go_away

Author Topic: AVRcam colour map upload  (Read 2576 times)

0 Members and 1 Guest are viewing this topic.

Offline frank26080115Topic starter

  • Supreme Robot
  • *****
  • Posts: 322
  • Helpful? 2
AVRcam colour map upload
« on: October 08, 2007, 03:16:28 PM »
I posted on the JRobot forum but haven't gotten an answer yet. Does anybody have any example code for uploading the colour map? I have everything working except the stupid colour map which apparently uses ASCII number characters instead of the usual bytes.

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: AVRcam colour map upload
« Reply #1 on: October 08, 2007, 03:55:04 PM »
I am also trying to figure out the AVRcam. I upload the color map using the software from the CD, AVRcamView. I take a picture of the objects, then point with the mouse at the color I want to add to the colour map, right click and select add to map, then click on one of the 8 locations and click on send. Then go back to the picture, select another color, add it to a different location, send again.

Now I have a question for you, something that I didn't figure out yet. How do you parse the bounding boxes? I mean how do you find out how to turn the robot and have it go towards the object you want?
Check out the uBotino robot controller!

Offline frank26080115Topic starter

  • Supreme Robot
  • *****
  • Posts: 322
  • Helpful? 2
Re: AVRcam colour map upload
« Reply #2 on: October 08, 2007, 05:33:36 PM »
I can't use his software because he specifically programmed it for COM1, I use a FTDI chip

I'm making my own test software using Processing, so far I can get all the data from the camera, but still can't upload colour map.

Anyhow, the camera outputs the values for the boundaries, lets say xMin is the left and xMax is the right boundary, you find the center of the object like this:

xCent = xMin + (xMax - xMin) / 2

if x is towards the left, turn the robot left, etc

You can also get width and height and use it to determine shape (square or rectangular) so this way you only look for spheres if you are chasing a ball.

Offline frank26080115Topic starter

  • Supreme Robot
  • *****
  • Posts: 322
  • Helpful? 2
Re: AVRcam colour map upload
« Reply #3 on: October 09, 2007, 03:42:58 PM »
the colour map uploading is really complicated, you don't upload values, everything is boolean, imagine sending this in binary format


I mean the window on the right

i hooked my laptop's serial to my desktop's serial port to analyze what is being sent...
everything is ascii, so if you send 123 it has to be "1" "2" "3" then a space
« Last Edit: October 09, 2007, 06:22:54 PM by frank26080115 »

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: AVRcam colour map upload
« Reply #4 on: October 10, 2007, 04:41:14 AM »
I believe John Orlando has the PC application open source. You may want to take a look at his code to figure it out. At least modify the COM port number to the one the USB adapter gives you and use his application to load the values in the colour table. For me it's too complicated to do it other way.
Check out the uBotino robot controller!

 


Get Your Ad Here