sampleGrid
public BitMatrix sampleGrid(BitMatrix image,
int dimensionX,
int dimensionY,
float 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)
throws NotFoundException
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.
- 指定者:
sampleGrid
在类中 GridSampler
- 参数:
image
- image to sample
dimensionX
- width of BitMatrix
to sample from image
dimensionY
- height of BitMatrix
to sample from image
p1ToX
- point 1 preimage X
p1ToY
- point 1 preimage Y
p2ToX
- point 2 preimage X
p2ToY
- point 2 preimage Y
p3ToX
- point 3 preimage X
p3ToY
- point 3 preimage Y
p4ToX
- point 4 preimage X
p4ToY
- point 4 preimage Y
p1FromX
- point 1 image X
p1FromY
- point 1 image Y
p2FromX
- point 2 image X
p2FromY
- point 2 image Y
p3FromX
- point 3 image X
p3FromY
- point 3 image Y
p4FromX
- point 4 image X
p4FromY
- point 4 image Y
- 返回:
BitMatrix
representing a grid of points sampled from the image within a region
defined by the "from" parameters
- 抛出:
NotFoundException
- 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