|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectFindIt.ImageProcessor
public class ImageProcessor
| Field Summary | |
|---|---|
static float |
DIVISOR
|
static int |
EMPTY_REGION
|
static int |
MAXVALUE
|
static int |
MINVALUE
|
| Constructor Summary | |
|---|---|
ImageProcessor()
|
|
| Method Summary | |
|---|---|
void |
colorSpliter(int[][] colorMap,
java.lang.String colorCase)
The colorSpliter function that uses the Blob colouring technique to find regions of similar colour in an image. |
static int |
findLowestEquivalentRegion(java.util.Vector tree,
int region)
Given a region number, this method finds the lowest equivalent region number by recursively following the path of equivalent regions down the tree. |
static void |
flatten(java.util.Vector tree)
Flattens a region equivalence tree. |
java.awt.image.BufferedImage |
getLiveImage()
Returns the live image from the video capture devive. |
java.awt.image.BufferedImage |
getProcessedImage()
Returns the processed image. |
void |
ImageProcessor(java.awt.image.BufferedImage im)
Creates a new Image Processor. |
void |
processImage()
The processImage function who marks at each colors map the point that is inside the color's region, with 1 and after checks every color if have enough pointst to continue to the process and calls the colorSpliter(int[][], java.lang.String) for the rest calculations or if not to don't and
to close the recording procedure for it if is on. |
static void |
propogateLowestRegion(java.util.Vector tree,
int start,
int lowestEquivalentRegion)
Given a region number, and it's lowest equivalent region, this method propogates the lowest equivalent region number down the path from the starting region number to the lowest equivalent region number. |
static void |
startBlackSink()
Starts the data sink for the Black color. |
static void |
startBlueSink()
Starts the data sink for the Blue color. |
static void |
startBrownSink()
Starts the data sink for the Brown color. |
static void |
startCyanSink()
Starts the data sink for the Cyan color. |
static void |
startGraySink()
Starts the data sink for the Gray color. |
static void |
startGreenSink()
Starts the data sink for the Green color. |
static void |
startMagentaSink()
Starts the data sink for the Magenta color. |
static void |
startOrangeSink()
Starts the data sink for the Orange color. |
static void |
startPinkSink()
Starts the data sink for the Pink color. |
static void |
startRedSink()
Starts the data sink for the Red color. |
static void |
startWhiteSink()
Starts the data sink for the White color. |
static void |
startYellowSink()
Starts the data sink for the Yellow color. |
static void |
stopBlackSink()
Stops the data sink for the Black color. |
static void |
stopBlueSink()
Stops the data sink for the Blue color. |
static void |
stopBrownSink()
Stops the data sink for the Brown color. |
static void |
stopCyanSink()
Stops the data sink for the Cyan color. |
static void |
stopGraySink()
Stops the data sink for the Gray color. |
static void |
stopGreenSink()
Stops the data sink for the Green color. |
static void |
stopMagentaSink()
Stops the data sink for the Magenta color. |
static void |
stopOrangeSink()
Stops the data sink for the Orange color. |
static void |
stopPinkSink()
Stops the data sink for the Pink color. |
static void |
stopRedSink()
Stops the data sink for the Red color. |
static void |
stopWhiteSink()
Stops the data sink for the White color. |
static void |
stopYellowSink()
Stops the data sink for the Yellow color. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int EMPTY_REGION
public static final float DIVISOR
public static final int MAXVALUE
public static final int MINVALUE
| Constructor Detail |
|---|
public ImageProcessor()
| Method Detail |
|---|
public void ImageProcessor(java.awt.image.BufferedImage im)
im - The BufferedImage who will be checkedpublic java.awt.image.BufferedImage getLiveImage()
public java.awt.image.BufferedImage getProcessedImage()
public void processImage()
colorSpliter(int[][], java.lang.String) for the rest calculations or if not to don't and
to close the recording procedure for it if is on.
ImageProcessor,
colorSpliter(int[][], java.lang.String)
public void colorSpliter(int[][] colorMap,
java.lang.String colorCase)
Hull2 algorithm to calculate
for each one his convex hull. If has been found that an object, with the specifed colour exists at the captured
video then the recording for this colour starts or if has start before and now doesn't exist the reconding for
this color stops.
colorMap - colorCase - startRedSink(),
stopRedSink(),
startOrangeSink(),
stopOrangeSink(),
startBrownSink(),
stopBrownSink(),
startYellowSink(),
stopYellowSink(),
startGreenSink(),
stopGreenSink(),
startCyanSink(),
stopCyanSink(),
startBlueSink(),
stopBlueSink(),
startMagentaSink(),
stopMagentaSink(),
startPinkSink(),
stopPinkSink(),
startWhiteSink(),
stopWhiteSink(),
startBlackSink(),
stopBlackSink(),
startGraySink(),
stopGraySink()public static void startRedSink()
public static void stopRedSink()
public static void startOrangeSink()
public static void stopOrangeSink()
public static void startBrownSink()
public static void stopBrownSink()
public static void startYellowSink()
public static void stopYellowSink()
public static void startGreenSink()
public static void stopGreenSink()
public static void startCyanSink()
public static void stopCyanSink()
public static void startBlueSink()
public static void stopBlueSink()
public static void startMagentaSink()
public static void stopMagentaSink()
public static void startPinkSink()
public static void stopPinkSink()
public static void startWhiteSink()
public static void stopWhiteSink()
public static void startBlackSink()
public static void stopBlackSink()
public static void startGraySink()
public static void stopGraySink()
public static void flatten(java.util.Vector tree)
Flattens a region equivalence tree.
Starting at the highest region, a call to findLowestEquivalentRegion() is made to find the
lowest region number that it is equivalent to. This is then propogated down the path in the tree from the
current region number to the lowest.
E.g. If 8 points to 6, which points to 4 points to 2, then starting at 8 its lowest equivalent region is 2. Propogating this down the path sets 6 to 2 and then 4 to 2.
tree -
public static int findLowestEquivalentRegion(java.util.Vector tree,
int region)
tree - equivalent regionregion - the starting region.
public static void propogateLowestRegion(java.util.Vector tree,
int start,
int lowestEquivalentRegion)
tree - equivalent region.start - the starting region number.lowestEquivalentRegion - the lowest equivalent region number.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||