Ask Your Question
0

Stitcher calibration Assertion `!err.empty()' failed

asked 2014-05-16 06:24:27 -0600

watman gravatar image

Hi,

I am doing some real-time image stitching, using the Stitcher class. After starting the program, it runs for some time and then just exits with this message.

/tmp/buildd/ros-hydro-opencv2-2.4.6-3precise-20140303-2244/modules/calib3d/src/calibration.cpp:132: bool CvLevMarq::update(const CvMat*&, CvMat*&, CvMat*&): Assertion `!err.empty()' failed.

this is the part if the code where I call stitcher

cv::Stitcher st = cv::Stitcher::createDefault(false);
while (true) {
        cv::Stitcher::Status status = st.stitch(imgs, pano);
        if (status != cv::Stitcher::OK) continue;
        cv::imshow("stream", pano);
}

any help how could I avoid that, or at least explanation in which cases this assert fail

edit retag flag offensive close merge delete

Comments

It states that err is not empty so it crashes. Can you try to output err in each iteration?

StevenPuttemans gravatar imageStevenPuttemans ( 2014-05-16 06:53:09 -0600 )edit

I can't. It is somewhere in opencv library and I don't have access to it. All I've got is this code you see here.

watman gravatar imagewatman ( 2014-05-16 07:47:29 -0600 )edit
1

OpenCV sourcecode is here and can be build manually on each system. Gives you the perfect tools to dig out what is wrong... Looking at your error, it seems rule 132 is the only rule that actually does an assert on the err variable. It seems that the actual err variable is never initialised.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-05-16 08:16:02 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-05-16 13:17:49 -0600

watman gravatar image

Thanks, I will look into it.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-05-16 06:24:27 -0600

Seen: 548 times

Last updated: May 16 '14