public class ComputeOtsu
extends java.lang.Object
GThresholdImageOps#computeOtsu(ImageGray, int, int),
GThresholdImageOps.computeOtsu2(ImageGray, int, int)| Modifier and Type | Field and Description |
|---|---|
boolean |
down |
double |
threshold |
double |
variance |
| Constructor and Description |
|---|
ComputeOtsu(boolean useOtsu2,
boolean down) |
ComputeOtsu(boolean useOtsu2,
double tuning,
boolean down,
double scale) |
| Modifier and Type | Method and Description |
|---|---|
void |
compute(int[] histogram,
int length,
int totalPixels)
Computes the threshold and stores the result in the 'threshold' variable
|
protected void |
computeOtsu(int[] histogram,
int length,
int totalPixels) |
protected void |
computeOtsu2(int[] histogram,
int length,
int totalPixels) |
double |
getScale() |
double |
getTuning() |
boolean |
isDown() |
boolean |
isUseOtsu2() |
void |
setDown(boolean down) |
void |
setScale(double scale) |
void |
setTuning(double tuning) |
void |
setUseOtsu2(boolean useOtsu2) |
public double threshold
public double variance
public boolean down
public ComputeOtsu(boolean useOtsu2,
double tuning,
boolean down,
double scale)
useOtsu2 - true to use modified otsu. false uses clasicaltuning - Tuning parameter. 0 = standard Otsu. Greater than 0 will penalize zero texture.down - Is otsu being used to threshold the image up or downscale - scale factor applied to the threshold. 1.0 = unmodifiedpublic ComputeOtsu(boolean useOtsu2,
boolean down)
public void compute(int[] histogram,
int length,
int totalPixels)
histogram - length - length of histogramtotalPixels - total sum of all pixels in histogramprotected void computeOtsu(int[] histogram,
int length,
int totalPixels)
protected void computeOtsu2(int[] histogram,
int length,
int totalPixels)
public boolean isUseOtsu2()
public void setUseOtsu2(boolean useOtsu2)
public double getTuning()
public void setTuning(double tuning)
public boolean isDown()
public void setDown(boolean down)
public double getScale()
public void setScale(double scale)