com.pax.dal

Interface IFaceDetector



  • public interface IFaceDetector
    人脸识别。
    Face detector.
    Since:
    V3.14.00
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      float compare(android.graphics.Bitmap face1, android.graphics.Bitmap face2)
      人脸特征对比。
      Face feature comparison.
      float compare(android.graphics.Bitmap face, float[] feature)
      人脸特征对比。
      Face feature comparison.
      float compare(float[] feature1, float[] feature2)
      人脸特征对比。
      Face feature comparison.
      java.util.List<FaceInfo> detect(android.graphics.Bitmap face)
      进行人脸检测。
      Face detection.
      float[] extractFeature(android.graphics.Bitmap face)
      提取人脸特征值。
      Extract face feature values.
      void init(int type)
      初始化人脸识别。
      Initialize face recognition.
      void release()
      释放人脸识别资源。
      Free face recognition resources.
      void setAppId(java.lang.String appId)
      设置AppID。若未设置,则使用默认AppID("000001")。
      Set the AppID.If not, the default AppID("000001") is used.
      void setConfig(FaceConfig config)
      配置检测项。
      Configure detection item.
    • Method Detail

      • init

        void init(int type)
           throws FaceDetectException
        初始化人脸识别。
        Initialize face recognition.
        Parameters:
        type -
        算法类型。
        • 0:百富。
        • 1:腾讯。
        • 2:云从。
        Algorithm type.
        • 0:Pax.
        • 1:Tencent.
        2:CloudWalk.
        Throws:
        FaceDetectException
        Since:
        V3.14.00
      • extractFeature

        float[] extractFeature(android.graphics.Bitmap face)
                        throws FaceDetectException
        提取人脸特征值。
        Extract face feature values.
        Parameters:
        face -
        待检测的人脸。最大支持1080p。
        Face to be tested.Maximum 1080p support.
        Returns:
        人脸特征值。
        Face feature values.
        Throws:
        FaceDetectException
        Since:
        V3.14.00
      • compare

        float compare(android.graphics.Bitmap face,
                      float[] feature)
               throws FaceDetectException
        人脸特征对比。
        Face feature comparison.
        Parameters:
        face -
        待检测的人脸。最大支持1080p。
        Face to be tested.Maximum 1080p support.
        feature -
        人脸特征值。
        Face feature values.
        Returns:
        人脸相似度。(0, 1]。建议大于0.63表示同一个人。
        Face similarity.(0, 1]. A recommendation greater than 0.63 indicates the same person.
        Throws:
        FaceDetectException
        Since:
        V3.14.00
      • compare

        float compare(android.graphics.Bitmap face1,
                      android.graphics.Bitmap face2)
               throws FaceDetectException
        人脸特征对比。
        Face feature comparison.
        Parameters:
        face1 -
        待检测的人脸。最大支持1080p。
        Face to be tested.Maximum 1080p support.
        face2 -
        待检测的人脸。最大支持1080p。
        Face to be tested.Maximum 1080p support.
        Returns:
        人脸相似度。(0, 1]。建议大于0.63表示同一个人。
        Face similarity.(0, 1]. A recommendation greater than 0.63 indicates the same person.
        Throws:
        FaceDetectException
        Since:
        V3.14.00
      • compare

        float compare(float[] feature1,
                      float[] feature2)
               throws FaceDetectException
        人脸特征对比。
        Face feature comparison.
        Parameters:
        feature1 -
        人脸特征值。
        Face feature values.
        feature2 -
        人脸特征值。
        Face feature values.
        Throws:
        FaceDetectException
        Since:
        V3.14.00
      • detect

        java.util.List<FaceInfodetect(android.graphics.Bitmap face)
                                 throws FaceDetectException
        进行人脸检测。
        Face detection.
        Parameters:
        face -
        待检测的人脸。最大支持1080p。
        Face to be tested.Maximum 1080p support.
        Returns:
        人脸信息。FaceInfo
        Face information.FaceInfo
        Throws:
        FaceDetectException
        Since:
        V3.14.00
      • setAppId

        void setAppId(java.lang.String appId)
               throws FaceDetectException
        设置AppID。若未设置,则使用默认AppID("000001")。
        Set the AppID.If not, the default AppID("000001") is used.
        Parameters:
        appId -
        6位AppID。
        6 bit length AppID.
        Throws:
        FaceDetectException
        Since:
        V3.14.00