diff --git a/face-search-core/src/test/java/com/visual/face/search/core/test/extract/FaceFeatureExtractTest.java b/face-search-core/src/test/java/com/visual/face/search/core/test/extract/FaceFeatureExtractTest.java index bdff7b4..1e46e48 100755 --- a/face-search-core/src/test/java/com/visual/face/search/core/test/extract/FaceFeatureExtractTest.java +++ b/face-search-core/src/test/java/com/visual/face/search/core/test/extract/FaceFeatureExtractTest.java @@ -70,7 +70,7 @@ public class FaceFeatureExtractTest extends BaseTest { Imgproc.line(image, new Point(box.rightTop.x, box.rightTop.y), new Point(box.rightBottom.x, box.rightBottom.y), new Scalar(255,0,0), 1); Imgproc.line(image, new Point(box.rightBottom.x, box.rightBottom.y), new Point(box.leftBottom.x, box.leftBottom.y), new Scalar(255,0,0), 1); Imgproc.line(image, new Point(box.leftBottom.x, box.leftBottom.y), new Point(box.leftTop.x, box.leftTop.y), new Scalar(255,0,0), 1); - Imgproc.putText(image, String.valueOf(faceInfo.angle), new Point(box.leftTop.x, box.leftTop.y+15), Imgproc.FONT_HERSHEY_PLAIN, 1, new Scalar(0,0,255)); + Imgproc.putText(image, String.valueOf(faceInfo.angle), new Point(box.leftTop.x, box.leftTop.y+15), 1, 1, new Scalar(0,0,255)); // Imgproc.rectangle(image, new Point(faceInfo.box.x1(), faceInfo.box.y1()), new Point(faceInfo.box.x2(), faceInfo.box.y2()), new Scalar(255,0,255)); FaceInfo.FaceBox box1 = faceInfo.rotateFaceBox(); @@ -80,8 +80,8 @@ public class FaceFeatureExtractTest extends BaseTest { Imgproc.circle(image, new Point(box1.leftBottom.x, box1.leftBottom.y), 3, new Scalar(0,0,255), -1); FaceInfo.Attribute attribute = faceInfo.attribute; - Imgproc.putText(image, attribute.valueOfGender().name(), new Point(box.center().x-10, box.center().y), Imgproc.FONT_HERSHEY_PLAIN, 1, new Scalar(255,0,0)); - Imgproc.putText(image, ""+attribute.age, new Point(box.center().x-10, box.center().y+20), Imgproc.FONT_HERSHEY_PLAIN, 1, new Scalar(255,0,0)); + Imgproc.putText(image, attribute.valueOfGender().name(), new Point(box.center().x-10, box.center().y), 1, 1, new Scalar(255,0,0)); + Imgproc.putText(image, ""+attribute.age, new Point(box.center().x-10, box.center().y+20), 1, 1, new Scalar(255,0,0)); int pointNum = 1; diff --git a/face-search-core/src/test/java/com/visual/face/search/core/test/models/InsightAttributeDetectionTest.java b/face-search-core/src/test/java/com/visual/face/search/core/test/models/InsightAttributeDetectionTest.java index 08b2257..03af594 100644 --- a/face-search-core/src/test/java/com/visual/face/search/core/test/models/InsightAttributeDetectionTest.java +++ b/face-search-core/src/test/java/com/visual/face/search/core/test/models/InsightAttributeDetectionTest.java @@ -49,14 +49,14 @@ public class InsightAttributeDetectionTest extends BaseTest { long a = System.currentTimeMillis(); FaceInfo.Attribute attribute = inferAttribute.inference(ImageMat.fromCVMat(cropFace), null); System.out.println("ssss="+(System.currentTimeMillis() - a)); - Imgproc.putText(image, attribute.valueOfGender().name(), new Point(faceInfo.box.x1()+10, faceInfo.box.y1()+10), Imgproc.FONT_HERSHEY_PLAIN, 1, new Scalar(0,0,255)); - Imgproc.putText(image, ""+attribute.age, new Point(faceInfo.box.x1()+10, faceInfo.box.y1()+40), Imgproc.FONT_HERSHEY_PLAIN, 1, new Scalar(0,0,255)); + Imgproc.putText(image, attribute.valueOfGender().name(), new Point(faceInfo.box.x1()+10, faceInfo.box.y1()+10), 1, 1, new Scalar(0,0,255)); + Imgproc.putText(image, ""+attribute.age, new Point(faceInfo.box.x1()+10, faceInfo.box.y1()+40), 1, 1, new Scalar(0,0,255)); Imgproc.rectangle(image, new Point(faceInfo.box.x1(), faceInfo.box.y1()), new Point(faceInfo.box.x2(), faceInfo.box.y2()), new Scalar(0,0,255)); int pointNum = 1; for(FaceInfo.Point keyPoint : faceInfo.points){ Imgproc.circle(image, new Point(keyPoint.x, keyPoint.y), 3, new Scalar(0,0,255), -1); - Imgproc.putText(image, String.valueOf(pointNum), new Point(keyPoint.x+1, keyPoint.y), Imgproc.FONT_HERSHEY_PLAIN, 1, new Scalar(255,0,0)); + Imgproc.putText(image, String.valueOf(pointNum), new Point(keyPoint.x+1, keyPoint.y), 1, 1, new Scalar(255,0,0)); pointNum ++ ; } } diff --git a/face-search-core/src/test/java/com/visual/face/search/core/test/models/InsightCoordFaceKeyPointTest.java b/face-search-core/src/test/java/com/visual/face/search/core/test/models/InsightCoordFaceKeyPointTest.java index 5849f69..253ec33 100755 --- a/face-search-core/src/test/java/com/visual/face/search/core/test/models/InsightCoordFaceKeyPointTest.java +++ b/face-search-core/src/test/java/com/visual/face/search/core/test/models/InsightCoordFaceKeyPointTest.java @@ -37,7 +37,7 @@ public class InsightCoordFaceKeyPointTest extends BaseTest { int pointNum = 1; for(FaceInfo.Point keyPoint : points){ Imgproc.circle(image, new Point(keyPoint.x, keyPoint.y), 1, new Scalar(0,0,255), -1); - Imgproc.putText(image, String.valueOf(pointNum), new Point(keyPoint.x+1, keyPoint.y), Imgproc.FONT_HERSHEY_PLAIN, 1, new Scalar(255,0,0)); + Imgproc.putText(image, String.valueOf(pointNum), new Point(keyPoint.x+1, keyPoint.y), 1, 1, new Scalar(255,0,0)); pointNum ++ ; System.out.println("["+keyPoint.x+"," +keyPoint.y+"],"); } diff --git a/face-search-core/src/test/java/com/visual/face/search/core/test/models/InsightScrfdFaceDetectionTest.java b/face-search-core/src/test/java/com/visual/face/search/core/test/models/InsightScrfdFaceDetectionTest.java index 18bbbd5..1cb2c7f 100755 --- a/face-search-core/src/test/java/com/visual/face/search/core/test/models/InsightScrfdFaceDetectionTest.java +++ b/face-search-core/src/test/java/com/visual/face/search/core/test/models/InsightScrfdFaceDetectionTest.java @@ -53,13 +53,13 @@ public class InsightScrfdFaceDetectionTest extends BaseTest { Imgproc.line(image, new Point(box.rightTop.x, box.rightTop.y), new Point(box.rightBottom.x, box.rightBottom.y), new Scalar(255,0,0), 1); Imgproc.line(image, new Point(box.rightBottom.x, box.rightBottom.y), new Point(box.leftBottom.x, box.leftBottom.y), new Scalar(255,0,0), 1); Imgproc.line(image, new Point(box.leftBottom.x, box.leftBottom.y), new Point(box.leftTop.x, box.leftTop.y), new Scalar(255,0,0), 1); - Imgproc.putText(image, String.valueOf(faceInfo.angle), new Point(box.leftTop.x, box.leftTop.y), Imgproc.FONT_HERSHEY_PLAIN, 1, new Scalar(0,0,255)); + Imgproc.putText(image, String.valueOf(faceInfo.angle), new Point(box.leftTop.x, box.leftTop.y), 1, 1, new Scalar(0,0,255)); FaceInfo.Points points = faceInfo.points; int pointNum = 1; for(FaceInfo.Point keyPoint : points){ Imgproc.circle(image, new Point(keyPoint.x, keyPoint.y), 3, new Scalar(0,0,255), -1); - Imgproc.putText(image, String.valueOf(pointNum), new Point(keyPoint.x+1, keyPoint.y), Imgproc.FONT_HERSHEY_PLAIN, 1, new Scalar(255,0,0)); + Imgproc.putText(image, String.valueOf(pointNum), new Point(keyPoint.x+1, keyPoint.y), 1, 1, new Scalar(255,0,0)); pointNum ++ ; } } diff --git a/face-search-core/src/test/java/com/visual/face/search/core/test/models/PcnNetworkFaceDetectionTest.java b/face-search-core/src/test/java/com/visual/face/search/core/test/models/PcnNetworkFaceDetectionTest.java index c99b172..83aca9c 100755 --- a/face-search-core/src/test/java/com/visual/face/search/core/test/models/PcnNetworkFaceDetectionTest.java +++ b/face-search-core/src/test/java/com/visual/face/search/core/test/models/PcnNetworkFaceDetectionTest.java @@ -51,7 +51,7 @@ public class PcnNetworkFaceDetectionTest extends BaseTest { Imgproc.line(image, new Point(box.rightTop.x, box.rightTop.y), new Point(box.rightBottom.x, box.rightBottom.y), new Scalar(255,0,0), 1); Imgproc.line(image, new Point(box.rightBottom.x, box.rightBottom.y), new Point(box.leftBottom.x, box.leftBottom.y), new Scalar(255,0,0), 1); Imgproc.line(image, new Point(box.leftBottom.x, box.leftBottom.y), new Point(box.leftTop.x, box.leftTop.y), new Scalar(255,0,0), 1); - Imgproc.putText(image, String.valueOf(faceInfo.angle), new Point(box.leftTop.x, box.leftTop.y), Imgproc.FONT_HERSHEY_PLAIN, 1, new Scalar(0,0,255)); + Imgproc.putText(image, String.valueOf(faceInfo.angle), new Point(box.leftTop.x, box.leftTop.y), 1, 1, new Scalar(0,0,255)); // Imgproc.rectangle(image, new Point(faceInfo.box.x1(), faceInfo.box.y1()), new Point(faceInfo.box.x2(), faceInfo.box.y2()), new Scalar(255,0,255)); FaceInfo.FaceBox box1 = faceInfo.rotateFaceBox(); @@ -63,7 +63,7 @@ public class PcnNetworkFaceDetectionTest extends BaseTest { int pointNum = 1; for(FaceInfo.Point keyPoint : faceInfo.points){ Imgproc.circle(image, new Point(keyPoint.x, keyPoint.y), 3, new Scalar(0,0,255), -1); - Imgproc.putText(image, String.valueOf(pointNum), new Point(keyPoint.x+1, keyPoint.y), Imgproc.FONT_HERSHEY_PLAIN, 1, new Scalar(255,0,0)); + Imgproc.putText(image, String.valueOf(pointNum), new Point(keyPoint.x+1, keyPoint.y), 1, 1, new Scalar(255,0,0)); pointNum ++ ; }