crop

open override fun crop(image: ImageRef, quad: List<PointF>, documentCropOptimization: DocumentCropOptimization): Result<ImageRef>

Crops the given image to the given quadrilateral.

Return

Cropped image.

Parameters

image

The image to crop.

quad

The quadrilateral of normalized points to crop.

documentCropOptimization

The optimization to apply when cropping a document. The method doesn't actually check if the input is a document photo, so it relies entirely on the caller's intent.