Converts an image into 3d mesh using depth map of the image.
- Opencv - Required for reading image
- Numpy - Required for storing image & for matrix operations
$ python depthTo3d.py <input-image> <input-depth> <output-ply-file> <fx> <fy> <cx> <cy>
$ python depthTo3d.py sofa.jpg sofa_depth.png s.ply 1148.93617021 1150.38461538 750 500
- Use texture mapping
- Smooth generated meshes
- Estimate position of the lights in the scene
- Estimate material properties
- Extract depth using single image
from reconstruct import reconstruct3d
from ply import *
mesh = reconstruct3d(image,depth_map,camera_parameters, step = 1, mesh = True, transformation = None)
mesh.save('out.ply', color = 'texture')