4 ファイルの説明

4.1 st_mobile_common

画像の形式やエラーコードなどを定義するファイルです。また関連するメソッドも含まれます。

//// @brief Blink動作の閾値設定。[0,1]の範囲内で設定可能であり,デフォルト設定値は0.5である 
ST_SDK_API void
st_mobile_set_eyeblink_threshold( 
    float threshold
);
/// @brief 口開ける動作の閾値設定。[0,1]の範囲内で設定可能であり,デフォルト設定値は0.5である
ST_SDK_API void
st_mobile_set_mouthah_threshold( 
    float threshold
);
/// @brief 頭振る動作の閾値設定。[0,1]の範囲内で設定可能であり,デフォルト設定値は0.5である
ST_SDK_API void
st_mobile_set_headyaw_threshold( 
    float threshold
);
/// @brief 頷く動作の閾値設定。[0,1]の範囲内で設定可能であり,デフォルト設定値は0.5である
ST_SDK_API void
st_mobile_set_headpitch_threshold( 
    float threshold
);
/// @brief 眉毛動く動作の閾値設定。[0,1]の範囲内で設定可能であり,デフォルト設定値は0.5である
ST_SDK_API void
st_mobile_set_browjump_threshold( 
    float threshold
);
/// @brief 顔識別のスムーズさを設定する。デフォルトは0.8である

ST_SDK_API void
st_mobile_set_smooth_threshold( 
    float threshold
);
/// @brief 顔識別の3D回転角度を設定する。デフォルトは0.8である

ST_SDK_API void
st_mobile_set_headpose_threshold( 
    float threshold
);
/// @brief SSE命令集のみ利用可能の設定 
ST_SDK_API void st_mobile_set_sse_only( 
    bool sse_only 
);

/// @brief 画像色の転換 
ST_SDK_API st_result_t
st_mobile_color_convert( 
    const unsigned char *image_src,
    unsigned char *image_dst,
    int image_width,
    int image_height,
    st_color_convert_type type
);

/// @brief 画像の回転
ST_SDK_API st_result_t st_mobile_image_rotate( 
    const unsigned char *image_src,
    unsigned char *image_dst,
    int image_width,
    int image_height,
    int image_stride,
    st_pixel_format pixel_format,
    st_rotate_type rotate_type
);

/// @brief st_mobileのカレントログレベルを設定

/// ST_LOG_DISABLEで設定した場合はログを禁止する

///
 @param[in] level ログレベルを設定する
///
 @return 正常の場合はST_OKで返す、異常の場合はエラーで返す


ST_SDK_API st_result_t
st_mobile_set_log_level(
    st_log_level_t level
);

/// @brief ログのレベルを取得する
/// @param[out] p_level カレントログレベルの結果

/// @return 正常の場合はST_OKで返す、異常の場合はエラーで返す

ST_SDK_API st_result_t
st_mobile_get_log_level(
    st_log_level_t* p_level
);

/// @brief ログパスを設定する 
/// @param[in] p_file_path ログファイルのパスを設定する
/// @param[in] b_tranc_file ファイル内容削除可否,true - 削除可,false - 削除不可 
/// @return 正常の場合はST_OKで返す、異常の場合はエラーで返す

ST_SDK_API st_result_t
st_mobile_redirect_log_to_file(
    const char* p_file_path, bool b_tranc_file
); 
/// @brief sdkバージョンを取得する
ST_SDK_API
const char* st_mobile_get_version(); 

4.2 st_mobile_license

ライセンス認証関連メソッドが含まれます。

/// @brief 根据授权文件生成激活码, 在使用新的license文件时使用. Android建议使用 
st_mobile_generate_activecode_from_buffer
ST_SDK_API 
st_result_t
st_mobile_generate_activecode( 
    const char* license_path,
    char* activation_code,
    int* activation_code_len
);

/// @brief 检查激活码, 必须在所有接口之前调用. Android建议使用 
st_mobile_check_activecode_from_buffer
ST_SDK_API 
st_result_t
st_mobile_check_activecode( 
    const char* license_path,
    const char* activation_code,
    int activation_code_len
);

/// @brief 根据授权文件缓存生成激活码, 在使用新的license文件时调用 
ST_SDK_API st_result_t st_mobile_generate_activecode_from_buffer( 
    const char* license_buf,
    int license_size,
    char* activation_code,
    int* activation_code_len
);

/// @brief 检查激活码, 必须在所有接口之前调用 
ST_SDK_API st_result_t st_mobile_check_activecode_from_buffer( 
    const char* license_buf,
    int license_size,
    const char* activation_code,
    int activation_code_len
);

/// @brief 根据授权文件在线生成激活码, 需要使用在线license和联网 
ST_SDK_API st_result_t st_mobile_generate_activecode_online( 
 		const char* license_path,
                  char* activation_code,
                  int* activation_code_len
  );
/// @brief 根据授权文件buffer在线生成激活码, 需要使用在线license和联网 
ST_SDK_API st_result_t st_mobile_generate_activecode_from_buffer_online( 
                      const char* license_buf,
                      int license_size,
                      char* activation_code,
                      int* activation_code_len
  );

4.3 st_mobile_human_action

st_mobile_human_actionのAPI関連設定が含まれます。

/// @brief 创建人体行为检测句柄. Android建议使用st_mobile_human_action_create_from_buffer ST_SDK_API st_result_t
st_mobile_human_action_create(
    const char *model_path,
    unsigned int config,
    st_handle_t *handle
);
/// @brief 添加子模型. Android建议使用st_mobile_human_action_add_sub_model_from_buffer ST_SDK_API st_result_t
st_mobile_human_action_add_sub_model(
    st_handle_t handle,
    const char *model_path
);
/// @brief 释放人体行为检测句柄 ST_SDK_API
void st_mobile_human_action_destroy(
    st_handle_t handle
);
/// @brief 人体行为检测 ST_SDK_API st_result_t st_mobile_human_action_detect(
    st_handle_t handle,
    const unsigned char *image,
    st_pixel_format pixel_format,
    int image_width,
    int image_height,
    int image_stride,
    st_rotate_type orientation,
    unsigned long long detect_config,
    st_mobile_human_action_t *p_human_action
);
/// @brief 镜像human_action检测结果. 隔帧检测时, 需要将检测结果拷贝出来再镜像 ST_SDK_API void
st_mobile_human_action_mirror(
    int image_width,
    st_mobile_human_action_t *p_human_action
    );
/// @brief 旋转human_action检测结果. ST_SDK_API void st_mobile_human_action_rotate(
    int image_width,
    int image_height,
    st_rotate_type orientation,
    bool b_rotate_image,
    st_mobile_human_action_t* p_human_action
);

4.4 st_mobile_face_attribute

st_mobile_face_attributeのAPI関連設定が含まれます。

/// @brief 创建人脸属性检测句柄 ST_SDK_API st_result_t st_mobile_face_attribute_create(
    const char *model_path,
    st_handle_t *handle
);
/// @brief 销毁已初始化的人脸属性检测句柄 ST_SDK_API void st_mobile_face_attribute_destroy(
    st_handle_t handle
);
ST_SDK_API st_result_t
st_mobile_face_attribute_detect_ext2(
st_handle_t handle,
const unsigned char *image,
st_pixel_format pixel_format,
int image_width,
int image_height,
int image_stride,
const st_mobile_face_t *p_face_array,
int face_count,
float** p_attribute_array
);

Last updated