org.shapelogic.color
Class ColorEdgeArea

java.lang.Object
  extended by org.shapelogic.color.ColorAndVariance
      extended by org.shapelogic.color.ColorRange
          extended by org.shapelogic.color.ColorEdgeArea
All Implemented Interfaces:
ColorChannels, IColorAndVariance, IColorEdgeArea, IColorRange, HasArea, HasPixelArea, PixelHandler

public class ColorEdgeArea
extends ColorRange
implements IColorEdgeArea

ColorEdgeArea holds the information.
Should this have getter and setters?
Maybe start without.
Should this be split in color and gray?
I think that maybe it should.

Author:
Sami Badawi

Field Summary
protected  int[] _borderCount
           
protected  int _lastX
           
protected  int _lastY
           
static int HIGH_CONTRAST_POS
           
static int LOW_CONTRAST_POS
           
static int MEDIUM_CONTRAST_POS
           
 
Fields inherited from class org.shapelogic.color.ColorRange
_colorCenter, _colorCenterInChannels, _distance, _frozen, _maxDistance
 
Fields inherited from class org.shapelogic.color.ColorAndVariance
_colorStatistics, _splitColors
 
Constructor Summary
ColorEdgeArea(int x, int y, int startColor)
           
 
Method Summary
 void addBorder(int level)
           
 int getAllContrastBorders()
           
 int getHighContrastBorders()
          Description of how much high contrast neighbor.
 int getLowContrastBorders()
           
 int getMediumContrastBorders()
           
 void merge(IColorAndVariance colorAndVariance)
           
 void putPixel(int x, int y, int color)
          Add the color for a given point (x,y).
 
Methods inherited from class org.shapelogic.color.ColorRange
colorInRange, distanceFromRange, distanceFromRangeCenter, getColorCenter, getColorChannels, getDistance, getMaxDistance, isRangeFrozen, setColorCenter, setDistance, setMaxDistance
 
Methods inherited from class org.shapelogic.color.ColorAndVariance
getArea, getMeanBlue, getMeanColor, 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

LOW_CONTRAST_POS

public static final int LOW_CONTRAST_POS
See Also:
Constant Field Values

MEDIUM_CONTRAST_POS

public static final int MEDIUM_CONTRAST_POS
See Also:
Constant Field Values

HIGH_CONTRAST_POS

public static final int HIGH_CONTRAST_POS
See Also:
Constant Field Values

_borderCount

protected int[] _borderCount

_lastX

protected int _lastX

_lastY

protected int _lastY
Constructor Detail

ColorEdgeArea

public ColorEdgeArea(int x,
                     int y,
                     int startColor)
Method Detail

putPixel

public void putPixel(int x,
                     int y,
                     int color)
Add the color for a given point (x,y).
The points needs to be added in sequence.

Specified by:
putPixel in interface PixelHandler
Overrides:
putPixel in class ColorAndVariance

getAllContrastBorders

public int getAllContrastBorders()
Specified by:
getAllContrastBorders in interface IColorEdgeArea

getHighContrastBorders

public int getHighContrastBorders()
Description copied from interface: IColorEdgeArea
Description of how much high contrast neighbor. What would be a good measure for this. Maybe the rate of borders that are high contrast to the one that are not. So maybe have a 30 and 70 percentile contrast levels. Or maybe I can just set the levels manually and do the count.

Specified by:
getHighContrastBorders in interface IColorEdgeArea

getMediumContrastBorders

public int getMediumContrastBorders()
Specified by:
getMediumContrastBorders in interface IColorEdgeArea

getLowContrastBorders

public int getLowContrastBorders()
Specified by:
getLowContrastBorders in interface IColorEdgeArea

addBorder

public void addBorder(int level)
Specified by:
addBorder in interface IColorEdgeArea

merge

public void merge(IColorAndVariance colorAndVariance)
Specified by:
merge in interface IColorAndVariance
Overrides:
merge in class ColorRange


Copyright © 2009. All Rights Reserved.