Ask Your Question
2

findCirclesGrid NOT Working

asked 2012-10-25 09:45:26 -0600

ALLL gravatar image

updated 2012-10-30 22:59:53 -0600

Dear all,

I'm having problems with the function findCirclesGrid(): it never finds the circles and it returns always false.

This is the simple piece of code:

Mat imageMat = imread("Untitled.png");
Size patternsize(4,11);
vector<Point2f> centers;

bool found = findCirclesGrid( imageMat, patternsize, Mat(centers), CALIB_CB_ASYMMETRIC_GRID );

where Untitled.png is the following image http://robocraft.ru/files/opencv/acircles_pattern.png

[OpenCV2.3 + Visual Studio 2010 + 64bit]

Any suggestions?

Thanks,

ALLL

edit retag flag offensive close merge delete

Comments

The circlesgrid is a lot more sensitive to lighting differences than chessboard. We find that 25-35% of our images in a calibration sequence fail for no obvious reason.

mgb gravatar imagemgb ( 2012-10-25 14:11:16 -0600 )edit

@mgb Perhaps you should change parameters of a blob detector (see my answer below). In my experiments detection of the circle grid is more stable than chessboard.

Ilya Lysenkov gravatar imageIlya Lysenkov ( 2012-10-30 22:58:45 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2013-01-15 04:06:34 -0600

ALLL gravatar image

Thanks all for the replies.

edit flag offensive delete link more
4

answered 2012-10-30 22:55:31 -0600

Hi,

Circles that have big area are filtered out by default. Your image has rather high resolution and size of circles is bigger than the default threshold. You can change your code as this to get it working:

Mat image = imread("Untitled.png");
Size patternSize(4, 11);
vector<Point2f> centers;

SimpleBlobDetector::Params params;
params.maxArea = 10e4;
Ptr<FeatureDetector> blobDetector = new SimpleBlobDetector(params);

bool isFound = findCirclesGrid(image, patternSize, centers, CALIB_CB_ASYMMETRIC_GRID, blobDetector);

The main application of findCirclesGrid is camera calibration and so default parameters are tuned to eliminate false detections because it is much worse for calibration than several miss-detections. You can change parameters if they doen't satisfy you. For example, I use the following parameters with Kinect camera (VGA resolution):

SimpleBlobDetector::Params params;
params.minArea = 10;
params.minDistBetweenBlobs = 5;

Also I use the flag CALIB_CB_CLUSTERING. The pattern is detected in ~99% of my images with these parameters.

edit flag offensive delete link more

Comments

this code "Ptr<featuredetector> blobDetector = new SimpleBlobDetector(params);" I find have some problem . I use Openv3.3.0,must use creat() can complied succeed.like this "Ptr<featuredetector> blobDetector = SimpleBlobDetector::create(params);"

Winne King gravatar imageWinne King ( 2018-10-19 03:10:21 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2012-10-25 09:45:26 -0600

Seen: 14,865 times

Last updated: Jan 15 '13