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 |
ContrastCorrection()
Contrast correction filter.
|
static PreprocessingFilter |
Invert()
Automatically inverts colors in a document image.
|
static PreprocessingFilter |
Median()
The median filter run through each element of the image and replace each pixel with the median of its neighboring pixels.
|
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 InterpolationFilterTypepublic static PreprocessingFilter Resize(int width, int height)
InterpolationFilterTypewidth - 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)
InterpolationFilterTyperatio - 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 InterpolationFilterTypepublic static PreprocessingFilter ToGrayscale()
public static PreprocessingFilter Threshold(int value)
value - The max value.public static PreprocessingFilter Median()
public static PreprocessingFilter ContrastCorrection()
public void add(PreprocessingFilter filter)
filter - New operation to add to filter list.Copyright © 2021 Aspose. All rights reserved.