¿ How to use Image.track() and CAMShift on SimpleCV ?

asked 2012-09-19 07:16:44 -0500

marco619 gravatar image

updated 2012-09-19 07:43:10 -0500

Hi to everyone , I'm trying make a : traking object proyect with simplecv for my university , but I found there is : Image.track() and CAMShift , for track objects, but , there is not examples about how to use them. So :

¿Can anyone please post a example about how to use : Image.track() and CAMShift on simplecv ?

I follow the help on the SimpleCV Shell but i got errors again and again as follow :

   OpenCV Error: Bad argument (Input window has non-positive sizes) in cvMeanShift, file /build/buildd/opencv-2.3.1/modules/video/src/camshift.cpp, line 81
ERROR: 
Traceback (most recent call last):
  File "test.py", line 19, in <module>
    ts = img.track( "camshift", ts, img0, bb )
  File "/usr/local/lib/python2.7/dist-packages/SimpleCV/ImageClass.py", line 10907, in track
    new_ellipse, track_window = cv2.CamShift(prob, bb, term_crit)
error: /build/buildd/opencv-2.3.1/modules/video/src/camshift.cpp:81: error: (-5) Input window has non-positive sizes in function cvMeanShift

Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
  File "/usr/local/lib/python2.7/dist-packages/SimpleCV/Camera.py", line 26, in run
<type 'exceptions.TypeError'>: 'NoneType' object is not iterable

I've read this links about tracking :

http://help.simplecv.org/question/682/centre-tracking-of-an-object/

http://jayrambhia.wordpress.com/2012/07/13/camshift-with-simplecv/

But I cannot understand it because there is not a example about how to use : Image.track() and CAMShift on simplecv code.

Thanks.

edit retag flag offensive close merge delete