SegmentationProperty
背景图像的处理属性。
class SegmentationProperty { const SegmentationProperty({this.modelType, this.greenCapacity}); @JsonKey(name: 'modelType') final SegModelType? modelType; @JsonKey(name: 'greenCapacity') final double? greenCapacity; factory SegmentationProperty.fromJson(Map<String, dynamic> json) => _$SegmentationPropertyFromJson(json); Map<String, dynamic> toJson() => _$SegmentationPropertyToJson(this); }
属性
- modelType
- 进行背景处理的算法。详见 SegModelType。
- greenCapacity
-
对画面中绿颜色(即不同程度的绿色)识别的精度范围。取值范围为 [0,1],默认值为 0.5。取值越大,代表可识别的绿色范围越大。当该参数取值过大时,人像边缘和人像范围内的绿色也会被识别。建议你根据实际效果动态调整该参数的值。
注: 该参数仅在 modelType 设置为 segModelGreen 时生效。