简体   繁体   English

如何通过C#中的“图像处理”在邮件中裁剪包含收件人详细信息的区域?

[英]How can I crop the area containing the recipient's details in a mail through Image Processing in C#?

Given this image link as my input image: 给定此图像链接作为我的输入图像:

在此处输入图片说明

How can I possibly crop the image using C# and Image Processing Techniques so I could only get the Rounded Rectangular area with the recipient's details, the fastest way possible? 如何使用C#和图像处理技术裁剪图像,以便只能以最快的方式获得带有收件人详细信息的圆形矩形区域?

As of now, I'm using AForge.NET, and I'm still stuck at using Histogram Equalization as shown: 到目前为止,我使用的是AForge.NET,但仍然停留在使用直方图均衡的方式,如下所示:

在此处输入图片说明

Thanks! 谢谢!

I would start with the otsu threshold ( link ): 我将从otsu阈值( link )开始:

在此处输入图片说明

After, you can do blob detection , iterate through all detected blobs and merge two blobs whether the distance between any of its edges is less than some fixed value. 之后,您可以进行斑点检测 ,遍历所有检测到的斑点,并合并两个斑点,无论其边缘之间的距离是否小于某个固定值。 This will give you two blobs, one containing address information and second containing "if undelivered...". 这将为您提供两个Blob,一个包含地址信息,另一个包含“如果未送达...”。 You chose the blob with the greatest area. 您选择了面积最大的斑点。

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

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