Hi,
I use custom lenses and get quite big distortion. How can I find proper values of CLEYE_LENSCORRECTION1, CLEYE_LENSCORRECTION2 and CLEYE_LENSCORRECTION3 to correct it?
Currently this is a custom process, you may want to grab CCV 1.3 (ccv.nuigroup.com) which allows you to use sliders to fine tune your camera distortion. (Load CCV > Click Camera Settings on Right) It is in our roadmap however to automate this process.
After some testing I figured out that openCV may be used for getting those parameters; you need distortion_coeffs matrix, that you get from CvCallibrateCamera2(). Parameters are:
CLEYE_LENSCORRECTION1 = 255 * distortion_coeffs[0,0]
CLEYE_LENSCORRECTION2 = 255 * distortion_coeffs[1,0]
CLEYE_LENSCORRECTION3 = 255 * distortion_coeffs[4,0]
The factor (255) is my guess; I’m pretty sure it’s correct value.