如何使用VGA摄像头作为光学传感器?
我正在设计一个信息亭,其中包含隐藏在信息亭内的手机。 我想知道是否可以使用手机的 VGA 摄像头作为传感器来检测何时有人站在信息亭前。
使用 VGA 摄像头进行运动检测的代码需要哪些软件组件(例如 Java、API、蓝牙堆栈等)?
I am designing an information kiosk which incorporates a mobile phone hidden inside the kiosk.
I wonder whether it would be possible to use the VGA camera of the phone as a sensor to detect when somebody is standing in front of the kiosk.
Which SW components (e.g. Java, APIs, bluetooth stack etc) would be required for a code to use the VGA camera for movement detection?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
显而易见的选择是使用人脸检测。 但您必须对此进行校准,以确保检测到的人脸距离自助服务终端足够近。 可能是利用了图片中脸部的相对大小。 这可以使用广泛使用的 opencv lib 来完成。 但由于该信息亭将部署在您无法控制照明的地方,因此很有可能出现误报和漏报。 您可能还想考虑将接近传感器与面部检测相结合。
Obvious choice is to use face detection. But you would have to calibrate this to ensure that the face detected is close enough to the kiosk. May be using the relative size of the face in the picture. This could be done using opencv lib which is widely used. But as this kiosk would be deployed in places you would have little control of the lighting, there's a good chance of false positives and negatives. May be you also want to consider a proximity sensor in combination with face detection.
根据信息亭的平台不同,使用的选项也会有所不同...但假设下面有 linux,您应该看看 OpenCV 库。 如果它有任何用处 - 这是 我的链接有趣的实验是为了获得用于阅读长网页的“点头控制界面”。
说到误报,甚至更糟糕的是误报,如果光线不好或角度不正常,出现这种情况的可能性相当高。 因此,您需要通过一些后备机制来补充这一机制,例如默认情况下存在的屏幕按钮“按此处开始”,然后使用不活动超时以及面部检测来避免只有一个信息输入向量。
另一个想法(取决于光线条件)可能是测量图片中的总光量 - 自然光应该仅引起缓慢的变化,而靠近信息亭的人会引起快速的照明变化。
Depending on what platform is the information kiosk using the options would vary... But assuming there is linux somewhere underneath, you should take a look at OpenCV library. And in case it is of any use - here's a link to my funny experiment to get the 'nod-controlled interface' for reading the long web pages.
And speaking of false positives - or even worse - false negatives - in case of bad lighting or unusual angle the chances are pretty high. So you'd need to complement that by some fallback mechanism like onscreen button 'press here to start' which would be there by default, and then use the inactivity timeout alongside with the face detection to avoid having just one information input vector.
Another idea (depending on the light conditions), might be to measure the overall amount of light in the picture - natural light should be eliciting only slow changes, while the person walking close to the kiosk would cause rapid lighting change.
在j2me(用于手机的java)中,您可以使用mmapi(移动媒体api)来捕获相机屏幕。
大多数手机都支持此功能。
In j2me (java for mobile phones), you can use the mmapi (mobile media api) to capture the camera screen.
Most phones support this.
@Andrew 对 OpenCV 的建议很好。 有很多运动检测项目。 但是,我建议添加一个便宜的 CMOS 摄像头而不是手机摄像头。
@Andrew's suggestion on OpenCV is good. There are a lot of motion detection projects. BUT, I would suggest adding a cheap CMOS camera rather than the mobile phone camera.