For ibaVision to be able to import the script procedure correctly, the user needs to write a short description of the input and output parameters at the beginning of every script.
IbaVisionInterfaceVersion (string)
Specifies which version of the internal Python script parser ibaVision will use to read this script. Later versions of ibaVision might include breaking changes to the script specifications, so to avoid problems with backwards compatibility, you always need to specify an interface version for the script.
Current versions:
“1.0.0“ - Initial release
ProcedureDescriptions (List<Dict<string, object>>)
This dictionary contains the descriptions of the procedures (Name, info text, inputs and outputs) and needs to be configured correctly for each script. The following keys and values must always be included for each procedure:
“Description” - Tuple<string name, string functionName, string descriptionText>
This Python tuple contains the name of the procedure, the name of the function that will be called by ibaVision and a description text to display in the UI.
“InputsIconic” - List<Tuple<int index, string name, string descriptionText>>
This list contains tuples that describe the image inputs. The index corresponds to the position of this input in the list. The name and description text can be chosen freely.
“InputsControl” - List<Tuple<int index, string name, string descriptionText>>
This list contains tuples that describe the control inputs. The index corresponds to the position of this input in the list. The name and description text can be chosen freely.
“OutputsControl” - List<Tuple<int index, string name, string descriptionText>>
This list contains tuples that describe the control outputs. The index corresponds to the position of this input in the list. The name and description text can be chosen freely.
“OutputsIconic” - List<Tuple<int index, string name, string descriptionText>>
This list contains tuples that describe the image outputs. The index corresponds to the position of this input in the list. The name and description text can be chosen freely.
InputsControl (List<object>)
Contains the control inputs from ibaVision. The inputs are automatically updated by ibaVision for each new frame before the script procedure is called. Python types that can be set by ibaVision are
int – Converted from 8-Bit, 16-Bit, 32-Bit and 64-Bit signed and unsigned integral types
string – Converted from Technostrings
float – Converted from single and double precision floating point numbers
InputsIconic (Dict<string procedureName, List<Tuple<int width, int height, int numChannels, numpy.ndarray pixelData>>>)
Contains the image inputs provided by ibaVision. The inputs are automatically updated by ibaVision for each new frame before the script procedure is called. The index of each image corresponds to the index defined in the description for this parameter. The images are provided as a 3D Numpy array with the shape (width, height, numChannels) where width and height are the width and height of the image and numChannels is the number of channels (e.g. 3 for an RGB image or 1 for a grayscale image). The data type must be “uint8”, i. e. an unsigned byte, which results in 8 bits per pixel color depth for a grayscale image and 24 bit per pixel color depth for an RGB image.
OutputsControl (List<object>)
Contains the control outputs that will be retrieved by ibaVision after each time that the script procedure has been executed. Supported Python types are
int – Will be converted to a 64-Bit signed integer internally
string – Will be converted to a string internally
float – Will be converted to a double precision floating point number internally
OutputsIconic Dict<string procedureName, List<Tuple<int width, int height, int numChannels, numpy.ndarray pixelData>>>))
Contains the image outputs that must be set by the script procedure during each execution and before returning control back to ibaVision. The index of each image corresponds to the index defined in the description for this parameter. The images must be a 3D Numpy array with the shape (width, height, numChannels) where width and height are the width and height of the image and numChannels is the number of channels (e.g. 3 for an RGB image or 1 for a grayscale image). The data type must be “uint8”, i.e. an unsigned byte, which results in 8 bits per pixel color depth for a grayscale image and 24 bit per pixel color depth for an RGB image.
