Class: Frame

TM NPU MicroPython

Product
SIMACTIC S7-1500 TM NPU 2.0
Language
en-US
Category
Manual

After preprocessing an image, the video pipeline returns an image of the class "frame".

Note:

Current restriction: Frame must be used as a context manager.

For example:

with vid_pipeline.read_processed() as frame:

     print("New frame! Dimensions:", frame.width(), "x", frame.height())

Frame.width() returns the width of the frame.

Frame.height() returns the height of the frame.

Frame.data() returns an ExternalBuffer object, allowing access to the raw pixel data of the frame.

Frame.release() releases the external resources held by the frame. This is automatically called when leaving the context manager.

Note:

Currently this function must not be called manually by the user.