Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » File System » SaveObject

SaveObject


Saves an object to a file.

Name Type Description
inObject T Object to be saved.
inStreamMode StreamMode Binary or text format of the file.
inFile File Input file path.

The type of this filter is defined using the type variable T which represents any valid type. Read more.

Examples

Description of usage of this filter can be found in examples and tutorial: OCR Read Number (MLP), OCR Read Number (SVM), Perspective Removal, Preparing an OCR model.

Remarks

Stream Modes
It is recommended to use the Binary stream mode for saving an object to a file as it is more efficient and works with all data types. The Text mode is more human-friendly, so it should be chosen if humans are expected to read or modify the file.
File Naming Conventions
It is recommended to name the files with the following double file extension: .<typeName>.avdata, where <typeName> is the instance type.
Working with Saved Objects
There are three ways to load the saved objects in Adaptive Vision Studio:
  • using the LoadObject filter with the same instance type,
  • using the command Load from File... from a filter input's context menu in the Program Editor (only binary files),
  • using the command Link to a File... from a filter input's context menu in the Program Editor (only binary files).
Possible Errors
  • [Io Error] Unable to open file for writing in SaveObject.
    You may have no write permission for the current working directory. If the project has not been saved yet, the working directory is typically in C:\Program Files and this message appears. Save the project to solve the problem.

Complexity Level

This filter is available on Basic Complexity Level.

See Also