## Threshold(int) {#threshold}

根据对原始图像的像素强度设置阈值来创建二值图像。

```csharp
public static PreprocessingFilter Threshold(int value)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| value | Int32 | 最大值。 |

### 返回值

二值化过滤器对象。

### 也可以看看

* class [PreprocessingFilter](../)
* 命名空间 [Aspose.OCR.Models.PreprocessingFilters](../../preprocessingfilter/)
* 部件 [Aspose.OCR](../../../)

---

## Threshold(int, Rectangle) {#threshold_1}

根据对原始图像部分的像素强度设置阈值来创建图像的二进制部分。

```csharp
public static PreprocessingFilter Threshold(int value, Rectangle area)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| value | Int32 | 最大值。 |
| area | Rectangle | 要校正的图像部分的坐标。 |

### 返回值

二值化过滤器对象。

### 也可以看看

* class [PreprocessingFilter](../)
* 命名空间 [Aspose.OCR.Models.PreprocessingFilters](../../preprocessingfilter/)
* 部件 [Aspose.OCR](../../../)


