![]() | [using it] | Interface Manipulation Package v4.0 (2008-06-25) | ![]() | ©copyright | ![]() |
java.lang.Objectimp.ima.util.RgbFilter
imp.ima.util.RgbDiffusionFilter
public class RgbDiffusionFilter
Encapsulates a RGB color image diffusion filter.
Constructor Summary | |
---|---|
RgbDiffusionFilter(boolean channel,
int borderSize,
int borderValue)
Creates a RgbDiffusionFilter. |
Method Summary | |
---|---|
static int[] |
double2int(double[] src,
int[] dst)
Converts doubles to integers between [0-255]. |
double |
getChannel(int ij,
int width,
int[] src0,
double[] src)
Defines the filter iterative operation at the red-green-blue pixel neighborhood level. |
int |
getRGB(int ij,
int width,
int[] red0,
int[] green0,
int[] blue0,
int[] red,
int[] green,
int[] blue)
Defines the filter iterative operation at the RGB pixel neighborhood level. |
static double[] |
int2double(int[] src,
double[] dst)
Converts integers to doubles. |
boolean |
more(int iteration,
double[] dst,
int width,
int height)
Returns true if the channel diffusion process should carry on, false it it has converged Diffusion filters overwrite this method. |
boolean |
more(int iteration,
int[] rgb,
int width,
int height)
Returns true if the RGB diffusion process should carry on, false it it has converged Diffusion filters overwrite this method. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RgbDiffusionFilter(boolean channel, int borderSize, int borderValue)
channel
- [optional, default is false] If true filter each red-green-blue channel, else filter the RGB pixel.borderSize
- [optional, default is 0] Border size: width/height in pixel on the image border where the filter must not be computed.borderValue
- [optional, default is 0] Border RGB value: value to be set on border where the filter is not computed.Method Detail |
---|
public static int[] double2int(double[] src, int[] dst)
src
- Source buffer.dst
- [optional, default is null] Optional destination buffer, if null or omitted the destination buffer is created.
public double getChannel(int ij, int width, int[] src0, double[] src)
ij
- Buffer index with pixels[i,j] = pixels[ij = i + j * width]width
- Buffer width.src0
- Initial red/green/blue channel buffer.src
- Current (at iteration n) red/green/blue channel buffer.public int getRGB(int ij, int width, int[] red0, int[] green0, int[] blue0, int[] red, int[] green, int[] blue)
ij
- Buffer index with pixels[i,j] = pixels[ij = i + j * width]width
- Buffer width.red0
- Initial red channel buffer.green0
- Initial green channel buffer.blue0
- Initial blue channel buffer.red
- Current (at iteration n) red channel buffer.green
- Current (at iteration n) green channel buffer.blue
- Current (at iteration n) blue channel buffer.public static double[] int2double(int[] src, double[] dst)
src
- Source buffer.dst
- [optional, default is null] Optional destination buffer, if null or omitted the destination buffer is created.
public boolean more(int iteration, double[] dst, int width, int height)
iteration
- Iteration number;dst
- Last iteration result.width
- Buffer width.height
- Buffer height.public boolean more(int iteration, int[] rgb, int width, int height)
iteration
- Iteration number;rgb
- Last iteration result.width
- Buffer width.height
- Buffer height.