|
Re: [Ri3D] Help BOOM DONE. Rpi Camera Tips and Tricks
I did a lot of work last summer on Camera Tracking using the Pi and BeagleBone Black. I was using python OpenCV because I didn't know C++. On the Pi, just running a morphology and threshold on an image took about 100ms at stock speed. overclocking the Pi to around 1GHz brought that down to 90ms. So doing any kind of processing on the pi is going to take most likely around 150ms - 200ms including grabbing the image and sending the data to the robot.
I never did the full loop on the Pi, so I dont have an exact answer. I did get it working on the BBB however, and running the entire tracking takes about 55ms. This was using the IP camera that comes in the KOP.
Running this on the DS if powerful enough can do all the calculations in about 1ms. If running over WiFi, I calculated about 5ms transfer time, vs about 1ms transfer wired. So from acquiring the image, every 33ms, the processed data will hit the robot about 15ms later. So unless you hit a large lag spike, tracking on the DS will have alot less latency.
Remember that you can run OpenCV on the DS in windows, and it should work the same as running on linux.
If you really want it onboard, you can also mount a laptop directly on the robot and do that too.
Next year we are thinking about doing the Beaglebone black method, because 100ms delay is not much for our purposes. But the code will be runnable on the DS as a backup.
__________________
All statements made are my own and not the feelings of any of my affiliated teams.
Teams 1510 and 2898 - Student 2010-2012
Team 4488 - Mentor 2013-2016
Co-developer of RobotDotNet, a .NET port of the WPILib.
|