Ask Your Question

calibrate a camera and calculate the homography: assertion failed

asked 2012-09-13 12:01:47 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

Hello!! I've a problem. I compiled the camera-calibration-program and there were no errors / warnings.

When I run the calibration-program and try to calibrate the camera with the images that are in my disk, I get an error-message that says:

"Assertion Failed:dst.channels<>> in unkown function , file ....modules 
\core\src\convert.cpp, enter code here`line 1277" in the function cvConvertScale() 
and cvCalibrateCamera2()

these two images resumes the results, after a click on continue in the image 1: image description

image description

all the images appear one by one on the screen, but no output-file is generated.

Thanks for help in advance.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2012-09-13 16:52:40 -0500

AgentCain gravatar image

Somewhere in your code (well, somewhere you're using a convertion since convert.cpp fails) you're using a function in which the source matrix isn't the same as the destination matrix in terms of mat.size or/and mat.channels (maybe one of them has different dimensions, maybe its uninitiallized, maybe one is RGB when the other one is grayscale etc). Thats why it says ASSERTION FAILED (src.size==dst.size && src.channels==dst.channels)

edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2012-09-13 12:01:47 -0500

Seen: 2,120 times

Last updated: Sep 17 '12