Hi,
I am writing a simple application on jetson orin using the latest VPI (3.2).
The application is loading video image data as cv::Mat and passing it to VPI for further processing. I’m unclear on details of how to do it properly.
I see there are two methods:
- lockImageData and vpiImageDataImportOpenCVMat
- vpiImageSetWrappedOpenCVMat
Which one is preferred, is there difference at all? The documentation seems to be unclear on it.
Another question, looking at the examples (VPI - Vision Programming Interface: Pyramidal LK Optical Flow), they tend to use vpiImageSetWrappedOpenCVMat and load data into a VPI wrapped cv::Mat without locking the VpiImage that is wrapping the cv::Mat. Is this safe to do? As I understand, when writing to cv::Mat that is wrapped the wrapper should be locked to block async access to the image when writing.
Thanks!