public class FloatImage
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
float[] |
d |
int |
height |
(package private) static java.util.Random |
r |
int |
width |
Constructor and Description |
---|
FloatImage(java.awt.image.BufferedImage im) |
FloatImage(java.awt.image.BufferedImage im,
int rightshift) |
FloatImage(int width,
int height) |
FloatImage(int width,
int height,
byte[] d)
Make FloatImage from byte array, scaling inputs to
range (0,1)
|
FloatImage(int width,
int height,
double[] d) |
FloatImage(int width,
int height,
float[] d) |
Modifier and Type | Method and Description |
---|---|
FloatImage |
abs() |
void |
addNoise(double stddev) |
FloatImage |
clamp(float minv,
float maxv)
Perform 2D convolution using 2D filter.
|
FloatImage |
copy() |
FloatImage |
decimate() |
FloatImage |
decimateAvg() |
FloatImage |
decimateMax() |
FloatImage |
filterFactoredCentered(float[] fhoriz,
float[] fvert)
Perform 2D convolution using f as the factor of a separable
filter, shifting the output by -f.length/2 so there is no net
shift.
|
FloatImage |
filterFactoredCentered(float[] fhoriz,
float[] fvert,
float[] r)
Perform 2D convolution using f as the factor of a separable
filter, shifting the output by -f.length/2 so there is no net
shift.
|
FloatImage |
filterFactoredCenteredMax(float[] fhoriz,
float[] fvert)
Perform 2D convolution using f as the factor of a separable
filter, shifting the output by -f.length/2 so there is no net
shift.
|
FloatImage |
filterHorizontalCentered(float[] f) |
FloatImage |
filterVerticalCentered(float[] f) |
float |
get(int x,
int y) |
byte[] |
getByteData()
Get byte data from FloatImage scaled from 0 to 255
|
static float[] |
imageToFloats(java.awt.image.BufferedImage im) |
static float[] |
imageToFloats(java.awt.image.BufferedImage im,
int rightshift) |
static float[] |
imageToFloats(java.awt.image.BufferedImage im,
int rightshift,
float[] f) |
FloatImage |
interpolate(double sigma,
int size)
Interpolate image, followed by a gaussian filter with given sigma.
|
java.util.ArrayList<float[]> |
localMaxima() |
java.util.ArrayList<float[]> |
localMinima()
Returns x, y, magnitude.
|
java.awt.image.BufferedImage |
makeColorImage() |
java.awt.image.BufferedImage |
makeImage() |
static java.awt.image.BufferedImage |
makeImage(FloatImage rim,
FloatImage gim,
FloatImage bim) |
FloatImage |
normalize()
Rescale all values so that they are between [0,1]
|
FloatImage |
scale(double s) |
void |
set(int x,
int y,
float v) |
FloatImage |
subtract(FloatImage fim) |
FloatImage |
subtract(FloatImage fim,
float[] r) |
public int width
public int height
public float[] d
static java.util.Random r
public FloatImage(int width, int height)
public FloatImage(int width, int height, float[] d)
public FloatImage(int width, int height, double[] d)
public FloatImage(int width, int height, byte[] d)
public FloatImage(java.awt.image.BufferedImage im)
public FloatImage(java.awt.image.BufferedImage im, int rightshift)
public FloatImage copy()
public final byte[] getByteData()
public final float get(int x, int y)
public final void set(int x, int y, float v)
public FloatImage filterFactoredCentered(float[] fhoriz, float[] fvert)
public FloatImage filterFactoredCentered(float[] fhoriz, float[] fvert, float[] r)
public FloatImage filterFactoredCenteredMax(float[] fhoriz, float[] fvert)
public FloatImage filterHorizontalCentered(float[] f)
public FloatImage filterVerticalCentered(float[] f)
public FloatImage clamp(float minv, float maxv)
public FloatImage normalize()
public void addNoise(double stddev)
public FloatImage scale(double s)
public FloatImage decimate()
public FloatImage decimateAvg()
public FloatImage decimateMax()
public FloatImage interpolate(double sigma, int size)
public FloatImage abs()
public FloatImage subtract(FloatImage fim)
public FloatImage subtract(FloatImage fim, float[] r)
public static java.awt.image.BufferedImage makeImage(FloatImage rim, FloatImage gim, FloatImage bim)
public java.awt.image.BufferedImage makeImage()
public java.awt.image.BufferedImage makeColorImage()
public static float[] imageToFloats(java.awt.image.BufferedImage im)
public static float[] imageToFloats(java.awt.image.BufferedImage im, int rightshift)
public static float[] imageToFloats(java.awt.image.BufferedImage im, int rightshift, float[] f)
public java.util.ArrayList<float[]> localMaxima()
public java.util.ArrayList<float[]> localMinima()