寻找最合适的图像标准【图像识别】
我们有一些图片示例。
我们有一组输入的图片。每张输入图片都是以下事物组合后的示例之一
: 1)旋转
2)缩放
3)切割部分图片
4)添加噪声
5)使用某种颜色的滤镜
这是保证人类可以轻松识别图片。
我需要简单但有效的算法来识别我们从哪个基本示例中获取输入图片。
我用 C# 和 Java 编写
We have some examples of pictures.
And we have on input set of pictures. Every input picture is one of example after combination of next things
1) Rotating
2) Scaling
3) Cutting part of it
4) Adding noise
5) Using filter of some color
It is guarantee that human can recognize picture ease.
I need simple but effective algorithm to recognize from which one of base examples we get input picture.
I am writing in C# and Java
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我认为没有一个简单的算法可以让您在您提到的所有条件下识别图像。
一种可能涵盖最多的技术是对图像进行傅里叶变换,但这不能无论怎么想都可以将其描述为简单,并且将涉及一些相当繁重的数学概念。
您可能会发现在数字信号处理领域进行搜索很有用,其中包括图像处理,因为它们只是二维信号。
编辑:显然,问题仅限于识别金钱(纸币和硬币),因此搜索的第一个问题就变成避免提及金钱是使用其图像识别产品的结果而不是来源的网站的图像。
不管怎样,我通过搜索 '货币图像识别'。包括一些提到隐马尔可夫模型(无论那意味着什么)。它可能是您正在寻找的算法。
由于拥有一小组目标图像,问题得以简化,但由于需要检测假货,问题变得复杂。
我仍然认为这项工作没有“简单的算法”。祝您搜索顺利。
I don't think there is a single simple algorithm which will enable you to recognise images under all the conditions you mention.
One technique which might cover most is to Fourier transform the image, but this can't be described as simple by any stretch of the imagination, and will involve some pretty heavy mathematical concepts.
You might find it useful to search in the field of Digital Signal Processing which includes image processing since they're just two dimensional signals.
EDIT: Apparently the problem is limited to recognising MONEY (notes and coins) so the first problem of searching becomes avoiding websites which mention money as the result of using their image-recognition product, rather than as the source of the images.
Anyway, I found more useful hits by searching for 'Currency Image Recognition'. Including some which mention Hidden Markov Models (whatever that means). It may be the algorithm you're searching for.
The problem is simplified by having a small set of target images, but complicated by the need to detect counterfeits.
I still don't think there's a 'simple agorithm' for this job. Good luck in your searching.
计算机视觉领域正在进行一些很好的研究。正在解决的问题之一是识别对象,无论比例变化、噪声添加和由于从不同视图点击照片而引入的倾斜。两年前,作为计算机视觉课程的一部分,我在这方面几乎没有做任何作业。有一种转换称为 尺度不变特征转换 通过它可以提取角点的各种特征。角点是那些与其所有相邻像素不同的点。正如您所观察到的,如果从两个不同的视图中单击照片,某些边缘可能会消失并看起来像其他东西,但角几乎保持不变。此转换解释了如何为所有角点提取大小为 128 的特征向量,并告诉您如何使用这些特征向量来找出两个图像之间的相似性。在你的情况下
您可以提取您拥有的所有纸币之一的这些特征,并检查您应该测试的测试图像中是否存在这些角点,
因为这种转换对于旋转、缩放、裁剪、噪声添加和颜色过滤具有鲁棒性,所以我我想这是我能建议你的最好的了。您可以查看此演示,以更好地了解我所解释的内容。
There is some good research going on in the field of computer vision. One of the problem being solved is identification of an object irrespective of scale changes,noise additions and skews introduced because photo has been clicked from a different view. I have done little assignment on this two years back as a part of computer vision course. There is a transformation called as scale invariant feature transform by which you can extract various features for the corner point. Corner points are those which are different from all its neighboring pixels. As you can observe, If photo has been clicked from two different views, some edges may disappear and appear like some thing else but corners remain almost same. This transformations explains how feature vector of size 128 can be extracted for all the corner points and tells you how to use these feature vector to find out the similarity between two images. Here in you case
You can extract those features for one of all the currency notes you have and check for existence of these corner points in the test image you are supposed to test
As this transformation is robust to rotation,scaling,cropping,noise addition and color filtering, I guess this is the best I can suggest you. You can check this demo to have a better picture of what I explained.
OpenCV 有很多算法和功能,我想它应该适合你的问题,但是你'我必须使用 PInvoke 才能从 C#(它是 C 库)中使用它 - 可行,但需要一些工作。
OpenCV has lots of algorithms and features, I guess it should be suitable for your problem, however you'll have to play with PInvoke to consume it from c# (it's C library) - doable, but requires some work.
您需要构建一组函数来计算两个图像 f(A,B) 之间特定变换的概率。先前已建议使用多种变换作为答案,例如傅里叶变换。您可能无法可靠地一次性计算出多个变换的概率 fgh(A,B)。因此,您将计算独立应用每个变换的概率 f(A,B) g(A,B) h(A,B) 并且 P 高于阈值的那些是解决方案。
如果顺序很重要,即您需要知道执行 f(A,B) 然后 g(f,B) 然后 h(g,B),那么您需要采用基于状态的概率框架,例如隐马尔可夫模型或贝叶斯网络(嗯,这是 HMM 的推广)来对状态之间移动的可能性进行建模。请参阅 Matlab 的 BNT 工具箱 (http://people.cs。 ubc.ca/~murphyk/Software/BNT/bnt.html)了解有关这些或任何优秀的现代人工智能书籍的更多详细信息。
You would need to build a set of functions that compute the probability of a particular transform between two images f(A,B). A number of transforms have previously been suggested as answers, e.g. Fourier. You would probably not be able to compute the probability of multiple transforms in one go fgh(A,B) with any reliability. So, you would compute the probability that each transform was independently applied f(A,B) g(A,B) h(A,B) and those with P above a threshold are the solution.
If the order is important, i.e you need to know that f(A,B) then g(f,B) then h(g,B) was performed, then you would need to adopt a state based probability framework such as Hidden Markov Models or a Bayesian Network (well, this is a generalization of HMMs) to model the likelihood of moving between states. See the BNT toolbox for Matlab (http://people.cs.ubc.ca/~murphyk/Software/BNT/bnt.html) for more details on these or any good modern AI book.