@ALDAOperator(genericExecutionMode=ALL,
level=APPLICATION)
public class HysteresisThresholding
extends MTBOperator
This thresholding scheme applies two thresholds $t_{l}$ and $t_{h}$ to the image. All pixels having an intensity value equal or larger than $t_{h}$ are assigned to the foreground. In addition, also pixels with an intensity value equal or higher to the lower threshold are included in the foreground if they transitively link to a pixel with an intensity value equal or larger than $t_{h}$.
This thresholding heuristic is, e.g., used in the Canny edge detector.
| Modifier and Type | Field and Description |
|---|---|
protected MTBImage |
inImg
Image to process.
|
protected MTBImageByte |
resultImage
Resulting binarized image.
|
protected Double |
threshHigh
Upper threshold.
|
protected Double |
threshLow
Lower threshold.
|
| Constructor and Description |
|---|
HysteresisThresholding()
Standard constructor.
|
| Modifier and Type | Method and Description |
|---|---|
MTBImageByte |
getResultImage()
Returns the result image.
|
protected static void |
labelNeighbors(MTBImage img,
MTBImage result,
boolean[][] procMap,
int x,
int y,
double tl,
double th)
Function for recursive labeling of foreground pixels.
|
protected void |
operate() |
void |
setHigherThreshold(double d)
Specify higher threshold.
|
void |
setInputImage(MTBImage image)
Set input image.
|
void |
setLowerThreshold(double d)
Specify lower threshold.
|
readResolveaddOperatorExecutionProgressEventListener, addParameter, addParameter, addParameterUnconditioned, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, getDocumentation, getHidingMode, getInactiveParameterNames, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterDescriptorUnconditioned, getParameterNames, getParameterUnconditioned, getSupplementalNames, getVerbose, getVersion, handleOperatorExecutionProgressEvent, hasInOutParameters, hasParameter, isAnnotatedParameter, isConfigured, print, print, print, printInterface, printInterface, readHistory, reinitializeParameterDescriptors, removeOperatorExecutionProgressEventListener, removeParameter, runOp, runOp, runOp, setConstructionMode, setConstructionMode, setConstructionMode, setHidingMode, setName, setParameter, setParameterUnconditioned, setVerbose, toStringVerbose, unconfiguredItems, validate, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory@Parameter(label="Input Image",
required=true,
dataIOOrder=0,
direction=IN,
description="Input image.")
protected transient MTBImage inImg
@Parameter(label="Upper Threshold",
required=true,
dataIOOrder=1,
direction=IN,
description="Higher threshold.")
protected Double threshHigh
@Parameter(label="Lower Threshold",
required=true,
dataIOOrder=2,
direction=IN,
description="Lower threshold.")
protected Double threshLow
@Parameter(label="Thresholded Image",
direction=OUT,
description="Thresholded binary image.")
protected transient MTBImageByte resultImage
public HysteresisThresholding()
throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorExceptionprotected void operate()
operate in class de.unihalle.informatik.Alida.operator.ALDOperatorprotected static void labelNeighbors(MTBImage img, MTBImage result, boolean[][] procMap, int x, int y, double tl, double th)
Refer to the hysteresis threshold algorithm for details.
img - Input image.result - Binary result image.procMap - Map to remember pixels already processed.x - Current x-position.y - Current y-position.tl - Lower threshold.th - Higher threshold.public void setInputImage(MTBImage image)
image - Image to process.public void setLowerThreshold(double d)
d - Threshold value.public void setHigherThreshold(double d)
d - Threshold value.public MTBImageByte getResultImage()
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.