开发者

OpenCV Error: Bad argument (Array should be CvMat or IplImage) in cvGetSize

I have successfully written a video processing program. I used ubuntu and Netbeans for programming. When I run this program on netbeans it runs perfectly and gives expected output.

I built executable file of this program both in debug and release mode and tried to run them in the command line. Now I get the following开发者_如何学运维 error. But Netbeans doesn't complain about this. Could someone point out what might be the problem?

OpenCV Error: Bad argument (Array should be CvMat or IplImage) in cvGetSize, file /home/<user>/trunk/opencv/modules/core/src/array.cpp, line 1238
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/<user>/trunk/opencv/modules/core/src/array.cpp:1238: error: (-5) Array should be CvMat or IplImage in function cvGetSize

thank you in advance


Can you check if the input argument to cvGetSize is:

  1. a NULL pointer? What is the result of querying/retrieving the frame?
  2. a CvSeq?
  3. a 1- or 3-dimensional array?

Usually it is the first.

That's the way OpenCV talks to you - it's more often the runtime exception than a compiler error.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