edu.berkeley.guir.papier_mache.vision
Class MeanColorClassifier
java.lang.Object
edu.berkeley.guir.papier_mache.assoc.ObjectClassifier
edu.berkeley.guir.papier_mache.vision.MeanColorClassifier
- All Implemented Interfaces:
- edu.berkeley.guir.lib.util.ToShortStringable
- public class MeanColorClassifier
- extends ObjectClassifier
Classifies Phobs, comparing their mean color to this classifier's ideal color.
Uses the
IHS color space as the color comparison model.
- Author:
- Scott Klemmer ( srk(AT)cs.berkeley.edu ), Ana Ramirez ( anar(AT)cs.berkeley.edu ), Edward De Guzman ( edwardd(AT)cs.berkeley.edu )
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MeanColorClassifier
public MeanColorClassifier()
- This constructor should only be used when unmarshalling a classifier from an XML file.
MeanColorClassifier
public MeanColorClassifier(IHSColor ihsColor,
float intTolerance,
float hueTolerance,
float satTolerance)
- Parameters:
ihsColor
- the canonical color to classify, in the IHS color spacetolerance
- similar phobs are phobs whose mean color is within this tolerance of the ideal color.
MeanColorClassifier
public MeanColorClassifier(java.awt.Color rgbColor)
- Parameters:
rgbColor
- the canonical color to classify, in the RGB color space
getIdealColor
public IHSColor getIdealColor()
getTolerance
public float[] getTolerance()
getView
public ObjectClassifierView getView()
- Overrides:
getView
in class ObjectClassifier
setIdealColor
public void setIdealColor(IHSColor ihsColor)
setTolerance
public void setTolerance(float intTolerance,
float hueTolerance,
float satTolerance)
updateIconColor
public void updateIconColor()
isMemberOfClass
public double isMemberOfClass(Phob phob)
- Specified by:
isMemberOfClass
in class ObjectClassifier
toShortString
public java.lang.String toShortString()
- Specified by:
toShortString
in interface edu.berkeley.guir.lib.util.ToShortStringable
- Specified by:
toShortString
in class ObjectClassifier
setParameter
public void setParameter(java.lang.String paramName,
java.lang.String paramValue)
- This classifier has six parameters: colors and tolerances for each of intensity,
hue, and saturation.
- Overrides:
setParameter
in class ObjectClassifier
- Parameters:
paramName
- the name of the parameter to setparamValue
- the value of the parameter
getIcon
public javax.swing.Icon getIcon()
- Overrides:
getIcon
in class ObjectClassifier