Catalano.Imaging.Filters
Class TsaiThreshold
- java.lang.Object
-
- Catalano.Imaging.Filters.TsaiThreshold
-
- All Implemented Interfaces:
- IApplyInPlace
public class TsaiThreshold extends java.lang.Object implements IApplyInPlace
Tsai Threshold.
-
-
Constructor Summary
Constructors Constructor and Description TsaiThreshold()Initializes a new instance of the TsaiThreshold class.TsaiThreshold(boolean invert)Initializes a new instance of the TsaiThreshold class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidapplyInPlace(FastBitmap fastBitmap)Apply filter to an image.intCalculateThreshold(FastBitmap fastBitmap)Calculate the bilevel threshold value.booleanisInvert()Check if the threshold is inverted.voidsetInvert(boolean invert)Invert threshold.
-
-
-
Constructor Detail
-
TsaiThreshold
public TsaiThreshold()
Initializes a new instance of the TsaiThreshold class.
-
TsaiThreshold
public TsaiThreshold(boolean invert)
Initializes a new instance of the TsaiThreshold class.- Parameters:
invert- True if need to invert the threshold.
-
-
Method Detail
-
isInvert
public boolean isInvert()
Check if the threshold is inverted.- Returns:
- True if the threshold is inverted, otherwise false.
-
setInvert
public void setInvert(boolean invert)
Invert threshold.- Parameters:
invert- True if need to invert the threshold.
-
applyInPlace
public void applyInPlace(FastBitmap fastBitmap)
Description copied from interface:IApplyInPlaceApply filter to an image.- Specified by:
applyInPlacein interfaceIApplyInPlace- Parameters:
fastBitmap- Image to be processed.
-
CalculateThreshold
public int CalculateThreshold(FastBitmap fastBitmap)
Calculate the bilevel threshold value.- Parameters:
fastBitmap- Grayscale image.- Returns:
- Tsai threshold value.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG