commit 09/04/2025
This commit is contained in:
@@ -5,6 +5,7 @@ import lombok.Setter;
|
||||
import org.bytedeco.opencv.opencv_core.Rect;
|
||||
import org.bytedeco.opencv.opencv_core.Scalar;
|
||||
import org.bytedeco.opencv.opencv_core.UMat;
|
||||
import org.opencv.imgproc.Imgproc;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,6 +15,9 @@ import static org.bytedeco.opencv.global.opencv_imgproc.rectangle;
|
||||
public class DetectorResult {
|
||||
private @Setter Rect Face;
|
||||
private List<Rect> Eyes;
|
||||
private final int linethickness = 3;
|
||||
private final int linetype = Imgproc.LINE_8;
|
||||
private final int lineshift = 0;
|
||||
|
||||
public void AddEye(Rect eye){
|
||||
if (Eyes == null) Eyes = new java.util.ArrayList<>();
|
||||
@@ -22,7 +26,8 @@ public class DetectorResult {
|
||||
|
||||
public void FaceRectangle(UMat mat){
|
||||
if (haveFace()){
|
||||
rectangle(mat, Face, Scalar.GREEN);
|
||||
|
||||
rectangle(mat, Face, Scalar.GREEN, linethickness, linetype, lineshift);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user