| Home | | | Quick start | | | Cookbook | | | All symbols | | | Analytical index | | | Namespaces | | | Syntax | | | Statements | | | CX | | | Frequency | | | Functions | | | Examples | | | Examples by command |
File, image, video, CSV and acquisition input/output helpers.
Symbols in this namespace: 71
| Symbol | Kind | Category | Description |
|---|---|---|---|
IO.ABS_PATH | Function | File and path functions | Returns the absolute version of a path. |
IO.APPEND_TEXT | Function | File and path functions | Appends UTF-8 text to a file and returns TRUE on success. |
IO.BASE_NAME | Function | File and path functions | File name without the final extension. |
IO.CAMERA_GET | Function | File / media IO statements | Reads an OpenCV VideoCapture property and assigns the numeric value. |
IO.CAMERA_GET | Function | File and path functions | Reads an OpenCV VideoCapture property and assigns the numeric value. |
IO.CAMERA_IS_OPEN | Function | File and path functions | Returns TRUE when the selected camera index is currently open inside the script runtime. |
IO.CAMERA_PROP_ID | Function | File and path functions | Returns the numeric OpenCV CAP_PROP id for a known friendly property name, or -1 if unknown. |
IO.CAMERA_PROPS | Function | File / media IO statements | Returns a diagnostic table with columns: name, OpenCV property id, current value, writable flag. |
IO.CAMERA_PROPS | Function | File and path functions | Returns a diagnostic table with columns: name, OpenCV property id, current value, writable flag. |
IO.CAMERA_RELEASE | Command | File / media IO statements | Releases an opened camera handle. Use this when a script has finished acquiring frames. |
IO.CAMERA_SET | Command | File / media IO statements | Sets an OpenCV VideoCapture property. Property can be a friendly name such as FPS, WIDTH, HEIGHT, EXPOSURE or GAIN, quoted or bare. |
IO.CANONICAL_PATH | Function | File and path functions | Returns the canonical existing path with symlinks resolved when possible. |
IO.CAPTURE_FRAME | Command | File / media IO statements | Captures one BGR frame from a camera. The camera is opened lazily and kept open for following captures until IO.CAMERA_RELEASE is called. |
IO.CLEAR_ERROR | Function | File and path functions | Clears the stored non-fatal runtime error and returns TRUE. |
IO.COPY_FILE | Function | File and path functions | Copies a file and returns TRUE on success. |
IO.CSV_COLS | Function | File and path functions | Returns the number of columns in a CSV/text table. |
IO.CSV_COLUMN | Function | File and path functions | Returns one selected CSV column as newline-separated text. The selector may be a header name or a zero-based index. |
IO.CSV_COLUMN_ARRAY | Function | File and path functions | Loads a selected CSV column into a script array. Pass numeric=TRUE to force numeric conversion. |
IO.CSV_FIELD | Function | File and path functions | Returns one CSV cell as text. The field selector may be a header name or a zero-based column index. |
IO.CSV_HEADERS | Function | File and path functions | Returns available CSV field names as newline-separated text. If no header exists, synthetic Column N names are returned. |
IO.CSV_INFO | Function | File and path functions | Analyzes and loads a CSV/text table using auto-detected delimiter and header by default, then returns a diagnostic text summary. |
IO.CSV_NUMBER | Function | File and path functions | Returns one CSV cell parsed as a flexible number, supporting decimal comma and decimal point. |
IO.CSV_ROWS | Function | File and path functions | Returns the number of data rows in a CSV/text table. |
IO.CSV_TABLE_ARRAY | Function | File and path functions | Loads the whole CSV data table into a two-dimensional script array. |
IO.CURRENT_DIR | Function | File and path functions | Returns the current working directory. |
IO.DIR_EXISTS | Function | File and path functions | TRUE if a path exists and is a directory. |
IO.DIR_LIST | Function | File and path functions | Returns a newline-separated directory listing. |
IO.DIR_NAME | Function | File and path functions | Parent directory component of a path. |
IO.EXT | Function | File and path functions | Final file extension without the dot. |
IO.FCLOSE | Function | File and path functions | Closes a file handle and returns TRUE on success. |
IO.FEOF | Function | File and path functions | Returns TRUE when the file handle is invalid or at end-of-file. |
IO.FFLUSH | Function | File and path functions | Flushes pending writes on an open file handle. |
IO.FILE_EXISTS | Function | File and path functions | TRUE if a path exists and is a file. |
IO.FILE_NAME | Function | File and path functions | Final file or directory name component. |
IO.FILE_SIZE | Function | File and path functions | Size in bytes, or -1 when unavailable. |
IO.FOPEN | Function | File and path functions | Opens a file and returns a numeric runtime handle. Modes follow fopen-style strings such as r, w, a, rb, wb, r+, w+. |
IO.FPRINTF | Function | File and path functions | Writes formatted text to an open file handle using simple %s, %d, %f, %g placeholders. |
IO.FREAD | Function | File and path functions | Reads a byte block from an open file handle and returns it as text. |
IO.FREADLINE | Function | File and path functions | Reads one text line from an open file handle without the trailing newline. |
IO.FSCANF | Function | File and path functions | Reads the next whitespace-separated token, optionally converting it using %s, %d, %f or %g. |
IO.FSEEK | Function | File and path functions | Moves the current file position. Origin can be SET, CUR or END. |
IO.FTELL | Function | File and path functions | Returns the current byte position of an open file handle. |
IO.FWRITE | Function | File and path functions | Writes text/raw UTF-8 bytes to an open file handle and returns the number of bytes written. |
IO.HOME_DIR | Function | File and path functions | Returns the user's home directory. |
IO.IS_ABSOLUTE | Function | File and path functions | TRUE if the path is absolute. |
IO.LAST_ERROR | Function | File and path functions | Returns the last non-fatal runtime error text, currently set by IO.TRY_LOAD and IO.TRY_LOAD_WITH_META. |
IO.LAST_ERROR_LINE | Function | File and path functions | Returns the source line associated with IO.LAST_ERROR(), or -1 when unavailable. |
IO.LOAD | Command | File / media IO statements | Loads an image, a FITS image/stack, a TIFF/TIFF stack, or a video; videos, multipage TIFF files and multi-HDU FITS files become in-memory stacks. |
IO.LOAD_WITH_META | Function | File / media IO statements | Loads an image/stack and applies the optional path.cvbmeta sidecar when present. |
IO.LOAD_WITH_META | Function | File and path functions | Loads an image/stack and applies the optional path.cvbmeta sidecar when present. |
IO.META_PATH | Function | File and path functions | Returns the metadata sidecar path used by IO.SAVE_WITH_META. |
IO.MKDIR | Function | File and path functions | Creates a single directory level and returns TRUE on success. |
IO.MKPATH | Function | File and path functions | Creates a directory tree and returns TRUE on success. |
IO.MOVE_FILE | Function | File and path functions | Moves or renames a file and returns TRUE on success. |
IO.PATH_EXISTS | Function | File and path functions | TRUE if a path exists. |
IO.PATH_JOIN | Function | File and path functions | Joins a base path and a child component. |
IO.READ_CSV_ARRAY | Function | File and path functions | Reads a CSV written by IO.WRITE_CSV_ARRAY, preserving 1D/2D shape when the #CVB_ARRAY header is present. |
IO.READ_TEXT | Function | File and path functions | Reads a text file as UTF-8, returning an empty string on failure. |
IO.REMOVE_DIR | Function | File and path functions | Removes an empty directory and returns TRUE on success. |
IO.REMOVE_DIR_TREE | Function | File and path functions | Removes a directory tree recursively and returns TRUE on success. |
IO.REMOVE_FILE | Function | File and path functions | Deletes a file and returns TRUE on success. |
IO.SAVE | Command | File / media IO statements | Saves a single image to common image formats, or saves a stack to multipage TIFF when the target extension is .tif/.tiff. |
IO.SAVE_WITH_META | Command | File / media IO statements | Saves an image or stack and writes a path.cvbmeta sidecar containing ROI state and user metadata. |
IO.TEMP_DIR | Function | File and path functions | Returns the system temporary directory. |
IO.TRY_LOAD | Function | File / media IO statements | Loads an image/stack/video without stopping the script on failure. On failure the destination becomes NULL and IO.LAST_ERROR() contains the reason. |
IO.TRY_LOAD | Function | File and path functions | Loads an image/stack/video without stopping the script on failure. On failure the destination becomes NULL and IO.LAST_ERROR() contains the reason. |
IO.TRY_LOAD_WITH_META | Function | File / media IO statements | Non-fatal variant of IO.LOAD_WITH_META. It restores metadata when possible, otherwise stores the reason in IO.LAST_ERROR(). |
IO.TRY_LOAD_WITH_META | Function | File and path functions | Non-fatal variant of IO.LOAD_WITH_META. It restores metadata when possible, otherwise stores the reason in IO.LAST_ERROR(). |
IO.WRITE_CSV_ARRAY | Function | File and path functions | Writes a 1D/2D array to CSV with a small #CVB_ARRAY shape header and returns TRUE. |
IO.WRITE_TEXT | Function | File and path functions | Writes UTF-8 text to a file and returns TRUE on success. |
IO.WRITE_VIDEO | Command | File / media IO statements | Writes a stack as an AVI/MJPG video. |
IO.ABS_PATH(path)
Returns the absolute version of a path.
value = IO.ABS_PATH(path)IO.APPEND_TEXT(path,text)
Appends UTF-8 text to a file and returns TRUE on success.
value = IO.APPEND_TEXT(path,text)IO.BASE_NAME(path)
File name without the final extension.
value = IO.BASE_NAME(path)IO.CAMERA_GET cameraIndex, property AS value
Reads an OpenCV VideoCapture property and assigns the numeric value.
IO.CAMERA_GET 0, FPS AS fps
PRINT fpsIO.CAMERA_GET cameraIndex, property AS value
Reads an OpenCV VideoCapture property and assigns the numeric value.
IO.CAMERA_GET 0, FPS AS fps
PRINT fpsIO.CAMERA_IS_OPEN([cameraIndex])
Returns TRUE when the selected camera index is currently open inside the script runtime.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
cameraIndex | Optional parameter. If omitted, the command uses its internal default. |
PRINT IO.CAMERA_IS_OPEN(0)IO.CAMERA_PROP_ID(property)
Returns the numeric OpenCV CAP_PROP id for a known friendly property name, or -1 if unknown.
PRINT IO.CAMERA_PROP_ID("EXPOSURE")IO.CAMERA_PROPS [cameraIndex] AS table
Returns a diagnostic table with columns: name, OpenCV property id, current value, writable flag.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
cameraIndex | Optional parameter. If omitted, the command uses its internal default. |
IO.CAMERA_PROPS 0 AS props
PRINT ARRAY.DIMSIZE(props, 0)IO.CAMERA_PROPS [cameraIndex] AS table
Returns a diagnostic table with columns: name, OpenCV property id, current value, writable flag.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
cameraIndex | Optional parameter. If omitted, the command uses its internal default. |
IO.CAMERA_PROPS 0 AS props
PRINT ARRAY.DIMSIZE(props, 0)IO.CAMERA_RELEASE [cameraIndex]
Releases an opened camera handle. Use this when a script has finished acquiring frames.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
cameraIndex | Optional parameter. If omitted, the command uses its internal default. |
IO.CAMERA_RELEASE 0IO.CAMERA_SET cameraIndex, property, value
Sets an OpenCV VideoCapture property. Property can be a friendly name such as FPS, WIDTH, HEIGHT, EXPOSURE or GAIN, quoted or bare.
IO.CAMERA_SET 0, WIDTH, 1280
IO.CAMERA_SET 0, HEIGHT, 720
IO.CAMERA_SET 0, FPS, 30IO.CANONICAL_PATH(path)
Returns the canonical existing path with symlinks resolved when possible.
value = IO.CANONICAL_PATH(path)IO.CAPTURE_FRAME [cameraIndex] AS img
Captures one BGR frame from a camera. The camera is opened lazily and kept open for following captures until IO.CAMERA_RELEASE is called.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
cameraIndex | Optional parameter. If omitted, the command uses its internal default. |
IO.CAPTURE_FRAME 0 AS frame
GUI.SHOW frameIO.CLEAR_ERROR()
Clears the stored non-fatal runtime error and returns TRUE.
ok = IO.CLEAR_ERROR()IO.COPY_FILE(source,target[,overwrite])
Copies a file and returns TRUE on success.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
overwrite | Optional parameter. If omitted, the command uses its internal default. |
value = IO.COPY_FILE(source,target[,overwrite])IO.CSV_COLS(path [, header [, delimiter]])
Returns the number of columns in a CSV/text table.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
header | CSV header policy, usually AUTO, TRUE or FALSE. |
delimiter | CSV delimiter override; omit it for auto-detection where supported. |
n = IO.CSV_COLS("measurements.csv")IO.CSV_COLUMN(path, field [, header [, delimiter]])
Returns one selected CSV column as newline-separated text. The selector may be a header name or a zero-based index.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
header | CSV header policy, usually AUTO, TRUE or FALSE. |
delimiter | CSV delimiter override; omit it for auto-detection where supported. |
values = IO.CSV_COLUMN("measurements.csv", "temperature")IO.CSV_COLUMN_ARRAY(path, field [, header [, numeric [, delimiter]]])
Loads a selected CSV column into a script array. Pass numeric=TRUE to force numeric conversion.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
header | CSV header policy, usually AUTO, TRUE or FALSE. |
numeric | When true, forces numeric conversion of CSV values. |
delimiter | CSV delimiter override; omit it for auto-detection where supported. |
temps = IO.CSV_COLUMN_ARRAY("measurements.csv", "temperature", "AUTO", TRUE)IO.CSV_FIELD(path, row, field [, header [, delimiter]])
Returns one CSV cell as text. The field selector may be a header name or a zero-based column index.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
header | CSV header policy, usually AUTO, TRUE or FALSE. |
delimiter | CSV delimiter override; omit it for auto-detection where supported. |
v = IO.CSV_FIELD("measurements.csv", 0, "temperature")IO.CSV_HEADERS(path [, header [, delimiter]])
Returns available CSV field names as newline-separated text. If no header exists, synthetic Column N names are returned.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
header | CSV header policy, usually AUTO, TRUE or FALSE. |
delimiter | CSV delimiter override; omit it for auto-detection where supported. |
PRINT IO.CSV_HEADERS("measurements.csv")IO.CSV_INFO(path [, header [, delimiter]])
Analyzes and loads a CSV/text table using auto-detected delimiter and header by default, then returns a diagnostic text summary.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
header | CSV header policy, usually AUTO, TRUE or FALSE. |
delimiter | CSV delimiter override; omit it for auto-detection where supported. |
PRINT IO.CSV_INFO("measurements.csv")IO.CSV_NUMBER(path, row, field [, header [, delimiter]])
Returns one CSV cell parsed as a flexible number, supporting decimal comma and decimal point.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
header | CSV header policy, usually AUTO, TRUE or FALSE. |
delimiter | CSV delimiter override; omit it for auto-detection where supported. |
t = IO.CSV_NUMBER("measurements.csv", 0, "temperature")IO.CSV_ROWS(path [, header [, delimiter]])
Returns the number of data rows in a CSV/text table.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
header | CSV header policy, usually AUTO, TRUE or FALSE. |
delimiter | CSV delimiter override; omit it for auto-detection where supported. |
n = IO.CSV_ROWS("measurements.csv")IO.CSV_TABLE_ARRAY(path [, header [, numeric [, delimiter]]])
Loads the whole CSV data table into a two-dimensional script array.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
header | CSV header policy, usually AUTO, TRUE or FALSE. |
numeric | When true, forces numeric conversion of CSV values. |
delimiter | CSV delimiter override; omit it for auto-detection where supported. |
table = IO.CSV_TABLE_ARRAY("measurements.csv", "AUTO", TRUE)IO.CURRENT_DIR()
Returns the current working directory.
value = IO.CURRENT_DIR()IO.DIR_EXISTS(path)
TRUE if a path exists and is a directory.
value = IO.DIR_EXISTS(path)IO.DIR_LIST(path[,pattern[,mode]])
Returns a newline-separated directory listing.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
pattern | Optional parameter. If omitted, the command uses its internal default. |
mode | Mode selector; accepted values are described in the command text. |
value = IO.DIR_LIST(path[,pattern[,mode]])IO.DIR_NAME(path)
Parent directory component of a path.
value = IO.DIR_NAME(path)IO.EXT(path)
Final file extension without the dot.
value = IO.EXT(path)IO.FCLOSE(handle)
Closes a file handle and returns TRUE on success.
value = IO.FCLOSE(handle)IO.FEOF(handle)
Returns TRUE when the file handle is invalid or at end-of-file.
value = IO.FEOF(handle)IO.FFLUSH(handle)
Flushes pending writes on an open file handle.
value = IO.FFLUSH(handle)IO.FILE_EXISTS(path)
TRUE if a path exists and is a file.
value = IO.FILE_EXISTS(path)IO.FILE_NAME(path)
Final file or directory name component.
value = IO.FILE_NAME(path)IO.FILE_SIZE(path)
Size in bytes, or -1 when unavailable.
value = IO.FILE_SIZE(path)IO.FOPEN(path[,mode])
Opens a file and returns a numeric runtime handle. Modes follow fopen-style strings such as r, w, a, rb, wb, r+, w+.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
mode | Mode selector; accepted values are described in the command text. |
value = IO.FOPEN(path[,mode])IO.FPRINTF(handle,format[,v1[,v2...v8]])
Writes formatted text to an open file handle using simple %s, %d, %f, %g placeholders.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
v1 | Optional parameter. If omitted, the command uses its internal default. |
v2 | Optional parameter. If omitted, the command uses its internal default. |
v8 | Optional parameter. If omitted, the command uses its internal default. |
value = IO.FPRINTF(handle,format[,v1[,v2...v8]])IO.FREAD(handle,byteCount)
Reads a byte block from an open file handle and returns it as text.
value = IO.FREAD(handle,byteCount)IO.FREADLINE(handle)
Reads one text line from an open file handle without the trailing newline.
value = IO.FREADLINE(handle)IO.FSCANF(handle[,format])
Reads the next whitespace-separated token, optionally converting it using %s, %d, %f or %g.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
format | Optional parameter. If omitted, the command uses its internal default. |
value = IO.FSCANF(handle[,format])IO.FSEEK(handle,offset[,origin])
Moves the current file position. Origin can be SET, CUR or END.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
origin | Optional parameter. If omitted, the command uses its internal default. |
value = IO.FSEEK(handle,offset[,origin])IO.FTELL(handle)
Returns the current byte position of an open file handle.
value = IO.FTELL(handle)IO.FWRITE(handle,value)
Writes text/raw UTF-8 bytes to an open file handle and returns the number of bytes written.
value = IO.FWRITE(handle,value)IO.HOME_DIR()
Returns the user's home directory.
value = IO.HOME_DIR()IO.IS_ABSOLUTE(path)
TRUE if the path is absolute.
value = IO.IS_ABSOLUTE(path)IO.LAST_ERROR()
Returns the last non-fatal runtime error text, currently set by IO.TRY_LOAD and IO.TRY_LOAD_WITH_META.
PRINT IO.LAST_ERROR()IO.LAST_ERROR_LINE()
Returns the source line associated with IO.LAST_ERROR(), or -1 when unavailable.
PRINT IO.LAST_ERROR_LINE()IO.LOAD pathExpr AS variable // images, OT RAW, FITS, TIFF stacks, video
Loads an image, a FITS image/stack, a TIFF/TIFF stack, or a video; videos, multipage TIFF files and multi-HDU FITS files become in-memory stacks.
IO.LOAD pathExpr AS variable // images, OT RAW, FITS, TIFF stacks, videoIO.LOAD_WITH_META path AS image
Loads an image/stack and applies the optional path.cvbmeta sidecar when present.
IO.LOAD_WITH_META "out.png" AS img2IO.LOAD_WITH_META path AS image
Loads an image/stack and applies the optional path.cvbmeta sidecar when present.
IO.LOAD_WITH_META "out.png" AS img2IO.META_PATH(mediaPath)
Returns the metadata sidecar path used by IO.SAVE_WITH_META.
sidecar = IO.META_PATH("out.png")IO.MKDIR(path)
Creates a single directory level and returns TRUE on success.
value = IO.MKDIR(path)IO.MKPATH(path)
Creates a directory tree and returns TRUE on success.
value = IO.MKPATH(path)IO.MOVE_FILE(source,target[,overwrite])
Moves or renames a file and returns TRUE on success.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
overwrite | Optional parameter. If omitted, the command uses its internal default. |
value = IO.MOVE_FILE(source,target[,overwrite])IO.PATH_EXISTS(path)
TRUE if a path exists.
value = IO.PATH_EXISTS(path)IO.PATH_JOIN(base,child)
Joins a base path and a child component.
value = IO.PATH_JOIN(base,child)IO.READ_CSV_ARRAY(path [, numeric [, delimiter]])
Reads a CSV written by IO.WRITE_CSV_ARRAY, preserving 1D/2D shape when the #CVB_ARRAY header is present.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
numeric | When true, forces numeric conversion of CSV values. |
delimiter | CSV delimiter override; omit it for auto-detection where supported. |
b = IO.READ_CSV_ARRAY("array.csv", TRUE)IO.READ_TEXT(path)
Reads a text file as UTF-8, returning an empty string on failure.
value = IO.READ_TEXT(path)IO.REMOVE_DIR(path)
Removes an empty directory and returns TRUE on success.
value = IO.REMOVE_DIR(path)IO.REMOVE_DIR_TREE(path)
Removes a directory tree recursively and returns TRUE on success.
value = IO.REMOVE_DIR_TREE(path)IO.REMOVE_FILE(path)
Deletes a file and returns TRUE on success.
value = IO.REMOVE_FILE(path)IO.SAVE media, path
Saves a single image to common image formats, or saves a stack to multipage TIFF when the target extension is .tif/.tiff.
IO.SAVEIO.SAVE_WITH_META media, path
Saves an image or stack and writes a path.cvbmeta sidecar containing ROI state and user metadata.
IO.SAVE_WITH_META img, "out.png"IO.TEMP_DIR()
Returns the system temporary directory.
value = IO.TEMP_DIR()IO.TRY_LOAD path AS image
Loads an image/stack/video without stopping the script on failure. On failure the destination becomes NULL and IO.LAST_ERROR() contains the reason.
IO.TRY_LOAD "input.png" AS img
IF NOT CV.IS_VALID(img) THEN
PRINT "Load failed: "; IO.LAST_ERROR()
EXIT
ENDIFIO.TRY_LOAD path AS image
Loads an image/stack/video without stopping the script on failure. On failure the destination becomes NULL and IO.LAST_ERROR() contains the reason.
IO.TRY_LOAD "input.png" AS img
IF NOT CV.IS_VALID(img) THEN
PRINT "Load failed: "; IO.LAST_ERROR()
EXIT
ENDIFIO.TRY_LOAD_WITH_META path AS image
Non-fatal variant of IO.LOAD_WITH_META. It restores metadata when possible, otherwise stores the reason in IO.LAST_ERROR().
IO.TRY_LOAD_WITH_META "out.png" AS img2
ASSERT CV.IS_VALID(img2), IO.LAST_ERROR()IO.TRY_LOAD_WITH_META path AS image
Non-fatal variant of IO.LOAD_WITH_META. It restores metadata when possible, otherwise stores the reason in IO.LAST_ERROR().
IO.TRY_LOAD_WITH_META "out.png" AS img2
ASSERT CV.IS_VALID(img2), IO.LAST_ERROR()IO.WRITE_CSV_ARRAY(path, array [, delimiter])
Writes a 1D/2D array to CSV with a small #CVB_ARRAY shape header and returns TRUE.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
delimiter | CSV delimiter override; omit it for auto-detection where supported. |
ok = IO.WRITE_CSV_ARRAY("array.csv", a)IO.WRITE_TEXT(path,text)
Writes UTF-8 text to a file and returns TRUE on success.
value = IO.WRITE_TEXT(path,text)IO.WRITE_VIDEO stack, path [, fps]
Writes a stack as an AVI/MJPG video.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
fps | Optional parameter. If omitted, the command uses its internal default. |
IO.WRITE_VIDEO