Class AlgorithmFuzzMinDeAndChatterji

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

    public class AlgorithmFuzzMinDeAndChatterji
    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) = 0.5*(1 - (srcThreshold - g)/(srcThreshold - srcMin)) for srcMin <= g <= srcThreshold u(g) = 0.5*(1 + (g - srcThreshold)/(srcMax - srcThreshold)) for srcThreshold <= g <= srcMax 2.) Contrast intensification u'(g) = 0.5*(1 - {sin(theta1*(1 - 2*u(g)))/sin(theta1)}**p1) for 0 <= u(g) <= 0.5 u'(g) = 0.5*(1 + {sin(theta2*(2*u(g) - 1))}/sin(theta2)}**p2) for 0.5 <= u(g) <= 1.0 Values below the crossover value will be decreased and values above the crossover value will be increased. 3.) New gray-levels by defuzzification g' = enhancedThreshold - (enhancedThreshold - gmin)*(1 - 2*u'(g)) for 0 <= u'(g) <= 0.5 g' = enhancedThreshold + (gmax - enhancedThreshold)*(2*u'(g) - 1) for 0.5 <= u'(g) <= 1.0 gmax >= srcMax. gmin <= srcMin 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. 141-142. 2.) De T.K. and Chatterji B.N.,"An approach to a generalized technique for image contrast enhancement using the concept of fuzzy set", Fuzzy Sets and Systems, Vol. 25, pp.145-158, 1998. 3.) Fang N. and Cheng M.C.,"An automatic crossover point selection technique for image enhancement using fuzzy sets", Pattern Recognition Letters, Vol. 14, pp. 397-406, 1993.
    • Field Detail

      • entireImage

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

        private double srcThreshold
        Original image threshold
      • enhancedThreshold

        private double enhancedThreshold
        Enhanced image threshold
      • autoThreshold

        private boolean autoThreshold
        If true, ignore srcThreshold input and calculate best value
      • theta1

        private double theta1
        Angular equivalence of black band, 0 <= theta1 <= PI/2
      • theta2

        private double theta2
        Angular equivalence of white band, 0 <= theta2 <= PI/2
      • p1

        private double p1
        Black region exponent, 0 <= p1 <= 1.0
      • p2

        private double p2
        White region exponent, 0 <= p2 <= 1.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

      • AlgorithmFuzzMinDeAndChatterji

        public AlgorithmFuzzMinDeAndChatterji​(ModelImage srcImg,
                                              double srcThreshold,
                                              boolean autoThreshold,
                                              double enhancedThreshold,
                                              double theta1,
                                              double theta2,
                                              double p1,
                                              double p2,
                                              double gmin,
                                              double gmax,
                                              boolean maskFlag)
        Constructor for images in which changes are returned to the source image.
        Parameters:
        srcImg - Source image model.
        srcThreshold - original image threshold
        autoThreshold - If true, ignore srcThreshold and calculate best value
        enhancedThreshold - enhanced image threshold
        theta1 - angular equivalence of black band
        theta2 - angular equivalence of white band
        p1 - black region exponent
        p2 - white region exponent
        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.
      • AlgorithmFuzzMinDeAndChatterji

        public AlgorithmFuzzMinDeAndChatterji​(ModelImage destImg,
                                              ModelImage srcImg,
                                              double srcThreshold,
                                              boolean autoThreshold,
                                              double enhancedThreshold,
                                              double theta1,
                                              double theta2,
                                              double p1,
                                              double p2,
                                              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.
        srcThreshold - original image threshold
        autoThreshold - If true, ignore srcThreshold and calculate best value
        enhancedThreshold - enhanced image threshold
        theta1 - angular equivalence of black band
        theta2 - angular equivalence of white band
        p1 - black region exponent
        p2 - white region exponent
        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