loading
 
Object Tracking is Slow
Austin Duff from United States  [8 posts]
7 years
Hello,

First of all GREAT job on this software! It's outstanding!

My problem is with my object tracking project. I'm doing a basic red object tracking routine, including red filter, COG, and arduino servo control using the Sparkfun Arduino module. Due to the ~1/4 second lag between moving the red object and the software reacting, the tracking abilities for even slightly fast moving objects is diminished. The object must move pretty slow so that the software can catch up, otherwise if the object exits the image before the software reacts, it loses it. I hope I explained it enough. It's not a bug, i'm just wondering what options I have to get better reaction time. I can get the FPS up to 50 FPS but there is no difference in the lag before the servos react. Here's a link to what kind of results I'm trying to achieve:

http://www.youtube.com/watch?v=kWG2EbhZUgc

This was using the cmucam3, which i know is embedded and therefore is much faster as it doesn't have to deal with alot of the processing RR uses. However RR has much more functionality and I would prefer to keep using it. So do you know of any way to improve reaction time? Thanks and again, GREAT JOB!

:) Austin
Anonymous 7 years
Austin,

Can you post the robofile that you are using to run this? We're not sure if it is a delay in the processing of the image or in the transmission to the Arduino system. Having exactly the configuration that you are using will help to determine this.

Thanks,
STeven.
Austin Duff from United States  [8 posts] 7 years
Sure here it is;

On the Arduino i'm using the example code that came with the SparkFun_Arduino Module.


program.robo
Austin Duff from United States  [8 posts] 7 years
I hate to bother, but any news yet?

Thank you
Anonymous 7 years
Austin,

We checked the latency to the Arduino and it appears to be reasonable ... how did you determine that the delay is 0.25 seconds?

There are a couple of tricks that you need to ensure that you don't lose track of an object.

1. As you have already done but others may not be aware, ensure that the FPS is ok and at least 15 fps. Check this by unclicking the Run button and see what the fps is. You may need more light to increase the fps.

2. Ensure that your camera is zoomed out as much as possible and that you are using as wide an lens angle as you have. Note that some webcams have a very sharp field of view which will cause the object to quickly disappear from the cameras view without any chance of following it.

3. Ensure that the modules are well tuned. Note that the Blob Filter module allows for multiple attributes in a single module to be tested ... we removed the two blob filters and just replaced then with one.

4. We updated the robofile that you were using to speed up the servo movements (removed the / by buffer) which helps the servo keep up. We also added in a better movement adjustment when the object moves from the bottom to the top of the image in one frame ... this normally indicates a quick object. We also added a 1.5 second lag where once the object is lost the servo still moves in the same direction for a bit. This is a kind of predictive movement which most animals do too.

See if the robofile below gives a different behavior.

STeven.
program.robo
Pratheesh Prakash from India  [2 posts] 7 years
Steven
            i tried your file with some small changes ....... and it worked like a breeze.... there is a small improvement... the camera searches for 1.5 second and if it doesnt find the object returns to the neutral position....
Thank You very much for the code....
this is the link

http://www.youtube.com/watch?v=WCu-159M7IE
Pratheesh Prakash from India  [2 posts] 7 years
try this file it has a different filter/.....
program.robo

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index