All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dahuatech.icc.brm.enums.ImgCheckEnum Maven / Gradle / Ivy

There is a newer version: 1.0.13.7
Show newest version
package com.dahuatech.icc.brm.enums;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

public enum ImgCheckEnum {


    IAT_ST_FGE_OK(0x0,"人脸底库评估成功"),
    IAT_ST_FGE_FAIL_WIDTH(0x1,"人脸不适合入底库,宽度过小"),
    IAT_ST_FGE_FAIL_PUPIL_DISTANCE(0x2,"人眼瞳间距过小"),
    IAT_ST_FGE_FAIL_FLL_CONFIDENCE(0x4,"人脸对齐分数过低"),
    IAT_ST_FGE_FAIL_PITCH(0x8,"人脸俯仰⻆过大"),
    IAT_ST_FGE_FAIL_YAW(0x10,"人脸偏航⻆过大"),
    IAT_ST_FGE_FAIL_QE_SCORE(0x40,"人脸质量分过低"),
    IAT_ST_FGE_FAIL_CLARITYNESS(0x80,"人脸清晰度过低"),
    IAT_ST_FGE_FAIL_OCCLU_EYE(0x100,"人眼遮挡"),
    IAT_ST_FGE_FAIL_OCCLU_BROW(0x200,"人脸额头遮挡"),
    IAT_ST_FGE_FAIL_OCCLU_MOUTH(0x400,"人脸嘴巴遮挡"),
    IAT_ST_FGE_FAIL_COMPLETENESS(0x800,"人脸不完整"),
    IAT_ST_FGE_FAIL_ILLUMINATION(0x1000,"人脸光照过曝或者欠爆"),
    IAT_ST_FGE_FAIL_SATURATION(0x2000,"人脸饱和度过低"),
    IAT_ST_FGE_FAIL_RATIO_OF_FACE_AREA_IN_IMG(0x4000,"人脸区域在图像中占比过大"),
    IAT_ST_FGE_FAIL_MULTI_FACE_IN_ONE_IMG(0x8000,"一张图检出多个人脸"),
    IAT_ST_FGE_FAIL_DETECT_NO_FACES_IN_IMG(0x10000,"图像中未检出人脸");

    private int code;
    private String name;

    private ImgCheckEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String getErrorInfo(Integer code){
        if(code == null){
            return null;
        }
        List strList = new ArrayList<>();
        StringBuilder stringBuilder = new StringBuilder();
        for(ImgCheckEnum checkEnum:ImgCheckEnum.values()){
            int i = code & checkEnum.getCode();
            if(i==1){
                stringBuilder.append(checkEnum.getName() + ",");
            }
        }
        return stringBuilder.toString();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy