org.shapelogic.imageprocessing
Class LineVectorizer

java.lang.Object
  extended by org.shapelogic.imageutil.BaseImageOperation
      extended by org.shapelogic.imageprocessing.BaseVectorizer
          extended by org.shapelogic.imageprocessing.ShortLineBasedVectorizer
              extended by org.shapelogic.imageprocessing.LineVectorizer
All Implemented Interfaces:
java.lang.Runnable, java.util.Iterator<Polygon>, IPixelTypeFinder, LazyPlugInFilter<Polygon>, PixelJumperByte, ImageOperation

public class LineVectorizer
extends ShortLineBasedVectorizer

LineVectorizer is a vectorizer using short line of default length 5. You do a sequence of small lines, if 2 consecutive lines are close in direction you can merge them. But if they are far away in angle you create a new line. Also you can only have 2 direction within the same line, they are stored by cycle index.

Author:
Sami Badawi

Field Summary
 
Fields inherited from class org.shapelogic.imageprocessing.ShortLineBasedVectorizer
_angleLimit, _currentAngle, _currentCircleInterval, _currentLineType, _currentVectorDirection, _firstPointInLine, _firstUsedDirection, _maxPointsInShortLine, _pixelTypeCalculatorNextPoint, _pointsInCurrentShortLine, _secondUsedDirection, _startOfShortLinePoint, ANGLE_DIFFERENCE_LIMIT, MAX_NUMBER_OF_POINTS_IN_SHORT_LINE
 
Fields inherited from class org.shapelogic.imageprocessing.BaseVectorizer
_cleanedupPolygon, _currentDirection, _currentPixelIndex, _currentPoint, _cyclePoints, _displayInternalInfo, _endPointsClusters, _errorMessage, _firstPointInLineIndex, _firstPointInMultiLine, _matchingOH, _maxX, _maxY, _minX, _minY, _nextCount, _numberOfPointsInAllLines, _pixels, _pixelTypeCalculator, _pixelTypeFinder, _rulesArrayForLetterMatching, _stream, _streamName, _unfinishedPoints, _yForUnporcessedPixel, MAX_DISTANCE_BETWEEN_CLUSTER_POINTS, STRAIGHT_LINE_COLOR
 
Fields inherited from class org.shapelogic.imageutil.BaseImageOperation
_arg, _guiWrapper, _image, _keyValueParser, _setupReturnValue
 
Constructor Summary
LineVectorizer()
           
 
Method Summary
protected  boolean multiLineHasGlobalFitness()
          Test that the current direction is close to the last direction.
 
Methods inherited from class org.shapelogic.imageprocessing.ShortLineBasedVectorizer
findMultiLine, findMultiLinePostProcess, findMultiLinePreProcess, findNextLinePoint, getAngleLimit, getMaxSinceLast, handleProblematicPoints, internalFactory, lastPixelOk, makeNewPoint, makeNewPointPostProcess, moveCurrentPointForwards, newShortLine, resetShortLine, setAngleLimit, setMaxSinceLast, splitLine
 
Methods inherited from class org.shapelogic.imageprocessing.BaseVectorizer
addToUnfinishedPoints, cleanPolygon, countRegionCrossingsAroundPoint, drawLine, drawLines, findAllLines, findFirstLinePoint, findPointType, getCleanedupPolygon, getCyclePoints, getErrorMessage, getImageProcessor, getMatchingOH, getMaxX, getMaxY, getMinX, getMinY, getPixels, getPoints, getPolygon, getStream, getStreamName, hasNext, init, isPixelUsed, matchLines, next, oppesiteDirection, pixelIndexToPoint, pointToPixelIndex, pointToPixelIndex, polygonFactory, remove, run, setStreamName
 
Methods inherited from class org.shapelogic.imageutil.BaseImageOperation
getGuiWrapper, getImage, getKeyValueParser, getSetupReturnValue, isImageValid, setArg, setGuiWrapper, setKeyValueParser, setSetupReturnValue, setup, showAbout, showMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineVectorizer

public LineVectorizer()
Method Detail

multiLineHasGlobalFitness

protected boolean multiLineHasGlobalFitness()
Test that the current direction is close to the last direction.

Returns:
true if a new point should be created


Copyright © 2009. All Rights Reserved.