Could someone help me please? I can’t detect the tongue or mouth. Im using openCV.js
Face works.
// detect faces
const msize = new cv.Size(0, 0);
faceCascade.detectMultiScale(gray, faces, 1.1, 3, 0, msize, msize);
for (let i = 0; i < faces.size(); ++i) {
const roiGray = gray.roi(faces.get(i));
const roiSrc = newImg.roi(faces.get(i));
const point1 = new cv.Point(faces.get(i).x, faces.get(i).y);
const point2 = new cv.Point(
faces.get(i).x + faces.get(i).width,
faces.get(i).y + faces.get(i).height
);
cv.rectangle(newImg, point1, point2, [255, 0, 0, 255]);
// detect mouth openCV.js
mouthCascade.detectMultiScale(roiGray, mouth);
// console.log(mouth.size());
for (let h = 0; h < mouth.size(); ++h) {
const point1 = new cv.Point(mouth.get(h).x, mouth.get(h).y);
const point2 = new cv.Point(
mouth.get(h).x + mouth.get(h).width,
mouth.get(h).y + mouth.get(h).height
);
cv.rectangle(roiSrc, point1, point2, [0, 0, 255, 255]);
// cv.rectangle(roiSrc, (x,y), (x+w,y+h), (0,255,0), 3)
}
Could someone help me with the mouth and tongue?