SegmentationProperty
Processing properties for background images.
public class SegmentationProperty { public static final int SEG_MODEL_AI = 1; public static final int SEG_MODEL_GREEN = 2; public int modelType; public float greenCapacity; public SegmentationProperty(int modelType, float greenCapacity) { this.modelType = modelType; this.greenCapacity = greenCapacity; } public SegmentationProperty() { this.modelType = SEG_MODEL_AI; this.greenCapacity = 0.5f; } }
Attributes
- modelType
- The type of algorithms to user for background processing.
- SEG_MODEL_AI(1): (Default) Use the algorithm suitable for all scenarios.
- SEG_MODEL_GREEN(2): Use the algorithm designed specifically for scenarios with a green screen background.
- greenCapacity
-
The accuracy range for recognizing background colors in the image. The value range is [0,1], and the default value is 0.5. The larger the value, the wider the range of identifiable shades of pure color. When the value of this parameter is too large, the edge of the portrait and the pure color in the portrait range are also detected. Agora recommends that you dynamically adjust the value of this parameter according to the actual effect.
Note: This parameter only takes effect when modelType is set to SEG_MODEL_GREEN.