扫描硬币,然后从图像中确定日期

发布于 2024-08-18 15:27:04 字数 227 浏览 6 评论 0原文

我想编写一个 .NET 程序,该程序获取特定硬币类型(例如美国镍币)的图像,然后搜索该图像的年份。假设扫描始终为 300dpi,并且裁剪到硬币的图像尺寸一致。 改变的是硬币的旋转。

那么我如何确定日期? 我是否应该通过创建每年所有预期硬币图像的库来进行图像匹配? 我应该尝试 OCR 日期吗? 哪些库可能有帮助

提前感谢您的任何帮助或建议

I want to write a .NET program that takes an image of a specific coin type (say a US nickle) and then searches the image for the year. Assume the scan is always 300dpi and has a consistent image size cropped to the coin. What changes is the rotation of the coin.

So how would I determine the date?
Should I image match by creating a library of all expected coin images with each year?
Should I try OCR the date?
What libraries might be helpful

Thanks in advance for any help or suggestions

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

メ斷腸人バ 2024-08-25 15:27:04

看起来是使用 OpenCV 的不错选择。如果可能的不同年份的集合不是很大,那么图书馆可能是一个好主意。

Looks like a good candidate for using OpenCV. If the set of different years possible is not very large, the library might be a good idea.

迷迭香的记忆 2024-08-25 15:27:04

好的图像处理库是 ImageMagick。它在codeplex 中有 CLR 包装器。

比较图像不是一个简单的操作,它需要一些 CPU 时间,因此设计是关于你的集合中硬币数量的问题。如果您在 Y 年内拥有 X 个代币,则需要进行 X*Y 比较,这可能需要很长时间。

我建议您将硬币与特定硬币进行真正的比较(而不是与确切的年份),
然后尝试从输入的硬币中提取年份。

Good Image manipulation librari is ImageMagick. It has CLR wrappers in codeplex.

Comparing images is not a light operation it takes some CPU time, so the design is a quetion of the amount of coins in your set. If you have X coins over Y years, you need to make X*Y comparisons, which might take too long.

I suggest you to tru comparing the coin to a specific coin (not with the exact year),
and then try to extract the year out of the input coin.

安穩 2024-08-25 15:27:04

您可以尝试使用形状匹配,但是当您为此准备模板时,请从找到的边缘中删除日期。然后使用不同旋转(从 0 到 360 度)的形状匹配。
所以你会得到一枚带有任何日期的硬币。
但是,如果不仅年份信息不同,您还必须准备不同的硬币模板。之后,您将能够旋转硬币并在必须写年份的地方进行 OCR。

You can try using shape matching, but when you will prepare template for that, remove the date from found edges. Then use shape matching with different rotations (from 0 to 360 angles).
So you will get a coin with any date.
But you will have to prepare a different coin template if it differs not only in year information. And after that you will be able to rotate the coin and to make an OCR at the place where the year must be written.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文