KK-Software documentation page 2


Back to Homepage
Previous page


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:
 
-reduce orthogonal:straight horizontal and vertical line-segments will be
                   reduced. This is the default value.
-reduce all:       All straight lines will be reduced (diagonal lines too).
                   Occasionally, small gaps may appear in the layout.
-reduce 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.


The resolution parameters have some influence on the internal evaluation:

-resolution low:   very small details may get lost (default)
-resolution high:  all details will be retained (needs more memory)


-rotate N:         Set rotation angle (value N in degrees)
                   Rotation will only be performed if the command list
                   specified by the -process switch contains a 'rotate'
                   command. The default rotation angle is 40 degrees.
                   Note: Only input raster files are concerned from rotation.
                   Rotation takes places before any vectorization.


The scaling parameters will obly be evaluated if the output format is
DXF or HPGL.

-scale hpgl N:     The output HPGL image will be scaled by a factor of N
-scale dxf N:      The output DXF image will be scaled by a factor of N
                   See also -xyscale hpgl / -xyscale dxf

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

-sort 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.

-sort 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.

-sort min:         The same as sort 'max' but sortorder is from minimum to
                   maximum. This makes no sense together with '-fill solid'.

-sort 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 local, KVEC will try to generate
                   subpolygons having transparency color. This may be usefull
                   for vectorizing text. The "-font" option will turn on
                   the local sort order automatically.

-sort color:       Polygons/polylines are sorted by color. You may want this
                   setting for HPGL output.


-subsampling:      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. 


-swf format mx:    Flash format MX (Default. Writes compressed output)
-swf format 6:     Flash format MX (writes compressed output)
-swf format 5:     Flash format 5.x (uncompressed, for compatibility)
-swf compression zlib: Use zlib compression method (Default, for format mx)
-swf compression none: no compression

-sysmalloc on:     (Default) Uses the memory-allocation routines from the
                   operating system
-sysmalloc off:    KVEC uses its own memory allocation routines. Some
                   operating systems have slow allocation routines. Try this
                   switch if the performance of KVEC decreases.


The transparency parameters will only be evaluated if the output format is
a format which can handle filled objects.
The transparency color will be suppressed in the generated output image.
Some formats cannot handle subpolygons. For these formats the transparency
option will not work correctly in some cases.
Default: Transparency option is turned off.

-tcolor auto:      Autodedect transparency color
-tcolor color R G B: User-defined transparency color (RGB values)


-text on/off:      Generate or suppress output of text in the output file.
                   This applies only to formats which support text objects.
                   Default: -text on


The Tiff-parameters will only be evaluated if the output format is the
Tiff-file or PowerFax format and control the generation of the Tiff-file:

-tiff append:   The image will be appended as subimage (Default: overwrite)
-tiff FillOrder msb2lsb: (for bilevel Fax images) Default
-tiff FillOrder lsb2msb: (for bilevel Fax images)
-tiff byteorder I:   byte-order in the Tiff file will be 'INTEL' (DEFAULT)
-tiff byteorder M:   byte-order in the Tiff file will be 'MOTOROLA'
-tiff compress none: no compression will be performed (DEFAULT)
-tiff compress huffman: 'Huffman-compression' will be used (bilevel images)
-tiff compress fax3: Fax group3 compression will be used (bilevel images)
-tiff compress fax4: Fax group4 compression will be used (bilevel images)
-tiff compress lzw:  LZW compression will be used 
-tiff compress packbits: 'packbits-compression' will be used  
-tiff Group3Opt fill: insert fillbits before EOL (Fax only)
-tiff xres <N>:   Xresolution in pixels per inch (Default: 300)
-tiff yres <N>:   Yresolution in pixels per inch (Default: 300)
-tiff SubFileType normal: (Default)
-tiff SubFileType mask: Transparency mask
-tiff SubfileType page: multi page file (fax)
-tiff predictor:   The Tiff-predictor field is set to 2 (for LZW compression)
                   DEFAULT: predictor field not set.
