Blob Tracker Sample

Glossary Item Box

Microsoft Robotics Developer Studio Send feedback on this topic

Blob Tracker Sample

The BlobTracker service partners with the WebCam service and performs simple vision recognition to track color segments in the frames.

This sample is provided in the C# language. You can find the project files for this sample at the following location under the Microsoft Robotics Developer Studio installation folder:

Samples\Technologies\Vision\BlobTracker

Contents:

  • Running the Sample
  • Related Services

Prerequisites

Hardware and Software

To use the BlobTracker you will need a camera. You could also use a simulated WebCam.

You will also need Microsoft Internet Explorer or another conventional web browser.

Running the Sample

To see how the BlobTracker service is used you can just play with it manually.

  1. Choose Start > then All Programs > Microsoft Robotics Developer Studio > Run DSS node menu command.

  2. Under System Services choose Control Panel.

  3. Find an instance of the WebCam service and click the Create button next to it.

    Cc998456.hs-note(en-us,MSDN.10).gif

    You do need a camera for the BlobTracker to be useful. You could use a webcam from simulation too.

  4. When the WebCam service service has started go to the service directory (https://localhost:50000/directory) and click on the link for the webcam, select the resolution that you want to process (this is likely to be smaller than larger, depending on how much processing power you are willing to use, and how many frames you want to drop)

  5. Go back to the control panel and start the BlobTracker service.

  6. When the console shows that the BlobTracker is started then start the BlobTracker Calibration service.

  7. The BlobTracker Calibration service should display a window containing a live feed from the camera. To configure a the BlobTracker click on the video image and drag out a circle that contains representative color that you wish to track. Then in the Name: text box type in a name and click the Train button. This should cause a rectangle to appear on the display showing the location and size of the color blob that is being tracked. Figure 1 Figure 1 - BlobTracker Calibration

  8. Go to https://localhost:50000/blobtracker and examine the state of the BlobTracker service, this will show you the definition for the color bin.

The BlobTracker Calibration service is an example of a service that both subscribes to the BlobTracker and configures it. Alternatively you can configure the BlobTracker service using an initial state file defined in a manifest.

For a tutorial on using the BlobTracker service with Speech see Robotics Tutorial 7 (C#) - Speech and Vision in Robots.

Also see Simple Vision Sample for an example of a vision recognition service.

Summary

This sample covered the following:

  • Running the Sample
  • Related Services

 

 

© 2012 Microsoft Corporation. All Rights Reserved.