Catalano.Imaging.Concurrent.Filters
Class BernsenThreshold
- java.lang.Object
-
- Catalano.Imaging.Concurrent.Filters.BernsenThreshold
-
- All Implemented Interfaces:
- IApplyInPlace
public class BernsenThreshold extends java.lang.Object implements IApplyInPlace
Bernsen Threshold.The method uses a user-provided contrast threshold. If the local contrast (max-min) is above or equal to the contrast threshold, the threshold is set at the local midgrey value (the mean of the minimum and maximum grey values in the local window). If the local contrast is below the contrast threshold the neighbourhood is considered to consist only of one class and the pixel is set to object or background depending on the value of the midgrey.
-
-
Constructor Summary
Constructors Constructor and Description BernsenThreshold()Initialize a new instance of the BernsenThreshold class.BernsenThreshold(int radius)Initialize a new instance of the BernsenThreshold class.BernsenThreshold(int radius, double contrastThreshold)Initialize a new instance of the BernsenThreshold class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidapplyInPlace(FastBitmap fastBitmap)Apply filter to an image.doublegetContrastThreshold()Get Contrast threshold.intgetRadius()Get radius.voidsetContrastThreshold(double c)Set Contrast threshold.voidsetRadius(int radius)Set radius.
-
-
-
Constructor Detail
-
BernsenThreshold
public BernsenThreshold()
Initialize a new instance of the BernsenThreshold class.
-
BernsenThreshold
public BernsenThreshold(int radius)
Initialize a new instance of the BernsenThreshold class.- Parameters:
radius- Radius.
-
BernsenThreshold
public BernsenThreshold(int radius, double contrastThreshold)Initialize a new instance of the BernsenThreshold class.- Parameters:
radius- RadiuscontrastThreshold- Contrast Threshold.
-
-
Method Detail
-
getRadius
public int getRadius()
Get radius.- Returns:
- Radius.
-
setRadius
public void setRadius(int radius)
Set radius.- Parameters:
radius- Radius.
-
getContrastThreshold
public double getContrastThreshold()
Get Contrast threshold.- Returns:
- Contrast threshold.
-
setContrastThreshold
public void setContrastThreshold(double c)
Set Contrast threshold.- Parameters:
c- Contrast 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.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG