Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
Toggle table of contents sidebar

# Image.extractRoi Method

Module: Image

## Definition

Extracts a region of interest in the image according to the given bounds.

Python

    extract_roi(self, bounds: Rectangle) -> Image

Parameters

> `bounds` Rectangle
> in Bounds of the crop to extract.

Returns

> Image
> The extracted region of interest.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Dart

    Image extractRoi(Rectangle bounds)

Parameters

> `bounds` Rectangle
> in Bounds of the crop to extract.

Returns

> Image
> The extracted region of interest.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

C#

    public Image ExtractRoi(Rectangle bounds)

Parameters

> `bounds` Rectangle
> in Bounds of the crop to extract.

Returns

> Image
> The extracted region of interest.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Java

    public Image extractRoi(Rectangle bounds) throws FaceException

Parameters

> `bounds` Rectangle
> in Bounds of the crop to extract.

Returns

> Image
> The extracted region of interest.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Swift

    public func extractRoi(bounds: Rectangle) throws -> Image

Parameters

> `bounds` Rectangle
> in Bounds of the crop to extract.

Returns

> Image
> The extracted region of interest.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

C

    int id3FaceImage_ExtractRoi (
        ID3_FACE_IMAGE hImage,
        const id3FaceRectangle * sBounds,
        ID3_FACE_IMAGE hImageRoi)

Parameters

> `hImage` ID3_FACE_IMAGE
> in Handle to the Image object.
> `sBounds` const id3FaceRectangle *
> in Bounds of the crop to extract.
> `hImageRoi` ID3_FACE_IMAGE
> out The extracted region of interest.

Returns

> `int`
> An error code.
> See id3FaceError file for the list of possible error codes.