Ask Your Question

nikitos1550's profile - activity

2015-03-17 13:01:51 -0600 asked a question CirclesGridFinderParameters values meaning


What are these parameters for? What is meaning of each of them?

  minDensity = 10;
  densityNeighborhoodSize = Size2f(16, 16);
  minDistanceToAddKeypoint = 20;
  kmeansAttempts = 100;
  convexHullFactor = 1.1f;
  keypointScale = 1;

  minGraphConfidence = 9;
  vertexGain = 2;
  vertexPenalty = -5;
  edgeGain = 1;
  edgePenalty = -5;
  existingVertexGain = 0;

  minRNGEdgeSwitchDist = 5.f;
  gridType = SYMMETRIC_GRID;
2015-03-17 12:59:55 -0600 asked a question How to add parameter to findCircleGrid and export it to Python cv2 api?


I want to add CirclesGridFinderParameters to findCirclesGrid Something like this:

bool cv::findCirclesGrid( InputArray _image, Size patternSize,
                      OutputArray _centers, int flags, const Ptr<FeatureDetector> &blobDetector, 
          CirclesGridFinderParameters parameters2)

And I want to have ability to create CirclesGridFinderParameters struct into Python cv2 api.

What is the right way to do this?

2015-03-17 12:55:44 -0600 commented question findCircleGrid detection, how to debug?

Problem solved!

2015-02-26 10:00:47 -0600 commented question findCircleGrid detection, how to debug?

Thanks, I will prepare image tomorrow.

2015-02-22 02:42:36 -0600 received badge  Editor (source)
2015-02-22 02:41:10 -0600 asked a question findCircleGrid detection, how to debug?


First of all - I am using opencv 2.4.10 on Ubuntu 14.04 (amd64), built from sources. I use python binding for my tests.

I am calibrating camera using circles grid (symmetric) and then looking for the same circle grid pattern to calculating distance. Usually I use 5x3/6x4 pattern, total dimensions of pattern from A4 paper up to 1m x 1m sized. Camera is 1/2.7 CMOS IPcam (so, I am catching h.264 stream yuv420, not any kind of row data, bitrate from 3 up to 20 mbits, so no bugs on image) resolution is 1920x1080. Lenses are about 2mm focus and 6mm focus.

I have found next problem, opencv can not detect pattern when I see on image ceil of one of my office rooms (I have different cases somewhere it is detecting very well, somewhere it is not detecting at all). Ceil is like grid of squares (later today, I can attach images to this thread). I have spent a few hours understanding, why previously good detection doesn`t work.

I have looked into sources of findCirclesGrid:

  • findCirclesGrid itself placed in modules/calib3d/src/calibinit.cpp
  • All related functions are in modules/calib3d/src/circlesgrid.cpp

So, I want to understand how findCirclesGrid works and find out some ways to debug and improve it. I don`t think I can improve it generally, but I can use such tricks, as tuning parameters for my pattern or add some pre detection of area where pattern is placed and then execute findCirclesGrid only for subarea of total image.


  1. circlesgrid.cpp has #ifdef DEBUG_CIRCLES, if turn it on, it produce 1 warning and 3 errors, but them easily can be fixed. I turned it on, rebuilt opencv, but can`t see any difference, maybe it debug some logic, that is not used in my case. What is DEBUG_CIRCLES for?

  2. There are CirclesGridFinderParameters parameters. What are they for? I think it is possible to add another option for findCirclesGrid and set different values.

  3. There is const Ptr<featuredetector> &blobDetector option for findCirclesGrid. What is it for? What is possible values? As I listened somewhere before, It uses SimpleBlobDetector, but how "good" is it? Are there other blob detectors in opencv?

  4. Where I can learn how circle grid finder works, except the sources?

  5. Is it possible to see any debug info? For example all circles, that method have found and so on, to better understand, why it can`t recognize pattern.

P.S. I use circle grid, but not chessboard, because chessboard detection is very very slow, but I need to have (in best case) as more fps as possible.

And I would be happy to learn any other your ideas about described above. Thanks!