08-09-2013 06:57 AM
hello, i am using the vision acquisition, vision assistant and a webcam to be able to identify obejcts and to track them . i did that using the pattern identification inside the vision assistant but the problem is that the streaming is very slow. for example if i move my hand in a fast way in front of the webcam i don't see it in the image display is there a way to make it faster ? or it is an issue of my pc specifications(processor ,RAM) ?
and i have one more question regarding the identification ,for example if the obejct is in front of the webcam it will be easy to identify it, but if i move it a little bit far it wont be anymore identified, and sometimes if i move it to the right or to the left too . i tried to decrease the score but at some level it will start detecting other objects not the one mentioned in the template so is there a way to deal with this issue? or this is because i am using a webcam so i should use something else with higher resolution maybe? i need my program to keep tracking the object in a fast way even if i move it in any direction.
08-09-2013 02:10 PM
Hello,
on a image of size 512x512 pix, the time for template matching is approximately 2 ms (shift invariant) and 12 ms (rotation invariant).
This translates to 500 fps and 83 fps respectively (subpixel resolution adds 2-3 ms).
I don't think that the matching is a bottleneck, unless you are using huge images. Since its a webcam, i would say your maximum pixel resolution should be 640x480 (physical pixels, not the software resampled sizes).
Try using NI MAX to grab continuous stream of images from your webcam and observe the framerate. Also, what are your computer specifications?
About the tracking - pattern matching will not work since it is not scale invariant. You could learn templates for different scales or try using geometric matching (where you can specify the scale difference). The resolution has no impact on the matching. What are you trying to track? Tracking an object using pattern matching in different conditions could be tricky (depends on your setup, lighting, background, etc...). The most effective way to do this with pattern matching (or geometric matching) is to specify the ROI, where the object is currently located (in first iteration with mouse maybe? Or search for it in a position where you know it will be found). In every next frame, this ROI should be updated and the search performed only inside it. This will save you a lot of processing time and will make your tracking system more roboust.
There are quite a few techniques of tracking objects. The important thing is to select the right feature to track (color, edges, etc...). I suggest reading this excellent survey for starters:
http://crcv.ucf.edu/papers/Object%20Tracking.pdf
Best regards,
K