Tag: haar classifier

Java和haarcascade面部和嘴部检测 – 嘴巴作为鼻子

今天我开始测试在Java和OpenCv中检测微笑的项目。 用于识别面部和嘴部项目使用haarcascade_frontalface_alt和haarcascade_mcs_mouth但我不明白为什么在某些原因项目检测鼻子为嘴。 我有两种方法: private ArrayList detectMouth(String filename) { int i = 0; ArrayList mouths = new ArrayList(); // reading image in grayscale from the given path image = Highgui.imread(filename, Highgui.CV_LOAD_IMAGE_GRAYSCALE); MatOfRect faceDetections = new MatOfRect(); // detecting face(s) on given image and saving them to MatofRect object faceDetector.detectMultiScale(image, faceDetections); System.out.println(String.format(“Detected %s faces”, faceDetections.toArray().length)); MatOfRect mouthDetections […]