CMUcamLibMF BETA version releasing soon!
Navigates to RoboticsConnection.com Home RoboticsConnection.com HomePage
RoboticsConnection User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



CMUcamLibMF BETA version releasing soon! Expand / Collapse
Author
Message
Posted Wednesday, August 13, 2008 11:18 AM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Today @ 7:20 AM
Posts: 285, Visits: 414
I have developed a CMUcamLibMF library to allow customers to easily use and integrate a CMUcam2/2+ robotic vision camera into their .NET MF application using the TraxsterMF Robotics Kit (which includes the SJJMicro EDK Plus .NET MF Development kit).

 

The CMUcamLibMF library handles communication to/from the camera, and the user just invokes the simple interface to retrieve Tracking, Histogram, and Statistical information for each frame.  Additionally, the library provides events to notify the .NET MF application that new data is available for consumption.

This makes it very easy program the Traxster MF Kit to track a colored object around.  For instance, if we wanted to track a red ball around, all we need to do is sign up for TrackColorEvent notifications, then invoke TrackWindow().   The handler you registerd for the TrackColorEvent event will get invoked every time a new TPacket arrives.  From there, you can use the information within the TPacket, such as the mean coordinates of the color blob, the blob size, number of pixels, and confidence to command your robot to track the ball.   We provide an example app that uses this information to implement the following behavior:

  • If the ball gets too close (large bounding box for red color), the robot backs up
  • If the ball gets too far away (small bounding box for red color), the robot drive forward
  • If the ball moves to the left or right too far, the robot rotates in that direction to keep it in sight

Here's an example where we sign up for the event, passing in an appropriate handler, and then invoke TrackWindow().


        // Sign up for the various camera events:
        TPacketProcessor.TrackColorEvent += new TrackColorEventHandler(TPacketProcessor_TrackColorEvent);

        // This will loop, firing TrackColorEvents as TPackets stream in...

        cmuCam.TrackWindow();

        ...

        static void TPacketProcessor_TrackColorEvent(TrackingPacket tp)
        {
            int width = tp.RightCornerX - tp.LeftCornerX;
            int height = tp.RightCornerY - tp.LeftCornerY;
            Debug.Print("TPacket MassX:" + tp.MassX + " MassY: " + tp.MassY + " Confidence:" + tp.Confidence);
            ChaseBall(tp.MassX, tp.MassY, width, height);
        }

Like I said, it's VERY EASY to use.

I am in final integration mode, and look to release a BETA version in about two weeks.  I'd love to have some BETA testers to beat my library up.

Also, since the job of the camera is to perform the frame differencing at high frame rates, I don't know if I'm going to add the functionality of grabbing the actual raw image from the camera, since especially for the EDKPlus kit won't be very useful (no display).  Depending on the size of the window you have configured, and the resolution mode, it may take several seconds to retrieve the image.  Thus, you can't do real-time processing on an image on the EDK plus.  You leave that to the firmware on the camera.  I would like to hear others thoughts on this...

The biggest problem I seem to have right now is proper lighting.  In order for the camera to pick up and properly track a colored object, there needs to be good lighting and NO OTHER objects of that same color in the FOV of the camera.   Otherwise, it gets locked on a stationary object, and it's hard to divert it's attention away (other than to put something in front of the object of a similar color).

Along w/ the BETA release, I'll post videos of the example application (which comes w/ the Visual Studio Solution).

Once the CMUcamLibMF is officially released and finished, I will port the lib over for use with the Full and Compact .NET Frameworks (then I will add the capability to retrieve the raw image).

Best Regards!

Jason Summerour
President,
Summerour Robotics Corporation
Microsoft MVP
www.roboticsconnection.com

Post #615
Posted Sunday, August 17, 2008 7:42 PM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Today @ 7:20 AM
Posts: 285, Visits: 414
FYI,

Here's the wiring diagram for connecting the CMUcam2/2+ to the EDK Plus iPac 9302 board via our new SPI-to-TTL converter board (availabled in 3 weeks).

Best Regards!

Jason Summerour
President,
Summerour Robotics Corporation
Microsoft MVP
www.roboticsconnection.com

Post #623
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: jsummerour

Permissions Expand / Collapse

All times are GMT -8:00, Time now is 6:33pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.140. 10 queries. Compression Disabled.