Ask Your Question

gtu's profile - activity

2014-11-14 08:40:50 -0600 received badge  Editor (source)
2014-11-13 00:13:19 -0600 commented question Camera calibration tutorial: assertion failed

no one knows that?

2014-11-11 10:01:49 -0600 received badge  Student (source)
2014-11-10 07:13:01 -0600 asked a question Camera calibration tutorial: assertion failed

Hi, I am developing an algorithm which measures dimensions of an object. I noticed that measurement error rises when moving out of image center. So I decided to calibrate my camera. I came across this tutorial.

The code I used is the same as in the tutorial AND in the openCV sample code directory (opencv\sources\samples\cpp\tutorial_code\calib3d\camera_calibration).

The program finds all needed files - the configuration file, list of image names, images. So that is not the problem.

When I run it, it throws an error:

Debug Assertion Failed!

Program: ---udio
2013\Projects\..\Debug\Calibration.exe
File: f:\dd\vctools\crt\crtw32\misc\dbgheap.c
Line: 1424

Expression: _pFirstBlock==pHead

For information on how your program can cause an assertion failure, see the VisaulC++ documentation on asserts.

The error seems to happen in the following statement:

  if (mode == CAPTURING)
        {
            if (s.showUndistorsed)
  (here)->      msg = format("%d/%d Undist", (int)imagePoints.size(), s.nrFrames);
            else
                msg = format("%d/%d", (int)imagePoints.size(), s.nrFrames);
        }

But it finds chessboard edges thou! image description

Then I commented it and the error showed up a little later.

The next thing I tried to create calibration all on my own. I wrote this program:

int main(){
Mat pic;
vector<Point2f> pointBuf;

pic = imread("images//f4.tiff");
namedWindow("Rezultat");

findChessboardCorners(pic, Size(9, 6), pointBuf);
drawChessboardCorners(pic, Size(9, 6), Mat(pointBuf),true);
imshow("Rezultat", pic);
waitKey(0);

}

And again, same thing. All functions seem to work properly, finds corners, draws them on the image, shows them, only when I want to close window on waitKey(), the program throws same error again.

I am very confused. Please help.

Thank you!

2014-11-10 07:12:56 -0600 asked a question Camera calibration tutorial: assertion failed

Hi, I am developing an algorithm which measures dimensions of an object. I noticed that measurement error rises when moving out of image center. So I decided to calibrate my camera. I came across this tutorial.

The code I used is the same as in the tutorial AND in the openCV sample code directory (opencv\sources\samples\cpp\tutorial_code\calib3d\camera_calibration).

The program finds all needed files - the configuration file, list of image names, images. So that is not the problem.

When I run it, it throws an error:

Debug Assertion Failed!

Program: ---udio
2013\Projects\..\Debug\Calibration.exe
File: f:\dd\vctools\crt\crtw32\misc\dbgheap.c
Line: 1424

Expression: _pFirstBlock==pHead

For information on how your program can cause an assertion failure, see the VisaulC++ documentation on asserts.

The error seems to happen in the following statement:

  if (mode == CAPTURING)
        {
            if (s.showUndistorsed)
  (here)->      msg = format("%d/%d Undist", (int)imagePoints.size(), s.nrFrames);
            else
                msg = format("%d/%d", (int)imagePoints.size(), s.nrFrames);
        }

But it finds chessboard edges thou! image description

Then I commented it and the error showed up a little later.

The next thing I tried to create calibration all on my own. I wrote this program:

int main(){
Mat pic;
vector<Point2f> pointBuf;

pic = imread("images//f4.tiff");
namedWindow("Rezultat");

findChessboardCorners(pic, Size(9, 6), pointBuf);
drawChessboardCorners(pic, Size(9, 6), Mat(pointBuf),true);
imshow("Rezultat", pic);
waitKey(0);

}

And again, same thing. All functions seem to work properly, finds corners, draw them on image, shows them, only when I want to close window on waitKey(), the program throws same error again.

I am very confused. Please help.

Thank you!

2014-11-10 07:12:52 -0600 asked a question Camera calibration tutorial: assertion failed

Hi, I am developing an algorithm which measures dimensions of an object. I noticed that measurement error rises when moving out of image center. So I decided to calibrate my camera. I came across this tutorial.

The code I used is the same as in the tutorial AND in the openCV sample code directory (opencv\sources\samples\cpp\tutorial_code\calib3d\camera_calibration).

The program finds all needed files - the configuration file, list of image names, images. So that is not the problem.

When I run it, it throws an error:

Debug Assertion Failed!

Program: ---udio
2013\Projects\..\Debug\Calibration.exe
File: f:\dd\vctools\crt\crtw32\misc\dbgheap.c
Line: 1424

Expression: _pFirstBlock==pHead

For information on how your program can cause an assertion failure, see the VisaulC++ documentation on asserts.

The error seems to happen in the following statement:

  if (mode == CAPTURING)
        {
            if (s.showUndistorsed)
  (here)->      msg = format("%d/%d Undist", (int)imagePoints.size(), s.nrFrames);
            else
                msg = format("%d/%d", (int)imagePoints.size(), s.nrFrames);
        }

But it finds chessboard edges thou! image description

Then I commented it and the error showed up a little later.

The next thing I tried to create calibration all on my own. I wrote this program:

int main(){
Mat pic;
vector<Point2f> pointBuf;

pic = imread("images//f4.tiff");
namedWindow("Rezultat");

findChessboardCorners(pic, Size(9, 6), pointBuf);
drawChessboardCorners(pic, Size(9, 6), Mat(pointBuf),true);
imshow("Rezultat", pic);
waitKey(0);

}

And again, same thing. All functions seem to work properly, finds corners, draw them on image, shows them, only when I want to close window on waitKey(), the program throws same error again.

I am very confused. Please help.

Thank you!