How to use the cv2.imshow() function with DeepStream SDK 5.0
I’ve heard that you can now access image data directly from DeepStream SDK 5.0.
Via pyds.get_nvds_buf_surface() we have confirmed that the image can be handled by OpenCV.
n_frame=pyds.get_nvds_buf_surface(hash(gst_buffer),frame_meta.batch_id)
frame_image=np.array(n_frame,copy=True,order='C')
#covert the array into cv2 default color format
print("ffs")
frame_image=cv2.cvtColor(frame_image,cv2.COLOR_RGBA2BGRA)
frame_image=draw_bounding_boxes(frame_image,obj_meta,obj_meta.confidence)
But I want the result to appear on the screen after processing in OpenCV.
So I want to use cv2.imshow(), but it stops at the cv2.waitKey(1) part.
Is there a way to display the results of processing in OpenCV?
Translated with www.DeepL.com/Translator (free version)