WinTopo Pro Command Line Operation
WinTopo Pro Command Line Operation
WinTopo Pro Command Line Operation
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
-tST
-tZS
-tBC
-tOT
-eED
-eCN:s:h:l
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
Image->Set
Canny's
Paramters...
option. System
defaults are
4:5:3
-eAD:n
Size of objects to be
considered for hollowing
1 up to the
width/height of the
image
10
Brightness enhancement
-255 to 255
128 (50%)
-bri:n
-con:n
-gam:n
image.
Contrast enhancement
-255 to 255
128 (50%)
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
-neg
-gre
-des:n
1 up to the
width/height of the
image
-fil:n
1 up to the
width/height of the
image
1 upwards
2 to 8
2 to 8
r = 0 to 255
g = 0 to 255
b = 0 to 255
Same as
Image->Identify
Background
Pixels...
option. System
defaults are
170:170:170
0 to 255
Same as
Image->Identify
Background
Pixels...
option. System
default is 20
-thrU:r:g:b
r = 0 to 255
g = 0 to 255
b = 0 to 255
0:0:0 (black)
-thrL:r:g:b
r = 0 to 255
g = 0 to 255
b = 0 to 255
0:0:0 (black)
-pru:n
-hea:n
-ero:n
-bac:r:g:b
-bacT:n
0=Remove or
1=Keep
1 (Keep)
-hsvH:h:s:v
h = 0.0 to 360.0
s = 0.0 to 100.0
v = 0.0 to 100.0
360:100:100
-hsvL:h:s:v
h = 0.0 to 360.0
s = 0.0 to 100.0
v = 0.0 to 100.0
0:0:0
-hsv:n
0=Remove or
1=Keep
1 (Keep)
-hsl:n
0=Remove or
1=Keep
1 (Keep)
-180.0 to 180.0
degrees
90 degrees
clockwise
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.
-thr:n
-dpi
-rot:n
-pal:n
If n is positive then it
represents the length of
the longest side of the
image (this would be the
-thumb:n
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.
100
-user:n
0 or 1
-oDXF
-oSHP
-oMIF
-oARC
-oASC
-oTXT
-oDI
-oPDF
The default is
that the
acquired
image has no
name and will
invoke the
Save Image As
dialog if the
Save Image
option is used.
The default is
-paste:filename
-scale:n:m
1.0
-setDPI:n
100
-offset:x:y
0.0:0.0
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
-ctl:filename
-nosplash
-noshow
-nostatus
0 = Standard fast
Standard fast
-viewQ:n
image display
1 = Highest quality
image display
image display
is used as
default
-noV
0 to 100
A larger number
represent less
compression. A
smaller number
represents greater
compression and
smaller file size.
0 to 100
0 is least quality
(smallest file size)
and 100 is greatest
quality (larger file
size)
75
By default an
output file is
saved in the
same folder as
the input file it
came from.
-oBMP
-oTIF:n
-oPNG
-oJPG:n
-oFolder:path
By default an
output file is
-oSetFolder:path
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:
Batch Processing
Save the Vector Drawing
Contents Page