Shop OBEX P1 Docs P2 Docs Learn Events
CMU: Raw camera data examples? — Parallax Forums

CMU: Raw camera data examples?

ArchiverArchiver Posts: 46,084
edited 2004-03-03 17:52 in General Discussion
I'm trying to track three blobs of the same color with a single CMU
camera. The three blobs are alligned in the vertical and I'm wanting
to determine the position (just the X coordinate) of the middle blob
in relation to the other two. I need to know how to dump the
camera's raw data and extract the X coordinates of the three blobs to
then start my calculations. The manual did offer basic commands but
not enough to clear-up my confusion. Has anyone found any example
code for displaying raw camera data? If not, I'll see what damage I
can do.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-03-02 23:09
    I believe the CMU-Cam on-module SX processor
    will only let you identify to it a color it
    should track. It then tracks ONE object of
    this color, and sends
    back to you on RS-232 the coordinates of the
    center of the colored object.

    I don't think tracking 3 objects of the same
    color will work. However, the CMU-Cam has
    been used to provide line-tracking data, so
    perhaps if the three objects are aligned in
    some way it will send you the 'average' value.

    You CAN dump the entire picture the CMU-Cam
    gets -- but I'd think you'd want a more capable
    processor than the BS2 to do that.


    --- In basicstamps@yahoogroups.com, "jordanlewis2330"
    <tmlewis10@h...> wrote:
    > I'm trying to track three blobs of the same color with a single CMU
    > camera. The three blobs are alligned in the vertical and I'm
    wanting
    > to determine the position (just the X coordinate) of the middle
    blob
    > in relation to the other two. I need to know how to dump the
    > camera's raw data and extract the X coordinates of the three blobs
    to
    > then start my calculations. The manual did offer basic commands
    but
    > not enough to clear-up my confusion. Has anyone found any example
    > code for displaying raw camera data? If not, I'll see what damage
    I
    > can do.
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-03 17:52
    Hi Jordan

    I think you mean you want to do a Dump Frame to get a raw picture, but
    that's the hard way.

    The easy way is to use Line Mode with Track Color. You will then get a
    Binary Bitmap showing every pixel in the bounding box of pixels that match
    the color range you are tracking. With the Binary Bitmap you can see the
    distinct outline of each object.

    If you do want to mess with the Dump Frame look at the source code for the
    Java application that comes with the CMUcam on the CD-ROM. It shows you how
    to deal with the Dump Frame " F" packet format

    Thank you
    Ron A. Nucci
    Seattle Robotics
    www.seattlerobotics.com

    Message: 19
    Date: Tue, 02 Mar 2004 22:26:17 -0000
    From: "jordanlewis2330" <tmlewis10@h...>
    Subject: CMU: Raw camera data examples?

    I'm trying to track three blobs of the same color with a single CMU
    camera. The three blobs are aligned in the vertical and I'm wanting
    to determine the position (just the X coordinate) of the middle blob
    in relation to the other two. I need to know how to dump the
    camera's raw data and extract the X coordinates of the three blobs to
    then start my calculations. The manual did offer basic commands but
    not enough to clear-up my confusion. Has anyone found any example
    code for displaying raw camera data? If not, I'll see what damage I
    can do.
Sign In or Register to comment.