Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Large number of chessboard corners and camera calibration

I am implementing camera calibration using a chessboard pattern as the test image. However, I am having problems identifying corners when I use a large number of corners (18x27 inner corners. Identifying corners works fine when I use a smaller test pattern (6x9 inner corners). I've tried adding a white border to the image but to no avail.

Is there a limit as to how many corners can be detected using the OpenCV "FindChessboardCorners" function? Is there anyway I can find the corners for a large test pattern such as 18x27 for camera calibration?

My Python script is below but I don't think there should be any problems with it:

    img = cv.LoadImage(filename,cv.CV_8UC1)
    img2 = cv.LoadImage(filename,cv.CV_LOAD_IMAGE_COLOR)
    found,corners = cv.FindChessboardCorners(img,(17,26),0)
    corners2 = cv.FindCornerSubPix(img,corners,(5,5),(-1,-1),(cv.CV_TERMCRIT_EPS,0,0.001))
    cv.DrawChessboardCorners(img2,(17,26),corners2,found)
    cv.SaveImage(filename_corner,img2)

Large number of chessboard corners and camera calibration

I am implementing camera calibration using a chessboard pattern as the test image. However, I am having problems identifying corners when I use a large number of corners (18x27 inner corners. corners). Identifying corners works fine when I use a smaller test pattern (6x9 inner corners). I've tried adding a white border to the image but to no avail.

Is there a limit as to how many corners can be detected using the OpenCV "FindChessboardCorners" function? Is there anyway I can find the corners for a large test pattern such as 18x27 for camera calibration?

My Python script is below but I don't think there should be any problems with it:

    img = cv.LoadImage(filename,cv.CV_8UC1)
    img2 = cv.LoadImage(filename,cv.CV_LOAD_IMAGE_COLOR)
    found,corners = cv.FindChessboardCorners(img,(17,26),0)
    corners2 = cv.FindCornerSubPix(img,corners,(5,5),(-1,-1),(cv.CV_TERMCRIT_EPS,0,0.001))
    cv.DrawChessboardCorners(img2,(17,26),corners2,found)
    cv.SaveImage(filename_corner,img2)