griegler / pyrender

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyRender

This project contains a Cython version of librender by Andreas Geiger and Chaohui Wang 2014. The code enables the efficient rendering of depth maps from 3D triangle meshes.

To use the code, first compile the Cython code via

python setup.py build_ext --inplace

You can then use the rendering function

import pyrender
...
# vertices: a Nx3 double numpy array
# faces: a Nx3 int array (indices of vertices array)
# cam_intr: (fx, fy, px, py) double vector
# img_size: (height, width) int vector
depth, mask = pyrender.render(vertices, faces, cam_intr, img_size)

Make sure pyrender is in your $PYTHONPATH.

About


Languages

Language:C++ 70.6%Language:Python 29.4%