Package boofcv.alg.misc
Class GImageStatistics
java.lang.Object
boofcv.alg.misc.GImageStatistics
Generalized version of
ImageStatistics
. Type checking is performed at runtime instead of at compile type.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Computes the histogram of intensity values for the image.static void
histogramScaled
(ImageGray input, double minValue, double maxValue, int[] histogram) Computes the histogram of intensity values for the image.static double
Returns the maximum pixel value across all bands.static double
Returns the absolute value of the element with the largest absolute value, across all bandsstatic double
Returns the mean pixel intensity value.static <T extends ImageBase<T>>
doublemeanDiffAbs
(T inputA, T inputB) Computes the mean of the absolute value of the difference between the two images across all bandsstatic <T extends ImageBase<T>>
doublemeanDiffSq
(T inputA, T inputB) Computes the mean of the difference squared between the two images.static double
Returns the minimum pixel value across all bandsstatic double
Returns the sum of all the pixels in the image across all bands.static <T extends ImageGray<T>>
doublevariance
(T input, double mean) Computes the variance of pixel intensity values inside the image.
-
Constructor Details
-
GImageStatistics
public GImageStatistics()
-
-
Method Details
-
maxAbs
Returns the absolute value of the element with the largest absolute value, across all bands- Parameters:
input
- Input image. Not modified.- Returns:
- Largest pixel absolute value.
-
max
Returns the maximum pixel value across all bands.- Parameters:
input
- Input image. Not modified.- Returns:
- Maximum pixel value.
-
min
Returns the minimum pixel value across all bands- Parameters:
input
- Input image. Not modified.- Returns:
- Minimum pixel value.
-
sum
Returns the sum of all the pixels in the image across all bands.
- Parameters:
input
- Input image. Not modified.- Returns:
- Sum of pixel intensity values
-
mean
Returns the mean pixel intensity value.- Parameters:
input
- Input image. Not modified.- Returns:
- Mean pixel value
-
variance
Computes the variance of pixel intensity values inside the image.- Parameters:
input
- Input image. Not modified.mean
- Mean pixel intensity value.- Returns:
- Pixel variance
-
meanDiffSq
Computes the mean of the difference squared between the two images.- Parameters:
inputA
- Input image. Not modified.inputB
- Input image. Not modified.- Returns:
- Mean difference squared
-
meanDiffAbs
Computes the mean of the absolute value of the difference between the two images across all bands- Parameters:
inputA
- Input image. Not modified.inputB
- Input image. Not modified.- Returns:
- Mean absolute difference
-
histogram
Computes the histogram of intensity values for the image. For floating point images it is rounded to the nearest integer using "(int)value".- Parameters:
input
- (input) Image.minValue
- (input) Minimum possible intensity value Ignored for unsigned images.histogram
- (output) Storage for histogram. Number of elements must be equal to max value.
-
histogramScaled
public static void histogramScaled(ImageGray input, double minValue, double maxValue, int[] histogram) Computes the histogram of intensity values for the image. For floating point images it is rounded to the nearest integer using "(int)value".- Parameters:
input
- (input) Image.minValue
- (input) Minimum possible intensity value Ignored for unsigned images.histogram
- (output) Storage for histogram. Number of elements must be equal to max value.
-