简体   繁体   English

使用AForge.net识别特殊模式

[英]use AForge.net to Recognition special pattern

I want to use AForge.net to recognize patterns like in the picture below. 我想使用AForge.net来识别如下图所示的模式。

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. 我使用[IPLab](http://code.google.com/p/iplab/)快速找到一些参数来提取图像的红色和蓝色特征。 Here are the steps I found: 以下是我找到的步骤:

  1. Use HSL filtering and keep only H values from 270 to 360. 使用HSL过滤并仅保留270到360的H值。
  2. Use HSL filtering and keep only H values from 180 to 270, with saturation over 0.100. 使用HSL过滤并仅保留180到270的H值,饱和度超过0.100。

Step 1 will give you the red circles and step 2 will give you the blue circles. 第1步会给你红色圆圈,第2步会给你蓝色圆圈。 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. 至于验证blob是否是椭圆形的,我认为AForge在它的blob类中没有这样的统计数据。 You might have to verify the moment of the blobs using another image processing library like EmguCV. 您可能必须使用另一个图像处理库(如EmguCV)来验证blob的时刻。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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