SegmentationProperty
Processing properties for background images.
class SegmentationProperty implements AgoraSerializable {
const SegmentationProperty(
{this.modelType, this.greenCapacity, this.screenColorType});
@JsonKey(name: 'modelType')
final SegModelType? modelType;
@JsonKey(name: 'greenCapacity')
final double? greenCapacity;
@JsonKey(name: 'screenColorType')
final ScreenColorType? screenColorType;
factory SegmentationProperty.fromJson(Map<String, dynamic> json) =>
_$SegmentationPropertyFromJson(json);
@override
Map<String, dynamic> toJson() => _$SegmentationPropertyToJson(this);
}
Properties
- modelType
- Algorithm used for background processing. See SegModelType.
- greenCapacity
- Precision range for recognizing background color in the image. Value range is [0,1], default is 0.5. A larger value means a wider range of solid colors can be recognized. If the value is too large, solid colors within the portrait area or along its edges may also be recognized. You are advised to adjust this parameter dynamically based on the actual effect.
Note: This parameter takes effect only when
modelTypeis set tosegModelGreen. - screenColorType
- Type of screen color. See ScreenColorType.