debug assertion failed!!!!
调试,发现就出现在最后一个大括号,也就是析构出现了问题。view与view_gray,好奇怪!
void CCalibration::cvut_test()
{
ifstream fin("calibdata.txt");
ofstream fout("caliberation_result.txt");
int image_count=0;
CvSize image_size;
CvSize board_size = cvSize(14,14);
CvPoint2D32f* image_points_buf = new CvPoint2D32f[board_size.width*board_size.height];
Seq
string filename;
int count;
getline(fin,filename);
image_count++;
Image
if (image_count == 1) {
image_size.width = view.size().width;
image_size.height = view.size().height;
}
if (0 == cvFindChessboardCorners( view.cvimage, board_size,
image_points_buf, &count, CV_CALIB_CB_ADAPTIVE_THRESH ))
{
// cout<<"can not find chessboard corners!\n";
exit(1);
} else
{
Image
rgb2gray(view,view_gray);
cvFindCornerSubPix( view_gray.cvimage, image_points_buf, count, cvSize(11,11),
cvSize(-1,-1), cvTermCriteria( CV_TERMCRIT_EPS+CV_TERMCRIT_ITER, 30, 0.1 ));
image_points_seq.push_back(image_points_buf,count);
cvDrawChessboardCorners( view.cvimage, board_size, image_points_buf, count, 1);
view.show("calib");
cvWaitKey();
view.close();
}
delete []image_points_buf;
cout<<"角点提取完成!\n";
}