Agora RTC Objective-C API Reference  Refactor
Properties
AgoraSegmentationProperty Class Reference

Inherits <NSObject>.

Properties

SegModelType modelType
 
float greenCapacity
 
ScreenColorType screenColorType
 

Detailed Description

The properties for virtual background algorithm.

Property Documentation

◆ modelType

- (SegModelType) modelType
readwritenonatomicassign

The type of segmentation algorithm.

See SegModelType. The default value is SegModelTypeAi.

◆ greenCapacity

- (float) greenCapacity
readwritenonatomicassign

The color tolerance for green screen segmentation.

This parameter is only effective when modelType is set to SegModelTypeGreen. The value ranges from 0.0 to 1.0, with a default of 0.5. 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.

◆ screenColorType

- (ScreenColorType) screenColorType
readwritenonatomicassign

The color of the screen for green screen segmentation.

See ScreenColorType. This property is only for green screen segmentation. The default value is ScreenColorTypeAuto.