public class FixedResizeProcessor extends Object implements SinglebandImageProcessor<Float,FImage>
ResizeProcessor
which speeds up the resize operation
between images of a given size to another fixed size by caching the contribution
calculationsSinglebandImageProcessor.Processable<T,S extends Image<T,S>,I extends Image<?,I>>
Modifier and Type | Field and Description |
---|---|
static ResizeFilterFunction |
DEFAULT_FILTER
The default
TriangleFilter (bilinear-interpolation filter) used
by instances of ResizeProcessor , unless otherwise specified. |
Constructor and Description |
---|
FixedResizeProcessor(FImage image,
int newX,
int newY) |
FixedResizeProcessor(float srcX,
float srcY,
float newX,
float newY)
Construct a fixed resize processor that will rescale the image to the given
width and height with the default filter function.
|
FixedResizeProcessor(float srcX,
float srcY,
float newX,
float newY,
ResizeFilterFunction ff)
Construct a fixed resize processor that will rescale the image to the given
width and height with the given filter function.
|
public static final ResizeFilterFunction DEFAULT_FILTER
TriangleFilter
(bilinear-interpolation filter) used
by instances of ResizeProcessor
, unless otherwise specified.public FixedResizeProcessor(float srcX, float srcY, float newX, float newY, ResizeFilterFunction ff)
srcX
- The expected width of input imagessrcY
- The expected with of output imagesnewX
- The new width of the image.newY
- The new height of the image.ff
- The filter function to use.public FixedResizeProcessor(float srcX, float srcY, float newX, float newY)
srcX
- The expected width of input imagessrcY
- The expected height of input imagesnewX
- The new width of the image.newY
- The new height of the image.public FixedResizeProcessor(FImage image, int newX, int newY)
image
- The expected width and height of input imagesnewX
- The new width of the imagenewY
- The new height of the imagepublic void processImage(FImage in)
Image.internalAssign(Image)
.processImage
in interface ImageProcessor<FImage>
in
- The image to process in place.ImageProcessor.processImage(org.openimaj.image.Image)