2.2.4.ビノキュラカメラによる顔トラッキング

ビノキュラカメラによる顔トラッキング

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

stid_facepro_binocular_tracking_create_handle

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

注意

ビノキュラカメラによる顔トラッキングでは、1人しかトラッキングできません。

定義:

STID_SDK_API
stid_result_t
stid_facepro_binocular_tracking_create_handle(
    stid_handle_t* out_handle,
    const char *rgb_alignment_model_filename,
    const char *infrared_alignment_model_filename,
    unsigned int config
);

引数:

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

  • [in] rgb_alignment_model_filename:アライメントモデルファイルの所在パスをロードしてください。

  • [in] infrared_alignment_model_filename:アライメントモデルファイルの所在パスをロードしてください。

  • [in] config :顔認識機の構成項目を設定します(0に設定した場合、デフォルト項目設定が適用されます)。

返り値

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

当バージョンのSDKでは、RGBとIRカメラは同じ特徴点モデルを利用するため、rgb_alignment_model_filenameとinfrared_alignment_model_filenameには同じ値を入力してください。

stid_facepro_binocular_tracking_destroy_handle

機能:binocular_trackingハンドルを解放できます。

定義:

STID_SDK_API
void
stid_facepro_binocular_tracking_destroy_handle(
    stid_handle_t handle
);

引数:

  • [in] handle: 解放するbinocular_trackingハンドルを入力してください。

返り値:ありません。

stid_facepro_binocular_tracking_reset

機能:binocular_trackingハンドルをリセットできます。

定義:

STID_SDK_API
stid_result_t
stid_facepro_binocular_tracking_reset(
    stid_handle_t handle
);

引数

  • [in] handle:リセットするbinocular_trackingハンドルを入力してください。

返り値:ありません。

stid_facepro_binocular_tracking_track

機能:フレーム分の画像を入力して、顔トラッキングを行ないます。連続したフレームに対して顔トラッキングを行うには、当APIを連続して呼び出してください。

注意:

  • ビノキュラカメラによる顔トラッキングは、1人しかトラッキングできません。

定義:

STID_SDK_API
stid_result_t
stid_facepro_binocular_tracking_track(
    stid_handle_t handle,
    const stid_image_t* rgb_input_image,
    const stid_image_t* infrared_input_image,
    stid_orientation_t face_orientation,
    double time_stamp_s,
    stid_target_t **out_rgb_targets_array,
    int *out_rgb_targets_array_count,
    stid_target_t **out_infrared_targets_array,
    int *out_infrared_targets_array_count
);

引数:

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

  • [in] rgb_input_image:RGBカメラによって撮影した1フレーム画像を入力してください。

  • [in] infrared_input_image:IRカメラによって撮影した画像情報を入力してください

  • [in] face_orientation:フレーム画像中の顔の向きを指定できます。

  • [in] time_stamp_s:入力した画像のタイムスタンプ情報です(単位:秒、浮動小数点形式)

  • [out] out_rgb_targets_array:RGBカメラによって撮影された顔情報のアレイが表示されます(当APIによってメモリの配分を決めます。この際、API stid_facepro_tracking_release_targets_arrayを呼び出して、ハンドルを解放する必要があります)。

  • [out] out_rgb_targets_array_count:RGBカメラによって撮影した写真の中から、トラッキングできた顔の数を表示されます。

  • [out] out_infrared_targets_array:IRカメラによって撮影された顔情報のアレイを表示されます(当API によってメモリの配分を決めます。この際、API stid_facepro_tracking_release_targets_arrayを呼び出して、ハンドルを解放する必要があります)

  • [out] out_infrared_targets_array_count:IRカメラによって撮影した写真の中から、トラッキングできた顔の数を表示されます。

返り値:

モノキュラカメラトラッキングの結果とビノキュラカメラトラッキングの結果に関するハンドルを解放するには、同じAPIを使用してください。

最終更新