1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-28 06:43:01 +04:00

Move objdetect HaarCascadeClassifier and HOGDescriptor to contrib xobjdetect (#25198)

* Move objdetect parts to contrib

* Move objdetect parts to contrib

* Minor fixes.
This commit is contained in:
WU Jia
2024-03-22 04:40:10 +08:00
committed by GitHub
parent 213e1a4d9d
commit aa5ea340f7
111 changed files with 22 additions and 741097 deletions
@@ -259,10 +259,10 @@ Next, create the directory `src/main/resources` and download this Lena image int
Make sure it's called `"lena.png"`. Items in the resources directory are available to the Java
application at runtime.
Next, copy `lbpcascade_frontalface.xml` from `opencv/data/lbpcascades/` into the `resources`
Next, copy `lbpcascade_frontalface.xml` from `opencv_contrib/modules/xobjdetect/data/lbpcascades/` into the `resources`
directory:
@code{.bash}
cp <opencv_dir>/data/lbpcascades/lbpcascade_frontalface.xml src/main/resources/
cp <xobjdetect_dir>/data/lbpcascades/lbpcascade_frontalface.xml src/main/resources/
@endcode
Now modify src/main/java/HelloOpenCV.java so it contains the following Java code:
@code{.java}
@@ -273,7 +273,7 @@ import org.opencv.core.Point;
import org.opencv.core.Rect;
import org.opencv.core.Scalar;
import org.opencv.imgcodecs.Imgcodecs;
import org.opencv.objdetect.CascadeClassifier;
import org.opencv.xobjdetect.CascadeClassifier;
//
// Detects faces in an image, draws boxes around them, and writes the results