블로그 이미지
Leeway is... the freedom that someone has to take the action they want to or to change their plans.
maetel

Notice

Recent Post

Recent Comment

Recent Trackback

Archive

calendar

1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
  • total
  • today
  • yesterday

Category

2010. 9. 27. 01:47 Computer Vision
OpenCV: cvFindChessboardCorners or cv::findChessboardCorners

source code: https://code.ros.org/trac/opencv/browser/tags/2.1/opencv/src/cv/cvcalibinit.cpp
file:///opencv/src/cv/cvcalibinit.cpp


ref.
Learning OpenCV: Chapter 11 Camera Models and Calibration

V.Vezhnevets, A.Velizhev (Graphics and Media Lab, CMC department, Moscow State University) "GML C++ Camera Calibration Toolbox", 2005
http://graphics.cs.msu.ru/en/science/research/calibration/cpp


http://www.vision.caltech.edu/bouguetj/calib_doc/htmls/example.html


IplImage* cvGetImage(const CvArr* arr, IplImage* imageHeader)


cvCheckChessboard
source file: //opencv/src/cv/cvcheckchessboard.cpp

Dilate or cv::dilate

Flood-fill algorithm
http://en.wikipedia.org/wiki/Flood_fill


quad_count = icvGenerateQuads( &quads, &corners, storage, thresh_img, flags );


CvMemStorage* cvCreateChildMemStorage(CvMemStorage* parent)

StartFindContours

cvContourArea






routine:
"cvcalibinit.cpp": cvFindChessboardCorners()'s routine

1. gray-scale input image (option: CV_CALIB_CB_NORMALIZE_IMAGE | CV_CALIB_CB_NORMALIZE_IMAGE ) -> save "imgGray"


2. binarize the gray-scaled image

adative thresholding (option: CV_CALIB_CB_ADAPTIVE_THRESH) or thresholding by "image mean-10" or "10"




3. dilate the binarized image -> save "imgThresh"





4. find rectangles to draw white lines around the image edge -> save "imgRect"

 


1. check if a chessboard is in the input image

 

1) erode and dilate ( cvErode() & cvDilate() )

2) find a threshold value to make contours ( "flag" )
3) select contours to make quadrangles
4) check if there are many hypotheses with similar sizes ( floodfill

-style algorithm )

 

2. (if pattern was no found using binarization) multi-level quads

extraction


3. draw white lines around the image edges ( "thresh_image" )


4. compute corners in clockwise order


5. find the quadrangle's neighbors


6. find connected quadrangles to order them and the corners


7. remove extra quadrangles to make a nice square pattern


8. check if each row and column of the chessboard is monotonous


9. refine corner locations








1. check if a chessboard is in the input image

1) erode and dilate ( cvErode() & cvDilate() )
2) find a threshold value to make contours ( "flag" )
3) select contours to make quadrangles
4) check if there are many hypotheses with similar sizes ( floodfill-style algorithm )
2. (if pattern was no found using binarization) multi-level quads extraction
3. draw white lines around the image edges ( "thresh_image" )
4. compute corners in clockwise order
5. find the quadrangle's neighbors
6. find connected quadrangles to order them and the corners
7. remove extra quadrangles to make a nice square pattern
8. check if each row and column of the chessboard is monotonous
9. refine corner locations



 

 
 

posted by maetel