2.2.5. モノキュラカメラによる生体検知

Windows/Linux/Arm_Linux 用のAPIは、以下の解説をご参照ください。

stid_facepro_create_singleliveness

機能:モデルファイルをロードして、singlelivenessハンドルを作成します。

定義:

STID_SDK_API
stid_result_t
stid_facepro_anti_spoofing_create_handle(
    stid_handle_t* out_handle,
    const char *model_filename
);

引数

  • [in] model_filename:モデルファイルの所在パスを入力します。

  • [out] out_handle:初期化されたハンドルを表示されます(利用しない場合、stid_face_anti_spoofing_destroy_handleを呼び出してリソースを解放する必要があります)。

返り値

  • [return]:正常の場合はSTID_OKが表示、エラーになった場合はエラーコードが表示されます。

stid_facepro_destroy_singleliveness

機能:singlelivenessハンドルを解放します。

定義

STID_SDK_API
void
stid_facepro_anti_spoofing_destroy_handle(
    stid_handle_t handle
);

引数

  • [in] handle:解放するハンドルを入力します。

返り値:ありません。

stid_facepro_anti_spoofing_detect

機能:入力された画像中の顔の非生体検知検知を行います。

定義

STID_SDK_API
stid_result_t
stid_facepro_anti_spoofing_detect(
    stid_handle_t handle,
    const stid_image_t* input_image,
    const stid_landmarks_t* input_landmarks,
    float *out_hack_score
);

引数

  • [in] input_landmarks:顔特徴点情報を入力します。

  • [out] out_hack_score:生体検知の結果スコアが表示されます(スコア範囲:0~1。スコアが高ければ高いほど非生体である可能性が高いことを示します)。

返り値

  • [return]:正常の場合はSTID_OKが表示、エラーになった場合はエラーコードが表示されます。

stid_facepro_anti_spoofing_get_default_hackness_threshold

機能:デフォルトの非生体検知しきい値を取得できます。

定義

STID_SDK_API
stid_result_t
stid_facepro_anti_spoofing_get_default_hackness_threshold(
    stid_handle_t handle,
    float *out_default_hackness_threshold
);

引数

  • [in] handle:初期化されたハンドルを表示します。

  • [out] out_default_hackness_threshold:デフォルトの非生体検知しきい値が表示されます。非生体検知の結果、スコアがこのしきい値より低い場合は、非生体である可能性が低いことを示します。

返り値

  • [return]:正常の場合はSTID_OKが表示され、エラーになった場合はエラーコードが表示されます。

最終更新