Ask Your Question
0

Chessboard detection fails on fisheye image

asked 2016-11-20 00:48:36 -0600

jeremybub gravatar image

updated 2016-11-23 01:17:09 -0600

I am trying to perform calibration for a fisheye lens using the omnidir module. I am finding that the chessboards are not detected on many of the calibration images.

For example, here is an image that it fails on. Why would this be? it has no occlusion and good lighting. I also tried downsampling to half the resolution as I heard that might help. Using opencv3-3.1.0_3 on OSX.

image description

EDIT: After recompiling with DEBUG_CHESSBOARD enabled, I found that the issue was caused by the new binarization failing. The debug output shows what the old binarization algorithm would have given, and it's clear that the old algorithm gave the correct result.

Old binarization: image description

New binarization: image description

This seems like a bug in opencv, so I will report it.

edit retag flag offensive close merge delete

Comments

Omnidir is for a pinhole camera not fisheye. You should use http://docs.opencv.org/master/db/d58/...

LBerger gravatar imageLBerger ( 2016-11-20 07:34:46 -0600 )edit

No omnidir is for fisheye as well, as per the documentation: http://docs.opencv.org/trunk/dd/d12/t.... In any case chessboard detection is independent of the calibration and just depends on the raw image.

jeremybub gravatar imagejeremybub ( 2016-11-20 16:28:53 -0600 )edit

with image given may be you can have problem with this

LBerger gravatar imageLBerger ( 2016-11-21 01:04:28 -0600 )edit

Enabling DEBUG_CHESSBOARD shows that the binarization is failing. In fact, the old binarization work, but the new binarization fails. I have added example images to the question

jeremybub gravatar imagejeremybub ( 2016-11-22 22:12:31 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2016-11-23 03:08:00 -0600

LBerger gravatar image

updated 2016-11-23 03:11:52 -0600

Yes there is problem with your image with theresholding. Threshold found is 70 using icvBinarizationHistogramBased( Mat & img ). Using OTSU is 131. imho best results is near 120. Method use gradient of histogram and some thresold surface. In your image all method failed and thresold of 70 is used. I don't think it is a bug. Method need to be improved using a dataset of easy and difficult image...a good Pull Request

image description

Threshold 70

image description

Threshold OTSU (131)

image description

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-11-20 00:48:36 -0600

Seen: 1,879 times

Last updated: Nov 23 '16