JCV AR SDK(Effects)Windows開発マニュアル
  • 1.環境準備
  • 2.開発の事前準備
  • 3.OpenCLの利用
  • 4.SDK API の使用
  • 5.ファイルの説明
  • 6.画像の回転とミラーリング
Powered by GitBook
On this page
  • 6.1 画像の回転
  • 6.2 画像のミラーリング
Export as PDF

6.画像の回転とミラーリング

6.1 画像の回転

st_mobile_human_action_detectを利用する際に顔の向きを正常の位置にする必要があります。

//画像回転方向
typedef enum { 
ST_CLOCKWISE_ROTATE_0 = 0, ///< 回転不要,画像の中に顔は正常の位置である 
ST_CLOCKWISE_ROTATE_90 = 1, ///< 時計回りで90度回転し,顔を正常の位置に戻す 
ST_CLOCKWISE_ROTATE_180 = 2,///< 時計回りで180度回転し,顔を正常の位置に戻す
ST_CLOCKWISE_ROTATE_270 = 3 ///< 時計回りで270度回転し,顔を正常の位置に戻す
} st_rotate_type;

SDKはst_mobile_human_action_rotateのAPIも提供しています。詳細はst_mobile_human_action.hに参照してください。

// @brief human_actionのチェック結果.

// @param[in] image_width human_actionの画像のWidth(pixel単位) 
// @param[in] image_height human_actionの画像のHeight(pixel単位) 
// @param[in] orientation 時計回りの回転角度
// @param[in] b_rotate_image 回転要否
// @param[in,out] p_human_action 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
)

6.2 画像のミラーリング

st_mobile_human_action_mirrorを用いて、カメラで取得した画像と実際のシーンでミラーリングします。詳細はst_mobile_human_action.hに参照してください。

// @brief human_actionのミラーリング結果 
// @param[in] image_width human_actionの画像のWidth(pixel単位) )
// @param[in,out] p_human_action human_actionのミラーリング結果 
ST_SDK_API void
st_mobile_human_action_mirror(
    int image_width,
    st_mobile_human_action_t *p_human_action
);
Previous5.ファイルの説明

Last updated 2 years ago