Is the normalization function in estimateFu​ndamentalM​atrix correct?

1 view (last 30 days)
I am having some problems in estimating the fundamental matrix from two images of a scene. I implemented the normalized 8 point algorithm described in Hartley and Zisserman book, as I was not aware that there already exists an in built function in MATLAB (estimateFundamentalMatrix). There are some differences in the results given by my function and the inbuilt function. Though, the inbuilt function describes itself as the same implementation of the described algorithm (from Hartley and Zisserman book). Moreover, since I am not getting the desired result, I am wondering where the problem lies.
Now on to describing my steps, I took two different view/images of a calibration pattern. This calibration pattern consists of two perpendicular planes, on which "chess board" image was printed. One of the plane was parallel to the ground and the other was perpendicular to the ground. The first step of the 8 point normalized algorithm is to normalize the input points. As mentioned, in the book of Hartley and Zisserman, this step is very crucial in order to estimate the fundamental matrix. The normalization steps consists of conditioning/normalizing the points so the centroid of the reference points is the origin and RMS distance from the origin is sqrt(2). Thus, in order to do so, (or equivalently transform our input distribution to normal distribution with mean zero) I applied the (X-mean)/sigma, where X is the "old" distribution and sigma is the standard distribution. Supposing X = [x1,y1], corresponding conditioning matrix can be written as T = [sqrt(2)/s(1),0,-sqrt(2)*m(1)/s(1); 0,sqrt(2)/s(2),-sqrt(2)*m(2)/s(2)]; where s = std(X) and m = mean (X).
When I compare the output of my normalization function and the in built MATLAB function (which is used in estimateFundamentalMatrix), both give different results. Hence the value of F calculated are different. Is my normalisation function wrong? Is it safe to assume that the inbuilt MATLAB function is correct, (because by using this F matrix, if I am recovering the 3D space coordinate of the point in the scene, it is not giving the correct coordinates).
keywords: Fundamental matrix, stereo, normalization, conditioning

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!