0

I am trying to calibrate a fish eye lens using opencv.

After capturing some images and using sample code that comes with opencv. I am getting these images:

enter image description here

This image is undistorted as follow:

enter image description here

Why is this happening and how can I fix it?

Cœur
  • 37,241
  • 25
  • 195
  • 267
mans
  • 17,104
  • 45
  • 172
  • 321
  • opencv uses a pinhole-camera model for calibration. it probably just don't work with a real fish-eye lens – berak Feb 26 '14 at 09:52
  • @berak: Thanks. So how can I undistorted a fisheye lens with opencv? – mans Feb 26 '14 at 09:56

2 Answers2

1

I got the same problem before. The default (pin-hole) model didn't work well with very wide-angle lens. You should try fisheye model.

Kevin Kuei
  • 193
  • 2
  • 17
0

You need to move your camera closer to the pattern, so that the pattern can cover more than half of the image.

Or, you need to print a larger size pattern (such as A0-size if possible), which will give you a very accurate result.

Dan Bechard
  • 5,104
  • 3
  • 34
  • 51