Hi everyone, I'm exploring PyCustomBlock in Altair Twin Activate and running into some confusion around data flow and input/output port parameters.
Here's what I'm trying to do:
- Use
ReadImage
or ReadVideo
as the input source - Process the image/video in a Python block (
PyCustomBlock
) - Display the result using
ShowImage
However, I’m stuck trying to understand:
- Input Port Parameters: What row/column sizes should I configure in the Python block's element parameters to handle image/video data correctly?
- Data Format Inside Python Script: Once the data enters the script, is it a serialized stream, a 2D NumPy array, or something else entirely?
To make things more confusing, I saw an example model in the Demo Explorer using rand(4,5)
as input to PyCustomBlock, but its input port parameters are set to -1
for rows and -2
for columns. What do these values signify, and how do they affect data interpretation inside the script?
I’d greatly appreciate it if someone could clarify the recommended setup or point me to documentation that explains the data format flowing between blocks and how the port parameters tie into it.
Thanks in advance!