As your objective is blurring (for privacy protection), you basically need a high recall detector as a first step. Here's how to go about doing this. The included code hints use OpenCV with Python.
For each contour, find the minAreaRect() bounding it.
Select rectangles based on aspect ratio, minimum and maximum area, and angle with the horizontal. (I used 2.2 <= Aspect Ratio <= 8, 500 <= Area <=15000, and angle <= 45 degrees)
All minAreaRect()s are shown in orange and the one which satisfies our criteria is in green.
There may be false positives after this step, to filter it, use edge density. Edge Density is defined as the number of white pixels/total number of pixels in a rectangle. Set a threshold for edge density. (I used 0.5)
Blur the detected regions.
You can apply other filters you deem suitable to increase recall and precision. The detection can also be trained using HOG+SVM to increase precision.
There is a new, open source library on GitHub that does ANPR for US and European plates. It looks pretty accurate and it should do exactly what you need (recognize the plate regions). Here is the GitHub project: https://github.com/openalpr/openalpr
I came across this one that is written in java javaANPR, I am looking for a c# library as well.
I would like a system where I can point a video camera at some sailing boats, all of which have large, identifiable numbers on them, and have it identify the boats and send a tweet when they sail past a video camera.
I have done some googling about this a couple of months ago. There are quite a few papers about this topic, but I never found any concrete open-source implementation. There are a lot of commercial implementations though, but none of them with a price quote, so they're probably pretty expensive.
Yes I use gocr at http://jocr.sourceforge.net/ its a commandline application which you could execute from your application. I use it in a couple of my applications.
看看字符识别软件也许可行,因为有很多库可以执行相同的操作。 我读取图像并存储它。 Microsoft Office 能够读取 tiff 文件并返回字母数字
It maybe work looking at Character recoqnition software as there are many libraries out there that perform the same thing. I reading an image and storing it. Micrsoft office is able to read tiff files and return alphanumerics
发布评论
评论(11)
编辑:我为此编写了一个Python脚本。
由于您的目标模糊(为了隐私保护),您基本上需要一个高召回率检测器作为第一步。 以下是如何进行此操作。 包含的代码提示使用 OpenCV 和 Python。
应用高斯模糊。
让输入图像如下。
使用严格阈值或 OTSU 的二值化对结果图像进行阈值处理。
使用合适的结构元素应用形态闭运算。 (我使用 16x4 作为结构元素)
第 5 步后的结果图像。
查找该图像的外部轮廓。
对于每个轮廓,找到其边界的
minAreaRect()
。所有
minAreaRect()
均以橙色显示,并且满足我们标准的颜色为绿色。您可以应用您认为合适的其他过滤器来提高召回率和精确度。 还可以使用HOG+SVM来训练检测以提高精度。
EDIT: I wrote a Python script for this.
As your objective is blurring (for privacy protection), you basically need a high recall detector as a first step. Here's how to go about doing this. The included code hints use OpenCV with Python.
Apply Gaussian Blur.
Let the input image be the following.
Threshold the resultant image using strict threshold or OTSU's binarization.
Apply a Morphological Closing operation using suitable structuring element. (I used 16x4 as structuring element)
Resultant Image after Step 5.
Find external contours of this image.
For each contour, find the
minAreaRect()
bounding it.All
minAreaRect()
s are shown in orange and the one which satisfies our criteria is in green.You can apply other filters you deem suitable to increase recall and precision. The detection can also be trained using HOG+SVM to increase precision.
我基于JAVA ANPR编写了C#版本,但我用OpenCV更改了awt库函数。
您可以在 https://github.com/jivanro/ANPRMX_SourceCode 查看
I coded a C# version based on JAVA ANPR, but I changed the awt library functions with OpenCV.
You can check it at https://github.com/jivanro/ANPRMX_SourceCode
GitHub 上有一个新的开源库,可以对美国和欧洲车牌进行 ANPR。 它看起来非常准确,并且应该完全满足您的需要(识别板区域)。 这是 GitHub 项目:
https://github.com/openalpr/openalpr
There is a new, open source library on GitHub that does ANPR for US and European plates. It looks pretty accurate and it should do exactly what you need (recognize the plate regions). Here is the GitHub project:
https://github.com/openalpr/openalpr
我遇到了这个用 java javaANPR 编写的,我也在寻找 ac# 库。
我想要一个系统,我可以将摄像机对准一些帆船,所有帆船上都有大的、可识别的数字,并让它识别船只并在它们驶过摄像机时发送推文。
I came across this one that is written in java javaANPR, I am looking for a c# library as well.
I would like a system where I can point a video camera at some sailing boats, all of which have large, identifiable numbers on them, and have it identify the boats and send a tweet when they sail past a video camera.
几个月前我已经对此进行了一些谷歌搜索。 关于此主题有相当多的论文,但是我从未找到任何具体的开源实现。 有许多商业实现 不过,但它们都没有报价,所以它们可能相当昂贵。
I have done some googling about this a couple of months ago. There are quite a few papers about this topic, but I never found any concrete open-source implementation. There are a lot of commercial implementations though, but none of them with a price quote, so they're probably pretty expensive.
尝试这个简单的自动车牌识别系统
http://opos.codeplex.com/
开源并用 C# 编写
try this Simple Automatic Number Plate Recognition System
http://opos.codeplex.com/
Open source and written with C#
查看 Java ANPR。 免费车牌识别...
Have a look at Java ANPR. Free license plate recognition...
是的,我在 http://jocr.sourceforge.net/ 使用 gocr,它是一个您可以执行的命令行应用程序从您的申请中。 我在几个应用程序中使用它。
Yes I use gocr at http://jocr.sourceforge.net/ its a commandline application which you could execute from your application. I use it in a couple of my applications.
高性能 ANPR 库 - http://www.dtksoft.com/dtkanpr.php。 这是商业性的,但他们提供试用密钥。
High performance ANPR Library - http://www.dtksoft.com/dtkanpr.php. This is commercial, but they provide trial key.
http://licenseplate.sourceforge.net Python(我没有测试过)
http://licenseplate.sourceforge.net Python (I have not tested it)
看看字符识别软件也许可行,因为有很多库可以执行相同的操作。 我读取图像并存储它。 Microsoft Office 能够读取 tiff 文件并返回字母数字
It maybe work looking at Character recoqnition software as there are many libraries out there that perform the same thing. I reading an image and storing it. Micrsoft office is able to read tiff files and return alphanumerics