Camshift error - Input window has non-positive sizes

asked 2015-05-03 20:59:29 -0500

choi gravatar image

Hello!

I am a student of University of Seoul, Korea.

I am making a tracking robot. And I search a camshift code here : http://www.computervisiononline.com/b...

He use a camshift in OpenCV.

But when an object moving fast, an error was occured. An error is :

error: ........\opencv\modules\video\src\camshift.cpp:80: error: (-5) Input
window has non-positive sizes in function cvMeanShift

And the problem section in the camshift.cpp is :

if( windowIn.height <= 0 || windowIn.width <= 0 )
CV_ERROR( CV_StsBadArg, "Input window has non-positive sizes" );

I think this error occured when meanshift is fail to track the object.

How can is fix this problem? Should I add some init codes are there?

Could you specifically tell me about this? It will be very helpful to me. Thanks in advance!

edit retag flag offensive close merge delete