public class ThresholdLocalOtsu extends java.lang.Object implements InputToBinary<GrayU8>
GThresholdImageOps.computeOtsu2(int[], int, int) Otsu-2} using its local region
This implementation includes a modification from the traditional Otsu algorithm. The threshold can optionally
be adjusted in low variance regions. See code for details.| Constructor and Description |
|---|
ThresholdLocalOtsu(boolean otsu2,
ConfigLength regionWidthLength,
double tuning,
double scale,
boolean down)
Configures the detector
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
computeHistogram(int x0,
int y0,
GrayU8 input) |
ImageType<GrayU8> |
getInputType() |
ComputeOtsu |
getOtsu() |
void |
process(GrayU8 input,
GrayU8 output)
Converts the gray scale input image into a binary image
|
protected void |
updateHistogramX(int x0,
int y0,
GrayU8 input) |
protected void |
updateHistogramY(int x0,
int y0,
GrayU8 input) |
public ThresholdLocalOtsu(boolean otsu2,
ConfigLength regionWidthLength,
double tuning,
double scale,
boolean down)
regionWidthLength - How wide the local square region is.tuning - Tuning parameter. 0 = standard Otsu. Greater than 0 will penalize zero texture.public void process(GrayU8 input, GrayU8 output)
process in interface InputToBinary<GrayU8>input - Input imageoutput - Output binary imageprotected void computeHistogram(int x0,
int y0,
GrayU8 input)
protected void updateHistogramX(int x0,
int y0,
GrayU8 input)
protected void updateHistogramY(int x0,
int y0,
GrayU8 input)
public ImageType<GrayU8> getInputType()
getInputType in interface InputToBinary<GrayU8>public ComputeOtsu getOtsu()