I am working on Structure from Motion. I have did the following steps till now.
- Feature Matching
- Fundamental Matrix
- Essential Matrix
- Camera Matrix P
- From triangulation, I got Point3d type values for all the matched features. I stored this in pointcloud variable.
- Bundle adjustment, optimize the pose and pointcloud.
- Add more views to reconstruct.
The problem occurs at 7, such as having 3 images i.e. 1,2,3. And point_1 correspondences to point_2. And point_2 correspondences to point_3. point_1, point_2, point_3 in image_1, image_2, image_3 respectively.
After triangulation, point_1 and point_2 get result worldPoint_1 point_2 and point_3 get result worldPoint_2
wordldPoint_1 and worldPoint_2 should be the same because Point_1,2,3 are the same observation of real-world point. But, because noise exists, worldPoint_1 and worldPoint_2 are not equal.
So my question is that how to merge point cloud after add new image to reconstruct and do triangulation.