Stitcher calibration Assertion `!err.empty()' failed
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
It states that err is not empty so it crashes. Can you try to output err in each iteration?
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.
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.