org.shapelogic.color
Class SimpleColorHypothesis
java.lang.Object
org.shapelogic.color.SimpleColorHypothesis
- All Implemented Interfaces:
- ColorHypothesis
public class SimpleColorHypothesis
- extends java.lang.Object
- implements ColorHypothesis
SimpleColorHypothesis is a color hypothesis.
- Author:
- Sami Badawi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_colors
protected java.util.Collection<IColorAndVariance> _colors
_maxDistance
protected double _maxDistance
_background
protected IColorAndVariance _background
SimpleColorHypothesis
public SimpleColorHypothesis()
addColor
public boolean addColor(IColorAndVariance color)
- If the color is identical merge else add.
- Specified by:
addColor
in interface ColorHypothesis
getColors
public java.util.Collection<IColorAndVariance> getColors()
- Specified by:
getColors
in interface ColorHypothesis
getBackground
public IColorAndVariance getBackground()
- Specified by:
getBackground
in interface ColorHypothesis
setBackground
public void setBackground(IColorAndVariance color)
- Specified by:
setBackground
in interface ColorHypothesis
getMaxDistance
public double getMaxDistance()
- Description copied from interface:
ColorHypothesis
- There will not always be a global maxDistance.
- Specified by:
getMaxDistance
in interface ColorHypothesis
setMaxDistance
public void setMaxDistance(double tolerance)
- Specified by:
setMaxDistance
in interface ColorHypothesis
mergable
public boolean mergable(IColorAndVariance color1,
IColorAndVariance color2)
- Description copied from interface:
ColorHypothesis
- Is it possible to merge the 2 colors in the given context.
- Specified by:
mergable
in interface ColorHypothesis
Copyright © 2009. All Rights Reserved.