Functions
The image processing algorithms are encapsulated in functions. More complex algorithms have been implemented as function blocks and can be found at ImageProcessing.
Structure of a function call
Functions are structured as follows:
hr | Status variable of the type HRESULT. The execution status of every function can be followed with this. |
Parameter <...> | Function parameters essentially fulfill the following purpose:
|
Optional parameter <...> | These parameters are initialized with default values, so the specification is optional. |
Grouping of functions
All functions of the TwinCAT Vision library are sorted thematically into the following groups:
Images
- Basic Image Operations
- Algebraic Image Operations
- Image Segmentation
- Image Color and Contrast Processing
- Image Analysis
- Image Filtering
Container
Contours
Measurement
Code quality
Code reading
Optical character recognition (OCR)
Drawing and text
Machine Learning
Advanced Functions
Miscellaneous
Expert functions
Expert versions exist for many functions. These contain additional parameters and are identified in the PLC library by the name suffix "Exp
". In C++, these additional parameters are assigned default values and can be omitted when called if not required.
Runtime behavior
The execution duration of some image processing algorithms depends on their parameterization and also the image content. It is therefore not deterministic. In order to guarantee real-time behavior despite that, watchdogs can be applied to these functions or function groups that abort the functions after a specified time.
WARNING | |
TwinCAT crash when functions are used incorrectly If some functions are used incorrectly, this can lead to errors (and to resulting TwinCAT crashes). These are not intercepted within the function, as corresponding checks would considerably lengthen the execution time. Therefore, you must take care to use the functions properly! For example, we recommend carrying out a validation of the input parameters. |
- License Overview
- Algebraic Container Operations
- Algebraic Image Operations
- Basic Container Operations
- Basic Image Operations
- Code Quality
- Code Reading
- Container Statistics
- Contour Analysis
- Control Functions
- Drawing
- Fourier Analysis
- Geometric and Coordinate Transformations
- Image Analysis
- Image Color and Contrast Processing
- Image Filtering
- Image Segmentation
- Keypoint Features
- Machine Learning
- Measurement
- Miscellaneous
- OCR
- Texture Analysis