org.shapelogic.imageprocessing
Class PriorityBasedPixelTypeFinder

java.lang.Object
  extended by org.shapelogic.imageprocessing.PriorityBasedPixelTypeFinder
All Implemented Interfaces:
IPixelTypeFinder, PixelJumperByte

public class PriorityBasedPixelTypeFinder
extends java.lang.Object
implements IPixelTypeFinder

Classify points to find out what type they are. This is used in ShortLineBasedVectorizer. Those vectorizers did not work very well.

Author:
Sami Badawi

Constructor Summary
PriorityBasedPixelTypeFinder(PixelJumperByte parent)
           
 
Method Summary
 PixelTypeCalculator findPointType(int pixelIndex, PixelTypeCalculator reusedPixelTypeCalculator)
          From the current point find direction.
 int[] getCyclePoints()
          What you need to add to the the index in the pixels array to get to the indexed point.
 int getMaxX()
           
 int getMaxY()
           
 int getMinX()
           
 int getMinY()
           
 byte[] getPixels()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PriorityBasedPixelTypeFinder

public PriorityBasedPixelTypeFinder(PixelJumperByte parent)
Method Detail

findPointType

public PixelTypeCalculator findPointType(int pixelIndex,
                                         PixelTypeCalculator reusedPixelTypeCalculator)
From the current point find direction. A problem with finding maximum is that the neighbor might not be known. Should the maximum only be calculated among unused? I think that if you have a V point and a junction If I already know a pixel should I do the calculation again?

Specified by:
findPointType in interface IPixelTypeFinder

getCyclePoints

public int[] getCyclePoints()
Description copied from interface: PixelJumperByte
What you need to add to the the index in the pixels array to get to the indexed point.

Specified by:
getCyclePoints in interface PixelJumperByte

getMaxX

public int getMaxX()
Specified by:
getMaxX in interface PixelJumperByte

getMaxY

public int getMaxY()
Specified by:
getMaxY in interface PixelJumperByte

getMinX

public int getMinX()
Specified by:
getMinX in interface PixelJumperByte

getMinY

public int getMinY()
Specified by:
getMinY in interface PixelJumperByte

getPixels

public byte[] getPixels()
Specified by:
getPixels in interface PixelJumperByte


Copyright © 2009. All Rights Reserved.