Class StdDeviationParamCalculator

  • All Implemented Interfaces:
    IParamCalculator

    public class StdDeviationParamCalculator
    extends BaseMeanCalculator
    implements IParamCalculator
    This class is designed to compute the standard deviation of each patch of the given 2D array, based on the following formula:

         σ = sqrt{(1/(L-1)) SUM{(z_i - m)^2}}

    where:
    • L: the total number of pixels in this patch.
    • z_i: the intensity value of the i-th pixel in this patch.
    • m: the mean value corresponding to this patch.
    Author:
    Azim Ahmadzadeh, Data Mining Lab, Georgia State University
    • Constructor Detail

      • StdDeviationParamCalculator

        public StdDeviationParamCalculator​(IMeasures.PatchSize patchSize)
    • Method Detail

      • calculateParameter

        public double[][] calculateParameter​(double[][] image)
        Description copied from interface: IParamCalculator
        This polymorphic method is designed to compute any of the 10 parameters at a time. It iterates over the given image, patch by patch, and then in every patch, pixel by pixel, to compute the parameter value for each patch.
        Note: In all the classes, matrices are read and write, row by row.
        Note: It is required that each class works independently, meaning that they must rely on their own computations. Therefore, some calculations (e.g. mean intensity value) might be calculated several times for different parameters (e.g. once for skewness and another time for std. deviation).
        Note: No fixed range for the color intensity values of the given images is assumed. (colors do not have to be within the range [0,255].)
        Specified by:
        calculateParameter in interface IParamCalculator
        Parameters:
        image - a 2D array representing the input image for which the parameter should be computed.
        Returns:
        a 2D matrix whose each entry corresponds to the calculated parameter for one particular patch of the image.