Class MeanParamCalculator
- java.lang.Object
-
- edu.gsu.cs.dmlab.imageproc.imageparam.BaseMeanCalculator
-
- edu.gsu.cs.dmlab.imageproc.imageparam.MeanParamCalculator
-
- All Implemented Interfaces:
IParamCalculator
public class MeanParamCalculator extends BaseMeanCalculator implements IParamCalculator
This class is designed to compute the mean of each patch of the given2D array
, based on the following formula:
m = (1/L) * SUM{z_i}
where:- L: the total number of pixels in this patch.
- z_i: the intensity value of the i-th pixel in this patch.
- Author:
- Dustin Kempton, Data Mining Lab, Georgia State University
-
-
Constructor Summary
Constructors Constructor Description MeanParamCalculator(IMeasures.PatchSize patchSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[][]
calculateParameter(double[][] image)
This polymorphic method is designed to compute any of the 10 parameters at a time.-
Methods inherited from class edu.gsu.cs.dmlab.imageproc.imageparam.BaseMeanCalculator
calculateMeanParameter
-
-
-
-
Constructor Detail
-
MeanParamCalculator
public MeanParamCalculator(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 interfaceIParamCalculator
- 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.
-
-