类的使用
com.wonxing.humanseg.WXException
-
com.wonxing.humanseg中WXException的使用
修饰符和类型方法说明检测证件照照片byte[]作用同toEncodedDatastatic WXImageWXImage.fromColor(int width, int height, int r, int g, int b)创建一副纯色图,颜色值由r,g,b三个值指定static WXImageWXImage.fromEncodedData(byte[] data)从图片原数据(即图片编码数据)创建WXImage对象,支持jpg和png图片static WXImage从图片文件创建WXImage对象,支持jpg和png图片booleanWXIDPhotoDetectResult.getBooleanValue(String key)读取参数float[]WXIDPhotoDetectResult.getFloatArrayValue(String key)读取参数floatWXIDPhotoDetectResult.getFloatValue(String key)读取参数int[]WXIDPhotoDetectResult.getIntArrayValue(String key)读取参数intWXIDPhotoDetectResult.getIntValue(String key)读取参数WXIDPhotoDetectResult.getStringValue(String key)读取参数static voidWXIDPhoto.init()已过时。static voidWXHumanSegSDK.initWithLicenseData(String appKey, byte[] licenseData)初始化SDKstatic voidWXHumanSegSDK.initWithLicensePath(String appKey, String licensePath)初始化SDKWXIDPhoto.makeIDPhoto(WXImage inputImage, WXIDPhotoConfig config)制作证件照WXIDPhoto.makeIDPhoto(WXImage inputImage, WXIDPhotoConfig config, WXIDPhotoPreDetectResult preResult)制作证件照voidWXHumanMatting.matting(ByteBuffer rgbData, int width, int height, FloatBuffer alpha)抠图并返回alpha数据预检测:检测将被用于制作证件照的原始图片,是否适合用来制作证件照WXHumanMatting.removeBackground(WXImage inputImage, WXImage bkImage)抠图换背景(或去背景)void作用同toFilestatic voidWXLicense.setLicense(byte[] licenseData)static voidWXLicense.setLicense(String licPath)voidWXIDPhotoDetector.setSettings(WXIDPhotoSettings settings)检测证件照配置,暂不使用byte[]WXImage.toEncodedData(String imgType)将图片保存为编码后的数据void将图片保存到文件,支持jpg和png图片static StringWXHumanSegSDK.version()获取SDK版本号static StringWXIDPhoto.version()已过时。抛出WXException的com.wonxing.humanseg中的构造器限定符构造器说明实例化构造函数WXHumanMatting(int gpuEnabled)实例化构造函数WXIDPhoto(int gpuEnabled)实例化构造函数WXIDPhotoDetector(int gpuEnabled)实例化构造函数WXIDPhotoSettings 构造函数
WXHumanSegSDK.initWithLicensePath(String, String)