It seemed that I am the only one who got this problem with Opencv 2.4.3.
http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html The following codes are published on that official website:
Size patternsize(8,6); //interior number of corners Mat gray = ....; //source image vector<Point2f> corners; //this will be filled by the detected corners //CALIB_CB_FAST_CHECK saves a lot of time on images //that do not contain any chessboard corners bool patternfound = findChessboardCorners(gray, patternsize, corners, CALIB_CB_ADAPTIVE_THRESH + CALIB_CB_NORMALIZE_IMAGE + CALIB_CB_FAST_CHECK); if(patternfound) cornerSubPix(gray, corners, Size(11, 11), Size(-1, -1), TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1)); drawChessboardCorners(img, patternsize, Mat(corners), patternfound); gray is Mat, and it is directly used as void*
But on my visual studio 2010, it kept saying Error
Error 1 error C2664: 'cvFindChessboardCorners' : cannot convert parameter 1 from 'cv::Mat' to 'const void *' 22 And, I have tried the following, but still the same error.
static_cast<void*>(gray) Error 1 error C2440: 'static_cast' : cannot convert from 'cv::Mat' to 'void *' 21 (void*)gray Error 1 error C2440: 'type cast' : cannot convert from 'cv::Mat' to 'void *' 21 I m using OpenCV 2.4.3. Please help.