# SegmentationProperty (/zh-CN/api-reference/rtc/android/class-segmentationproperty)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

<a id="class_segmentationproperty__prototype"></a>

```java
public class SegmentationProperty {
  public static final int SEG_MODEL_AI = 1;
  public static final int SEG_MODEL_GREEN = 2;
  public static final int SCREEN_COLOR_AUTO = 0;
  public static final int SCREEN_COLOR_GREEN = 1;
  public static final int SCREEN_COLOR_BLUE = 2;
  public int modelType;
  public float greenCapacity;
  public int screenColorType;
}
```

<a id="class_segmentationproperty__parameters"></a>

## 属性 [#属性]

<ParameterList>
<a id="seg_model_ai"></a>
<Parameter name="SEG_MODEL_AI">

（1）：（默认）AI 分割算法。

</Parameter>
<a id="seg_model_green"></a>
<Parameter name="SEG_MODEL_GREEN">

（2）：绿幕分割算法。

</Parameter>
<a id="screen_color_auto"></a>
<Parameter name="SCREEN_COLOR_AUTO">

（0）：（默认）自动识别屏幕颜色。

</Parameter>
<a id="screen_color_green"></a>
<Parameter name="SCREEN_COLOR_GREEN">

（1）：绿色。

</Parameter>
<a id="screen_color_blue"></a>
<Parameter name="SCREEN_COLOR_BLUE">

（2）：蓝色。

</Parameter>
<a id="modeltype"></a>
<Parameter name="modelType">

用于背景处理的算法类型。

- `SEG_MODEL_AI`（1）：（默认）使用适用于所有场景的算法。
- `SEG_MODEL_GREEN`（2）：使用专为绿幕背景场景设计的算法。

</Parameter>
<a id="greencapacity"></a>
<Parameter name="greenCapacity">

识别图像中背景颜色的准确度范围。取值范围为 [0, 1]，默认值为 0.5。值越大，可识别的纯色色阶范围越宽。当该值过大时，人物边缘和人物区域中的纯色部分也可能被识别为背景。

:::note
注： 仅当 `modelType` 设为 `SEG_MODEL_GREEN` 时该参数生效。声网建议你根据实际效果动态调整该参数值。
:::

</Parameter>
<a id="screencolortype"></a>
<Parameter name="screenColorType">

屏幕颜色类型：

- `SCREEN_COLOR_AUTO`（0）：SDK 自动选择屏幕颜色。
- `SCREEN_COLOR_GREEN`（1）：绿色。
- `SCREEN_COLOR_BLUE`（2）：蓝色。

</Parameter>
</ParameterList>
