3D rendering in OpenCV
opencv
Solution
For the 3D part, you can render your scene with OpenGL or with PCL. You've two solutions:
- For each pixel, you make a point with the right color extracted from the camera's image. This will give you a point cloud which can be processed with PCL (for 3D features extraction for example).
- You apply a triangulation algorithm, but in order to apply this algorithm you must have the extrinsic matrices of your camera.
You can find more information about these techniques here:
- Point Cloud technique
- Triangulation algorithm
If you want to use OpenGL, you have to open a valid OpenGL context. I recommend you the SFML library or Qt. These libraries are very easy to use and have a good documentation. Both have tutorials about 3D rendering with OpenGL.
Problem
I am doing a project on 3D rendering of a scene. I am using OpenCV. The steps I am doing are like this: - Taking two images of a scene. - Calculating object correspondence using SURF feature matching. - Calculating camera fundamental matrix. - Calculating the Disparity image. Now I have two questions After calculating fundamental matrix how can I calculate the Q matrix? (I can't calibrate the camera) How can I render in 3D using opencv or any other library?