CLEYE_LENSCORRECTION - where to get it from?
Posted: 06 July 2010 01:40 AM   [ Ignore ]
New Member
Rank
Total Posts:  3
Joined  2010-02-26

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?

Thanks in advance

Profile
 
 
Posted: 06 July 2010 03:24 PM   [ Ignore ]   [ # 1 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  162
Joined  2009-09-17

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.

Profile
 
 
Posted: 07 July 2010 05:41 AM   [ Ignore ]   [ # 2 ]
New Member
Rank
Total Posts:  3
Joined  2010-02-26

Are those parameters same as or related to those in OpenCV (k1, k2 and k3 from CvCalbobrateCmera2 method)?

Profile
 
 
Posted: 10 July 2010 12:28 PM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  585
Joined  2009-09-17

Yes they are radial distortion coefficients based on the same barrel distortion formula used on OpenCV.
The mapping is as following:


x’ = x * (1 + k1*r^2 + k2*r^4 + k3*r^6)
y’ = y * (1 + k1*r^2 + k2*r^4 + k3*r^6)

Profile
 
 
Posted: 10 July 2010 01:19 PM   [ Ignore ]   [ # 4 ]
New Member
Rank
Total Posts:  3
Joined  2010-02-26

If anyone has same problem:

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.

Profile
 
 
Posted: 14 July 2010 09:40 PM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  585
Joined  2009-09-17

mruce,

Thanks for posting this information, I’m sure it will be useful to a lot of people interested in lens calibration.

Profile
 
 
 
 


RSS 2.0     Atom Feed