使用Aforge.net进行图像处理>>我需要帮助 [英] image processing using Aforge.net >> I need the help

查看:118
本文介绍了使用Aforge.net进行图像处理>>我需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨我想在一张图片中检测一辆汽车,并根据我的研究确定其灯光形状检测的汽车数量,有人告诉我使用Aforge.net并使用blobs计数器,我看过一个示例示例,但我还没有理解blob计数器的功能以及如何使用它来检测汽车灯!任何人都可以帮助我理解blob计数器的功能以及如何使用它,或者任何人都可以给我一个有用的链接或教程!!

Hi I want to detect a cars in an image and determine the number of cars in term of its lights " shape detection " in my research ,, someone told me to use Aforge.net and use blobs counter ,, I have seen a sample example but I have not understood the function of the blob counter and how to use it to detect the car lights !! can any one help me to understand the function of the blob counter and how to use it ,, or can any one give me a useful link or tutorial !!

推荐答案

该算法在AForge.NET中运行良好,速度非常快。我不知道你从代码示例中错过了什么(很明显),但你基本上需要使用类 AForge.Imaging.BlobCounter



另外,你应该记住算法应该适用于黑色背景上的blob。在你的情况下,看起来你正在寻找黑暗背景上的轻型汽车光点,但有些情况或相反,所以你需要反转图像。如果是这样,请使用类 AForge.Imaging.Filters.Invert



现在,背景可能或可能不是足够黑。要改进,你只需要提高对比度。我从来不知道任何最大对比度可能出错的情况,所以请使用过滤器 AForge.Imaging.Filters.ContrastCorrection 。我总是使用它的属性 Factor 等于 int.MaxValue



如果在应用对比度滤镜之前稍微调整亮度,对比效果可能会更好。使用类 AForge.Imaging.Filters.BrightnessCorrection 。重要的是不要变暗或烧得太多;这一切都取决于初始图像,可能曝光不足,或暴露不适合您正在寻找blob识别的区域。



当您发现您的斑点被识别时,如果你只想选择一些blob,这是非常典型的。一些亮点可能会被识别为斑点,但它们不是汽车灯的亮点。在这种情况下,您可以再使用一个过滤器,过滤掉不需要的blob。您需要在所有其他调整之后,但在使用 BlobCounter 之前应用它。这是类AForge.Imaging.Filters.BlobsFiltering 。最典型的情况是,你需要按照最大和最小尺寸过滤掉一些blob。



在某些情况下,你可能想给用户一些UI来调整一些过滤参数,但最佳斑点识别的搜索也可以自动化。它在很大程度上取决于您的典型场景的复杂程度。如果您准确地使用我的建议,即使在非常棘手的情况下也可以成功识别。



祝你好运,

-SA
This algorithm works very well in AForge.NET, and it is very fast. I don''t know what did you miss from the code sample (it is quite clear), but you basically need to use the class AForge.Imaging.BlobCounter.

Also, you should remember that the algorithm is supposed to work for blobs on black background. In your case, it looks like you are looking for light car light spots on the dark background, but some cases or opposite, so you need to invert the image. If so, use the class AForge.Imaging.Filters.Invert.

Now, the background may or may not be "black enough". To improve is, you simply need to boost contrast. I never knew any cases where the maximum contrast could be wrong, so use the filter AForge.Imaging.Filters.ContrastCorrection. I always use its property Factor equal to int.MaxValue.

The contrasting might work better if you also adjust brightness slightly before applying the contrasting filter. Use the class AForge.Imaging.Filters.BrightnessCorrection. It''s important not to darken or burn too much; it all depends on the initial image, which could be poorly exposed, or exposed not for the region you are looking for blob recognition.

When you find your blobs recognized, it''s very typical if you want to select only some blobs. It is likely that some highlights will be recognized as blobs, but they are not the spots of the car lights. In this case, you can use one more filter, which filters out unwanted blobs. You need to apply it after all other adjustments, but before using of your BlobCounter. This is the class AForge.Imaging.Filters.BlobsFiltering. Most typically, you would need to filter out some blobs by their maximum and minimum size.

In some cases, you may want to give the user some UI to adjust some filter parameters, but the search of the "best blob recognition" can also be automated. It heavily depends on how complex your typical scene is. If you accurately use my advice, you can perform successful recognition even in very tricky situations.

Good luck,
—SA


在这里 [ ^ ]。



/ ravi
Here you go[^].

/ravi


这篇关于使用Aforge.net进行图像处理>>我需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