3
votes

I have some images captured from an wide angle appx. (180 degree) camera. I am using opencv 2.4.8 which gives some details about camera matrix n distortion matrix.

MatK = [537.43775285, 0, 327.61133999], [0, 536.95118778, 248.89561998], [0, 0, 1]
MatD = [-0.29741743, 0.14930169, 0, 0, 0]

And this info I have used further to remove the distortion. But the result is not as expected. I have attached some input images of chess board which i have used to calibrate. Or Is there any other tools or library by which it can be removed.

input images

testImg1

testImg2testImg3testImg4

from a Normal Camera or even captured by my smart phone without Distortionwithout Distortionwithout Distortion

3
is that pattern really planar? the distortion looks very very strange. or did you use very bad mirror (e.g. coated light bulb) to get the wide-angle image? - Micka
Micka, its a COP CG180 Camera 180 degree Wide Angle lens and not the mirror. - Javed
Yes It is planer, check out some other images of the same board from other camera, now any idea about the same ? - Javed
looks like the lens is crap... - Micka

3 Answers

4
votes

This is not an answer to the question, but something about the "discussion" of distortion and planarness.

In reality you have some straight lines on a pattern:

enter image description here

With (nearly any) lens you'll get some kind of distortion so that those straight lines aren't straight anymore after projection to your image. This effect is much stronger for wide angle lenses. You could expect something like this (for wide angle stronger but similar):

enter image description here

But the images you provided look more like this, which can be because of your pattern wasnt really planar on the ground, or because the lens has some additional "hills" on your lens.

enter image description here

1
votes

The whole point of the calibration process is to tell OpenCV what a straight line looks like under distortion. A chess board is used to present a number of straight lines that are easy for OpenCV to detect. In your image, these lines are simply not straight. I'm moderately sure that OpenCV also needs square boxes.

So, use a real chess board pattern. Print it out, glue it to a piece of wood or hard plastic or whatever. But make sure it's a regular chessboard pattern on a level plane.

0
votes

The most common method (used by the Oculus Rift Runtime for example) draws a fine enough textured grid for which the texture coordinates or the grid node positions are chosen to compensate the distortion. To obtain the grid normally one fits a polynomial or a spline to some reference picture. For example the checkerboard in your camera is a common calibration target.