简体   繁体   English

Android OpenCV:手部检测

[英]OpenCV Android: Hand detection

I'm using OpenCV in android. 我在android中使用OpenCV。 I'm a total beginner in OpenCV. 我是OpenCV的初学者。 My end goal is to recognize hand gestures. 我的最终目标是识别手势。 But for this, I first have to detect a human hand. 但是为此,我首先必须检测到人的手。 I don't know where to start. 我不知道从哪里开始。 Any help? 有什么帮助吗?

EDIT I have already imported OpenCV and successfully ran 2 sample projects. 编辑我已经导入了OpenCV并成功运行了2个示例项目。 The face detector sample didn't work though. 脸部检测器样本无法正常工作。 Now I wanna proceed to detect hand gestures. 现在我要继续检测手势。 Only 4 gestures: when a user moves his hand from left to right in front of camera, same for three more directions. 仅4个手势:当用户在摄像头前从左向右移动手时,在三个方向上相同。

Since you are planning to detect only 4 motions, hence you simplify your task to a huge degree. 由于您计划仅检测4个动作,因此可以极大地简化您的任务。

Go through these links 1 2 and get yourself acquainted with basics of hand detection. 通过这些链接1 2并熟悉手部检测的基础知识。

Your main aim should be to detect the hand from background, something like shown in the image below. 您的主要目的应该是从背景中检测手,如下图所示。

手

Once that is done, you can keep taking images in succession and process it and keep track of center and end points of the hand. 完成此操作后,您可以继续连续拍摄图像并进行处理,并跟踪手的中心和终点。

Now by simply subtracting these points of the successive image, you can easily find the possible 4 directions the hand can move in your case. 现在,只需减去连续图像的这些点,就可以轻松找到手在您的情况下可以移动的四个方向。

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

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