Virtual Background
Accurately removes the background in real time and applies a virtual background (customizable):
Integration guide for Android
For directions on how to integrate the Beauty AR SDK for Android, see the integration guide for Integrating SDK (Android).
Attribute setting API
void updateProperty(XmagicProperty<?> p)
Keying parameters:
Attribute Field | Description |
category | Category.SEGMENTATION |
ID | The resource folder name, which is required, such as video_segmentation_blur_45 .XmagicProperty.ID_NONE indicates there is no ID.A custom keying ID must be XmagicConstant.SegmentationId.CUSTOM_SEG_ID . |
resPath | Required. The full path of the customized segment material. |
effkey | null (except for custom backgrounds). The value of a custom background is the selected resource path. |
effValue | null |
Setting a virtual background
// Initialize `XmagicProperty`XmagicProperty xmagicProperty = new XmagicProperty(Category.SEGMENTATION,"video_segmentation_blur_45",resPath,null,null);// Set the attributesxmagicApi.updateProperty(xmagicProperty)
Setting a custom background
XmagicProperty xmagicProperty = new XmagicProperty(Category.SEGMENTATION,XmagicConstant.SegmentationId.CUSTOM_SEG_ID,resPath,null,null);xmagicApi.updateProperty(xmagicProperty)