SegmentationProperty
Used to set properties related to background image processing.
public class SegmentationProperty {
public static final int SEG_MODEL_AI = 1;
public static final int SEG_MODEL_GREEN = 2;
public static final int SCREEN_COLOR_AUTO = 0;
public static final int SCREEN_COLOR_GREEN = 1;
public static final int SCREEN_COLOR_BLUE = 2;
public int modelType;
public float greenCapacity;
public int screenColorType;
}
Properties
- SEG_MODEL_AI
- (1): (Default) AI segmentation algorithm.
- SEG_MODEL_GREEN
- (2): Green screen segmentation algorithm.
- SCREEN_COLOR_AUTO
- (0): (Default) Automatically detect screen color.
- SCREEN_COLOR_GREEN
- (1): Green.
- SCREEN_COLOR_BLUE
- (2): Blue.
- modelType
- Algorithm type used for background processing.
SEG_MODEL_AI(1): (Default) Algorithm suitable for all scenarios.SEG_MODEL_GREEN(2): Algorithm designed specifically for green screen background scenarios.
- greenCapacity
- Accuracy range for identifying background color in the image. Value range: [0, 1], default is 0.5. The larger the value, the wider the range of solid color shades that can be identified. If the value is too large, solid color areas on the edge or within the subject may also be identified as background.
Note: This parameter is only effective when
modelTypeis set toSEG_MODEL_GREEN. Agora recommends adjusting this value dynamically based on actual results. - screenColorType
- Screen color type:
SCREEN_COLOR_AUTO(0): SDK automatically selects screen color.SCREEN_COLOR_GREEN(1): Green.SCREEN_COLOR_BLUE(2): Blue.