views:

38

answers:

1

Hi there,

I am wondering if there's any way I can track objects in Flash video using ActionScript? For example, let's say I would like to track a red ball, how can I do this? I have seen some examples using the OpenCV port but the examples shown are for face detection. And I can't seem to figure out what's the difference between the OpenCV port and the actual OpenCV library itself. Is it a full port?

Thanks!

A: 

Here's a class that might do what you want: http://blog.soulwire.co.uk/code/actionscript-3/webcam-motion-detection-tracking

Quasimondo
Mario? I have seen your work and I am impressed! Do you have any examples on tracking objects like a red ball instead of a face?
Tereno
Thanks! I do not have an example for tracking a red ball, but tracking a colored object like that is typically one of the easier tasks since by using the right colorMatrix you can already isolate the object pretty good from the background. Then you can find the location of the blob with a combination of floodFill and getColorBoundsRect. Here's a link that explains this technique: http://play.blog2t.net/fast-blob-detection/
Quasimondo