de.unihalle.informatik.MiToBo.enhance
Class LocallyAdaptiveContrastEnhancement

java.lang.Object
  extended by de.unihalle.informatik.Alida.operator.ALDOperator
      extended by de.unihalle.informatik.MiToBo.core.operator.MTBOperator
          extended by de.unihalle.informatik.MiToBo.enhance.LocallyAdaptiveContrastEnhancement
All Implemented Interfaces:
de.unihalle.informatik.Alida.datatypes.ALDConfigurationValidator, de.unihalle.informatik.Alida.operator.events.ALDOperatorExecutionProgressEventListener, EventListener

@ALDAOperator(genericExecutionMode=ALL,
              level=APPLICATION)
@ALDMetaInfo(export=MANDATORY)
public class LocallyAdaptiveContrastEnhancement
extends MTBOperator

This class implements contrast enhancement for microscopy images.

Reference:
Jyh-Ying Peng, Chun-Nan Hsu, Chung-Chih Lin,
"Adaptive Image Enhancement for Fluorescence Microscopy",
Int. Conf. on Technologies and Applications of Artificial Intelligence, pp. 9-16, 2010.

The basic idea of this algorithm is to enhance contrast by normalizing each pixel's intensity according to the standard intensity deviation in a local region around the pixel. Subsequently it should be easier to distinguish image background and relevant foreground structures from each other. Although in principal arbitrary segmentation methods could be applied after contrast enhancement, the algorithm is optimized for subsequent binarization, e.g. by Otsu thresholding. In addition, note that the algorithm does not work very well on images showing small structures on very noisy background (like P-bodies or stress granules). It is much better suited for larger structures like DAPI-stained nuclei which can more easily be distinguished from clutter, at least visually.

The size of each local region is adaptive and chosen so that the standard deviation in the region exceeds a certain fraction of the overall image standard deviation, where the fraction is usually lying in the range of 0.2 to 0.8. The ratio can be adapted by the corresponding parameter for the standard deviation ratio. The size of the local region is bounded to a maximum radius which is to be selected according to the size of the entities shown in the image.

The actual image enhancement is based on the following equations.
The radius for each pixel region is first of all calculated as follows:

%preamble{\usepackage{amssymb,amsmath}}
where $R_{max}$ is the maximally allowed radius, $T_{StD}$ is the threshold for local standard deviation calculated as fraction of the image intensity standard deviation, and $StD[R_r(x,y)]$ is the standard deviation in a region $R_r(x,y)$ with radius $r$ around the current pixel $(x,y)$.

To avoid numerical instabilities the local standard deviation for normalization is calculated as follows, given the selected local region size $r^\ast$:

%preamble{\usepackage{amssymb,amsmath}}
Finally the normalization for contrast enhancement, i.e. the calculation of the new image intensity value $I_N(x,y)$ is done as follows:
%preamble{\usepackage{amssymb, amsmath}}

As an extension to the original paper this operator features a mode for component-wise application of the algorithm. This means that the image is first of all thresholded and connected components are extracted. Then the contrast enhancement is applied to each component's bounding box separately. Finally, the result image is generated from all enhanced patches after they have been thresholded, i.e. the result image in this case is already a binary segmentation of foreground and background. This inherent binarization is done as the contrast-enhanced image does contain only fractions of reasonable information and, thus, is difficult to post-process without specific knowledge only available inside of this operator.

The basics of this operator have been implemented in the course of the bachelor thesis of Joachim Schumann in SS 2011.

Author:
Joachim Schumann, Birgit Moeller

Nested Class Summary
 
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode
 
Field Summary
 
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
completeDAG, name, operatorExecutionEventlistenerList, portHashAccess, verbose, versionProvider
 
Constructor Summary
LocallyAdaptiveContrastEnhancement()
          Default constructor.
LocallyAdaptiveContrastEnhancement(MTBImage inimg)
          Constructor with given image.
LocallyAdaptiveContrastEnhancement(MTBImage inimg, double pc, int maxr)
          Constructor with given image and parameters.
 
Method Summary
 MTBImage getInputImage()
          Returns the input image, null if not set.
 MTBImage getRadiusImage()
          Returns supplemental radius image, null if not generated.
 MTBImage getResultImage()
          Returns result image.
 boolean isAppliedComponentwise()
          Return operator mode.
protected  void operate()
          This method does the actual work.
 void setInputImage(MTBImage inimg)
          Specify the input image.
 
Methods inherited from class de.unihalle.informatik.MiToBo.core.operator.MTBOperator
readResolve
 
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
addOperatorExecutionProgressEventListener, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, getHidingMode, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterNames, getSupplementalNames, getVerbose, getVersion, handleOperatorExecutionProgressEvent, isConfigured, print, print, print, printInterface, printInterface, readHistory, reinitializeParameterDescriptors, removeOperatorExecutionProgressEventListener, runOp, runOp, runOp, setConstructionMode, setHidingMode, setName, setParameter, setVerbose, toStringVerbose, unconfiguredItems, validate, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocallyAdaptiveContrastEnhancement

public LocallyAdaptiveContrastEnhancement()
                                   throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Default constructor.

Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException

LocallyAdaptiveContrastEnhancement

public LocallyAdaptiveContrastEnhancement(MTBImage inimg)
                                   throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Constructor with given image.

Parameters:
inimg - Input image.
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException

LocallyAdaptiveContrastEnhancement

public LocallyAdaptiveContrastEnhancement(MTBImage inimg,
                                          double pc,
                                          int maxr)
                                   throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Constructor with given image and parameters.

Parameters:
inimg - Input image.
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail

setInputImage

public void setInputImage(MTBImage inimg)
Specify the input image.

Parameters:
inimg - Input image to be processed.

getInputImage

public MTBImage getInputImage()
Returns the input image, null if not set.


getResultImage

public MTBImage getResultImage()
Returns result image.


getRadiusImage

public MTBImage getRadiusImage()
Returns supplemental radius image, null if not generated.


isAppliedComponentwise

public boolean isAppliedComponentwise()
Return operator mode.

Returns:
If true, enhancement is applied component-wise.

operate

protected void operate()
                throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException,
                       de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
This method does the actual work.

Specified by:
operate in class de.unihalle.informatik.Alida.operator.ALDOperator
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException


Copyright © 2010–2015 Martin Luther University Halle-Wittenberg. All rights reserved.