wx_human_seg 3.0.0
wx_human_matting_c_api.h
Go to the documentation of this file.
1
5#ifndef WX_HUMAN_MATTING_C_API_H_
6#define WX_HUMAN_MATTING_C_API_H_
7
8#ifdef ANDROID
9#include <jni.h>
10#endif
11
12#include "wx_api.h"
13#include "wx_image_c_api.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#ifdef ANDROID
21 JNIEnv *jniEnv, jobject applicationContext,
22 const char *appKey,
23 const char *licenseFilePath);
25 JNIEnv *jniEnv, jobject applicationContext,
26 const char *appKey,
27 uint8_t *licData, size_t licSize);
28#else
44WX_API int WXSDKInitWithLicenseFile(const char *appKey,
45 const char* licenseFilePath);
46
62WX_API int WXSDKInitWithLicenseData(const char *appKey,
63 uint8_t *licData, size_t licSize);
64#endif
65
68WX_API void WXSDK_Terminate();
69
73WX_API const char *WXSDK_Version();
74
77WX_API int WXSDKLicense_ValidFrom(uint64_t *validFrom);
78
81WX_API int WXSDKLicense_ExpiredAt(uint64_t *expiredAt);
82
85WX_API const char * WXSDKLicense_LicenseId();
86
93
105WX_API int WXHumanMatting_Create(WXDeviceType deviceType, WXHumanMatting_t **matting_p);
106
109
128 const uint8_t *inRGB,
129 int width,
130 int height,
131 float *outAlpha);
132
154 const WXImage_t *inImage,
155 const WXImage_t *bkImage,
156 WXImage_t **resultImg_p);
157
162WX_API const char *WXSDK_GetLastErrorMsg();
163
164#ifdef __cplusplus
165}
166#endif
167
168#endif // WX_HUMAN_MATTING_C_API_H_
WXDeviceType
Definition: wx_api.h:21
WX_API const char * WXSDK_Version()
获取sdk版本号
WX_API int WXSDKLicense_ExpiredAt(uint64_t *expiredAt)
获取当前license文件的有效期过期时间戳,单位为秒
WX_API int WXHumanMatting_RemoveBackground(WXHumanMatting_t *matting, const WXImage_t *inImage, const WXImage_t *bkImage, WXImage_t **resultImg_p)
图片去背景或换背景
WX_API const char * WXSDKLicense_LicenseId()
获取当前license文件的licenseId
WX_API int WXSDKLicense_ValidFrom(uint64_t *validFrom)
获取当前license文件的有效期起始时间戳,单位为秒
WX_API int WXHumanMatting_Create(WXDeviceType deviceType, WXHumanMatting_t **matting_p)
WX_API void WXHumanMatting_Release(WXHumanMatting_t *matting)
WX_API int WXSDKInitWithLicenseData(const char *appKey, uint8_t *licData, size_t licSize)
初始化SDK,并且通过内存数据的方式,为SDK设置license,
WX_API int WXSDKInitWithLicenseFile(const char *appKey, const char *licenseFilePath)
初始化SDK,并且通过文件方式,为SDK设置license,
WX_API void WXSDK_Terminate()
程序退出前,调用本函数释放资源
WX_API const char * WXSDK_GetLastErrorMsg()
struct WXHumanMatting_t WXHumanMatting_t
Definition: wx_human_matting_c_api.h:92
WX_API int WXHumanMatting_Matting(WXHumanMatting_t *matting, const uint8_t *inRGB, int width, int height, float *outAlpha)
matting函数,输入rgb像素图,输出alpha图
struct WXImage_t WXImage_t
Definition: wx_image_c_api.h:38