简体   繁体   中英

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.

在此输入图像描述

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM