Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Does the drawchessboardcorner method work?

cv::Size board_size=cv::Size(8, 6);

int board_width=board_size.width; int board_height=board_size.height; 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);
}

}

Does the drawchessboardcorner method work?

cv::Size board_size=cv::Size(8, 6);

int board_width=board_size.width; int board_height=board_size.height; 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);
}

}

Does the drawchessboardcorner method work?

cv::Size board_size=cv::Size(8, 6); int board_width=board_size.width; int board_height=board_size.height; 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);
}

}

Does the drawchessboardcorner method work?

cv::Size board_size=cv::Size(8, 6); int board_width=board_size.width; int board_height=board_size.height; 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);
            }

     }

}