|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--Erode
Erode is an algorithm to erode a binary image using a 3x3 kernel.
Fields inherited from class java.lang.Thread |
MAX_PRIORITY,
MIN_PRIORITY,
NORM_PRIORITY |
Constructor Summary | |
Erode()
Default no-args constructor. |
Method Summary | |
static BinaryFast |
erode_image(BinaryFast binary,
int[] kernel,
int iterations)
Applies several iterations of the erode algorithm to an image. |
static BinaryFast |
erodeSingleIteration(BinaryFast binary,
int[] kernel)
Applies a single iteration of the erode algorithm to the image. |
static boolean |
kernelAll1s(int[] kernel)
Returns true if the kernel consists of 9 1s. |
static boolean |
kernelMatch(java.awt.Point p,
int[][] pixels,
int w,
int h,
int[] kernel)
Returns true if the kernel matches the area of image centred on the given point. |
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 Erode()
Method Detail |
public static boolean kernelMatch(java.awt.Point p, int[][] pixels, int w, int h, int[] kernel)
p
- The centre point identifying the pixel neighbourhood.pixels
- The 2D array representing the image.w
- The width of the image.h
- The height of the image.kernel
- The array representing the kernel.public static boolean kernelAll1s(int[] kernel)
kernel
- The array representing the kernel.public static BinaryFast erodeSingleIteration(BinaryFast binary, int[] kernel)
binary
- The BinaryFast representation of the input image.kernel
- The array representing the kernel.public static BinaryFast erode_image(BinaryFast binary, int[] kernel, int iterations)
binary
- The BinaryFast representation of the input image.kernel
- The array representing the kernel.iterations
- The number of iterations to be applied.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |