public class PreprocessingFilter extends Object
Constructor and Description |
---|
PreprocessingFilter() |
Modifier and Type | Method and Description |
---|---|
void |
add(PreprocessingFilter filter)
Add the new filter to the collection to further run all operations.
|
static PreprocessingFilter |
Binarize()
Converts an image to black-and-white image.
|
static PreprocessingFilter |
BinarizeAndDilate()
Dilation adds pixels to the boundaries of objects in an image.
|
static PreprocessingFilter |
Invert()
Automatically inverts colors in a document image.
|
static PreprocessingFilter |
Resize(int width,
int height)
Rescale image - Upscale or downscale image resolution.
|
static PreprocessingFilter |
Resize(int width,
int height,
InterpolationFilterType type)
Rescale image - upscale or downscale image resolution.
|
static PreprocessingFilter |
Rotate(float angle)
Rotate original image.
|
static PreprocessingFilter |
Scale(float ratio)
Rescale image - Upscale or downscale image resolution.
|
static PreprocessingFilter |
Scale(float ratio,
InterpolationFilterType type)
Rescale image - Upscale or downscale image resolution.
|
static PreprocessingFilter |
Threshold(int value)
Create a binary image based on setting a threshold value on the pixel intensity of the original image.
|
static PreprocessingFilter |
ToGrayscale()
Converts an image to grayscale image.
|
public static PreprocessingFilter Binarize()
public static PreprocessingFilter Resize(int width, int height, InterpolationFilterType type)
width
- The new width of the image.height
- The new height of the image.type
- InterpolationFilterType @see InterpolationFilterType
public static PreprocessingFilter Resize(int width, int height)
InterpolationFilterType
width
- The new width of the image.height
- The new height of the image.public static PreprocessingFilter BinarizeAndDilate()
public static PreprocessingFilter Invert()
public static PreprocessingFilter Rotate(float angle)
angle
- Angle of rotation. Value from -360 to 360.public static PreprocessingFilter Scale(float ratio)
InterpolationFilterType
ratio
- The scaling factor. Recommended value from 0.1 to 1 to shrink. From 1 to 10 to enlarge.public static PreprocessingFilter Scale(float ratio, InterpolationFilterType type)
ratio
- The scaling factor. Recommended value from 0.1 to 1 to shrink. From 1 to 10 to enlarge.type
- InterpolationFilterType @see InterpolationFilterType
public static PreprocessingFilter ToGrayscale()
public static PreprocessingFilter Threshold(int value)
value
- The max value.public void add(PreprocessingFilter filter)
filter
- New operation to add to filter list.Copyright © 2021 Aspose. All rights reserved.