- python 3.x
- openCV 3.x
- open3D
- Numpy
- Image calibration: Calibrating with checkerboard method, get intrinsic parameter of camera.
- 3D Visualization: Visualize 3D using open3d with point cloud from depth map and RGB images.
Disparity map can be obtained between images, simply translated with X-axis. As depth and disparity are inversely propotional, we can estimate relative depth values then reconstruct 3D. The reconstucted 3D point clouds will be dense since depth can be inffered from disparity map, which is dense also.
With SIFT algorithm between two images, obtaining correspondence pairs is possible. We can find find 3D position which is the intersection of rays from each camera. The result 3D point clouds will be sparse in contrast to Disparity method since the position of points cab be calculated from feature points, which are also sparse.# Loop through each pixel in the image
for v in range(height):
for u in range(width):
# Apply equation in fig 4
x = (u - u0) * z / fx
y = (v - v0) * z / fy
z = depth[v, u]