@@ -8,12 +8,12 @@ int main(void)
88 int n_views = 5 ;
99
1010 // Load multiple views of 'box.xyz'
11- // c.f. You need to run 'image_generation %02d.cpp' to generate point observation.
11+ // c.f. You need to run 'image_formation %02d.cpp' to generate point observation.
1212 // You can apply Gaussian noise by change value of 'camera_noise' if necessay.
1313 std::vector<std::vector<cv::Point2d> > xs;
1414 for (int i = 0 ; i < n_views; i++)
1515 {
16- FILE* fin = fopen (cv::format (" image_generation %d.xyz" , i).c_str (), " rt" );
16+ FILE* fin = fopen (cv::format (" image_formation %d.xyz" , i).c_str (), " rt" );
1717 if (fin == NULL ) return -1 ;
1818 std::vector<cv::Point2d> pts;
1919 while (!feof (fin))
@@ -26,6 +26,8 @@ int main(void)
2626 xs.push_back (pts);
2727 if (xs.front ().size () != xs.back ().size ()) return -1 ;
2828 }
29+
30+ // Assume that all feature points are visible
2931 std::vector<int > visible_all (xs.front ().size (), 1 );
3032 std::vector<std::vector<int > > visibility (n_views, visible_all);
3133
@@ -37,7 +39,7 @@ int main(void)
3739 Rs.push_back (cv::Mat::eye (3 , 3 , CV_64F)); // R for the first camera (index: 0)
3840 ts.push_back (cv::Mat::zeros (3 , 1 , CV_64F)); // t for the first camera (index: 0)
3941
40- // Esitmate relative pose of the inital two views
42+ // Estimate relative pose of the inital two views (epipolar geometry)
4143 cv::Mat F = cv::findFundamentalMat (xs[0 ], xs[1 ], cv::FM_8POINT);
4244 cv::Mat E = K.t () * F * K;
4345 cv::Mat R, t;
0 commit comments