AdaptiveWhiteStretchFilterOptions
Inheritance: java.lang.Object, com.aspose.imaging.imagefilters.filteroptions.FilterOptionsBase
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.
Constructors
Methods
Method | Description |
---|---|
isGrayscale() | Gets a value indicating whether the filter operates in grayscale mode. |
getLowPercentile() | Gets the lower percentile for black point calculation. |
getHighPercentile() | Gets the upper percentile for white point calculation. |
getTargetWhite() | Gets the target white value the stretch aims to achieve. |
getMaxScale() | Gets the maximum allowed brightness scale. |
AdaptiveWhiteStretchFilterOptions()
public AdaptiveWhiteStretchFilterOptions()
AdaptiveWhiteStretchFilterOptions(boolean isGrayscale)
public AdaptiveWhiteStretchFilterOptions(boolean isGrayscale)
Parameters:
Parameter | Type | Description |
---|---|---|
isGrayscale | boolean |
AdaptiveWhiteStretchFilterOptions(boolean isGrayscale, int lowPercentile)
public AdaptiveWhiteStretchFilterOptions(boolean isGrayscale, int lowPercentile)
Parameters:
Parameter | Type | Description |
---|---|---|
isGrayscale | boolean | |
lowPercentile | int |
AdaptiveWhiteStretchFilterOptions(boolean isGrayscale, int lowPercentile, int highPercentile)
public AdaptiveWhiteStretchFilterOptions(boolean isGrayscale, int lowPercentile, int highPercentile)
Parameters:
Parameter | Type | Description |
---|---|---|
isGrayscale | boolean | |
lowPercentile | int | |
highPercentile | int |
AdaptiveWhiteStretchFilterOptions(boolean isGrayscale, int lowPercentile, int highPercentile, int targetWhite)
public AdaptiveWhiteStretchFilterOptions(boolean isGrayscale, int lowPercentile, int highPercentile, int targetWhite)
Parameters:
Parameter | Type | Description |
---|---|---|
isGrayscale | boolean | |
lowPercentile | int | |
highPercentile | int | |
targetWhite | int |
AdaptiveWhiteStretchFilterOptions(boolean isGrayscale, int lowPercentile, int highPercentile, int targetWhite, float maxScale)
public AdaptiveWhiteStretchFilterOptions(boolean isGrayscale, int lowPercentile, int highPercentile, int targetWhite, float maxScale)
Initializes a new instance of the AdaptiveWhiteStretchFilter class.
Parameters:
Parameter | Type | Description |
---|---|---|
isGrayscale | boolean | Indicates whether the filter should operate in grayscale mode. |
lowPercentile | int | Lower percentile for black point (e.g. 10). |
highPercentile | int | Upper percentile for white point (e.g. 90). |
targetWhite | int | Target white value (e.g. 240). |
maxScale | float | Maximum allowed brightness scale (e.g. 1.7). |
The algorithm stretches the histogram so that the white percentile approaches targetWhite
, but without exceeding maxScale
to avoid over-brightening. |
isGrayscale()
public final boolean isGrayscale()
Gets a value indicating whether the filter operates in grayscale mode.
Returns: boolean - a value indicating whether the filter operates in grayscale mode.
getLowPercentile()
public final int getLowPercentile()
Gets the lower percentile for black point calculation. Pixel values below this percentile are considered as black during stretching.
Returns: int - the lower percentile for black point calculation.
getHighPercentile()
public final int getHighPercentile()
Gets the upper percentile for white point calculation. Pixel values above this percentile are considered as white during stretching.
Returns: int - the upper percentile for white point calculation.
getTargetWhite()
public final int getTargetWhite()
Gets the target white value the stretch aims to achieve.
Returns: int - the target white value the stretch aims to achieve.
getMaxScale()
public final float getMaxScale()
Gets the maximum allowed brightness scale. The actual stretching will not exceed this factor, to avoid over-brightening.
Returns: float - the maximum allowed brightness scale.