Shop OBEX P1 Docs P2 Docs Learn Events
tracking colors with cmucam — Parallax Forums

tracking colors with cmucam

maxxmaxx Posts: 14
edited 2005-11-29 15:54 in BASIC Stamp
Is it possible using the CMUcam to track specific color on the screen. so the boe bot can follow the color instead of following the object?

Comments

  • Steve JoblinSteve Joblin Posts: 784
    edited 2005-11-22 20:48
    I don't think the original CMUCam can (by looking at the CMU site, http://www.cs.cmu.edu/~cmucam/home.html, it looks like it can only track a colorful or bright object, not a specific color).· The CMUCam2 can... from looking at CMU's site, it looks like the original CMUCam is no longer supported since the only place to buy it is from Acroname (and they list it as "Discontinued).· Is Parallax planning on coming out with a Parallax version of the CMUCam2?
  • BorgelBorgel Posts: 23
    edited 2005-11-22 21:54
    I agree, the CMU Cam2 can track colors. I have a CMU Cam2+ from Acroname. After much time, I finally got it to work with my BS2. The 2+ is essentially the same as the CMU Cam 2, the commands are the same, but it is all on one board. If you want it, PM me and I can send you my source code.
  • maxxmaxx Posts: 14
    edited 2005-11-23 00:33
    I have CMU cam 1 not CMU cam 2
    sad.gif
  • LarryLarry Posts: 212
    edited 2005-11-23 01:51
    Don't despair--

    The CMUcam can track colors just fine. In fact, it's what the camera does best. Look in te manual for information on the TC command.

    It'll track colors in RGB format, or, alternatively, in YCrCB format. That has the advantage that it is less dependent on brightness of the image.

    It takes a little bit of practice to figure out how to ask for the color you want, but practice is the best teacher. While you are looking up the TC command, have a peek at the effects of the TW command. It will allow you to "show" the camera what you want to track, just like the demo mode does. The results from the TW command· are the parameters you set for the TC command.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Post Edited (Larry) : 11/23/2005 7:11:23 AM GMT
  • Steve JoblinSteve Joblin Posts: 784
    edited 2005-11-23 18:05
    So then what is the difference between the CMUCam 1 and the CMUCam2? Is this why Parallax has not released an updated version?
  • maxxmaxx Posts: 14
    edited 2005-11-23 22:40
    I looked up TC & TW commands and as i understood they can track the object regardless of it's color. I actually tried it. I put a blue object in front of it and it tracked it fine, and i then i replaced it with a yellow object and the CMU cam didn't recognize the difference and tracked it as well, although it's not the intented color to be tracked. Another disadvantage is that the CMU cam can't find a specific color on the the screen. It can only give u the mean value of the RGB and u can figure which color is dominant in the screen but for example if you are looking for a green color on the scene it's almost impossible to find it. CORRECT ME PLEASE IF I'M WRONG. Thanx
  • Tom WalkerTom Walker Posts: 509
    edited 2005-11-28 14:17
    I think that, in this case, an explanation of the conditions and the expected results would go far in finding a solution. In other words, can you describe exactly what you want this "thing" to do, withou using generic terms such as "track a color on the screen"? Something like " figure out where the red cube is in its field of view using a webcam on a BOE-bot and aim a laser pointer at it and scream 'die, you red cube!'"...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • maxxmaxx Posts: 14
    edited 2005-11-29 13:49
    All right, In a very simple way, I would like the robot to track a Yellow rc car. "just a yellow and not any other color". So if and only if the rc color is yellow then the boe will follow it.
  • LarryLarry Posts: 212
    edited 2005-11-29 15:54
    Post your code. It'll help us figure out why you are not succeeding. Also describe the lighting conditions--Bright sun? cloudy day? indoors flourescent? indoors incandescent? Bright?, dim?



    If indoors, is the side of the object you are tracking directly lit, or is it in shadow. Are you sure you locked onto the object during the TW command phase of your code?

    Also describe how you focussed the camera. Do you have the parallax version of the camera (no RS232 chip on the board) or the original version (with the socketted· 232 chip)?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sign In or Register to comment.