Ask Your Question

findchessboardCorners result

asked 2013-09-09 04:49:03 -0600

engine gravatar image


I have a chessboard where its height equal to its width, and I need to know how to change for example a recognized chessboard let's say a 3 rows to 3 columns, here a an example of a code a the result it may help you understanding my question :

int main () {
    cv::Mat frame;
    cv::Size board(3,3);
    cv::vector<cv::Point2f> imageCorners;
    cv::VideoCapture cap (0);
    int key =0;

    while(key != 27){
        cap >> frame;
        key = cv::waitKey(10);

    return 0 ;

columns vector

rows vector

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-09-09 06:37:06 -0600

efanucar gravatar image

updated 2013-09-09 06:38:26 -0600

I don't know if I understand your question correctly...but: The size "board" you set as the parameter for findChessboardCorners does not correspond to the squares but to the inner corner points. So if you want to cover 3 x 3 squares you need to set the size to (4,4) - you will then find 4 inner corner points made up by 5 squares.

edit flag offensive delete link more

Question Tools


Asked: 2013-09-09 04:49:03 -0600

Seen: 651 times

Last updated: Sep 09 '13