Society of Robots - Robot Forum

Software => Software => Topic started by: mbateman on January 02, 2009, 04:51:35 PM

Title: AVRcam code for the Axon
Post by: mbateman on January 02, 2009, 04:51:35 PM
I have developed a code module for the Axon that makes it easy to interface to the AVRcam.

If you are interested, the API documentation and source code are available on my web site at http://www.laughingsky.com/hobbies/robotics/pages/axon_modules/avrcam/index.html (http://www.laughingsky.com/hobbies/robotics/pages/axon_modules/avrcam/index.html). Feel free to use it or modifiy it as you see fit.
Title: Re: AVRcam code for the Axon
Post by: Joe on January 03, 2009, 09:43:34 AM
Nice! You've just saved me, probably, days of frustration. Now if my Axon would just get here...  :-[
Title: Re: AVRcam code for the Axon
Post by: Admin on January 09, 2009, 12:13:36 AM
Nice!

I just added this to the Axon examples page, and will include your source (as is with all credits of course) in all future Axon code releases.
Title: Re: AVRcam code for the Axon
Post by: mbateman on January 09, 2009, 12:23:35 PM
Cool. So, does your offer still stand from last July ;-) http://www.societyofrobots.com/robotforum/index.php?topic=4678.0 (http://www.societyofrobots.com/robotforum/index.php?topic=4678.0)

Quote
If you write code for the CMUcam or AVRcam to work with the Axon, and its well documented, I'll send you a check for $50

If so, I'll take another Axon instead.  ;)
Title: Re: AVRcam code for the Axon
Post by: Admin on January 09, 2009, 12:36:00 PM
doh was hoping you wouldn't see that!

Ok I'll send you a private email about payment. Can you post up a video of it working with your Axon?
Title: Re: AVRcam code for the Axon
Post by: mbateman on January 09, 2009, 05:04:41 PM
Well, the code works to communicate with the AVRcam, but that doesn't mean it does anything useful yet.  :(

I am having a very hard time getting settings and colormaps on the camera to isolate colors well enough to track them. It is also very dependent on lighting conditions. Since the same camera module (OV6620) is used in the CMUcam and the Blackfin, I am still hoping it is possible. But so far I am not having much luck. I will try again in better light this weekend and see if I can get something that I can video.

I wish I had better news.  :(

The next phase of this project is to rewrite the AVRcam firmware to test other methods of using the camera besides the colormap code that comes with it.
Title: Re: AVRcam code for the Axon
Post by: Admin on January 09, 2009, 08:30:34 PM
Ok, lets get your code fix up first and demo'd.

Quote
It is also very dependent on lighting conditions. Since the same camera module (OV6620) is used in the CMUcam and the Blackfin, I am still hoping it is possible.
The trick is to turn on auto-brightness and auto-contrast for a few seconds as the first step, then turn them both off.

Then have it measure the min and max of RGB or YUV.

(Min + Max + constant)/2 = tracking blob threshold

Your robot will then be calibrated for the current light settings.
Title: Re: AVRcam code for the Axon
Post by: Ro-Bot-X on January 10, 2009, 01:03:06 AM
I am having a very hard time getting settings and colormaps on the camera to isolate colors well enough to track them. It is also very dependent on lighting conditions.

Yes, I'm having the same problem... Bad lighting and lots of small objects instead of one big object. And it is jumping a lot without any movement. I didn't even get the chance to work on the code to center the object, still trying to get a better colour map so the colour detection is reliable.

Quote
The next phase of this project is to rewrite the AVRcam firmware to test other methods of using the camera besides the colormap code that comes with it.

Now that would be great! Although I am not sure I'll be able to reflash the ATmega...