HAAR classifier-how to detect only ONE face at a time

三世轮回 提交于 2019-12-12 03:16:47

问题


Using a C# implementation of Open CV which in turn is directly based on the OpenCV Java source here. http://docs.opencv.org/java/

The specific line where I call the HAAR classifier is

 cascade.detectMultiScale(grayMat, faces, 1.2, 3, 2, new Size(60, 60), new Size(150, 150));

The problem is I only want to track one face at a time, even if several are detected. ie if there are 2 faces detected, my tracking rectangles keep jumping randomly between the 2 faces. How can I ONLY detect 1 face at a time(ie the first one detected)?

来源:https://stackoverflow.com/questions/32059717/haar-classifier-how-to-detect-only-one-face-at-a-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!