|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.shapelogic.color.ColorAndVariance
org.shapelogic.color.ColorRange
public class ColorRange
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 int[] |
_colorCenterInChannels
|
protected IColorDistance |
_distance
|
protected boolean |
_frozen
|
protected double |
_maxDistance
Distance from colorCenter that will be accepted in this Range. |
| Fields inherited from class org.shapelogic.color.ColorAndVariance |
|---|
_colorStatistics, _splitColors |
| Constructor Summary | |
|---|---|
ColorRange()
|
|
| 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()
|
int[] |
getColorChannels()
Color vector to be used for color distance. Should I use the center color or the mean color? I will start by using the mean color. I think that I will start without including the standard deviation. |
IColorDistance |
getDistance()
|
double |
getMaxDistance()
|
boolean |
isRangeFrozen()
If the ColorRange can change. |
void |
merge(IColorAndVariance colorAndVariance)
|
void |
setColorCenter(int center)
|
void |
setDistance(IColorDistance distance)
|
void |
setMaxDistance(double distance)
|
| Methods inherited from class org.shapelogic.color.ColorAndVariance |
|---|
getArea, getMeanBlue, getMeanColor, getMeanGreen, getMeanRed, getPixelArea, getStandardDeviation, putPixel, 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.imageutil.PixelHandler |
|---|
putPixel |
| Methods inherited from interface org.shapelogic.imageutil.HasArea |
|---|
getArea |
| Methods inherited from interface org.shapelogic.imageutil.HasPixelArea |
|---|
getPixelArea, setPixelArea |
| Field Detail |
|---|
protected double _maxDistance
protected IColorDistance _distance
protected int _colorCenter
protected int[] _colorCenterInChannels
protected boolean _frozen
| Constructor Detail |
|---|
public ColorRange()
| Method Detail |
|---|
public double distanceFromRangeCenter(int color)
IColorRange
distanceFromRangeCenter in interface IColorRangepublic 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 void merge(IColorAndVariance colorAndVariance)
merge in interface IColorAndVariancemerge in class ColorAndVariancepublic IColorDistance getDistance()
getDistance in interface IColorRangepublic void setDistance(IColorDistance distance)
setDistance in interface IColorRangepublic int[] getColorChannels()
ColorAndVariance
getColorChannels in interface ColorChannelsgetColorChannels in class ColorAndVariance
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||