public class OtsuWeighted extends CalculateLevel
The standard otsu method seeks both foreground and background to have similar variance. But many for real world cases (e.g. fluorescent microscopy) one expects the background to be have much less variance, as it is very low-valued.
This algorithm allows the foreground and background variance to be non-equally weighted to a priori account for low-variance backgrounds.
Otsu
Constructor and Description |
---|
OtsuWeighted() |
OtsuWeighted(double weightForeground,
double weightBackground) |
Modifier and Type | Method and Description |
---|---|
int |
calculateLevel(Histogram histogram)
Determines a voxel intensity that can be used for thresholding.
|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
double |
getWeightBackground() |
double |
getWeightForeground() |
int |
hashCode() |
void |
setWeightBackground(double weightBackground) |
void |
setWeightForeground(double weightForeground) |
initializeRecursive, onInitialization, onInitialization
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public OtsuWeighted()
public OtsuWeighted(double weightForeground, double weightBackground)
public int calculateLevel(Histogram histogram) throws OperationFailedException
CalculateLevel
calculateLevel
in class CalculateLevel
histogram
- a histogram of voxel-intensities from which a threshold-level can be
derived.OperationFailedException
- if a level cannot be successfully calculated.public boolean equals(Object o)
equals
in class CalculateLevel
protected boolean canEqual(Object other)
public int hashCode()
hashCode
in class CalculateLevel
public double getWeightForeground()
public void setWeightForeground(double weightForeground)
public double getWeightBackground()
public void setWeightBackground(double weightBackground)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.