Class AlgorithmFuzzyMinimization

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

    public class AlgorithmFuzzyMinimization
    extends AlgorithmBase
    This algorithm performs minimization of fuzziness, a reduction of the amount of fuzziness. This method is probably the first fuzzy approach to image enhancement and is also known in the literature as contrast intensification operator. The main idea is to reduce the amount of image fuzziness. The algorithm is as follows: 1.) Gray-level fuzzification (u(g) denotes the degree of brightness) u(g) = pow(1 + (gmax - g)/Fd, -Fe) where Fd and Fe are the exponential and denominational fuzzifiers that control the amount of grayness ambiguity in the membership plane. Suitable values for Fe are 1 and 2. Fd is computed from a user selected crossover gray scale value, gc, at which u(gc) = 0.5. gmax is the maximum gray level in the new image. gmax >= srcMax. alpha = pow(1 + (gmax - gmin)/Fd, -Fe) gmin <= srcMin 2.) Membership modification using successive application of Zadeh's intensification operator for (iters = 1; iters <= iterations; iters++) { u(g) = 2*u(g)*u(g) if 0 <= u(g) <= 0.5 u(g) = 1 - 2*[1 - u(g)]*[1 - u(g)] if 0.5 < u(g) <= 1 if (u(g) < alpha) { // This prevents the gray level from decreasing below gmin u(g) = alpha } } // for (iters = 1; iters <= iterations; iters++) This operation decreases values of u(g) which are <= 0.5 and increases those values of u(g)which are above 0.5. As the number of iterations approaches infinity, a 2 level binary image is produced. The amount of contrast enhancement can be increased either by increasing the number of iterations or by increasing the value of Fe. Values below the crossover value will be decreased and values above the crossover value will be increased. 3.) New gray-levels by defuzzification g' = gmax - Fd*(pow(u(g), -1.0/Fe) - 1.0) References: 1.) Tizhoosh, H. R., "Fuzzy Image Enhancement: An Overview," in Fuzzy Techniques in Image Processing, E. Kerre and M. Nachtegael, eds., Springer-Verlag, New York, 2000, pp. 140-141. 2.) Sankar K. Pal and Robert A. King, "Image Enhancement Using Smoothing with Fuzzy Sets", IEEE Transactions on Systems, Man, and Cybernetics, vol. smc-11, no. 7, July, 1981.
    • Field Detail

      • entireImage

        private boolean entireImage
        true means apply to entire image, false only region.
      • iterations

        private int iterations
        number of times to filter the image.
      • crossVal

        private double crossVal
        The crossover gray scale value at which u(crossVal) = 0.5
      • expFuzzifier

        private double expFuzzifier
        Exponential fuzzifier between 1.0 and 2.0
      • gmin

        private double gmin
        The new minimum level gmin <= srcMin
      • gmax

        private double gmax
        The new maximum level gmax >= srcMax
      • mask

        private java.util.BitSet mask
        contains VOI.
    • Constructor Detail

      • AlgorithmFuzzyMinimization

        public AlgorithmFuzzyMinimization​(ModelImage srcImg,
                                          int iters,
                                          double crossVal,
                                          double expFuzzifier,
                                          double gmin,
                                          double gmax,
                                          boolean maskFlag)
        Constructor for images in which changes are returned to the source image.
        Parameters:
        srcImg - Source image model.
        iters - Number of iterations of the fuzzy minimization filter.
        crossVal - crossover gray scale value at which u(crossVal) = 0.5
        expFuzzifier - exponential fuzzifier between 1.0 and 2.0
        gmin - The new minimum level gmin <= srcMin
        gmax - The new maximum level gmax >= srcMax
        maskFlag - Flag that indicates that the fuzzy minimization filtering will be performed for the whole image if equal to true.
      • AlgorithmFuzzyMinimization

        public AlgorithmFuzzyMinimization​(ModelImage destImg,
                                          ModelImage srcImg,
                                          int iters,
                                          double crossVal,
                                          double expFuzzifier,
                                          double gmin,
                                          double gmax,
                                          boolean maskFlag)
        Constructor for images in which changes are placed in a predetermined destination image.
        Parameters:
        destImg - Image model where result image is stored.
        srcImg - Source image model.
        iters - Number of iterations of the fuzzy minimization filter.
        crossVal - crossover gray scale value at which u(crossVal) = 0.5
        expFuzzifier - exponential fuzzifier between 1.0 and 2.0
        gmin - The new minimum level gmin <= srcMin
        gmax - The new maximum level gmax >= srcMax
        maskFlag - Flag that indicates that the fuzzy minimization filtering will be performed for the whole image if equal to true.
    • Method Detail

      • finalize

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

        private void calcStoreInPlace()
        Fuzzy minimization filtering of the source image. Replaces the original image with the filtered image.
      • calcStoreInDest

        private void calcStoreInDest()
        This function produces a new image that has had fuzzy minimization filtering