|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.shapelogic.color.GrayAndVariance
org.shapelogic.color.GrayRange
public class GrayRange
GrayRange describes a range of colors in the Gray 8 bit.
Used for color clustering, and particle counter.
| Field Summary | |
|---|---|
protected int |
_colorCenter
Color encoded in an int. |
protected IColorDistance |
_distance
Distance from colorCenter that will be accepted in this Range. |
protected boolean |
_frozen
|
| Fields inherited from class org.shapelogic.color.GrayAndVariance |
|---|
_grayStatistic, _maxColor, _maxDistance, _minColor |
| Constructor Summary | |
|---|---|
GrayRange()
|
|
| Method Summary | |
|---|---|
boolean |
colorInRange(int color)
Whether a color belong to the ColorRange. |
double |
distanceFromRange(int color)
Distance of input color from this ColorRange. |
double |
distanceFromRangeCenter(int color)
Distance of input color from this ColorRange. |
int |
getColorCenter()
|
IColorDistance |
getDistance()
|
double |
getMaxDistance()
|
boolean |
isRangeFrozen()
If the ColorRange can change. |
void |
merge(IColorAndVariance colorAndVariance)
|
void |
putPixel(int x,
int y,
int color)
Add the color for a given point (x,y). |
void |
setColorCenter(int center)
|
void |
setDistance(IColorDistance distance)
|
void |
setMaxDistance(double distance)
|
| Methods inherited from class org.shapelogic.color.GrayAndVariance |
|---|
getArea, getColorChannels, getMeanBlue, getMeanColor, getMeanGray, getMeanGreen, getMeanRed, getPixelArea, getStandardDeviation, setPixelArea, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.shapelogic.color.IColorAndVariance |
|---|
getMeanBlue, getMeanColor, getMeanGreen, getMeanRed, getStandardDeviation |
| Methods inherited from interface org.shapelogic.color.ColorChannels |
|---|
getColorChannels |
| Methods inherited from interface org.shapelogic.imageutil.HasArea |
|---|
getArea |
| Methods inherited from interface org.shapelogic.imageutil.HasPixelArea |
|---|
getPixelArea, setPixelArea |
| Field Detail |
|---|
protected IColorDistance _distance
protected int _colorCenter
protected boolean _frozen
| Constructor Detail |
|---|
public GrayRange()
| Method Detail |
|---|
public void putPixel(int x,
int y,
int color)
GrayAndVariance
putPixel in interface PixelHandlerputPixel in class GrayAndVariancepublic boolean colorInRange(int color)
IColorRange
colorInRange in interface IColorRangepublic double distanceFromRange(int color)
IColorRange
distanceFromRange in interface IColorRangepublic boolean isRangeFrozen()
IColorRange
isRangeFrozen in interface IColorRangepublic double getMaxDistance()
getMaxDistance in interface IColorRangepublic void setMaxDistance(double distance)
setMaxDistance in interface IColorRangepublic int getColorCenter()
getColorCenter in interface IColorRangepublic void setColorCenter(int center)
setColorCenter in interface IColorRangepublic double distanceFromRangeCenter(int color)
IColorRange
distanceFromRangeCenter in interface IColorRangepublic void merge(IColorAndVariance colorAndVariance)
merge in interface IColorAndVariancemerge in class GrayAndVariancepublic IColorDistance getDistance()
getDistance in interface IColorRangepublic void setDistance(IColorDistance distance)
setDistance in interface IColorRange
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||