Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

use AForge.net to Recognition special pattern

I want to use AForge.net to recognize patterns like in the picture below.

I used filters to extract yellow-orange-red colors so I can now find the colored blobs but :

  1. I want to find blobs that are surrounded with a big blue circle ( as shown in the picture )

  2. I want to filter objects that have an oval shape

  3. I don't want the exact code , just show me the basic outline and functions that I should use.

enter image description here

like image 334
Mohammad Reza Hashemi Avatar asked Nov 03 '22 09:11

Mohammad Reza Hashemi


1 Answers

I used [IPLab] (http://code.google.com/p/iplab/) to quickly find some parameter to extract the red and blue features of your image. Here are the steps I found:

  1. Use HSL filtering and keep only H values from 270 to 360.
  2. Use HSL filtering and keep only H values from 180 to 270, with saturation over 0.100.

Step 1 will give you the red circles and step 2 will give you the blue circles. You can apply some morphology operators to clean up the results. Now you can compute the blobs from both output images and identify if the center of a red blob is inside a blue blob.

As for verifying if a blob is oval I think AForge doesn't have such statistics in its blob class. You might have to verify the moment of the blobs using another image processing library like EmguCV.

like image 159
rold2007 Avatar answered Nov 15 '22 04:11

rold2007