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

# DocumentImage.extractRoi Method

Module: DocumentImage

## Definition

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

Python

    extract_roi(self, bounds: Rectangle) -> DocumentImage

Parameters

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

Returns

> DocumentImage
> The extracted region of interest.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Dart

    DocumentImage extractRoi(Rectangle bounds)

Parameters

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

Returns

> DocumentImage
> The extracted region of interest.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

C#

    public DocumentImage ExtractRoi(Rectangle bounds)

Parameters

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

Returns

> DocumentImage
> The extracted region of interest.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Java

    public DocumentImage extractRoi(Rectangle bounds) throws DocumentException

Parameters

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

Returns

> DocumentImage
> The extracted region of interest.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Swift

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

Parameters

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

Returns

> DocumentImage
> The extracted region of interest.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

C

    int id3DocumentImage_ExtractRoi (
        ID3_DOCUMENT_IMAGE hDocumentImage,
        const id3DocumentRectangle * sBounds,
        ID3_DOCUMENT_IMAGE hDocumentImageRoi)

Parameters

> `hDocumentImage` ID3_DOCUMENT_IMAGE
> in Handle to the DocumentImage object.
> `sBounds` const id3DocumentRectangle *
> in Bounds of the crop to extract.
> `hDocumentImageRoi` ID3_DOCUMENT_IMAGE
> out The extracted region of interest.

Returns

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