-tiff photo white:   Photometric interpretation: 'MINISWHITE'
                     Tiff file will be of type 'bilevel' or 'grayscale'
                     (tiff class 'B' or 'G')
-tiff photo black:   Photometric interpretation: 'MINISBLACK'
                     Tiff file will be of type 'bilevel' or 'grayscale'
                     (tiff class 'B' or 'G')
-tiff photo rgb:     Tiff file will have 3 color components (RGB)
                     (tiff class 'R') (DEFAULT setting)
-tiff photo separated: Tiff file will have 4 color components (CMYK)
                     
-tiff photo pal:     Tiff file will have a color palette
                     (tiff class 'P')
-tiff photo ycbcr:   Tiff file will have luminance and chrominance components 
                     (tiff class 'Y')
-tiff stripsize N:   Tiff file will have a stripsize of N Bytes 
                     Default: 32000 Bytes.


-trim:             Trim picture. (Only WMF output format)


-vblack:           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.
-xmin <x>:         set x-range for plotting user-defined functions
                   (in arbitrary units)
                   (see switch '-function')

-xmax <x>:         set x-range for plotting user-defined functions
                   (in arbitrary units)
                   (see switch '-function')

-ymin <x>:         set y-range for plotting user-defined functions
                   (in arbitrary units)
                   (see switch '-function')

-ymax <x>:         set y-range for plotting user-defined functions
                   (in arbitrary units)
                   (see switch '-function')

-zmin <z>:         set z-range for plotting user-defined functions
                   (in arbitrary units)
                   (see switch '-function')

-zmax <z>:         set z-range for plotting user-defined functions
                   (in arbitrary units)
                   (see switch '-function')

-tmin <t>:         set t-range for plotting user-defined functions
                   (in arbitrary units)
                   (see switch '-function')

-tmax <t>:         set t-range for plotting user-defined functions
                   (in arbitrary units)
                   (see switch '-function')

-phimin <t>:       set phi-range for plotting user-defined functions
                   (in polar-coordinate units)
                   (see switch '-function')

-phimax <t>:         set phi-range for plotting user-defined functions
                   (in polar-coordinate units)
                   (see switch '-function')



-voblack dark:     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'.
-voblack nwhite:   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'.


-zlib bufsize <N>: Buffersize for the zlib input/output buffers. Default: 32768
-zlib clevel <N>:  Compression level for the zlib routines (Default: 6)
                   Allowed values: 1 up to 9
	(The zlib compression method can be applied to SVG and SWF formats)
-winding original: (Default) Winding of polygons will be unchanged, as
                   detected from the source or from the vectorizer.
-winding reversed: Reverse the winding direction. This may be necessary
                   for some types of input data. 
-winding optimized: KVEC sets alternating winding directions for main-
                   and subpolygons, depending on the nesting depth.

                   The winding settings are only relevant for the SWF 
                   format (and especially if you want to import the
                   SWF files into the Macromedia Flash Editor). The
                   Flash Players can handle all types of winding directions

The following switches are only available for registered users:

The Debug switches specify the level of the debug-output. The debug-output
with informations about the status of the vectorization process is displayed
on the screen. (High level means more detailed debug output).


-debug N:          Generate debug-output level N (1-8) (default: No debug)
-debug all:        Generate very detailed debug-output


-delta N:          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


-errbez N:         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.


-group:            Generates recursively nested groups of objects
                   This parameter applies for the LogoArt format only.


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


-process <list>    KVEC has built in some image processing features which
                   are hardly to be found in other graphic programs.
                   You can specify a list of instructions after the
                   'process' keyword. These instructions must be entered
                   as strings or as ordinal numbers and must be seperated by
                   one of the following characters: ',',':','.','-'.
                   The 'string-keywords may be abbreviated.
                   The instructions were performed as soon as the image is
                   read from disk (or automatically generated by using the
                   '-random' switch). Here a few examples:

