Direkt zum Hauptinhalt

KVEC

KVEC is a freeware program that allows you to convert raster graphics to vector graphics. You can freely use it. Before 2010 it was distributed as shareware. Please download the freeware version from the kvec web site (https://www.kvec.de). It can be freely distributed and copied. KVEC is very exacting with respect to memory demands. Vectorizing is a critical process and often leads to a trade off between memory demands and performance. It is crucial for the performance that your computer has enough RAM. The selection of values for the switch parameters requires some caution. Noisy pictures (typical for scanned colour pictures) or pictures with a lot of very small details should be evaluated with larger 'grit values' and smaller 'quantize values'.

This is a special inkscape frontend implementation. A lot of KVEC options are not supported, because we reduced the support for SVG format only. Please see the KVEC readme for full details.

grafik.png

Generate bezier curves

The output will consist of bezier-curves instead of straight lines. This allows you to zoom the image without getting edges. For the output formats which don't support bezier curves, the bezier algorithm will be simulated and approximated by polylines.

Centerlines

off Turns centerline vectorization off (Default)
mixed The effect of this parameter depends on the value of the parameter -lwidth. (If used together with -centerline, the meaning of the parameter -lwidth is modified). Before vectorizing, all detected objects were checked for its maximal thickness. All objects with a maximal thickness less than -lwidth were treated as line objects; all other objects were vectorized in the normal way. The vectorization of line objects does not result in border lines around the objects. It produces single lines which are located along the centerlines of the objects. The final linewidth of this generated single lines will be adopted so that the area of the line object is about the same as the area of the original object. (this has no effect, if the output format cannot handle variable linewidths).
lines The same as 'centerline mixed' except that only line objects will be generated. All other objects will be discarded

Colorspace conversion parameters

Selects the internal color space which is used by kvec. The effect of changing the internal color space will be noticed when used together with the "colorsep" option or when bitmap processing is performed ("process" option). Note: If a color space other than RGB or CMYK is selected, the colors will be changed such that the optical impression will be quite near to the original image. RGB is default.

Color separation parameters 

 Selects the type of color separation. The output file will only contain the specified color components. Please note, that for cmyk separation the color space is also set to the right value. Note: It is useful to produce a gray-scale output file for single component color separation. This can be achieved by using the "-black" option together with colsep.

  • rgb: no color separation (default).
  • cmyk: no color separation
  • rb: extract R and B components
  • gb: extract G and B components
  • gr: extract R and G components
  • cy: extract C and Y components
  • my: extract M and Y components
  • mc: extract C and M components
  • rr: separate R color
  • gg: separate G color
  • bb: separate B color
  • cc: separate C color
  • mm: separate M color
  • yy: separate Y color 

Fill

The fill parameters specify how the generated polylines/polygons will be interpreted:

solid Polygons are always closed (i.e. the last point of a vector is identical with the first point). The Polygons are filled with individual colors (DEFAULT). The sort parameter should not be 'min' in this case because the  larger Polygons would cover and hide the smaller ones.
line Output consists of polylines with individual colors. The polylines are not closed. This is the preferable fill parameter if the outputfile is generated for a pen-plotter. The plotter pen will never plot more than one color one upon another. The layout will depend on the sort order  specified with the 'sort' switch. With the switches  'reduce' and 'smooth' you can once more refine the layout of the output.
contour  The same as '-fill solid', however the interiors of the  polygons remain 'hollow'. Lines with different colour can cover each other. The layout will depend on the sort order specified with the 'sort' switch.

Font

KVEC generates (before vectorization) an optimized set of parameters, which is suited for vectorization of dark colored text on a clear background. All objects get a unique 'dark' color. Sort order "local" is automatically turned on for generation of sub-polygons.

Gap fill (jumping)

This parameter controls whether the vectorizer can 'jump' over gaps while tracing an object. The value N must be specified in 10ths of a pixel. Allowed values: 0 - 30.

Filter out details smaller than x pixels

Polylines or polygons which belong to a bounded area with a number of pixels fewer than N will be filtered out (i.e. small details are 'erased'). The default value depends on the dimensions and the colour depth of the picture. The use of a grit value > 0 increases the computing time and increases also considerably the demand of memory. If you have to deal economically with memory you should try a grit value of 0 and decrease the quantization value.

Line width

Specifies the line width of the generated output vectors in 10ths of a pixel. Allowed values: 0-1000. Default value: 0. Note that this parameter has a different meaning if used together with the option -centerline. In this case the default value for the lwidth is 100.

Polygons overlap (1px)

If this switch is specified, Polygons will slightly overlap, actually one pixel. (DEFAULT: no overlap). If vector images show strange coloured gaps after they have been rotated (especially along border lines between adjacent Polygons) you should set this switch.

Palette

optimize KVEC will use internal optimized palette when color reducing has to be done (default)
fixed KVEC will use a standard color palette when color reducing has to be done. This often gives better vectorization results, especially if the raster image contains less than 16 colors.
user (not supported!) <n> R1,G1,B1, .... Rn,Gn,Bn: Here you can specify a user supplied color palette which contains <n> colors. The value <n> must be followed by <n> RGB triples. It is more practicable to use a parameter file than entering all RGB values on the commandline. The value for n may not exceed 256 colors.

Color quantization

The input file will be quantized down to N colors before vectorization, if it contains more than N colours. Default: 32 colors

Type of line reducing

The reduce parameters specify whether all those points of a vector laying on a straight line may be replaced (= reduced) by two points (the start and the end point of the straight line). This reduces the size of the outputfile. Because straight lines can lie horizontally, vertically, or diagonally,we have:

orthogonal straight horizontal and vertical line-segments will be reduced. This is the default value.
all All straight lines will be reduced (diagonal lines too). Occasionally, small gaps may appear in the layout.
off lines will not be reduced. The only case in which you may want this setting is when you want the velocity of a plotter pen to slow down for long straight lines.

High vectorization resolution

The resolution parameters have some influence on the internal evaluation. If high, all details will be retained (needs more memory), else very small details may get lost (default)

Sorting

The sort parameters specify the sequence order in which the vectors appear in the outputfile:

nosort  Vectors will not be sorted. Contours with different colours may cover each other but the interior areas of each vector cannot be covered by those of another vector.
max This parameter depends on the filltype: For filltype 'solid' the Polygons are sorted by the size of the bounded area. For filltype line and color they are sorted by the length of the vectors (sortorder is from maximimum to minimum). This is the default value.
min The same as sort 'max' but sortorder is from minimum to maximum. This makes no sense together with '-fill solid'.
local The generated output order preserves the local topology, i.e. objects are drawn in the order in which they are nested. The sort order in a group of nested objects is from max to min. The sort order for groups is the same. Needs more computing time. If the sort order is local0, KVEC will try to generate subpolygons having transparency color. This may be usefull for vectorizing of text. The "-font" option will turn on the local sort order automatically.
color Polygons/polylines are sorted by color.

Subsampling

If enabled, the output vectors are subsampled by a factor of 2. This will reduce the size of the output file and will also result in smoothing the vectors. 

Sysmalloc

If enabled, use the memory-allocation routines from the operating system, else KVEC uses its own memory allocation routines. Some operating systems have slow allocation routines. Try this switch if the performance of KVEC decreases.

Text

Generate or suppress output of text in the output file. Default is enabled

Color vectorization

Normal No special mode. Default
Only darkest and brightest color The same as -vblack, except that only the dark areas will be processed. Thus, white areas inside of black areas might dissapear if the 'black' object is of type 'filled polygon'.
All colors except brightest  The same as -vblack, except that only 'not white' areas will be processed. Thus, white areas inside of other areas might dissapear if the object is of type 'filled polygon'.
Only colors with 'darkest' RGB-values Only the colors with the 'darkest' RGB-values will be vectorized (picks the 'black' lines out of the picture). All other objects were treated as having one unique 'white color'. The regions consisting of this 'white' color will also be vectorized. Thus, white areas inside of black areas will be shown correctly. Note that a lower -quantize value results in the generation of more 'black' lines. If the quantize value is too high, the program will not catch all all dark regions.

Winding

original (Default) Winding of polygons will be unchanged, as detected from the source or from the vectorizer.
reversed Reverse the winding direction. This may be necessary for some types of input data. 
optimized KVEC sets alternating winding directions for main- and subpolygons, depending on the nesting depth. 

Delta

This is the maximal allowed color difference between the rough and the detail layer. The detail layer contains a vector representation of these areas which have a colour difference to the first layer greater than delta. Note: delta has two different meanings: If used together with the 'progressive' option it means a color difference between two layers. If used together with the 'vcolor' option it means a maximal allowed color tolerance. Values: 0 up to 128. Default: 0

Error-Parameter for Bezier-curves

Use the value N for the Bezier error-parameter. Allowed values: 1 - 20. Greater values for errbez will allow more differences between the original and the output picture and will reduce the size of the output. The default value is 3.

Lossless

Generates a lossless image. May need enormous memory. This is a synonym for: -resolution high -grit 0 -reduce orth. and no quantization

Progressive

KVEC offers you the possibility of building a 'progressive' image. The term 'progressive' means that the image is build up from two successive layers (one 'rough' picture without details and one refined picture which contains only details). The two layers follow in this order as the image is build up. This kind of image representation is very robust against all kinds of transformations and local deformations. The difference of the two layers with respect to colour quantization and resolution of details is expressed by the gritfactor and the colorfactor:

-progressive gritfactor N: Generates a progressive image with 2 Layers. The first layer has a grit-value multiplied by N
-progressive colorfactor N: Generates a progressive image with 2 Layers. The first layer has a quantize-value divided by N

Smoothing of polylines

The program will try to smoothen the polylines and Polygons. This is involving some loss of information. Default: Depends on the output format. Using the 'smooth on' with the WMF or EMF-Format will increase the resolution of the outputfile by a factor of 4.

Pick out regions with color - mode

none Do not apply
matching This switch can be be used to pick out regions of the image which have the specified color. The color representation is RGB (Red Green Blue) with values from 0 up to 255. Only these regions that match this colour will be vectorized. Note: If a delta value > 0 is specified ('-delta' option) all colors which lie in the range (RGB +/- delta) will be vectorized.
not_matching Only these regions that do not match this colour will be vectorized. Note: If a delta value > 0 is specified ('-delta' option) all colors which lie in the range (RGB +/- delta) will not be vectorized.

Original KVEC software

This is how official GUI looks (some settings screenshots).

grafik.png grafik.png grafik.png grafik.png