Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 695 Bytes

README.md

File metadata and controls

24 lines (18 loc) · 695 Bytes

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.