****************************************************************************** * K V E C D O C U M E N T A T I O N * * * * +++ KK-Software +++ KK-Software +++ KK-Software +++ KK-Software +++ * *----------------------------------------------------------------------------* * Dipl.-Phys. Karl-Heinz Kuhl, Joseph-Haas-Str. 7d, 92637 Weiden, Germany * *----------------------------------------------------------------------------* * Voice FAX/BBS E-Mail * * +49 961 6340837 +49 961 61455 100270.1652@compuserve.com * ****************************************************************************** What is KVEC? KVEC is a shareware program that allows you to convert raster graphics to vector graphics. You can freely use it for a trial period of 30 days. After this period you should consider to register it when you want to use it further on. The (unregistered) shareware version can be freely distributed and copied. KVEC is designed for 32 bit operating systems and 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 is supplied with enough RAM and that you have a floating point coprocessor. A minimum of 16 MByte RAM is recommended. KVEC works fine on a Pentium 100 MHz with 32 MByte. The result on a 40 MHz PC with 386 CPU and 8 MB RAM without coprocesseor is frustrating: The computing time is about 300 times as high as on the Pentium. The computing time on a Pentium 100 MHz is in the order of magnitude of seconds up to minutes, depending on the size and the colour-depth of the input file. 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' (explained below). The output formats DXF and HPGL are not suited for vectorization of coloured photos or coloured scanned pictures (unless you have lots of GigaBytes left on your harddisk ;-) the output size would be immense. Vector representations of images have several advantages in contrast to rastered block representations: operations like rotation, stretching, morphing and warping can much easier be performed and one does not have to care about aliasing and other unwanted effects. The application fields of a good vectorizer reach from motion estimating in video sequences up to effective image compression (if you don't believe it, wait until the next release). This is the first release of KVEC and probably there are still some petty bugs in it. Please feel free to contact the author if you have problems with KVEC or if you find some bugs. KVEC is designed to run on several operating systems (which have different hardware and graphical environments), therefore this first release of KVEC is a graphic-independend commandline version. The syntax is as simple as can be: KVEC (Inputfile) (Outputfile) [optional switches] Inputfile is the name of a raster graphic file (of type tiff, Bitmap BMP or GIF). Outputfile is the name of the desired vector graphic file. Currently supported vector formats are: - Windows Metafile, Postscript, AutoCad DXF and HPGL. The switches are optional. If you don't specify any switches, the program chooses a set of parameters which are optimized with respect to the kind of graphic data. Switches may be abbreviated. The filenames must be specified before the optional switches. Some switches however don't require filenames and can be specified immediately after KVEC. From these switches only one can be specified in each case: KVEC -info: Displays some useful information about KVEC on the screen. KVEC -printform: Generates automatically a registration form. This form can be sent to the author by E-Mail, FAX or postal mail in order to get a registration key. The registration key is a max. 5 digit number, which allows the user to register the software and get access to extended features of KVEC. You will be prompted to select a language. The registration form will then be generated in your preferred language. The registration form consists of plain ASCII text. If you print it out from a text processing program, be shure that you choose a monospaced font and not a proportional font. KVEC -register: As soon as you got a registration key you can use this switch to register the program. You will be prompted to enter your name, the serial-number and your registration key. Please type all characters exactly as printed in the registration confirmation you got from the author. If you have entered the information correctly, a message appears which thanks you for your registration. The received registration key is valid for updates and future releases of KVEC. The other switches must follow the input and output filenames: The fill parameters specify how the generated polylines/polygones have to be interpreted: -fill solid: Polygones are always closed (i.e. the last point of a vector is identical with the first point). The polygones are filled with individual colors (DEFAULT). The sort parameter should not be 'min' in this case because the larger polygones would cover and hide the smaller ones. -fill 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. -fill contour: The same as '-fill solid', however the interior of the polygones remains 'hollow'. Lines with different colour can cover each other. The layout will depend on the sort order specified with the 'sort' switch. The sort parameters specify the sequence order in which the vectors appear in the outputfile: -sort nosort: Vectors were not sorted. Contours with different colours may cover each other but the interior areas of each vector cannot be covered by these of another vector. -sort max: This parameter depends on the filltype: For filltype 'solid' the polygones 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'. -grit N: Polylines or polygones 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 economical with memory you should try a grit value of 0 and decrease the quantization value. -overlapp: If this switch is specified, polygones will slightly overlapp, actually one pixel. (DEFAULT: no overlapp). If vector images show strange coloured gaps after they have been rotated (especially along border lines between adjacent polygones) you should set this switch. The reduce parameter 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 horizontal, vertical and diagonal, 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, there may appear small gaps 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. -quantize N: The input file will be quantized down to N colors before vectorization, if it contains more than N colours. (Default: 256 colours). The format parameters specify the output format: -format wmf: Output-Format is Windows Metafile format -format amf: Output-Format is Windows Metafile (ALDUS-Type, default) -format emf: Output-Format is Enhanced Windows Metafile format -format ps: Output-Format is Postscript level 2 -format eps: Output-Format is Encapsulated Postscript level 2 -format dxf: Output-Format is AutoCad DXF (contours only, color: black) -format hpgl: Output-Format is HPGL (for pen-plotters, contours only) The resolution parameters have some influence on the internal evaluation: -resolution low: very small details can get lost (default) -resolution high: all details can be catched (needs more memory) -black: Output-color is always black The following switches are only available for registered users: 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 -delta N: This is the maximal allowed colour 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. -subimage N: Use subimage No. N in inputfile (Tiff oder OS/2-Bitmaps) -lossless: Generates a lossless image. May need enormous memory. This is a synonym for: -resolution high -grit 0 -reduce orth. and no quantization 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 -smooth: Smooth polylines: the program will try to smoothen the polylines and polygones. This is involving some loss of information. -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. The newest version of KVEC and the current price list is always available in the following mailbox: (+49 961 61455) V32bis (+49 961 6340838) ISDN =============================================================================== ****************************************************************************** * K V E C D O K U M E N T A T I O N * * * * +++ KK-Software +++ KK-Software +++ KK-Software +++ KK-Software +++ * *----------------------------------------------------------------------------* *Dipl.-Phys. Karl-Heinz Kuhl, Joseph-Haas-Str. 7d, 92637 Weiden, Deutschland * *----------------------------------------------------------------------------* * Tel. 10-12 Uhr FAX/BBS E-Mail * * +49 961 6340837 +49 961 61455 100270.1652@compuserve.com * ****************************************************************************** Was ist KVEC? KVEC ist ein Shareware-Programm, mit dem Sie Raster-Graphiken in Vektor- Graphiken konvertieren koennen. Sie koennen es ohne Einschraenkungen fuer einen Zeitraum von 30 Tagen benutzen. Nach Ablauf dieser Zeit sollten Sie das Programm registrieren lassen, falls Sie es weiterhin benutzen moechten. Die (unregistrierte) Shareware Version darf frei weitergegeben und kopiert werden. KVEC ist ein Programm, das nur auf 32 Bit Betriebssystemen laeuft, und das hohe Anforderungen an den Speicherbedarf stellt. Vektorisierung ist ein rechenaufwendiger, komplizierter Prozess und fuehrt oft zu einem Abwaegen zwischen Rechenzeit und Speicherbedarf. Es ist entscheidend fuer die Performance, dass Ihr Computer mit genuegend RAM-Speicher ausgestattet ist und dass er ueber einen Arithmetik-Koprozessor verfuegt. Ein Minimum von 16 MByte RAM wird empfohlen. KVEC laeuft sehr gut auf einem Pentium 100 Mhz mit 32 Mbyte RAM. Das Ergebnis auf einem 40 Mhz PC mit 8 Mbyte RAM ohne Koprozessor ist frustrierend: Die Rechenzeit ist hier etwa 300 mal so hoch wie auf dem Pentium. Die Rechenzeit auf einem Pentium 100 MHz liegt im Sekunden- bis Minuten- bereich je nach der Groesse und der Farbtiefe der Input-Datei. Die Auswahl der Werte fuer die (optionalen) Programmparameter erfordert einige Vorsicht. 'Verrauschte' Bilder (typisch fuer gescannte Farbbilder) oder Bilder mit sehr vielen sehr kleinen Details sollten mit groesseren 'grit' Werten und kleineren 'quantize' Werten (Erklaerung s. unten) ausgewertet werden. Die Ausgabeformate DXF und HPGL sind nicht fuer die Vektorisierung von farbigen Photos oder gescannten Farbbildern geeignet (ausser Sie haben viele GBytes Speicher auf Ihrer Festplatte uebrig ;-) die Groesse der Ausgabe- Datei waere riesig. Vektordarstellungen von Bildern haben gegenueber Rastergrafiken mehrere Vorteile: Operationen, wie z.B. Rotation, Dehnen, Morphing und Warping sind viel leichter durchzufuehren und unerwuenschte Effekte wie z. B. Aliasing tauchen bei Vektor-Bildern erst gar nicht auf. Die Anwendungsgebiete eines guten Vektorisierers reichen von der Bewegungsschaetzung in Video-Sequenzen bis hin zur effektiven Bildkompression (wenn Sie das nicht glauben, dann muessen Sie bis zur naechsten Version von KVEC warten). Dieses Programm ist die erste Version von KVEC und wahrscheinlich beeinhaltet es noch einige kleinere 'bugs'. Bitte wenden Sie sich an den Autor, wenn Sie Probleme mit dem Programm haben, oder wenn Sie Fehler finden. KVEC wurde so konzipiert, dass es auf mehreren Betriebssystemen (die unterschiedliche Hardware und graphische Oberflaechen besitzen) laeuft. Diese erste 'Release' ist deshalb eine (graphik-unabhaengige) Kommandozeilen-Version. Die Syntax ist sehr einfach: KVEC (Inputdatei) (Outputdatei) [optionale Parameter] Inputdatei ist der Name der Rastergraphik-Datei (vom Typ Tiff, Bitmap BMP oder GIF). Outputdatei ist der Name der gewuenschten Vektorgraphik-Datei. Z. Zeit werden folgende Vektor-Formate unterstuetzt: - Windows Metafile, Postscript, AutoCad DXF und HPGL. Die Parameter sind optional. Wenn Sie keine Parameter angeben, waehlt das Programm automatisch einen Satz von Parametern aus, der optimal an die Eigenschaften der Input-Datei angepasst ist. Die Schluesselwoerter fuer die Parameter koennen abgekuerzt werden. Die Dateinamen muessen in der Kommandozeile vor den optionalen Parametern erscheinen. Einige Parameter koennen jedoch ohne Dateinamen direkt hinter KVEC angegeben werden. Von diesen Parametern darf jeweils nur einer angegeben werden: KVEC -info: Gibt ein paar nuetzliche Informationen auf dem Bildschirm aus. KVEC -printform: Erzeugt automatisch ein Registrierungsformular. Dieses Formular koennen Sie per FAX, E-Mail oder Briefpost an den Programm-Autor senden, um einen Registrierungs- schluessel zu erhalten. Der Registrierungsschluessel ist eine max. 5-stellige Zahl, die dem Benutzer erlaubt, die Software zu registrieren und den Zugriff auf die erweiterten Funktionen von KVEC freigibt. Sie koennen eine Sprache auswaehlen. Das Registrierungs- formular wird dann in einer Sprache Ihrer Wahl erzeugt. Das Registrierungsformular besteht aus reinem ASCII Text. Wenn Sie es aus einem Textverarbeitungsprogramm heraus ausdrucken moechten, achten Sie bitte darauf, dass Sie einen Zeichensatz mit gleichmaessigem Zeichenabstand, und keine Proportionalschrift ausgewaehlt haben. KVEC -register: Sobald Sie einen Registrierungsschluessel erhalten haben koennen Sie mit dieser Option das Programm registrieren lassen. Das Programm fragt Sie nach Ihrem Namen, der Seriennummer und nach Ihrem Registrierungsschluessel. Bitte geben Sie alle Buchstaben und Ziffern genau so ein, wie Sie auf der Registrierungsbestaetigung, die Sie vom Autor erhalten haben, abgedruckt sind. Wenn Sie die Informationen richtig eingegeben haben, wird eine Meldung erscheinen, die sich fuer die Registrierung bedankt. Ihr Registrierungs- schluessel ist fuer alle 'Bugfixes' und Updates von KVEC gueltig. Die anderen Parameter muessen nach dem Dateinamen angegeben werden: Die 'Fuell'-Paremeter geben an, wie die erzeugten Polylines/Polygone interpretiert werden sollen: -fill solid: Polygone sind stets geschlossen, d.h. der letzte Punkt eines Polygones ist identisch mit dem ersten. Die Flaecheninhalte der Polygone werden mit individuellen Farben gefuellt. (Das ist die Default-Fuelleinstellung). Der 'sort' Parameter sollte in diesem Fall nicht 'min' sein, da die groesseren Polygone die kleineren ueberdecken und verstecken wuerden. -fill line: Es werden Polylines mit individuellen Farben erzeugt. Die Polylines sind nicht geschlossen. Dies ist die bevorzugte Einstellung wenn die Output-Datei fuer einen Plotter bestimmt ist. Der Plotter-Stift wird keine Farben ueber- einander zeichnen. Das 'Layout' haengt vom Sortierparameter 'sort' ab. Mit den Parametern 'reduce' und 'smooth' koennen Sie nochmals das Ergebnis der Vektorisierung verfeinern. -fill contour: Wie bei '-fill solid', jedoch wird das Innere der Polygone nicht gefuellt. Linien mit unterschiedlicher Farbe koennen sich evtl. ueberdecken. Das 'Layout' haengt vom Sortier- parameter 'sort' ab. Die Sortier-Parameter geben an, in welcher Reihenfolge die Vektoren in der Output-Datei erscheinen: -sort nosort: Vektoren werden nicht sortiert. Konturen oder Linien mit unterschiedlichen Farben koennen sich ueberdecken, die inneren Gebiete der Vektoren jedoch nicht. -sort max: Dieser Parameter haengt von der Einstellung des Parameters 'fill' ab: Beim Fuelltyp 'solid' werden die Polygone nach der Groesse der umschlossenen Flaeche sortiert. Beim Typ 'line' oder 'contour' wird nach der Laenge der Vektoren sortiert. Die Sortierreihenfolge ist vom Maximum zum Minimum. Das ist die Default-Einstellung. -sort min: Wie bei '-sort min', jedoch ist die Sortierreihenfolge vom Minimum zum Maximum. Diese Einstellung ergibt nur einen Sinn, wenn der Fuelltyp nicht auf 'solid' eingestellt ist. -grit N: Mit diesem Parameter kann man angeben, ob kleine Details bei der Vektorisierung erfasst werden sollen, oder nicht. Polygone oder Polylines die eine Flaeche mit weniger als N Pixels umfassen, werden 'weggefiltert'. Der Defaultwert fuer 'grit' haengt von den Dimensionen und der Farbtiefe des Bildes ab. Bei -grit 0 findet keine Filterung statt. Die Benutzung eines Wertes N > 0 vergroessert die Rechen- zeit und vergroessert auch erheblich den RAM Speicherbedarf. Wenn Sie sparsam mit Speicher umgehen muessen sollten Sie fuer -grit den Wert 0 und fuer -quantize einen kleineren Wert waehlen. -overlapp: Bei der Angabe dieses Parameters ueberlappen sich die erzeugten Vektoren geringfuegig (um genau ein Pixel). Der Defaultwert ist 'keine Ueberlappung'. Falls Vektorgraphiken, nachdem sie gedreht worden sind, schwarze oder andersfarbige Luecken aufweisen sollten, (besonders entlang den Grenzlinien benachbarter Polygone) dann sollten Sie diesen Parameter angeben. Die 'reduce'-Parameter geben an, ob alle die Punkte eines Vektors, die auf einer Geraden liegen, durch zwei Punkte (den Start- und den Endpunkt des Geradenabschnittes) ersetzt (= reduziert) werden. Das verringert die Groesse der Ausgabedatei. Da Geraden horizontal, vertikal oder schraeg liegen koennen, haben wir folgende Moeglichkeiten: -reduce orthogonal:gerade horizontale und vertikale Vektorabschnitte werden reduziert. Das ist der Default-Wert. -reduce all: Alle geraden Abschnitte (auch die schraeg liegenden) werden reduziert. Bei dieser Parameterwahl koennen gelegentlich kleine Luecken im Layout erscheinen. -reduce off: Vektoren werden, auch wenn sie Geradenabschnitte enthalten, nicht reduziert. Der einzige Fall, in dem man evtl. diese Einstellung waehlen wird, ist, wenn man die Geschwindigkeit eines Plotterstiftes entlang langer Geradenabschnitte herab- setzen moechte. -quantize N: Die Inputdatei wird vor Beginn der Vektorisierung auf N Farben quantisiert (falls diese mehr als N Farben enthalten sollte). Der Defaultwert ist 256 Farben. Die Format-Parameter geben das gewuenschte Output-Format an: -format wmf: Output-Format ist Windows Metafile Format -format amf: Output-Format ist Windows Metafile (ALDUS-Typ, Default) -format emf: Output-Format ist Enhanced Windows Metafile Format -format ps: Output-Format ist Postscript Level 2 -format eps: Output-Format ist Encapsulated Postscript Level 2 -format dxf: Output-Format ist AutoCad DXF (nur Linien, Farbe: schwarz) -format hpgl: Output-Format ist HPGL (Fuer Plotters, nur Linien) Die 'resolution'-Parameter haben Einfluss auf die interne Auswertung: -resolution low: Sehr kleine Details koennen verloren gehen (Default) -resolution high: Alle Details koennen erfasst werden (braucht mehr Speicher) -black: Output-Farbe ist immer schwarz Auf die folgenden Parameter haben nur registrierte Benutzer Zugriff: KVEC bietet die Moeglichkeit, einen progressiven Bildaufbau zu erzeugen. Der Ausdruck 'progressiv' bedeutet, dass das Bild aus zwei aufeinander folgenden Ebenen (einem 'groben' Bild ohne Details und einem 'feinem' Bild, das nur Datails enthaelt) aufgebaut wird. Die beiden Ebenen folgen in dieser Reihenfolge beim Zeichnen. Diese Art des Bildaufbaues ist sehr robust gegen alle Arten von Rotationen, Dehnungen oder lokalen Deformationen. Die Unter- schiede dieser beiden Ebenen in Bezug auf Farbquantisierung und dem 'grit'- Wert werden durch den 'colorfactor' und dem 'gritfactor' ausgedrueckt. -progressive gritfactor N: Erzeugt ein progressives Bild aus zwei Ebenen Die erste Ebene hat einen mit N multiplizierten 'grit'-Wert -progressive colorfactor N: Erzeugt ein progressives Bild aus zwei Ebenen Die erste Ebene hat einen durch N dividierten 'quantize'-Wert -delta N: Das ist die maximal erlaubte Farbabweichung zwischen der ersten Ebene (dem 'rohen' Bild und der zweiten Ebene (dem 'Detail'-Bild). Die 'Detail-Ebene enthaelt eine Vektor- darstellung nur jener Gebiete, die eine Farbabweichung von mehr als N Einheiten zur 1.ten Ebene aufweisen. -subimage N: Waehlt das Bild Nr. N in einer Graphik-Datei aus, die mehr als ein Bild enthaelt (Tiff oder OS/2 Bitmaps) -lossless: Die Vektorisierung soll ohne Informationsverlust erfolgen. Die Angabe dieser Option kann enorme Speicheranforderungen zur Folge haben. Diese Option ist identisch mit der Einstellung: -resolution high -grit 0 -reduce orth. -quantize (Unendlich) Die Debug-Parameter geben den Grad (d.h. die Ausfuehrlichkeit) des Debug-Outputs an. Debug-Output bedeutet, dass ein Protokoll ueber den Fort- schritt der Vektorisierung auf dem Bildschirm ausgegeben wird. (Grosses N bedeutet ausfuehrliches Protokoll, kleines N ein sparsames Protokoll. -debug N: Erzeugt Protokoll-Ausgabe level N (1-8) (Default: Debug ausgeschaltet) -debug all: Erzeugt sehr ausfuehrliches Protokoll -smooth: Glaettung von Polylines und Polygonen. Das Programm versucht, Vektoren zu glaetten. Diese Einstellung ist mit einem gewissen Bild-Informationsverlust verbunden. Default: ausgeschaltet. -vcolor R G B: Diese Option kann benutzt werden, um aus einem Bild bestimmte Bereiche, naemlich die mit den RGB- Farbkomponenten R,G,B, 'herauszuholen'. Die Vektor- Outputdatei wird nur Bereiche mit dieser Farbe enthalten. Die Werte fuer R,G,B koennen zwischen 0 und 255 liegen. Die neueste Version von KVEC und eine aktuelle Preisliste ist stets verfuegbar in folgender Mailbox: (+49 961 61455) V32bis (+49 961 6340838) ISDN