locked
Algorithm behind Blob Tracker and Color Segment RRS feed

  • Question

  • Hello MRDS team,

    Thank you for this amazing product :)

    I have questions concerning the algorithm behind blob tracker and color segment, what is the used algorithm? And how can we know what the functions stand for and how to use them?

    Another question is how can we connect blob tracker and colorsegment together ( to segment the blobs) so that we can make the robot drive towards the predefined blob?

    Thank you :)

    Saturday, May 19, 2012 3:15 AM

Answers

  • Hello,

    The source code for these samples are available but there is no documentation describing the specific techniques or algorithm used.  It is not hard to follow if you can read C#.  

    For Blob tracking, basically there is a training step where the code determines a upper and lower threshold for each color channel based on all the pixels in the training region, then each frame of video is evaluated looking for adjacent pixels who’s color channel values are within the prescribed threshold.  If you open the BlobTracker.sln file and run the "BlobTrackerCalibrate" project, you will see how this is done.

    I'm not sure what you mean by "what the functions stand for and how to use them". Load the "BlobTracker.sln" file, then run the "BlobTrackerCalibrate" project.  You can set breakpoints at places like "btnTrain_Click" in VisualizationForm.cs and "InsertBinHandler" in BlobTracker.cs and "ProcessImage" in BlobTracker.cs to see what is happening.

    the Blob Tracker and Color Segment services both partner with a web camera, so you cannot exactly use the output of one as the input of another without some modification of the code.  However, to follow a blob you only need the blob tracker service by itself as it provides x-y coordinates of any tracked blobs. For example, if you know which way your camera is facing (probalby forward) and the blob is to the left of center of the view, then you know you need to turn left to make the blob be directly ahead.

    Thursday, May 24, 2012 8:27 PM