OpenCV 4.0.0 is now available in the official OpenCV.org website. I have compiled and packaged the CVImage library from my book together with the Java build of the new OpenCV library.
You can download the CVImage library here.
OpenCV 4.0.0 is now available in the official OpenCV.org website. I have compiled and packaged the CVImage library from my book together with the Java build of the new OpenCV library.
You can download the CVImage library here.
This will be the series of tutorials to elaborate the OpenCV face swap example. The 1st one is a demonstration of the face detection of the Face module, instead of using the Object Detection module. The sample program will detect faces from 2 photos, using the Haar Cascades file, haarcascade_frontalface_default.xml, located in the data folder of the Processing sketch.
The major command is
Face.getFacesHAAR(im.getBGR(), faces, dataPath(faceFile)); |
where im.getBGR() is the photo Mat returned from the CVImage object, im, faces is a MatOfRect variable returning the rectangle of all faces detected, and faceFile is a string variable containing the file name of the Haar Cascades XML file.
Complete source code is in the website GitHub repository, ml20180818a.