3D model from stereo Video
pip install opencv-python
pip install open3d
Run the script.
The depth map will appear on the screen next to the original video.
At any point, press SPACE to display 3D model of the frame as a point cloud. The camera position will appear as a red dot.
Basically, stereo matching with intensity threshold.
- First pixels with intensity higher than the image mean intensity divided by three are removed (as background).
- Pixels in the bottom of the screen are filtered as floor.
- Stereo matching is applied.
- Disparity map converted to Z map.
- Points with negative or very high Z values are filtered.
- XYZ map and depth map are constructed.