Class AlgorithmMarkovSmooth

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

    public class AlgorithmMarkovSmooth
    extends AlgorithmBase
    Author:
    ilb This is a port of the MATLAB program restore_image.m written by PeterOrchard to Java. This port is performed with the permission of Peter Orchard. The original Markov Random Field Optimisation text with accompanying code is found at http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/AV0809/ORCHARD/. The code uses a technique invented specifically for Markov Random Field optimization called Iterated Conditional Modes (ICM). This code is used to smooth an image. This restoration method does a good job of smoothing the noise from surfaces of constant or slowly-varying intensity. It does not do so well with thin, sharp features. This is due to the energy function punishing local differences in pixel values.
    • Field Detail

      • covariance

        private double covariance
        The known covariance of the Gaussian noise
      • max_diff

        private double max_diff
        The maximum contribution to the potential of the difference between two neighboring pixel values.
      • weight_diff

        private double weight_diff
        The weighting attached to the component of the potential due to the difference between two neighboring pixel values.
      • iterations

        private int iterations
        The number of iterations to perform
    • Constructor Detail

      • AlgorithmMarkovSmooth

        public AlgorithmMarkovSmooth​(ModelImage srcImg,
                                     double covariance,
                                     double max_diff,
                                     double weight_diff,
                                     int iterations)
        Parameters:
        srcImg -
        covariance -
        max_diff -
        weight_diff -
        iterations -
      • AlgorithmMarkovSmooth

        public AlgorithmMarkovSmooth​(ModelImage destImg,
                                     ModelImage srcImg,
                                     double covariance,
                                     double max_diff,
                                     double weight_diff,
                                     int iterations)
        Parameters:
        destImg -
        srcImg -
        covariance -
        max_diff -
        weight_diff -
        iterations -
    • Method Detail

      • runAlgorithm

        public void runAlgorithm()
        Description copied from class: AlgorithmBase
        Actually runs the algorithm. Implemented by inheriting algorithms.
        Specified by:
        runAlgorithm in class AlgorithmBase