(Apply Gauss Highpass filter)
KVEC x.bmp y.tif -for tif -proc fft_bm,gausshighpass,ifft_bm
KVEC x.bmp y.tif -for tif -proc 14,39,15

(Spectrum)
KVEC x.bmp y.tif -for tif -proc norm_flo,fft_bm,log_bm,norm_byt,center_or
KVEC x.bmp y.tif -for tif -proc 11,14,12,8,33

(Spectral power density)
KVEC x.bmp y.tif -for tif -proc norm_flo,fft_bm,abs_bm,log_bm,norm_rby,center_or
KVEC x.bmp y.tif -for tif -proc 11,14,7,12,9,33

(Autocorrelation function)
KVEC x.bmp y.tif -for tif -proc norm_flo,fft_bm,abs_bm,ifft_bm,log_bm,norm_byt,center_or
KVEC x.bmp y.tif -for tif -proc 11,14,7,15,12,8,33

(1.st Derivative)
KVEC x.bmp y.tif -for tif -proc norm_flo,fft_bm,derive1,ifft_bm,abs_bm,norm_byt
KVEC x.bmp y.tif -for tif -proc 11,14,34,15,7,8

(1.st Integral)
KVEC x.bmp y.tif -for tif -proc norm_flo,fft_bm,integral1,ifft_bm,abs_bm,norm_byt
KVEC x.bmp y.tif -for tif -proc 11,14,35,15,7,8

(Try to reconstruct the original image from a bitmap which contains a logarithmic
spectrum)
KVEC x.bmp y.tif -for tif -proc center_or,norm_flo,exp_bm,ifft_bm,abs_bm,log_bm,norm_byt
KVEC x.bmp y.tif -for tif -proc 33,11,13,15,7,12,8

