public class AdaptiveWhiteStretchFilterOptions extends FilterOptionsBase
Provides options for configuring the Adaptive White Stretch filter. Allows customization of histogram stretch parameters to enhance the white level and improve the readability of faint-text or low-contrast document images.
| Constructor and Description |
|---|
AdaptiveWhiteStretchFilterOptions() |
AdaptiveWhiteStretchFilterOptions(boolean isGrayscale) |
AdaptiveWhiteStretchFilterOptions(boolean isGrayscale,
int lowPercentile) |
AdaptiveWhiteStretchFilterOptions(boolean isGrayscale,
int lowPercentile,
int highPercentile) |
AdaptiveWhiteStretchFilterOptions(boolean isGrayscale,
int lowPercentile,
int highPercentile,
int targetWhite) |
AdaptiveWhiteStretchFilterOptions(boolean isGrayscale,
int lowPercentile,
int highPercentile,
int targetWhite,
float maxScale)
Initializes a new instance of the
AdaptiveWhiteStretchFilter class. |
| Modifier and Type | Method and Description |
|---|---|
int |
getHighPercentile()
Gets the upper percentile for white point calculation.
|
int |
getLowPercentile()
Gets the lower percentile for black point calculation.
|
float |
getMaxScale()
Gets the maximum allowed brightness scale.
|
int |
getTargetWhite()
Gets the target white value the stretch aims to achieve.
|
boolean |
isGrayscale()
Gets a value indicating whether the filter operates in grayscale mode.
|
public AdaptiveWhiteStretchFilterOptions()
public AdaptiveWhiteStretchFilterOptions(boolean isGrayscale)
public AdaptiveWhiteStretchFilterOptions(boolean isGrayscale,
int lowPercentile)
public AdaptiveWhiteStretchFilterOptions(boolean isGrayscale,
int lowPercentile,
int highPercentile)
public AdaptiveWhiteStretchFilterOptions(boolean isGrayscale,
int lowPercentile,
int highPercentile,
int targetWhite)
public AdaptiveWhiteStretchFilterOptions(boolean isGrayscale,
int lowPercentile,
int highPercentile,
int targetWhite,
float maxScale)
Initializes a new instance of the AdaptiveWhiteStretchFilter class.
isGrayscale - Indicates whether the filter should operate in grayscale mode.lowPercentile - Lower percentile for black point (e.g. 10).highPercentile - Upper percentile for white point (e.g. 90).targetWhite - Target white value (e.g. 240).maxScale - Maximum allowed brightness scale (e.g. 1.7).
targetWhite,
but without exceeding maxScale to avoid over-brightening.
public final boolean isGrayscale()
Gets a value indicating whether the filter operates in grayscale mode.
public final int getLowPercentile()
Gets the lower percentile for black point calculation. Pixel values below this percentile are considered as black during stretching.
public final int getHighPercentile()
Gets the upper percentile for white point calculation. Pixel values above this percentile are considered as white during stretching.
public final int getTargetWhite()
Gets the target white value the stretch aims to achieve.
public final float getMaxScale()
Gets the maximum allowed brightness scale. The actual stretching will not exceed this factor, to avoid over-brightening.
Copyright (c) 2008-2025 Aspose Pty Ltd. All Rights Reserved.