You need to enable JavaScript to run this app.
文档中心
智能美化特效

智能美化特效

复制全文
下载 pdf
相关示例参考
CV480头文件变动详解
复制全文
下载 pdf
CV480头文件变动详解
bef_effect_ai_api.h​
CV480新增bef_effect_ai_set_render_cache_texture_orientation,bef_effect_ai_set_render_cache_int_value和 bef_effect_ai_set_render_cache_string_value​
​
/**​
* @brief set render_cache_texture_orientation​
* @param handle Effect handle​
* @param key render cache key​
* @param value value​
*/​
BEF_SDK_API bef_effect_result_t bef_effect_ai_set_render_cache_texture_orientation(bef_effect_handle_t handle, const char* key, bef_ai_rotate_type orientation);​
​
/**​
* @brief set or add value to render cache​
* @param handle Effect handle​
* @param key render cache key​
* @param value value​
*/​
BEF_SDK_API bef_effect_result_t bef_effect_ai_set_render_cache_int_value(bef_effect_handle_t handle, const char* key, int value);​
​
/**​
* @brief set or add value to render cache​
* @param handle Effect handle​
* @param key render cache key​
* @param value value​
*/​
BEF_SDK_API bef_effect_result_t bef_effect_ai_set_render_cache_string_value(bef_effect_handle_t handle, const char* key, const char* value);​
​
bef_effect_ai_chroma_keying.h​
CV480 针对bef_ai_chroma_keying_uniform_type 新增3个参数:BEF_AI_CHROMA_KEYING_UNIFORM_CONTRAST、BEF_AI_CHROMA_KEYING_UNIFORM_BRIGHTNESS 和 BEF_AI_CHROMA_KEYING_UNIFORM_OPACITY​
​
typedef enum{​
BEF_AI_CHROMA_KEYING_UNIFORM_COLOR = 0, // COLOR:[0,360],算法会自动调色,可以手动更改微调绿幕主色​
BEF_AI_CHROMA_KEYING_UNIFORM_INTENSITY = 1, // INTENSITY:[0,1],抠图强度,以COLOR为中心,影响抠除色域的范围​
BEF_AI_CHROMA_KEYING_UNIFORM_SPILL = 2, // SPILL:[0,1],去溢色能力,对于绿幕,会把前景里泛绿的颜色矫正​
BEF_AI_CHROMA_KEYING_UNIFORM_EDGE_SMOOTH = 3, // EDGE_SMOOTH:[0,1],边缘平滑能力,适当的值可以去锯齿,值过大可能会导致前景模糊​
BEF_AI_CHROMA_KEYING_UNIFORM_DETAIL = 4, // DETAIL:[0,1],细节增强能力,0为通用方案,1为精细方案,之间进行效果加权​
BEF_AI_CHROMA_KEYING_UNIFORM_SHADOW = 5, // SHADOW:[0,1],阴影增强能力,可用于保留阴影​
BEF_AI_CHROMA_KEYING_UNIFORM_CONTRAST = 6, // CONTRAST: [0,1],对比度​
BEF_AI_CHROMA_KEYING_UNIFORM_BRIGHTNESS = 7, // BRIGHTNESS: [0,1],亮度​
BEF_AI_CHROMA_KEYING_UNIFORM_OPACITY = 8, // OPACITY: [0, 1], 透明度​
}bef_ai_chroma_keying_uniform_type;​
​
bef_effect_ai_facefitting.h​
CV480更新最大支持人脸数,BEF_FITTING_MAX_FACE 从6更新为10​
​
CV480:​
#define BEF_FITTING_MAX_FACE 10 //最大支持的人脸数​
​
CV480之前的版本:​
#define BEF_FITTING_MAX_FACE 6 //最大支持的人脸数​
​
bef_effect_ai_hairparser.h​
CV480新增bef_effect_ai_hairparser_get_output_shape_with_input​
​
/*​
* * @brief 获取输出mask shape​
* input_width, input_height 输入的图片大小 ​
* output_width, output_height 用于得到 bef_effect_ai_hairparser_do_detect 接口输出的​
*/​
BEF_SDK_API bef_effect_result_t​
bef_effect_ai_hairparser_get_output_shape_with_input(bef_effect_handle_t handle,​
int input_width,​
int input_height,​
int* output_width,​
int* output_height);​
​
bef_effect_ai_online_license.h​
CV480新增bef_effect_ai_free_online_license_auth_msg 和 bef_effect_ai_free_device_id​
​
//释放auth_msg内存,如果调用过 bef_effect_ai_get_online_license_authmsg,在鉴权后调用该接口​
BEF_SDK_API int bef_effect_ai_free_online_license_auth_msg(char* auth_msg);​
​
//释放device_id内存,如果调用过 bef_effect_ai_get_device_id,在鉴权后调用该接口​
BEF_SDK_API int bef_effect_ai_free_device_id(char* device_id);​
​
bef_effect_ai_skeleton.h​
CV480 更新预处理指令if defined(__APPLE__) || defined(TARGET_OS_WINDOWS)​
​
CV480:​
/**​
* @brief 人体关键点授权​
* @param [in] handle Created skeleton detect handle​
* 已创建的骨骼检测句柄​
* @param [in] license 授权文件字符串​
* @param [in] length 授权文件字符串长度​
* @return If succeed return BEF_RESULT_SUC, other value please refer bef_effect_ai_public_define.h​
* 成功返回 BEF_RESULT_SUC, 授权码非法返回 BEF_RESULT_INVALID_LICENSE ,其它失败返回相应错误码, 具体请参考 bef_effect_ai_public_define.h​
*/​
#if defined(__ANDROID__) || defined(TARGET_OS_ANDROID)​
BEF_SDK_API bef_effect_result_t bef_effect_ai_skeleton_check_license(JNIEnv* env, jobject context, bef_effect_handle_t handle, const char *licensePath);​
#else​
#if defined(__APPLE__) || defined(TARGET_OS_WINDOWS)​
BEF_SDK_API bef_effect_result_t bef_effect_ai_skeleton_check_license(bef_effect_handle_t handle, const char *licensePath);​
#endif​
#endif​
​
CV480之前的版本:​
/**​
* @brief 人体关键点授权​
* @param [in] handle Created skeleton detect handle​
* 已创建的骨骼检测句柄​
* @param [in] license 授权文件字符串​
* @param [in] length 授权文件字符串长度​
* @return If succeed return BEF_RESULT_SUC, other value please refer bef_effect_ai_public_define.h​
* 成功返回 BEF_RESULT_SUC, 授权码非法返回 BEF_RESULT_INVALID_LICENSE ,其它失败返回相应错误码, 具体请参考 bef_effect_ai_public_define.h​
*/​
#if defined(__ANDROID__) || defined(TARGET_OS_ANDROID)​
BEF_SDK_API bef_effect_result_t bef_effect_ai_skeleton_check_license(JNIEnv* env, jobject context, bef_effect_handle_t handle, const char *licensePath);​
#else​
#ifdef __APPLE__​
BEF_SDK_API bef_effect_result_t bef_effect_ai_skeleton_check_license(bef_effect_handle_t handle, const char *licensePath);​
#endif​
#endif​
​
bef_effect_ai_slam.h​
CV480新增结构体bef_ai_slam_camera_calib_size,针对bef_ai_slam_camera_info和bef_ai_slam_pose新增参数​
​
CV480新增:​
typedef struct bef_ai_slam_camera_calib_size{​
int w; // image width​
int h; // image height​
} bef_ai_slam_camera_calib_size;​
​
CV480:​
typedef struct bef_ai_slam_camera_info​
{​
bef_ai_slam_image_color color;​
int is_front;​
bef_ai_slam_device_orientation oriention;​
bef_ai_slam_camera_calib_size calib_size;​
bef_ai_slam_camera_intrinsic camera_intrinsic;​
bef_ai_slam_camera_extrinsic camera_extrinsic;​
bef_ai_slam_camera_distort camera_distort;​
int disable_internal_time_delay; // disable the internal correction of time delay​
float horizontal_fov; // not used​
bef_ai_slam_resolution resolution;​
bool low_texture_enhanced; // disable it to speed up but worse results on low-texture regions​
bef_ai_slam_accuracy_level level;// default value is Medium, use Low for faster version​
int is_video; // use video mode​
int run_gba; // use gba​
int easy_init; // use fast initialization​
int width;​
int height;​
int enable_fusion;​
int enable_multi_planes;​
int enable_normal_model;​
bool self_vio;​
bool self_calib;​
int enable_depth;​
bool is_depth_inverse;​
int robust_depth_align;​
​
}bef_ai_slam_camera_info;​
​
CV480之前的版本:​
typedef struct bef_ai_slam_camera_info​
{​
bef_ai_slam_image_color color;​
int is_front;​
bef_ai_slam_device_orientation oriention;​
bef_ai_slam_camera_intrinsic camera_intrinsic;​
bef_ai_slam_camera_extrinsic camera_extrinsic;​
bef_ai_slam_camera_distort camera_distort;​
int disable_internal_time_delay; // disable the internal correction of time delay​
float horizontal_fov; // not used​
bef_ai_slam_resolution resolution;​
bool low_texture_enhanced; // disable it to speed up but worse results on low-texture regions​
bef_ai_slam_accuracy_level level;// default value is Medium, use Low for faster version​
int is_video; // use video mode​
int run_gba; // use gba​
int easy_init; // use fast initialization​
int width;​
int height;​
int enable_fusion;​
int enable_multi_planes;​
int enable_normal_model;​
bool self_vio;​
bool self_calib;​
int enable_depth;​
bool is_depth_inverse;​
int robust_depth_align;​
​
}bef_ai_slam_camera_info;​
​
CV480:​
typedef struct bef_ai_slam_pose{​
float R[9]; // row major 3x3 rotation matrix​
float T[3]; // 3x1 translation matrix​
bef_ai_slam_tracking_state state;​
int plane_detected; // planeDetected 1, otherwise 0​
double time_stamp; // time for pose (unit is second), 0 for no time​
float img_td; // t_imu = t_img + img_td, unit: ms​
float focal_len; // camera focal length, unit: pixel​
bool is_calibing; // is in self-calib process​
int is_stationary; // -1 for system uninitialized, 0 for static, 1 for dynamic, 2 for not sure​
​
float V[3];​
float Ba[3];​
float Bg[3];​
}bef_ai_slam_pose;​
​
CV480之前的版本:​
typedef struct bef_ai_slam_pose{​
float R[9]; // row major 3x3 rotation matrix​
float T[3]; // 3x1 translation matrix​
bef_ai_slam_tracking_state state;​
int plane_detected; // planeDetected 1, otherwise 0​
double time_stamp; // time for pose (unit is second), 0 for no time​
float img_td; // t_imu = t_img + img_td, unit: ms​
int is_stationary; // -1 for system uninitialized, 0 for static, 1 for dynamic, 2 for not sure​
​
float V[3];​
float Ba[3];​
float Bg[3];​
}bef_ai_slam_pose;​
​
最近更新时间:2026.01.29 17:55:24
这个页面对您有帮助吗?
有用
有用
无用
无用