Skip to content

This tool takes a mesh file as its input and outputs an RGB image and a depth image.

Notifications You must be signed in to change notification settings

nsalminen/mesh2rgbd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mesh2rgbd

This tool takes a mesh file as its input, and outputs an RGB image and a depth image. It is based on face3d by YadiraF.

Structure

mesh2rgbd/mesh/        # written in python and c++
|  cython/               # c++ files, use cython to compile 
|  io.py                 # read & write obj
|  vis.py                # plot mesh
|  transform.py          # transform mesh & estimate matrix
|  light.py              # add light
|  render.py             # obj to image using rasterization render

Getting Started

Prerequisites

  • Python 2 or Python 3

  • Python packages:

    • numpy

    • skimage

    • scipy

    • matplotlib

    • cython

    • tiffile

    • pyrender

    • scikit-image

    • plyfile

Usage

  1. Clone the repository

    git clone https://github.com/nsalminen/mesh2rgbd
    cd mesh2rgbd
  2. Compile the C++ files to .so for Python use

    cd mesh2rgbd/mesh/cython
    python setup.py build_ext -i 
  3. Refer to render_mesh.py for a basic example.

About

This tool takes a mesh file as its input and outputs an RGB image and a depth image.

Topics

Resources

Stars

Watchers

Forks