source code: https://code.ros.org/trac/opencv/browser/tags/2.1/opencv/src/cv/cvcalibinit.cpp
file:///opencv/src/cv/cvcalibinit.cpp
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)
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
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 )
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
'Computer Vision' 카테고리의 다른 글
OpenCV: Random Trees (0) | 2010.10.12 |
---|---|
variational principle (0) | 2010.10.01 |
OpenCV: cvThreshold() 함수 연습 (0) | 2010.09.26 |
Dazhi Chen & Guangjun Zhan, "A New Sub-Pixel Detector for X-Corners in Camera Calibration Targets" (0) | 2010.09.26 |
Luca Lucchese & Sanjit K. Mitra "Using saddle points for subpixel feature detection in camera calibration targets" (0) | 2010.09.26 |