public class MeanCenter extends Object implements ImageProcessor<FImage>
ImageProcessor
that computes the mean of the image's pixels
and subtracts the mean from all pixels.Constructor and Description |
---|
MeanCenter() |
Modifier and Type | Method and Description |
---|---|
static float |
patchMean(float[][] data)
same as
patchMean(float[][], int, int, int, int) but the width and height are taken from data[0].length and data.length |
static float |
patchMean(float[][] data,
int x,
int y,
int width,
int height)
Finds the mean value of a sub-patch of a 2D float array.
|
void |
processImage(FImage image)
Process an image.
|
public MeanCenter()
public void processImage(FImage image)
ImageProcessor
Image.internalAssign(Image)
.processImage
in interface ImageProcessor<FImage>
image
- The image to process in place.public static final float patchMean(float[][] data)
patchMean(float[][], int, int, int, int)
but the width and height are taken from data[0].length and data.lengthdata
- public static final float patchMean(float[][] data, int x, int y, int width, int height)
data
- the arrayx
- the location of the sub-patchy
- the location of the sub-patchwidth
- sub-patch widthheight
- sub-patch height