Agora RTC Objective-C API Reference  Refactor
Public Types | Data Fields
SegmentationProperty Struct Reference

Public Types

enum  SEG_MODEL_TYPE { SEG_MODEL_AI = 1, SEG_MODEL_GREEN = 2 }
 
enum  SCREEN_COLOR_TYPE { SCREEN_COLOR_AUTO = 0, SCREEN_COLOR_GREEN = 1, SCREEN_COLOR_BLUE = 2 }
 

Data Fields

SEG_MODEL_TYPE modelType
 
float greenCapacity
 
SCREEN_COLOR_TYPE screenColorType
 

Detailed Description

The properties for virtual background algorithm.

Member Enumeration Documentation

◆ SEG_MODEL_TYPE

The type of algorithms for segmentation processing.

Enumerator
SEG_MODEL_AI 

1: (Default) AI segmentation algorithm.

SEG_MODEL_GREEN 

2: Green screen segmentation algorithm.

◆ SCREEN_COLOR_TYPE

The color of the screen for green screen segmentation.

Enumerator
SCREEN_COLOR_AUTO 

0: (Default) Automatically recognizes the screen color.

SCREEN_COLOR_GREEN 

1: Green.

SCREEN_COLOR_BLUE 

2: Blue.

Constructor & Destructor Documentation

◆ SegmentationProperty()

Field Documentation

◆ modelType

SEG_MODEL_TYPE modelType

The type of segmentation algorithm. See SEG_MODEL_TYPE. The default value is SEG_MODEL_AI.

◆ greenCapacity

float greenCapacity

The color tolerance for green screen segmentation.

This parameter is only effective when modelType is set to SEG_MODEL_GREEN. 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

SCREEN_COLOR_TYPE screenColorType

The color of the screen for green screen segmentation. See SCREEN_COLOR_TYPE.

This property is only for green screen segmentation. The default value is SCREEN_COLOR_AUTO.