Hi guys,
as in the previous topics I made I'm still working on self calibration stuff. I'm generating the data for the evaluation but I end out with some strange error computing the residual error as defined here slide 31. But maybe I'm using the wrong function to compute the norm. The resulting residual error is absurd, while the epipolar equation x'Fx=0 give to me a residual of 0.25 so I suppose is almost perfect. I've points correspondences for image L and R and the fundamental matrix. Actually I'm doing in this way, I don't care that it isn't efficient since is not important, is just for data generation.
cv::Mat temp_point_1 = cv::Mat(3,1,CV_64F);
temp_point_1.at<double>(0,0) = featuresL.at(i).x;
temp_point_1.at<double>(1,0) = featuresL.at(i).y;
temp_point_1.at<double>(2,0) = 1;
cv::Mat temp_point_2 = cv::Mat(3,1,CV_64F);
temp_point_2.at<double>(0,0) = featuresR.at(i).x;
temp_point_2.at<double>(1,0) = featuresR.at(i).y;
temp_point_2.at<double>(2,0) = 1;
double resError = cv::norm(temp_point_2-(fundamentalMat*temp_point_1))
+ cv::norm(temp_point_1-(fundamentalMat.t()*temp_point_2));
I would like to find the residual error, is there any built in function to do that? I've looked on the documentation but I've not find it.