Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why can't you change the Angle?

Image_points has detected the number of angles and x, y.

   UIImage *image=[UIImage imageNamed:[NSString stringWithFormat:@"%d",1]];    
    cv::Mat imageInput;
    UIImageToMat(image, imageInput);

 bool ok = cv::findChessboardCorners(imageInput, cv::Size(board_width, board_height), image_points,cv::CALIB_CB_ADAPTIVE_THRESH |  cv::CALIB_CB_NORMALIZE_IMAGE);
    if (ok==false) {

    }else{
        cv::Mat view_gray;
         cv::cvtColor(imageInput, view_gray, cv::COLOR_BGR2GRAY);
           UIImage *images=MatToUIImage(view_gray);
        cv::TermCriteria criteria = cv::TermCriteria(
                                                     cv::TermCriteria::MAX_ITER + cv::TermCriteria::EPS,
                                                     30,
                                                     0.1);
        cv::cornerSubPix(view_gray, image_points, cvSize(5,5), cvSize(-1,-1), criteria);
        image_points_seq.push_back(image_points);

        cv::drawChessboardCorners(imageInput, cv::Size(board_width, board_height), image_points, true);
        UIImage *image=MatToUIImage(imageInput);
    }

}