(Random - test image (24 bit color) having a  1/(F*F) spectrum
KVEC null y.tif -for tif -proc norm_flo,fft_bm,spect_2_f,ifft_bm,norm_byt -random 24 2
KVEC null y.tif -for tif -proc 11,14,23,15,8 -random 24 2



                   The (first) instruction 'byte2complex' and the (last)
                   instruction 'complex2byte' need not to be specified, 
                   KVEC executes them by default.
                   Example 2 (Spectrum):
                   This instructs KVEC to perform a fourier transformation
                   with the image, apply the log() function to it, normalize
                   the values to the range [0..255], put the origin of the
                   image into the center (which is the better choice for
                   frequency representations). After this KVEC continues
                   in evaluating the other switches.

                   PLEASE NOTE THAT THE BITMAP MUST BE CONVERTED TO A COMPLEX
                   BITMAP. THIS MAY RESULT IN ENORMOUS MEMORY DEMANDS!
                   Here an example: If we have a 500 * 500 bitmap with a
                   colordepth of 4 bit (palette bitmap), the bitmap occupies
                   500*500*1/2 * sizeof(BYTE) =  125 KByte. The converted
                   complex bitmap occupies
                   500*500*(3 colorplanes)*sizeof(COMPLEX) = 6 MByte.
                   Here are the keywords and the ordinal numbers (some of
                   the functions may not yet be implemented).
                   Please type the keywords lowercase in the commandline.
                   instruction: ordinal number:
                   =========================================================
                   NOOP            0 no operation
                   BYTE2COMPLEX    1 makes complex image of bitmap
                   COMPLEX2BYTE    2 makes a bitmap of a complex image
                   BYTE2REAL       3 fills real part of complex image 
                   REAL2BYTE       4 makes a bitmap of the real-part image
                   BYTE2IMAGINARY  5 fills imaginary part of complex image
                   IMAGINARY2BYTE  6 makes a bitmap of the imaginary-part
                   ABS_BM_COMPLEX  7 build absolute values Abs(z)
                   NORM_BYTE       8 normalize all values  to [0...255]
                   NORM_RBYTE      9 normalize real values to [0...255]
                   NORM_IBYTE      10 normalize imaginary values to [0...255]
                   NORM_FLOAT      11 normalize all values to [-1.0,1.0]
                   LOG_BM_COMPLEX  12 applies the Logarithm function
                   EXP_BM_COMPLEX  13 applies the Exponential function
                   FFT_BM_COMPLEX  14 performs a Fourier Transformation
                   IFFT_BM_COMPLEX 15 performs a inverse Fourier Transform.
                   SUPPRESS_DC     16 supresses the DC part of the spectrum
                   SET_ZERO        17 set a complex image to 0
                   SET_IM_ZERO     18 set real part of complex image to 0
                   SET_RE_ZERO     19 set imaginary part of complex image to 0
                   MAKE_RAND_PHASE 20 build a random phase of all points
                   SPECT_LIN       21 give spectrum a decreasing linear shape
                   SPECT_1_F       22 give spectrum a 1/f shape
                   SPECT_2_F       23 give spectrum a 1/f*f shape
                   SPECT_RE_EVEN   24 force even symmetry for real spectrum
                   SPECT_RE_ODD    25 force odd symmetry for real spectrum
                   SPECT_IM_EVEN   26 force even symmetry for imaginary spectr.
                   SPECT_IM_ODD    27 force odd symmetry for imaginary spectr.
                   CAR2POL         28 convert image to polar representation
                   POL2CAR         29 convert image to cartesian representation
                   LOWPASS         30 Low Pass filter (rectangle)
                   HIGHPASS        31 High Pass filter (rectangle)
                   ROTATE          32 Rotate
                   CENTER_ORIGIN   33 move origin into center of the image
                   DERIVE1         34 Build first derivative  of the image
                   INTEGRAL1       35 Build first integral    of the image
                   DERIVE2         36 Build second derivative  of the image
                   INTEGRAL2       37 Build second integral    of the image
                   GAUSSLOWPASS    38 Low Pass filter (Gauss)
                   GAUSSHIGHPASS   39 High Pass filter (Gauss)
                   GRAY2COLOR      40 gray-to-color conversion
                   MAKE16MCOLOR    41 convert to image having 16 M unique colors
                   (Please note: needs 150 - 200 MB RAM and runs 12 - 100 hours!!)

GRAY2COLOR: The colordepth of the generated colored image (default: 8 Bit)
            can be specified by using the switch '-random <coldepth> <N>.
            The parameter value <N> will be ignored.


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


-random N1 N2:     Generates a random test image for input. The name of the
                   input file should be 'null' or 'vnull' in this case. The
                   parameter N1 specifies the color depth of the test image.
                   Allowed values: 1,4,8,24.
                   N2 specifies the type of the image.

                   Allowed values for N2 for raster images ('null'):
                   0 or 1 (White noise BW or gray), 2 (white noise colored)
                          Values 0,1, or 2 are not suited for vectorization.
                   3 : generates an image of a well known logo... (Default)
                   4 : generates an image of a space shuttle
                   5 : generates an image having 16777216 different colors

                   Allowed values for N2 for vector images ('vnull'):
                   0: Random polylines, 1: random polygons
                   2: All types of KVEC objects
                   3: generates an image (butterfly)... (Default)
                   4: generates an image (tiger)


-smooth on:        Smooth 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.
                   
-smooth off:       Turns smoothing off


-subimage N:       Use subimage No. N in inputfile (Tiff or FAX formats)
                   The first subimage has no. 0. If subimage is not specified
                   KVEC will put all subimages together in one image
                   (for FAX format only)



KVEC offers the possibility of anisotropic scaling / translation for
DXF and HPGL output:
-xyscale hpgl X Y: Scale hpgl output with factors X (x-direction) and
                   Y (y-direction)
-xyscale dxf X Y:  Scale dxf output with factors X (x-direction) and
                   Y (y-direction)
-xyoffset X Y:     Add X and Y offset to the coordinates on output
                   (The switch -coord should be set to 'pixel' in this case)


-vcolor R G B:     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.
-vcolor -R -G -B:  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.


The newest version of KVEC is always available  
from  https://www.kvec.de



Previous page