@@ -57,13 +57,15 @@ public ArcFaceRecognitionTemplate(ArcFaceRecognitionProperties properties,
5757 this .faceEngineObjectPool = faceEngineObjectPool ;
5858 }
5959
60+ /** Getter for message */
6061 protected String getMessage (int code ) {
6162 return messages .getMessage ("K" + code );
6263 }
6364
6465 /*
6566 * 不同的控制度下所对应的活体控制阈值,如果检测出来的活体分数小于控制阈值,则会返回错误信息。 LOW 0.05 NORMAL 0.3 HIGH 0.9
6667 */
68+ /** Setter for liveness param */
6769 protected int setLivenessParam (FaceEngine faceEngine , FaceLiveness liveness , JSONObject result ) {
6870 switch (liveness ) {
6971 case LOW : {
@@ -91,6 +93,11 @@ protected int setLivenessParam(FaceEngine faceEngine, FaceLiveness liveness, JSO
9193 * @author <a href="https://github.com/loong10k">Loong Wan</a>
9294 * @return
9395 */
96+ /**
97+ * <p>detect.</p>
98+ * @param imageBytes the image bytes
99+ * @return the detect return value
100+ */
94101 public JSONObject detect (byte [] imageBytes ) {
95102 return detect (ImageFactory .getRGBData (imageBytes ), FaceLiveness .NONE );
96103 }
@@ -102,6 +109,12 @@ public JSONObject detect(byte[] imageBytes) {
102109 * @author <a href="https://github.com/loong10k">Loong Wan</a>
103110 * @return
104111 */
112+ /**
113+ * <p>detect.</p>
114+ * @param imageBytes the image bytes
115+ * @param liveness the liveness
116+ * @return the detect return value
117+ */
105118 public JSONObject detect (byte [] imageBytes , FaceLiveness liveness ) {
106119 return detect (ImageFactory .getRGBData (imageBytes ), liveness );
107120 }
@@ -113,6 +126,11 @@ public JSONObject detect(byte[] imageBytes, FaceLiveness liveness) {
113126 * @author <a href="https://github.com/loong10k">Loong Wan</a>
114127 * @return
115128 */
129+ /**
130+ * <p>detect.</p>
131+ * @param imageInfo the image info
132+ * @return the detect return value
133+ */
116134 public JSONObject detect (ImageInfo imageInfo ) {
117135 return detect (imageInfo , FaceLiveness .NONE );
118136 }
@@ -124,6 +142,12 @@ public JSONObject detect(ImageInfo imageInfo) {
124142 * @author <a href="https://github.com/loong10k">Loong Wan</a>
125143 * @return
126144 */
145+ /**
146+ * <p>detect.</p>
147+ * @param imageInfo the image info
148+ * @param liveness the liveness
149+ * @return the detect return value
150+ */
127151 public JSONObject detect (ImageInfo imageInfo , FaceLiveness liveness ) {
128152
129153 JSONObject result = new JSONObject ();
@@ -267,6 +291,12 @@ public JSONObject detect(ImageInfo imageInfo, FaceLiveness liveness) {
267291 * @author <a href="https://github.com/loong10k">Loong Wan</a>
268292 * @return
269293 */
294+ /**
295+ * <p>ir detect.</p>
296+ * @param imageBytes the image bytes
297+ * @param liveness the liveness
298+ * @return the irDetect return value
299+ */
270300 public JSONObject irDetect (byte [] imageBytes , FaceLiveness liveness ) {
271301 return irDetect (ImageFactory .getGrayData (imageBytes ), liveness );
272302 }
@@ -278,6 +308,12 @@ public JSONObject irDetect(byte[] imageBytes, FaceLiveness liveness) {
278308 * @author <a href="https://github.com/loong10k">Loong Wan</a>
279309 * @return
280310 */
311+ /**
312+ * <p>ir detect.</p>
313+ * @param imageInfo the image info
314+ * @param liveness the liveness
315+ * @return the irDetect return value
316+ */
281317 public JSONObject irDetect (ImageInfo imageInfo , FaceLiveness liveness ) {
282318
283319 JSONObject result = new JSONObject ();
@@ -416,6 +452,13 @@ public JSONObject irDetect(ImageInfo imageInfo, FaceLiveness liveness) {
416452 return null ;
417453 }
418454
455+ /**
456+ * <p>match.</p>
457+ * @param sourceImage the source image
458+ * @param feature the feature
459+ * @param liveness the liveness
460+ * @return the match return value
461+ */
419462 public JSONObject match (ImageInfo sourceImage , byte [] feature , FaceLiveness liveness ) {
420463
421464 JSONObject result = new JSONObject ();
@@ -499,10 +542,24 @@ public JSONObject match(ImageInfo sourceImage, byte[] feature, FaceLiveness live
499542 }
500543 }
501544
545+ /**
546+ * <p>match.</p>
547+ * @param sourceImage the source image
548+ * @param targetImage the target image
549+ * @param liveness the liveness
550+ * @return the match return value
551+ */
502552 public JSONObject match (byte [] sourceImage , byte [] targetImage , FaceLiveness liveness ) {
503553 return match (ImageFactory .getRGBData (sourceImage ), ImageFactory .getRGBData (targetImage ), liveness );
504554 }
505555
556+ /**
557+ * <p>match.</p>
558+ * @param sourceImage the source image
559+ * @param targetImage the target image
560+ * @param liveness the liveness
561+ * @return the match return value
562+ */
506563 public JSONObject match (ImageInfo sourceImage , ImageInfo targetImage , FaceLiveness liveness ) {
507564
508565 JSONObject result = new JSONObject ();
@@ -608,14 +665,32 @@ public JSONObject match(ImageInfo sourceImage, ImageInfo targetImage, FaceLivene
608665 }
609666 }
610667
668+ /**
669+ * <p>ir search.</p>
670+ * @param sourceImage the source image
671+ * @param searchImage the search image
672+ * @return the irSearch return value
673+ */
611674 public JSONObject irSearch (byte [] sourceImage , byte [] searchImage ) {
612675 return search (ImageFactory .getGrayData (sourceImage ), ImageFactory .getGrayData (searchImage ));
613676 }
614677
678+ /**
679+ * <p>search.</p>
680+ * @param sourceImage the source image
681+ * @param searchImage the search image
682+ * @return the search return value
683+ */
615684 public JSONObject search (byte [] sourceImage , byte [] searchImage ) {
616685 return search (ImageFactory .getRGBData (sourceImage ), ImageFactory .getRGBData (searchImage ));
617686 }
618687
688+ /**
689+ * <p>search.</p>
690+ * @param sourceImage the source image
691+ * @param searchImage the search image
692+ * @return the search return value
693+ */
619694 public JSONObject search (ImageInfo sourceImage , ImageInfo searchImage ) {
620695
621696 JSONObject result = new JSONObject ();
@@ -709,10 +784,22 @@ public JSONObject search(ImageInfo sourceImage, ImageInfo searchImage) {
709784 }
710785 }
711786
787+ /**
788+ * <p>verify.</p>
789+ * @param imageBytes the image bytes
790+ * @param liveness the liveness
791+ * @return the verify return value
792+ */
712793 public JSONObject verify (byte [] imageBytes , FaceLiveness liveness ) {
713794 return verify (ImageFactory .getRGBData (imageBytes ), liveness );
714795 }
715796
797+ /**
798+ * <p>verify.</p>
799+ * @param imageInfo the image info
800+ * @param liveness the liveness
801+ * @return the verify return value
802+ */
716803 public JSONObject verify (ImageInfo imageInfo , FaceLiveness liveness ) {
717804
718805 JSONObject result = new JSONObject ();
@@ -794,6 +881,12 @@ public JSONObject verify(ImageInfo imageInfo, FaceLiveness liveness) {
794881 }
795882 }
796883
884+ /**
885+ * <p>ir verify.</p>
886+ * @param imageBytes the image bytes
887+ * @param liveness the liveness
888+ * @return the irVerify return value
889+ */
797890 public JSONObject irVerify (byte [] imageBytes , FaceLiveness liveness ) {
798891 return irVerify (ImageFactory .getGrayData (imageBytes ), liveness );
799892 }
@@ -806,6 +899,12 @@ public JSONObject irVerify(byte[] imageBytes, FaceLiveness liveness) {
806899 * @param option 场景信息,程序会视不同的场景选用相对应的模型。当前支持的场景有COMMON(通用场景),GATE(闸机场景),默认使用COMMON
807900 * @return
808901 */
902+ /**
903+ * <p>ir verify.</p>
904+ * @param imageInfo the image info
905+ * @param liveness the liveness
906+ * @return the irVerify return value
907+ */
809908 public JSONObject irVerify (ImageInfo imageInfo , FaceLiveness liveness ) {
810909
811910 JSONObject result = new JSONObject ();
@@ -887,6 +986,7 @@ public JSONObject irVerify(ImageInfo imageInfo, FaceLiveness liveness) {
887986 }
888987 }
889988
989+ /** Getter for properties */
890990 public ArcFaceRecognitionProperties getProperties () {
891991 return properties ;
892992 }
0 commit comments