5#ifndef WX_HUMAN_MATTING_H_
6#define WX_HUMAN_MATTING_H_
18class WXHumanMattingImpl;
33 JNIEnv *jniEnv, jobject applicationContext,
35 const char *licenseFilePath);
49 JNIEnv *jniEnv, jobject applicationContext,
51 uint8_t *licData,
size_t licSize);
72 const char* licenseFilePath);
94 uint8_t *licData,
size_t licSize);
156 static void setLicense(
const char *licensePath,
const char *appKey);
170 static void setLicense(uint8_t *buffer,
size_t size,
const char *appKey);
274 const std::shared_ptr<WXImage> &bkImage);
284 std::unique_ptr<WXHumanMattingImpl> _impl;
Definition: wx_human_matting.h:207
void matting(const uint8_t *inRGB, int width, int height, float *outAlpha)
matting函数,输入rgb像素图,输出alpha图
static void terminate()
进程结束前,调用此函数进行资源清理
std::shared_ptr< WXImage > removeBackground(const std::shared_ptr< WXImage > &inImage, const std::shared_ptr< WXImage > &bkImage)
图片去背景或换背景
static void initialize()
初始化SDK,调用其他接口(除license相关接口外)之前,需要先调用这个函数。
WXImage * removeBackground(const WXImage *inImage, const WXImage *bkImage)
图片去背景或换背景
WXHumanMatting(WXDeviceType deviceType=kDeviceCPU)
WXHumanMatting 构造函数
static const char * version()
返回SDK版本号
Definition: wx_image.h:15
Definition: wx_human_matting.h:117
static uint64_t expiredAt()
获取当前license文件的有效期过期时间戳
static void setLicense(const std::string &licensePath)
通过文件的方式,为SDK设置license,
static const char * licenseId()
获取当前license文件的licenseId
static void setLicense(uint8_t *buffer, size_t size)
通过内存的方式,为SDK设置license,
static void setLicense(uint8_t *buffer, size_t size, const char *appKey)
通过内存的方式,为SDK设置license,
static void setLicense(const char *licensePath, const char *appKey)
通过文件的方式,为SDK设置license,
static uint64_t validFrom()
获取当前license文件的有效期起始时间戳
WXDeviceType
Definition: wx_api.h:21
@ kDeviceCPU
Definition: wx_api.h:23
WX_API const char * WXSDKVersion()
进程结束前,调用此函数进行资源清理
WX_API void WXSDKTerminate()
进程结束前,调用此函数进行资源清理
WX_API void WXSDKInitWithLicense(const char *appKey, const char *licenseFilePath)
初始化SDK,并且通过文件方式,为SDK设置license,