FSegmentationProperty

Processing properties for background images.

USTRUCT(BlueprintType)
struct FSegmentationProperty
{
	GENERATED_BODY()
public:
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|SegmentationProperty")
	ESEG_MODEL_TYPE modelType = ESEG_MODEL_TYPE::SEG_MODEL_AI;
	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|SegmentationProperty")
	float greenCapacity = 0.5;
	FSegmentationProperty(){}
	FSegmentationProperty(const agora::rtc::SegmentationProperty & AgoraData){
		modelType = static_cast<ESEG_MODEL_TYPE>(AgoraData.modelType);
		greenCapacity = AgoraData.greenCapacity;
	}
	agora::rtc::SegmentationProperty CreateAgoraData() const {
		agora::rtc::SegmentationProperty AgoraData;
		AgoraData.modelType = static_cast<agora::rtc::SegmentationProperty::SEG_MODEL_TYPE>(modelType);
		AgoraData.greenCapacity = greenCapacity;
		return AgoraData;
	}
	void FreeAgoraData(agora::rtc::SegmentationProperty& AgoraData) const {
	}
};

Attributes

modelType
The type of algorithms to user for background processing. See ESEG_MODEL_TYPE.
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.