|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsigus.segmentation.ColorBasedSegmentation
Implements a color based segmentation technique based on statistichal models of the target object color.
Field Summary | |
(package private) int |
dimension
Dimension of the color space. |
private boolean |
estimated
True when mean e standard deviation parameters have been estimated |
(package private) double[] |
muValues
Mean values for each variable |
(package private) int |
N
Maximum Number of samples collected. |
(package private) int |
nn
Samples collected so far |
(package private) double[] |
sigmaValues
Sigma values for each variable |
(package private) double |
stdMult
The constant that should be multiplied to the standard deviation when calculating the interval, for each variable, that will be used to identify target pixels |
(package private) java.awt.Rectangle |
targetSampleWindow
Dimensions and position of the rectangular window, in the training image, where the samples will be collected |
(package private) int[][] |
values
Variable Values |
Constructor Summary | |
ColorBasedSegmentation()
|
Method Summary | |
(package private) void |
clearSamplesAndParameters()
|
(package private) void |
collectSample(float[] hsb)
|
(package private) void |
estimateParameters()
Calculate Means and Standard Deviations values for all variables |
void |
extractSamples(byte[] inData,
byte[] jmfData,
byte[] outData,
int width,
int height)
Collect H and S values |
(package private) boolean |
isTargetColor(int R,
int G,
int B)
True if H and S value of the pixel are inside the calculated limits |
void |
segment(byte[] inData,
byte[] jmfData,
byte[] outData,
int width,
int height)
Takes an input image, inData, and creates and output image, outData, with all pixels that are not part of the target object (a hand, a mice, etc), set to zero |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
int dimension
java.awt.Rectangle targetSampleWindow
double[] muValues
double[] sigmaValues
int N
int nn
int[][] values
double stdMult
private boolean estimated
Constructor Detail |
public ColorBasedSegmentation()
Method Detail |
public void segment(byte[] inData, byte[] jmfData, byte[] outData, int width, int height)
width
- Image widthheight
- Image heightvoid estimateParameters()
boolean isTargetColor(int R, int G, int B)
public void extractSamples(byte[] inData, byte[] jmfData, byte[] outData, int width, int height)
void clearSamplesAndParameters()
void collectSample(float[] hsb)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |