@ALDAOperator(genericExecutionMode=ALL, level=STANDARD, allowBatchMode=true, shortDescription="Correction of uneven illumination.") public class IlluminationCorrection extends MTBOperator
This class corrects the uneven illumination (e.g. background gradient) of especially gray value bright filed or DIC images. The original image is transformed by a morphological closing (or an other morphological transformation). The correction of the uneven illumination is obtained by dividing the original image by the transformed image. This approach works well for DIC images, maybe also for bright field or other illumination/contrast based images. Mask size of the structuring element should be large to remove the cells or objects but preserve the (uneven) illumination function. The approach is adapted from: author = {Soille, Pierre}, title = {Morphological Image Analysis: Principles and Applications}, year = {2010}, isbn = {9783642076961}, edition = {2}, pages = {124 -- 126}, publisher = {Springer Berlin Heidelberg}. Also other morphological operations can be used instead of the closing followed with a division of the images. Approach maybe depends on the image data. Feel free to extend this class!
Modifier and Type | Field and Description |
---|---|
private MTBImage |
inputImage |
private BasicMorphology |
morphOp |
private MTBImage |
outputImage |
private MTBImage.MTBImageType |
outputType |
Constructor and Description |
---|
IlluminationCorrection()
Standard constructor.
|
IlluminationCorrection(MTBImage _inputImage,
BasicMorphology _morphOp,
MTBImage.MTBImageType _outputType)
Constructor to create a new IlluminationCorrection object.
|
Modifier and Type | Method and Description |
---|---|
private MTBImage |
div(MTBImage img1,
MTBImage img2)
Method to divide two images.
|
String |
getDocumentation() |
MTBImage.MTBImageType |
getImageType()
Get output image type.
|
MTBImage |
getInputImage()
Get uneven illuminated input image.
|
BasicMorphology |
getMorphOp()
Get morphological operation for illumination correction, default is
closing.
|
MTBImage |
getResultImage()
Get illumination corrected result image.
|
protected void |
operate() |
void |
setImageType(MTBImage.MTBImageType _outputType)
Set output image type.
|
void |
setInputImage(MTBImage _inputImage)
Set uneven illuminated input image.
|
void |
setMorphOp(BasicMorphology _morphOp)
Set morphological operation for illumination correction, default is
closing.
|
readResolve
addOperatorExecutionProgressEventListener, addParameter, addParameter, addParameterUnconditioned, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, 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, direction=IN, description="Uneven illuminated input image.", mode=STANDARD, dataIOOrder=0) private transient MTBImage inputImage
@Parameter(label="Morphology", required=true, direction=IN, description="Morphological operator for correction.", mode=STANDARD, dataIOOrder=1) private BasicMorphology morphOp
@Parameter(label="Output Image Type", required=true, direction=IN, description="Image type of illumination corrected output image.", mode=STANDARD, dataIOOrder=2) private MTBImage.MTBImageType outputType
@Parameter(label="Output Image", required=true, direction=OUT, description="Illumination corrected output image.") private transient MTBImage outputImage
public IlluminationCorrection() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public IlluminationCorrection(MTBImage _inputImage, BasicMorphology _morphOp, MTBImage.MTBImageType _outputType) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
image
- uneven illuminated input imageoperator
- morphological operator for correction, e.g. closingtype
- MTBImageType of illumination corrected output imagede.unihalle.informatik.Alida.exceptions.ALDOperatorException
public MTBImage getInputImage()
public void setInputImage(MTBImage _inputImage)
public BasicMorphology getMorphOp()
public void setMorphOp(BasicMorphology _morphOp)
public MTBImage.MTBImageType getImageType()
public void setImageType(MTBImage.MTBImageType _outputType)
public MTBImage getResultImage()
protected void operate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
private MTBImage div(MTBImage img1, MTBImage img2)
ImageArithmetics
.public String getDocumentation()
getDocumentation
in class de.unihalle.informatik.Alida.operator.ALDOperator
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.