简体   繁体   English

在Windows 8 App中查找匹配的图像

[英]Find matching image in Windows 8 App

I'd like to build an app for Windows 8 / Windows Store where a user can take a picture with his device and the app will return an image from a database which looks the closest to it. 我想为Windows 8 / Windows Store构建一个应用程序,用户可以在其中使用设备拍摄照片,该应用程序将从数据库中返回最接近它的图像。 For example, you scan the front of a book and you get the right product image from the db. 例如,您扫描一本书的正面,然后从数据库中获得正确的产品图像。 Now, I know this isn't an easy task and so I was wondering, if there are any libraries working on Win8 I could use. 现在,我知道这不是一件容易的事,所以我想知道,是否有任何可以在Win8上运行的库。 I heard about tools like OpenCV, SURF and AForge.net, but can I use those on Windows 8? 我听说过OpenCV,SURF和AForge.net之类的工具,但是我可以在Windows 8上使用它们吗? I hope you guys can give me a point to start. 我希望你们能给我一点起点。

This is a very general question and thus can only yield a very general answer. 这是一个非常笼统的问题,因此只能产生一个非常笼统的答案。 Since you are targeting tablet devices you need to remember that they do not have nearly the processing power of a normal PC. 由于定位的是平板电脑设备,因此需要记住,它们几乎没有普通PC的处理能力。 Other applications on other devices that offer this type of functionality typically offload a lot of the work to their servers. 其他提供此类功能的设备上的其他应用程序通常会将大量工作分担给服务器。 I believe most of them do very little pre-processing on the device (normalizing to the correct resolution or doing some histogram generation) and then upload that to a server that has the databases and heavy analysis tools to do the comparisons. 我相信他们中的大多数人在设备上进行的预处理非常少(标准化为正确的分辨率或进行一些直方图生成),然后将其上传到具有数据库和大量分析工具进行比较的服务器。

The easiest way to start an application like this from the Windows 8 perspective would be to get an application that can take the picture and normalize it to a specific resolution. 从Windows 8的角度来看,启动像这样的应用程序的最简单方法是获得可以拍照并标准化为特定分辨率的应用程序。 Once you have that, build functionality to upload that to a server. 有了这些功能之后,就可以构建功能以将其上载到服务器。 You then need to implement server code to use tools like AForge to perform the image processing that would allow you to compare images. 然后,您需要实现服务器代码,以使用诸如AForge之类的工具来执行图像处理,从而可以比较图像。

There are tons of great resources on how to compare images and you are going to have to wade through them and find ones that work for you. 关于如何比较图像,有大量的资源,您将不得不遍历它们并找到适合您的图像。 To start you might want to read this thread: 首先,您可能需要阅读以下主题:

Image comparison - fast algorithm 图像比较-快速算法

In the end you need to decide what algorithm works best for the images you want to compare. 最后,您需要确定哪种算法最适合您要比​​较的图像。

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

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