Why can't you change the Angle?

asked 2018-02-28 01:58:00 -0500

baihualinxin gravatar image

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);
    }

}
edit retag flag offensive close merge delete

Comments

can you delete duplicate post?

LBerger gravatar imageLBerger ( 2018-02-28 02:18:47 -0500 )edit