简体   繁体   English

OpenCV背景扣除+皮肤脱粒以检测手C ++

[英]OpenCV background substraction + skin thresh to detect hand c++

I've been working on a project to detect the hand palm using only computer webcam and no equipments(no colored gloves to ease the detection). 我一直在一个项目中,仅使用计算机网络摄像头而不使用任何设备(没有彩色手套来简化检测)来检测手掌。 So far I've combined Skin detection and Background substraction, By using bitwised & between both Mats. 到目前为止,我已经通过在两个Mats之间使用按位&结合了皮肤检测和背景减法。

Skin + Back Thresh 皮肤+背部脱粒

I've combined both to overcome skin colored objects such as my guitar, my door and my closet. 我结合了两者,以克服皮肤有色的物体,例如吉他,门和壁橱。 But as you can see, there is still much noise and the hand is interrupted. 但是正如您所看到的,仍然有很多噪音并且手被打断了。 I've tried to blur that, which only made it worse. 我试图模糊它,这只会使情况变得更糟。 also, change of lighting really damaged the proccess, tried to cancel auto exposure which did not help much. 此外,更换照明确实损坏了过程,试图取消自动曝光,但效果不大。 I dont want this to be perfect, cause it is just part of my bigger project, but does any of you know how can I better the algorithm? 我不希望这是完美的,因为这只是我较大的项目的一部分,但是你们中有人知道我该如何改善算法吗?

You can remove some noise by a morphological transformation (like opening and closing). 您可以通过形态转换(例如打开和关闭)去除一些噪音。 These techniques are often used after a background substraction 这些技术通常在扣除背景后使用

  1. A closing to reduce noise 封闭以减少噪音
  2. An opening right after to minimize loss of information over the things we want to detect 紧随其后的开放以最大程度地减少我们想要检测的事物的信息丢失

see this link for code example. 有关代码示例,请参见此链接

After that you have to "discover" the hand in your image, but I think this is not the query here but this link could help you. 之后,您必须“发现”图像中的手,但是我认为这不是这里的查询,但是此链接可以为您提供帮助。

Hope that help. 希望有所帮助。

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

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