简体   繁体   English

如何向Google Glass应用程序添加图像识别?

[英]How can I add image recognition to a Google Glass application?

I am trying to find a free way to do image recognition / computer vision in my Google Glass application. 我正在尝试在Google Glass应用程序中找到一种免费的方法来进行图像识别/计算机视觉。 I am looking for something that can recognize real-world objects like money, book covers, and text. 我正在寻找一种可以识别现实世界中的物体的东西,例如金钱,书的封面和文本。 Ideally, it would work like Google Goggles (for some reason Google hasn't made a Goggle API). 理想情况下,它可以像Google Goggles一样工作(由于某种原因Google尚未制作Goggle API)。 I am open to cloud-based solutions or ones that run locally. 我欢迎基于云的解决方案或在本地运行的解决方案。 I am even open to running my own server if its not feasable to do image recognition locally on Glass. 如果我不愿意在Glass上本地进行图像识别,我什至愿意运行自己的服务器。

I have looked into several different technologies. 我研究了几种不同的技术。 OpenCV seems very powerful, but it doesn't come with a library of images to match against. OpenCV似乎非常强大,但没有附带可匹配的图像库。 CamFind has an cloud API that does exactly what I need, but it costs a lot of money. CamFind的云API可以完全满足我的需要,但要花很多钱。

Does any have any suggestions for how I could add image recognition to my application? 关于如何将图像识别添加到应用程序中,有什么建议吗? Thanks in advance! 提前致谢!

I won the Glass Foundry hackathon in NYC (in 2013) by hacking basically the same thing together. 我在2013年赢得了纽约市的Glass Foundry黑客马拉松大赛,方法是一起入侵基本上相同的东西。 This was before the native development kit for Glass was even announced, so I did it all with just the mirror API. 这是在甚至还没有宣布Glass的本机开发工具包之前的,所以我只使用了镜像API来完成这一切。 This is how I implemented it: 这是我的实现方式:

  1. First, create a server-side glass app using one of the quickstarts . 首先, 使用快速入门之一创建服务器端Glass应用程序 requesting the correct scope so you can interact with the Mirror API and manipulate users' timelines. 请求正确的范围,以便您可以与Mirror API交互并操纵用户的时间表。
  2. Expose a custom share target, so that when the user takes a photo, they can "share" it with your app 公开自定义共享目标,以便用户拍照时可以与您的应用“共享”照片
  3. Upon sharing, your server will receive a POST (multipart I believe) from the mirror API with your image Note: Most image recognition won't require such a high resolution as Glass's 5mp, so I shrunk the image down significantly to make everything move faster. 共享后,您的服务器将通过镜像API随您的图像收到POST(我相信是多个部分) 注意:大多数图像识别不需要像Glass的5mp这样的高分辨率,因此我将图像缩小了很多以使一切移动得更快。
  4. On the server side, upload the image to an image recognition service. 在服务器端,将图像上传到图像识别服务。 I used IQ Engines which is now defunct. 我使用了现已失效的IQ引擎。 A quick Google search reveals many services. 快速的Google搜索显示了许多服务。
  5. Still on the server side, with the result of the image recognition, insert a new card into the user's timeline with the result and the image, etc 仍然在服务器端,通过图像识别的结果,将新卡以及结果和图像插入用户的时间轴中,等等。

OpenCV has haarcascade for detection of eyes, body and plate number. OpenCV具有级联功能,可以检测眼睛,身体和车牌号。 See the following link for available features. 有关可用功能,请参见以下链接。

https://github.com/Itseez/opencv/tree/master/data/haarcascades https://github.com/Itseez/opencv/tree/master/data/haarcascades

See the following for eye detection 眼部侦测请参阅以下内容

Opencv - detecting whether the eye is closed or open OpenCV-检测眼睛是闭合还是睁开

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

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