Class AlgorithmRGBtoHSB

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

    public class AlgorithmRGBtoHSB
    extends AlgorithmBase
    Simple algorithm that converts an RGB image to a hue, saturation and brightness greyscale images.
    Version:
    1.0 Dec 30, 1999
    Author:
    Matthew J. McAuliffe, Ph.D.
    • Field Detail

      • destImageB

        private ModelImage destImageB
        Destination image (gray type) to store the Brightness channel of the source image.
      • destImageH

        private ModelImage destImageH
        Destination image (gray type) to store the Hue channel of the source image.
      • destImageS

        private ModelImage destImageS
        Destination image (gray type) to store the Saturation channel of the source image.
      • srcImage

        private ModelImage srcImage
        Source image RGB type image.
    • Constructor Detail

      • AlgorithmRGBtoHSB

        public AlgorithmRGBtoHSB​(ModelImage destImgH,
                                 ModelImage destImgS,
                                 ModelImage destImgB,
                                 ModelImage srcImg)
        Creates a new AlgorithmRGBtoHSB object.
        Parameters:
        destImgH - image model where result image of the Red channel is to be stored
        destImgS - image model where result image of the Green channel is to be stored
        destImgB - image model where result image of the Blue channel is to be stored
        srcImg - source image model
    • Method Detail

      • finalize

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

        private void calcStoreInDest()
        Calculates the new images.