|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--Convolution
Convolution is the code for applying the convolution operator.
Fields inherited from class java.lang.Thread |
MAX_PRIORITY,
MIN_PRIORITY,
NORM_PRIORITY |
Constructor Summary | |
Convolution()
Default no-arg constructor. |
Method Summary | |
static int |
applyConvolution(int[][] input,
int x,
int y,
double[][] k,
int kernelWidth,
int kernelHeight)
|
static int[] |
convolution_image(int[] input,
int width,
int height,
double[][] kernel,
int kernelWidth,
int kernelHeight,
double scale,
double offset)
Applies the convolution2DPadded algorithm and an offset and scale factors |
static double[][] |
convolution2D(double[][] input,
int width,
int height,
double[][] kernel,
int kernelWidth,
int kernelHeight)
Takes a 2D array of grey-levels and a kernel and applies the convolution over the area of the image specified by width and height. |
static double[][] |
convolution2DPadded(double[][] input,
int width,
int height,
double[][] kernel,
int kernelWidth,
int kernelHeight)
Takes a 2D array of grey-levels and a kernel, applies the convolution over the area of the image specified by width and height and returns a part of the final image. |
static double[] |
convolutionDouble(double[][] input,
int width,
int height,
double[][] kernel,
int kernelWidth,
int kernelHeight)
Takes a 2D array of grey-levels and a kernel and applies the convolution over the area of the image specified by width and height. |
static double[] |
convolutionDoublePadded(double[][] input,
int width,
int height,
double[][] kernel,
int kernelWidth,
int kernelHeight)
Takes a 2D array of grey-levels and a kernel and applies the convolution over the area of the image specified by width and height. |
double[][] |
convolutionType1(double[][] input,
int width,
int height,
double[][] kernel,
int kernelWidth,
int kernelHeight,
int iterations)
Applies the convolution2D algorithm to the input array as many as iterations. |
double[][] |
convolutionType2(double[][] input,
int width,
int height,
double[][] kernel,
int kernelWidth,
int kernelHeight,
int iterations)
Applies the convolution2DPadded algorithm to the input array as many as iterations. |
static int[] |
doublesToValidPixels(double[] greys)
Converts a greylevel array into a pixel array. |
static double |
singlePixelConvolution(double[][] input,
int x,
int y,
double[][] k,
int kernelWidth,
int kernelHeight)
Takes an image (grey-levels) and a kernel and a position, applies the convolution at that position and returns the new pixel value. |
Methods inherited from class java.lang.Thread |
activeCount,
checkAccess,
countStackFrames,
currentThread,
destroy,
dumpStack,
enumerate,
getContextClassLoader,
getName,
getPriority,
getThreadGroup,
interrupt,
interrupted,
isAlive,
isDaemon,
isInterrupted,
join,
join,
join,
resume,
run,
setContextClassLoader,
setDaemon,
setName,
setPriority,
sleep,
sleep,
start,
stop,
stop,
suspend,
toString,
yield |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public Convolution()
Method Detail |
public static double singlePixelConvolution(double[][] input, int x, int y, double[][] k, int kernelWidth, int kernelHeight)
input
- The 2D double array representing the image.x
- The x coordinate for the position of the convolution.y
- The y coordinate for the position of the convolution.k
- The 2D array representing the kernel.kernelWidth
- The width of the kernel.kernelHeight
- The height of the kernel.public static int applyConvolution(int[][] input, int x, int y, double[][] k, int kernelWidth, int kernelHeight)
public static double[][] convolution2D(double[][] input, int width, int height, double[][] kernel, int kernelWidth, int kernelHeight)
input
- the 2D double array representing the imagewidth
- the width of the imageheight
- the height of the imagekernel
- the 2D array representing the kernelkernelWidth
- the width of the kernelkernelHeight
- the height of the kernelpublic static double[][] convolution2DPadded(double[][] input, int width, int height, double[][] kernel, int kernelWidth, int kernelHeight)
input
- the 2D double array representing the imagewidth
- the width of the imageheight
- the height of the imagekernel
- the 2D array representing the kernelkernelWidth
- the width of the kernelkernelHeight
- the height of the kernelpublic static double[] convolutionDouble(double[][] input, int width, int height, double[][] kernel, int kernelWidth, int kernelHeight)
input
- the 2D double array representing the imagewidth
- the width of the imageheight
- the height of the imagekernel
- the 2D array representing the kernelkernelWidth
- the width of the kernelkernelHeight
- the height of the kernelpublic static double[] convolutionDoublePadded(double[][] input, int width, int height, double[][] kernel, int kernelWidth, int kernelHeight)
input
- the 2D double array representing the imagewidth
- the width of the imageheight
- the height of the imagekernel
- the 2D array representing the kernelkernelWidth
- the width of the kernelkernelHeight
- the height of the kernelpublic static int[] doublesToValidPixels(double[] greys)
the
- 1D array of greylevels.public double[][] convolutionType1(double[][] input, int width, int height, double[][] kernel, int kernelWidth, int kernelHeight, int iterations)
input
- the 2D double array representing the imagewidth
- the width of the imageheight
- the height of the imagekernel
- the 2D array representing the kernelkernelWidth
- the width of the kernelkernelHeight
- the height of the kerneliterations
- the number of iterations to apply the convolutionpublic double[][] convolutionType2(double[][] input, int width, int height, double[][] kernel, int kernelWidth, int kernelHeight, int iterations)
input
- the 2D double array representing the imagewidth
- the width of the imageheight
- the height of the imagekernel
- the 2D array representing the kernelkernelWidth
- the width of the kernelkernelHeight
- the height of the kerneliterations
- the number of iterations to apply the convolutionpublic static int[] convolution_image(int[] input, int width, int height, double[][] kernel, int kernelWidth, int kernelHeight, double scale, double offset)
input
- the 1D int array representing the imagewidth
- the width of the imageheight
- the height of the imagekernel
- the 2D array representing the kernelkernelWidth
- the width of the kernelkernelHeight
- the height of the kernelscale
- the scale factor to applyoffset
- the offset factor to apply
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |