MasteringOpenCV / code

Code for the book "Mastering OpenCV with Practical Computer Vision Projects" by Packt Publishing 2012.
Other
2.73k stars 1.65k forks source link

Distortion effect in Chapter 4 #14

Open Carlosco opened 11 years ago

Carlosco commented 11 years ago

Hi,

I have been debugging the example of chapter 4 and I have one doubt about how the distortion is managed in the code.

In the code there are some references to the undistortpoints function, but all of them are commented so I asume that no correction for distortion is done.

In the chapter I haven't either found any comment about this, and in the "Finding camera matrices" subchapter of the book the except code calculates the F matrix directly from the matched points.

As there is an option in the code to read the calibration parameters from file so I asume that no undistorted images have to be used.

The question is that the reprojection error that I have when using undistorted the images is a Little bit higher tan when I run the code directly. Does it make sense or I should check the calibration process ?

Another issue I have found is that in order to check if the essential matrix is properly computed, the determinant(E) is compared with 1e-07 but for big images (3972x2592), the determinant of K is so big that it makes to fail the comparation, even having a determinant(F) around 1e-21

Regards

Carlos