Question on processing data

This forum is used for discussing hardware, software, and technical details of the AVRcam embedded system.

Question on processing data

Postby naveed » Tue Feb 07, 2006 2:10 pm

Hello, I was referred here by a post on some google groups discussion, you may recall we are the group that is building the robo hockey project.

Ok I will be honest, in all my years of schooling, this is the first I've had experiance with image processing via a camera, from what I have read on the AVRcam manual, and other literature throughout the sites, here are my few questions.

First, I know that the camera is capable of detecting a bright orange puck on a black top air hockey table. That said, what will it do with the data? If the table is 4 feet long, I'll need to mount the camera a few feet above the table to get the whole table, will the resolution limits hurt my frame rate? By how much?

We need to acquire data fast enough so that we can calculate future position, and send this information to another team, who will be controlling the actual device to block/return the puck.

What kind of data will I get? I am not entirely sure what the results would be, will the device define a coordinate system based on the bounding box, and once that is set, will I be able to extrapolate coordinates to use to calculate future position?

I noticed while reading the manual the command "ET" for enable color blob tracking. Is this the command I need? This is what I assume it would do, however I feel I may be way off, for it seems to be too simple...

I give it the command ET, it returns to me the parameters, in the format seen in appendix B of the manual, is this set by me before hand? Bounding Box and Color tracked seems like something I would input, why is it ouputing it to me? If it is preset, is this just an acknowledgement? Does it then proceed to stream to me coordinates in relation to the bounding box? If it does stream coordinates, how do I get those coordinates into something that I can use to process the data, the only other experiance I have is some basic microcontroller work, where we interfaced a microcontroller with a C compiler and used the inputs to do small calculations, is something similar availble to us with AVR cam?


Sorry for the barrage of questions, while there is a lot of material on the internet regarding robotics, it can be overwhelming when you don't know the basics. If you understand my quesetions correctly, I'll check back for a reply, if not please let me know what you need more clarification on and I'll try to shoot back a response asap.

Thanks for the time
naveed.
naveed
 

Postby Guest » Tue Feb 07, 2006 8:29 pm

Hi Naveed,
Yes, the AVRcam is capable of tracking an orange puck on a black background. The normal procedure for using the camera to do this would be to:

1) Build the color map that the AVRcam will use. This color map is essentially the list of "colors" that the AVRcam will be able to track. In the case of wanting to track just orange, you would setup the color map to track this color (which is represented as some range of red, green, and blue, since all colors can be represented with a combination of red, green, and blue).

2) Send the color map to the AVRcam. This is done using the SM command to send down the color map.

3) Send the ET command to the AVRcam. This will enable tracking. The AVRcam will now process each frame of image data, looking for regions of orange. It will build a rectangular bounding box around each connected region of orange pixels, and will return the coordinates of the bounding box (in x,y coordinate form) to the user over the serial port. The AVRcam can track up to 8 different objects simultaneously, so if you have lots of orange objects, it will only track the first 8.

The AVRcam sends this bounding box information over its serial port around 30 times per second, so you are getting updates quite frequently. The expectation is that something will receive this bounding box information on the other end of the serial port and do something useful with it. This can be anything from displaying the coordinates of the tracked objects (like what the AVRcamVIEW PC software does), or turn a servo motor, which is more likely what you'd want to do for the hockey setup.

BTW...I read your post on comp.robotics.misc, and it sounds like a cool project. However, I would seriously be evaluating the mechanics of your situation to determine how you can respond quick enough to deal with a normal-speed air-hockey match. I definitely think that you should be able to track an orange puck at reasonable speeds with an AVRcam, though this is not very quantitative. Sounds like its time to do some requirements analysis to determine what speeds you need to be able to track, and how quickly you'll need to respond.

Post back if you have more questions.
Guest
 

Postby Guest » Thu Feb 09, 2006 1:24 pm

Thanks for the feedback, one thing that we sort of left out of the project description that is pretty important is that this project is split up between two groups.

We are responsible for the Tracking and Position of the puck, and a seperate group is responsible for taking the data that we give them, and moving their robotic arm or whatever they decide to make in place to block/return the puck.

So your concern is also our concern, but it is not the focal point of our problem, our priority is to track the puck, and extrapolate a future position as fast as possible, and to be doing this constantly, so taking every two sets of coordinates and doing our calculations and simply saying go to y=10 then one frame later y=12 etc, so speed is also our concern, but to make the other groups job easier, ours has to be able to predict position at a very high rate.

There are ways to integrate the two projects more, to cut down on processing/communication time, but in the end this is a school project, and we have been asked to work with the other team, but at the same time have a defined end of our part and beginning of their part. With that restriction, we need to have a two phase system, as one integrated system would cloud the line too much between our work, and theirs.

I will be meeting with my team later and we will try to make a decision on what we are going to be doing. Thanks a lot for the help.
Guest
 


Return to AVRcam Embedded System

Who is online

Users browsing this forum: No registered users and 24 guests

cron