commit 22/07/2025
This commit is contained in:
@@ -44,7 +44,6 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import static Config.SomeCodes.*;
|
||||
import static id.co.gtc.erhacam.Detectors.*;
|
||||
import static org.bytedeco.opencv.global.opencv_imgproc.*;
|
||||
|
||||
@SuppressWarnings({"unused"})
|
||||
@@ -157,6 +156,8 @@ public class Cameradetail {
|
||||
private boolean use_qr = false;
|
||||
private boolean use_face = false;
|
||||
|
||||
private @Getter Detectors detector;
|
||||
|
||||
private void setSliderValue(Slider sld, CameraProperty prop, double value){
|
||||
|
||||
if (sld!=null){
|
||||
@@ -239,6 +240,8 @@ public class Cameradetail {
|
||||
raise_log("Exposure for "+getCameraTitle()+" changed to "+newVal);
|
||||
});
|
||||
|
||||
detector = new Detectors();
|
||||
|
||||
}
|
||||
|
||||
@FXML
|
||||
@@ -903,7 +906,7 @@ public class Cameradetail {
|
||||
int _face_width = 0;
|
||||
int _face_height = 0;
|
||||
|
||||
List<DetectorResult> frontalfaces = HaveFrontalFace(GrayMat.clone());
|
||||
List<DetectorResult> frontalfaces = detector.HaveFrontalFace(GrayMat.clone());
|
||||
if (!frontalfaces.isEmpty()){
|
||||
for(DetectorResult rect : frontalfaces){
|
||||
if (rect.haveFace() ){
|
||||
@@ -921,7 +924,7 @@ public class Cameradetail {
|
||||
} else {
|
||||
// gak punya frontal face
|
||||
// coba cek punya profile left face 45 gak
|
||||
List<DetectorResult> Left45Faces = HaveLeft45Face(GrayMat.clone());
|
||||
List<DetectorResult> Left45Faces = detector.HaveLeft45Face(GrayMat.clone());
|
||||
if (!Left45Faces.isEmpty()){
|
||||
for(DetectorResult rect : Left45Faces){
|
||||
if (rect.haveFace()){
|
||||
|
||||
Reference in New Issue
Block a user