Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to calculate the fundamental matrix for stereo vision
    primarykey
    data
    text
    <p>I'm trying to write some code that will calculate the fundamental matrix to determine the relationship between stereo images. I started with the Hartley and Zisserman book that most people recommend, but it didn't have any practical examples and the sample code for it was in MATLAB which I don't have. I then switched to <a href="http://books.google.com/books?id=tS3RMy2ay3gC&amp;pg=PT69&amp;lpg=PT69" rel="noreferrer">An introduction to 3D Computer Vision Techniques and Algorithms</a> which is more practical and has actual examples in it. I implemented the recommended 8-point algorithm using Python and numpy, but I'm having trouble verifying the validity of it.</p> <p>I'm using the dataset listed on page 48 (use that link above to see a Google Books excerpt) of that book. When I normalize the points, I get the same results as that book. However, when I use numpy's SVD function to calculate the fundamental matrix, I get the following value for F:</p> <pre><code>[[-0.01851684 -0.21631176 -0.67036356] [ 0.2605251 -0.01023853 0.14234079] [ 0.63748775 -0.09404508 -0.00220713]] </code></pre> <p>This matrix satisfies the equation <strong>p_R^ * F * p_L = 0</strong> so it seems correct. However, it is very different from the matrix calculated in the book. I tried to double check the answer using OpenCV's cv.FindFundamentalMat() and I got a third answer:</p> <pre><code>[[ 22.98129082 271.46453857 853.74273682] [-334.1673584 -4.84123087 -175.99523926] [-809.88891602 125.99833679 1. ]] </code></pre> <p>I'm not how those other two matrices are calculated, but I can't find any examples of fundamental matrix calculation on the web to verify my implementation of the 8-point algorithm. The fact that my implementation returns a value that satisfies the equation gives me confidence, but I'm worried that I did something silly which is why I can't match the results in the book or by OpenCV.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload