|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 IColorRange
public boolean colorInRange(int color)
IColorRange
colorInRange
in interface IColorRange
public double distanceFromRange(int color)
IColorRange
distanceFromRange
in interface IColorRange
public boolean isRangeFrozen()
IColorRange
isRangeFrozen
in interface IColorRange
public double getMaxDistance()
getMaxDistance
in interface IColorRange
public void setMaxDistance(double distance)
setMaxDistance
in interface IColorRange
public int getColorCenter()
getColorCenter
in interface IColorRange
public void setColorCenter(int center)
setColorCenter
in interface IColorRange
public void merge(IColorAndVariance colorAndVariance)
merge
in interface IColorAndVariance
merge
in class ColorAndVariance
public IColorDistance getDistance()
getDistance
in interface IColorRange
public void setDistance(IColorDistance distance)
setDistance
in interface IColorRange
public int[] getColorChannels()
ColorAndVariance
getColorChannels
in interface ColorChannels
getColorChannels
in class ColorAndVariance
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |