Class AlgorithmAutoCorrelation

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.WindowListener, java.lang.Runnable, java.util.EventListener

    public class AlgorithmAutoCorrelation
    extends AlgorithmBase
    Reference: Digital Image Processing, Second Edition by Rafael C. Gonzalez and Richard C. Woods, Prentice-Hall, Inc., 2002, pp. 205 - 208 and pp. 414-417. The autocorrelation coefficient = A(deltaX, deltaY)/A(0,0) where A(deltaX,deltaY) = num/denom with num = sum from X = 0 to X = xDim - 1 - deltaX sum from Y = 0 to Y = yDim - 1 - deltaY f(x,y)*f(x+deltaX,y+deltaY) denom = (xDim - deltaX)*(yDim - deltaY) Autocorrelation does not subtract out the means while autocovariance does subtract out the means.

    The autocorrelation coefficeints are fitted to a function of the form (1 - a0) + a0*exp(-(x**2 + y**2)/w**2) = (1 - a0) + a0*exp(a1*distSqr), where 1 >= a0 > 0, a1 < 0.

    • Field Detail

      • destImageB

        private ModelImage destImageB
        DOCUMENT ME!
      • destImageG

        private ModelImage destImageG
        DOCUMENT ME!
      • destImageR

        private ModelImage destImageR
        DOCUMENT ME!
      • fwhm

        private int fwhm
        Full width at half maximum of the autocorrelation.
    • Constructor Detail

      • AlgorithmAutoCorrelation

        public AlgorithmAutoCorrelation​(ModelImage destImg,
                                        ModelImage srcImg)
        Constructor for black and white image in which correlation coefficients are placed in a predetermined destination image.
        Parameters:
        destImg - Image model where result image is stored.
        srcImg - Source image model.
      • AlgorithmAutoCorrelation

        public AlgorithmAutoCorrelation​(ModelImage destImageR,
                                        ModelImage destImageG,
                                        ModelImage destImageB,
                                        ModelImage srcImg)
        Constructor for color image in which correlation coefficients are placed in predetermined destination images.
        Parameters:
        destImageR - Image model where red result is stored.
        destImageG - Image model where green result is stored.
        destImageB - Image model where blue result is stored.
        srcImg - Source image model.
    • Method Detail

      • finalize

        public void finalize()
        Prepares this class for destruction.
        Overrides:
        finalize in class AlgorithmBase
      • getFWHM

        public int getFWHM()
        Returns the full width at half maximum of the autocorrelation.
        Returns:
        fwhm
      • calcStoreInDest2D

        private void calcStoreInDest2D()
        This function calculates the autocorrelation coefficients and places them in the destination image for black and white images.
      • calcStoreInDest2DC

        private void calcStoreInDest2DC()
        This function calculates the autocorrelation coefficients and places them in the destination image for color images.
      • calcStoreInDest3D

        private void calcStoreInDest3D()
        This function calculates the autocorrelation coefficients and places them in the destination image for black and white images.
      • calcStoreInDest3DC

        private void calcStoreInDest3DC()
        This function calculates the autocorrelation coefficients and places them in the destination image for color images.
      • calcStoreInDest4D

        private void calcStoreInDest4D()
        This function calculates the autocorrelation coefficients and places them in the destination image for black and white images.
      • calcStoreInDest4DC

        private void calcStoreInDest4DC()
        This function calculates the autocorrelation coefficients and places them in the destination image for color images.