Shop OBEX P1 Docs P2 Docs Learn Events
BS2sx getting color data back from cmucam — Parallax Forums

BS2sx getting color data back from cmucam

ArchiverArchiver Posts: 46,084
edited 2003-04-11 20:11 in General Discussion
I'm having trouble figuring out how the min and max color values work
with the TC commands for the cmucam. I've tried TC 255 255 255 0 0 0
thinking that that should return a bounding box around the entire
field of view (because that range encompasses all colors) but I keep
getting back 0 0 0 0 0 0 for whatever range of colors I try. The
first three numbers are the max values right? What about "TC 255 100
0 0 0 150", 150 is greater than 0...how is this interpretted?

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-04-11 20:11
    Sam,

    As I read the TC command (both in Parallax' Boe-Bot CMUcam Manual v1.1 and
    the CMUcam Manual v2.00 for the CMUcam v1.12 firmware, from
    http://www-2.cs.cmu.edu/~cmucam/), the format is:

    TC Rmin, Rmax, Gmin, Gmax, Bmin, Gmax

    Further, there is a note that the color values range from 16 to 240.

    Based on that information, should not the description of all colors should
    read like:

    TC 0, 255, 0, 255, 0, 255
    or
    TC 16, 240, 16, 224, 16, 224

    What return packet type are you getting?

    You might also try successively flooding the field of view with a single
    color (maybe use something like construction papers), and using the TW
    command and observing the S-type return packet color values the different
    colors.

    HTH,
    Daniel

    Original Message
    From: Sam [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=0ePSjUVwbR_lL8iZtHvLC6s6Ib8YJOJQDsIF5bw5bbfD74kwEbs-VyqdtS7hI7LXngA93JSxWI-rBh1OS40]hard-on@t...[/url
    Sent: Friday, April 11, 2003 11:37 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] BS2sx getting color data back from cmucam


    I'm having trouble figuring out how the min and max color values work
    with the TC commands for the cmucam. I've tried TC 255 255 255 0 0 0
    thinking that that should return a bounding box around the entire
    field of view (because that range encompasses all colors) but I keep
    getting back 0 0 0 0 0 0 for whatever range of colors I try. The
    first three numbers are the max values right? What about "TC 255 100
    0 0 0 150", 150 is greater than 0...how is this interpretted?
Sign In or Register to comment.