|
Agora Java API Reference for Android
|
Public Member Functions | |
| SegmentationProperty (int modelType, float greenCapacity) | |
Public Attributes | |
| int | modelType |
| float | greenCapacity |
| int | screenColorType |
Static Public Attributes | |
| static final int | SEG_MODEL_AI = 1 |
| static final int | SEG_MODEL_GREEN = 2 |
| static final int | SCREEN_COLOR_AUTO = 0 |
| static final int | SCREEN_COLOR_GREEN = 1 |
| static final int | SCREEN_COLOR_BLUE = 2 |
The properties for virtual background algorithm.
|
static |
1: (Default) AI segmentation algorithm.
|
static |
2: Green screen segmentation algorithm.
|
static |
0: (Default) Automatically recognizes the screen color.
|
static |
1: Green.
|
static |
2: Blue.
| int io.agora.rtc2.video.SegmentationProperty.modelType |
The type of segmentation algorithm. See SEG_MODEL_AI and SEG_MODEL_GREEN. The default value is SEG_MODEL_AI.
| float io.agora.rtc2.video.SegmentationProperty.greenCapacity |
The color tolerance for green screen segmentation.
This parameter is only effective when modelType is set to SEG_MODEL_GREEN. The value ranges from 0.0f to 1.0f, with a default of 0.5f. A larger value widens the range of identifiable shades of the screen color. Setting the value too high may cause parts of the portrait to be detected as the background. Agora recommends dynamically adjusting this value based on the observed segmentation effect.
| int io.agora.rtc2.video.SegmentationProperty.screenColorType |
The color of the screen for green screen segmentation. See SCREEN_COLOR_AUTO, SCREEN_COLOR_GREEN, and SCREEN_COLOR_BLUE.
This property is only for green screen segmentation. The default value is SCREEN_COLOR_AUTO.
1.8.18