Skip to content

Instantly share code, notes, and snippets.

@walidvb
Created January 19, 2013 17:52
Show Gist options
  • Save walidvb/4573915 to your computer and use it in GitHub Desktop.
Save walidvb/4573915 to your computer and use it in GitHub Desktop.
// number of corners on the chessboard
Size boardSize(6,5);
//init the system
CalibController calibControl(boardSize);
//Load the images
string filePath = "/Users/Gaston/dev/RDC/tmp/IMG_0701.JPG";
Mat image = imread(filePath, CV_LOAD_IMAGE_COLOR);
//Resize the images to a more reasonable size before treatment
Mat dst;
// output vectors of image points
std::vector<cv::Point2f> imageCorners;
// Get the chessboard corners
bool found = findChessboardCorners(image, boardSize, imageCorners);
//Draw the corners
drawChessboardCorners(image, boardSize, imageCorners, found); // corners have been found
resize(image, image, Size(800, 800*image.size().height/image.size().width) );
//image = calibControl.getRealImage(image);
//Draw the image
imshow( "Display window", image ); // Show our image inside it.
cvWaitKey(0);
cvDestroyWindow("Display window");
return 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment