(This option is not available on the Freeware version)
WinTopo Pro can operate unattended by starting from the command line, and specifying how it should process an image by supplying command line options.
This can be useful for batch processing a number of rasters in a single operation, because more than one raster file can be supplied on the command line.
It is also useful for third-party developers who want to incorporate WinTopo Pro's abilities into their own applications.
This table shows the options which can be specified on the command line, any values that the options can take, and their ranges...
Option | Description | Optional Parameters | Parameter Range | Default Parameters |
Perform Stentiford Thinning on the raster | - | - | - | |
Perform Zhang Suen Thinning on the raster | - | - | - | |
Perform Best Combination Thinning on the raster | - | - | - | |
Perform One-Touch Thinning on the raster. This will perform whichever thinning operation was last set in the One-Touch Vectorise Options window. | - | - | - | |
Perform Simple Edge Detection on the raster | - | - | - | |
Perform Canny Edge Detection on the raster | s is the gaussian Standard deviation parameter. h is the High threshold parameter. l is the Low threshold parameter. If the parameters are not present then the defaults are used. | s = 1.0 to 5.0 h = 0 to 100 l = 0 to 100 |
Same as |
|
Perform Advanced Edge Detection on the raster | Size of objects to be considered for hollowing | 1 up to the width/height of the image | 10 | |
Change the Brightness of the raster image | Brightness enhancement | -255 to 255 | 128 (50%) | |
Change the Contrast of the raster image. | Contrast enhancement | -255 to 255 | 128 (50%) | |
Enhance the raster Gamma. | Gamma enhancement. The Gamma value is usually specified as a floating point number between 0.1 and about 5.0. | 0.1 to 5.0 | 1.2 | |
Convert the raster image colours to their negative values (swap black/white) | - | - | - | |
Convert the raster image colours to greyscale. | - | - | - | |
Despeckle the raster image | Maximum speckle size to remove | 1 up to the width/height of the image | 1 | |
Fill holes in the raster image | Maximum hole size to fill | 1 up to the width/height of the image | 1 | |
Prune thin side branches from line edges within the raster image | Maximum branch length (in pixels) to remove | 1 upwards | 1 | |
Heal a broken or dithered raster image | Minimum number of dark neighbours a light pixel should have to be considered for healing | 2 to 8 | 8 | |
Erode pixels from the image | Minimum number of light neighbours a dark pixel should have to be considered for erosion | 2 to 8 | 8 | |
Specify the colour to be considered as the image background | r is the red intensity of the colour. g is the green intensity of the colour. b is the blue intensity of the colour | r = 0 to 255 g = 0 to 255 b = 0 to 255 |
Same as |
|
Specify the tolerance for the colour to be considered as the image background (see |
The tolerance value | 0 to 255 | Same as |
|
Specify the colour to be used for the Upper bound of the Threshold operation. See |
r is the red intensity of the colour. g is the green intensity of the colour. b is the blue intensity of the colour | r = 0 to 255 g = 0 to 255 b = 0 to 255 |
0:0:0 (black) | |
Specify the colour to be used for the Lower bound of the Threshold operation. See |
r is the red intensity of the colour. g is the green intensity of the colour. b is the blue intensity of the colour | r = 0 to 255 g = 0 to 255 b = 0 to 255 |
0:0:0 (black) | |
Perform the colour Threshold operation using the Upper and Lower bounds set with the previous |
Whether to use the Keep or Remove function of the Threshold operation. | 0=Remove or 1=Keep | 1 (Keep) | |
Specify the Hue, Saturation, Value or Luminance to be used for the High bound of the Threshold HSV/HSL operation. See |
h is the hue of the colour. s is the saturation of the colour. v is the HSV value parameter, or the HSL luminance of the colour | h = 0.0 to 360.0 s = 0.0 to 100.0 v = 0.0 to 100.0 |
360:100:100 | |
Specify the Hue, Saturation, Value or Luminance to be used for the Low bound of the Threshold HSV/HSL operation. See |
h is the hue of the colour. s is the saturation of the colour. v is the HSV value parameter, or the HSL luminance of the colour | h = 0.0 to 360.0 s = 0.0 to 100.0 v = 0.0 to 100.0 |
0:0:0 | |
Perform the HSV Threshold operation using the High and Low bounds set with the previous |
Whether to use the Keep or Remove function of the Threshold operation. | 0=Remove or 1=Keep | 1 (Keep) | |
Perform the HSL Threshold operation using the High and Low bounds set with the previous |
Whether to use the Keep or Remove function of the Threshold operation. | 0=Remove or 1=Keep | 1 (Keep) | |
Reduce the image resolution by half. This will produce an image with ¼ of the pixels, and so greatly reduce the memory requirement for processing. | - | - | - | |
Rotate the image. | n is the rotation angle in degrees. Negative angles are anti-clockwise and positive angles are clockwise | -180.0 to 180.0 degrees | 90 degrees clockwise | |
Set the number of colours in the image palette. It is usually used to decrease the number of colours in the image, and determines the subsequent bit depth of the image. | n is the required number of colours for the image. A value over 256 will result in a non-paletted (24 bit depth/full colour) image that has only the requested number of distinct colours. |
1 to 65535 | If the image has more than 256 colours then 256. Otherwise, if the image has more than 16 colours then 16. Otherwise, if the image has more than 2 colours then 2. |
|
Resize the image to a thumbnail size. This can be useful if you need to create small thumbnail representations of your images, for example, to display on a website or a catalogue. The produced image does not have to be small (like a thumbnail). This option can be used to resize the image to any new size. The resulting image will always be 24 bit depth (full colour) even if the original was less. |
n is the size in pixels for the thumbnail. If n is positive then it represents the length of the longest side of the image (this would be the height of a portrait image, or the width of a landscape image), and the resulting image will be the same aspect ratio as the original. If n is negative then the new image will be square at the given pixel size, with the top and bottom clipped off from a portrait image, or the sides clipped off from a landscape image. |
any non-zero integer | 100 | |
Pause automated processing and allow the user to manually perform any other image processing functions.
Automated processing is resumed when the user selects the |
If the parameter is given as 0 (zero) then no explanatory message is shown upon pausing | 0 or 1 | 1 | |
Use DXF format when saving the vector drawing. (This is the default output format) | - | - | - | |
Use ArcView ShapeFile (.SHP) format when saving the vector drawing | - | - | - | |
Use MapInfo (.MIF) format when saving the vector drawing | - | - | - | |
Use r2v ARC (.ARC) format when saving the vector drawing | - | - | - | |
Use Ascii X,Y,Z (.ASC) format when saving the vector drawing | - | - | - | |
Use WinTopo Text (.TXT) format when saving the vector drawing | - | - | - | |
Use GenaMap (.DI) format when saving the vector drawing | - | - | - | |
Use Adobe Portable Document Format (.PDF) format when saving the vector drawing | - | - | - | |
Invoke the TWAIN image acquisition option to allow the raster to be scanned directly from a TWAIN device (for example, a scanner) | The full path name to give to the scanned image, which will be used by the |
Any valid folder and file name
(for example, |
The default is that the acquired image has no name and will invoke the |
|
Get the raster image from the Clipboard. You will need to have used another application to Copy an image onto the Clipboard. | The full path name to give to the image, which will be used by the |
Any valid folder and file name
(for example, |
The default is that the image has no name and will invoke the |
|
Set the scale for the vector output by defining the size of 1 raster pixel. For example, if you know the image to have been scanned at 100dpi and you want the vector drawing to be output in units of inches, then use -scale:0.01 (i.e. 1/100th). Or, if you want a 100dpi image to be output in units of millimetres then use -scale:0.254 (because there are 25.4 millimetres in one inch) | n is the vector size of 1 raster pixel. Optionally m can be given to specify the scale in the y-axis different to n for the x-axis |
Any numeric values | 1.0 | |
Set the resolution of the raster image. | n is the number of image pixels per inch. | Any positive integral value | 100 | |
Apply an offset to the coordinate values of the output vector drawing | x is the offset in the direction of the x axis. y is the offset in the direction of the y axis. |
Any numeric values | 0.0:0.0 | |
This option causes WinTopo Pro to look for a .ctl file, and import the control points, and apply the calculated georeferencing to the vector drawing. Up to 200 control points may be used. | filename is a file which contains control point information. | Any valid folder and file name
(for example, |
By default WinTopo Pro will look for a .ctl file of the same name as the loaded raster file, except with a .ctl name extension | |
Do not show the initial splash window when WinTopo Pro starts up. | - | - | - | |
Do not show the WinTopo main window. This can be useful for third party applications which want to vectorise a file without being obscured on screen by the WinTopo window.
The WinTopo splash image is still shown as well as the progress status windows, unless suppressed by the |
- | - | - | |
Do not show the progress meter status windows during processing of options.
This can be useful for third party applications which want to completely hide WinTopo when converting an image, when used in conjuction with the |
- | - | - | |
Use either standard (fast) or high image display quality. | n indicates which display option is desired. | 0 = Standard fast image display 1 = Highest quality image display |
Standard fast image display is used as default | |
Do not perform the default vectorisation and do not save a vector file. Without this option the raster file will always be vectorised. This option is useful when you only want to convert the raster to another format (for example from TIF to PNG), or you only want to use the raster processing options and re-save the image. | - | - | - | |
Output the raster image as a BMP file. The file name will be the same as the original loaded raster file, except that the file extension is changed to .bmp.
This option can be used with |
- | - | - | |
Output the raster image as a TIF file. The file name will be the same as the original loaded raster file, except that the file extension is changed to .tif.
This option can be used with |
If n is given (and not zero) then WinTopo Pro will use the Jpeg compression algorithm within the TIF file, rather than a lossless compression. n is the Jpeg compression factor to use (75 is a common value) NOTE: the Jpeg compression will only be used if the image is 24 bit colour depth. |
0 to 100 A larger number represent less compression. A smaller number represents greater compression and smaller file size. |
0 (do not use Jpeg compression) | |
Output the raster image as a PNG file. The file name will be the same as the original loaded raster file, except that the file extension is changed to .png.
This option can be used with |
- | - | - | |
Output the raster image as a JPG file. The file name will be the same as the original loaded raster file, except that the file extension is changed to .jpg.
This option can be used with |
n is the JPEG quality / compression factor | 0 to 100 0 is least quality (smallest file size) and 100 is greatest quality (larger file size) |
75 | |
Save output files to the specified location instead of the same folder as the input file. This is particularly useful when the input files are in a read-only location, for instance, a CDROM. | path is the folder location for the output files. | Any valid folder (for example, c:\images or \\server\path) | By default an output file is saved in the same folder as the input file it came from. | |
Save output files to the specified location instead of the same folder as the input file.
This is like -oFolder except that it only affects subsequent output options on the commandline (whereas -oFolder affects all output files even if it is the last option on the commandline). You can have multiple -oSetFolder options on a single commandline to output different files to different folders. |
path is the folder location for the output files. | Any valid folder (for example, c:\images or \\server\path) | By default an output file is saved in the same folder as the input file it came from. |
The options are performed in the order in which they appear on the command line. There must be at least one option for WinTopo Pro to run in unattented mode. If only raster file names are given, WinTopo Pro will start up and display the images, then wait for the user to work interactively.
The file names of raster image files can be specified after the options, before the options, or interspersed between them - it does not matter. All the options will be performed on all the raster images.
Examples
Topo.exe -tST c:\scans\image1.tif
This would start up WinTopo Pro, load the raster file called image1 in the folder c:\scans, perform Stentiford Thinning, then extract the vectors and save as the DXF file image1.dxf in the same folder, and then close down WinTopo Pro. DXF is the default vector output format, when none is explicitly specified.
Topo.exe -eED -tBC -oSHP c:\scans\image1.tif
In this example, the same raster file is loaded, but this time it is processed first with Simple Edge Detection, then Best Combination Thinning, the vectors are extracted and the result is saved as the ArcView Shapefile image1.shp.
Topo.exe -bri:-60 -con:255 -des:4 -pru:5 c:\scans\image1.tif c:\scans\image2.tif
In this example, image1.tif will be loaded and processed by reducing the brightness by -60, increasing the contrast to maximum, despeckling to remove speckles up to 4 pixels wide, pruning branches up to 5 pixels long, then Stentiford Thinning will be performed (the default when no thinning method is given), the vectors will be extracted and the results saved as a DXF file of the same name stem. Then image1.tif will be closed and the same process will be repeated for image2.tif.
Topo.exe -acquire
The above example will allow the use of the scanner interface to scan and import a raster image, perform the default vectorisation and save the DXF results as a file called .dxf in the current folder.
Related Topics: