public interface Vectorization
La entrada es una capa raster, ya sea en un fichero, RasterDastaSource o un RasterDataset.
El uso de comunicacion con la libreria jpotrace es como funciona el comando potrace, de hecho, se pueden aņadir mas opciones si potrace los admite por linea de comandos.
Una vez creada una instancia de Vectorization se definen todos los parametros deseables o en caso de no definirlos se usaran los valores por defecto y se invoca al metodo VectorizeBuffer()
Este ultimo metodo, devuelve un array de doubles indicando si lo que se ha devuelto son operaciones tipicas de shapes... MoveTo, LineTo, CurveTo, etc...
En la primera posicion se devuelve el tamaņo del array.
Modifier and Type | Field and Description |
---|---|
static int |
POLICY_BLACK |
static int |
POLICY_LEFT |
static int |
POLICY_MAJORITY |
static int |
POLICY_MINORITY |
static int |
POLICY_RANDOM |
static int |
POLICY_RIGHT |
static int |
POLICY_WHITE |
Modifier and Type | Method and Description |
---|---|
boolean |
isEnabledCurveOptimization()
Return if the curve optimization is enabled or disabled
|
void |
setCornerThreshold(double value)
Set the corner threshold parameter (default 1)
|
void |
setDespeckle(int value)
Suppress speckles of up to this size (default 2)
|
void |
setEnabledCurveOptimization(boolean value)
Enable/Disable the curve optimization (default enabled)
|
void |
setOptimizationTolerance(double value)
Set the curve optimization tolerance (default 0.2)
|
void |
setOutputQuantization(int value)
Quantize output to 1/unit pixels (default 10)
|
void |
setPolicy(int value)
Set how to resolve ambiguities in path decomposition
Use:
POLICY_BLACK POLICY_LEFT POLICY_MAJORITY POLICY_MINORITY POLICY_RANDOM POLICY_RIGHT POLICY_WHITE |
double[] |
VectorizeBuffer()
Hace el proeso de Vectorizacion de un Raster
|
static final int POLICY_BLACK
static final int POLICY_WHITE
static final int POLICY_RIGHT
static final int POLICY_LEFT
static final int POLICY_MINORITY
static final int POLICY_MAJORITY
static final int POLICY_RANDOM
void setCornerThreshold(double value)
value
- void setOutputQuantization(int value)
value
- void setDespeckle(int value)
value
- void setPolicy(int value)
Use:
POLICY_BLACK
POLICY_LEFT
POLICY_MAJORITY
POLICY_MINORITY
POLICY_RANDOM
POLICY_RIGHT
POLICY_WHITE
value
- void setOptimizationTolerance(double value)
value
- boolean isEnabledCurveOptimization()
value
- void setEnabledCurveOptimization(boolean value)
value
- double[] VectorizeBuffer()
PotraceException