face_getFacesHAAR
import { face_getFacesHAAR } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Default face detector This function is mainly utilized by the implementation of a Facemark Algorithm. End users are advised to use function Facemark::getFaces which can be manually defined and circumvented to the algorithm by Facemark::setFaceDetector.
std::vector<cv::Rect> faces;
CParams params("haarcascade_frontalface_alt.xml");
cv::face::getFaces(frame, faces, ¶ms);
for(int j=0;j<faces.size();j++){
cv::rectangle(frame, faces[j], cv::Scalar(255,0,255));
}
cv::imshow("detection", frame);
face_getFacesHAAR(image: Mat, faces: Mat, face_cascade_name: EmbindString): boolean;imageThe input image to be processed.
facesOutput destination, filled by the native operation. Output of the function which represent region of interest of the detected faces. Each face is stored in cv::Rect container.
face_cascade_nameface cascade name argument (EmbindString).
The boolean result.
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.