# IdentityProcessor

The `IdentityProcessor` class provides functions to process identity documents, such as locating portrait zones with higher precision.

**Remarks**

Introduced in Dynamsoft Capture Vision version 3.4.1000.

## Definition

*Package:* com.dynamsoft.id_utility

```java
public class IdentityProcessor
```

## Methods

| Method                                                    | Description                                        |
| --------------------------------------------------------- | -------------------------------------------------- |
| [`IdentityProcessor`](#identityprocessor)                 | Constructor. Initializes a new instance of the `IdentityProcessor` class. |
| [`findPortraitZone`](#findportraitzone)                   | Finds the location of the portrait zone on an identity document. |

### IdentityProcessor

Constructor. Initializes a new instance of the `IdentityProcessor` class.

```java
IdentityProcessor()
```

### findPortraitZone

Finds the location of the portrait zone on an identity document.

```java
Quadrilateral findPortraitZone(ScaledColourImageUnit scaledColourImgUnit,
                               LocalizedTextLinesUnit localizedTextLinesUnit,
                               RecognizedTextLinesUnit recognizedTextLinesUnit,
                               DetectedQuadsUnit detectedQuadsUnit,
                               DeskewedImageUnit deskewedImageUnit) throws IdentityUtilityException
```

**Parameters**

`scaledColourImgUnit` The scaled colour image unit containing the source image.

`localizedTextLinesUnit` The localized text lines unit containing MRZ/text regions.

`recognizedTextLinesUnit` The recognized text lines unit for document type identification.

`detectedQuadsUnit` The detected quads unit containing document boundaries.

`deskewedImageUnit` The deskewed image unit for coordinate transformation.

**Return value**

Returns a `Quadrilateral` representing the portrait zone location. Returns `null` if not found.

**Exception**

[IdentityUtilityException](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/id-utility/identity-utility-exception.md)

**See Also**

[ScaledColourImageUnit](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/intermediate-results/scaled-colour-image-unit.md)

[LocalizedTextLinesUnit](https://www.dynamsoft.com/label-recognition/docs/server/programming/java/api-reference/localized-text-lines-unit.md)

[RecognizedTextLinesUnit](https://www.dynamsoft.com/label-recognition/docs/server/programming/java/api-reference/recognized-text-lines-unit.md)

[DetectedQuadsUnit](https://www.dynamsoft.com/document-normalizer/docs/server/programming/java/api-reference/detected-quads-unit.md)

[DeskewedImageUnit](https://www.dynamsoft.com/document-normalizer/docs/server/programming/java/api-reference/deskewed-image-unit.md)

[Quadrilateral](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/basic-classes/quadrilateral.md)
