Ask Your Question

Error with running segmentation related to cv.Convert

asked 2013-01-04 22:37:54 -0500

cipher gravatar image

updated 2013-01-04 22:39:05 -0500

I am working on creating a motion tracking system it was working fine but i observed that when there was too much commotion in the video, i got this error. I am using running segmentation, I have seen some examples that utilize the same. Once I grab the blobs, I process them. I am wondering what am i doing wrong. Here's the error:

WARNING: Holy Heck! You tried to make an image really big or impossibly small. I can't scale that
Traceback (most recent call last):
  File "C:\MotionTrack\TrackSubversioned\", line 233, in <module>
  File "C:\MotionTrack\TrackSubversioned\", line 169, in run
  File "C:\Python27\lib\site-packages\SimpleCV\Segmentation\", line 54, in addImage
  File "C:\Python27\lib\site-packages\SimpleCV\", line 1584, in getFPMatrix
TypeError: CvArr argument 'src' must be IplImage, CvMat or CvMatND. Use fromarray() to convert numpy arrays to CvMat or cvMatND
edit retag flag offensive close merge delete


As the warning suggests your image dimensions are really low or off the charts. But there could be some other error. If you could give a link to your code, someone might be able to debug it.

jayrambhia gravatar imagejayrambhia ( 2013-01-05 00:37:05 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-01-29 19:03:47 -0500

cipher gravatar image

I found out that when the video ends , the next image i get from


is of zero size. So currently I set display.done to True and exit the script:

                rsError += 1
                print "Running Segmentation Error:", rsError, "Times."
                if rsError <50:
                    print "max error level reached, probably video ended here!, quitting"                    
                    self.disp.done = True

I am wondering if there is a way in SimpleCV to check if video stream being processed has ended and to exit in that event?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-01-04 22:37:54 -0500

Seen: 615 times

Last updated: Jan 29 '13