OpenCVTool Forth procedures
-
Creates new raster layer and loads images in JPG, BMP, PNG, TIF, GIF formats using
WindowsCodecs. Image intensity values are normalized (scaled) into 1.
Example: s” test.png” loadimage cr
-
Saves current raster image in JPG, BMP, PNG, TIF formats. Gray scale images for
TIF and PNG formats are scaled to 0xffff and saved as 16bit integer values, other
are scaled to 255 and saves as 8bit values.
Example: s” test.png” savemage cr
-
Creates new vector layer and loads a vector file into it. File should be in DXF
or YML formats.
Example: s” coastline.yml” loadyml cr
-
Saves vector layer in YML format.
Example: s” test.yml” saveyml cr
-
Changes current raster layer into the one with the index defined. The index should
be in range (0,total_layers_number-1)
Example: 0 chnglayer cr
-
Changes current vector layer into the one with the index defined. The index should
be in range (0,total_vectors_number-1)
Example: 5 chngvec cr
-
Deletes current raster layer. The following layer if presented is made the current.
Example: dellayer drop cr
-
Deletes current vector layer. The following layer if presented is made the current.
Example: delvec drop cr
-
Deletes a contour is closest to the coordinates defined.
x = 10 y = 20
Example: 10 20 delcont cr
-
Creates eliptic polyline with defined width and heights and places it to a new layer
or adds to a current. The centers of the figure is(0;0).
w = 100, h = 200, flag = TRUE.
Example: 100 200 1 oval cr
-
Creates a rectangle with defined coordinates of the top left corner, width and height
and places it to a new layer or adds to a current.
x = 100, y = 200, w = 50, h = 50, flag = TRUE.
Example: 100 200 50 50 1 rectangle cr
-
Ôdds vertices with coordinates defined to the first contour or creates new polylineand
places it to a new layer or adds to a current layer. Sets defined closed
flag.
x =100, y = 200, close = TRUE, add = FALSE, flag = FALSE.
Example: 100 200 1 0 0 line cr
-
Rotates or moves current polygon in a current vector layer.
angle = 45°, x = 100, y = 200.
Example: 4.50e+001 100 200 rotmove cr
-
Crops current layer by the top left corner coordinates defined, width and height. All vector layers of that raster layer are also shifts on the left top by x,y.
x = 100, y = 200, w=50, h=50.
Example: 100 200 50 50 crop cr
-
Creates test label in a point with the coordinates defined and adds it to the current vector layer or a new one.
x = 100, y = 200, flag = TRUE.
Example: s” the text” 100 200 1 label cr
-
Changes a color of all polygons or text labels (depends on the flag) of currently selected vector layer.
Predefined color table has 10 colors.
color index = 7, polygon = TRUE.
Example: 7 1 veccolor cr