sampleGrid

open override fun sampleGrid(image: BitMatrix, dimensionX: Int, dimensionY: Int, p1ToX: Float, p1ToY: Float, p2ToX: Float, p2ToY: Float, p3ToX: Float, p3ToY: Float, p4ToX: Float, p4ToY: Float, p1FromX: Float, p1FromY: Float, p2FromX: Float, p2FromY: Float, p3FromX: Float, p3FromY: Float, p4FromX: Float, p4FromY: Float): BitMatrix

Samples an image for a rectangular matrix of bits of the given dimension. The sampling transformation is determined by the coordinates of 4 points, in the original and transformed image space.

Return

BitMatrix representing a grid of points sampled from the image within a region defined by the "from" parameters

Parameters

image

image to sample

dimensionX

width of BitMatrix to sample from image

dimensionY

height of BitMatrix to sample from image

Throws

if image can't be sampled, for example, if the transformation defined by the given points is invalid or results in sampling outside the image boundaries


open override fun sampleGrid(image: BitMatrix, dimensionX: Int, dimensionY: Int, transform: PerspectiveTransform): BitMatrix