Read Frames

• Hardware Platform (Jetson / GPU) GTX 1650
• DeepStream Version 5
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only) 450.51
• Issue Type( questions, new requirements, bugs) question

I want to read the original frame from the input stream and draw on it with opencv. I see that deepstream-imagedata-multistream test already has the code that does that

        # Getting Image data using nvbufsurface
        # the input should be address of buffer and batch_id
        #convert python array into numy array format.
        #covert the array into cv2 default color format

But I got this error

Pipeline construction from main()

I found someone pointing to this solution, but I don’t know how to update the current code according to it.

1 Like

Which sample code are you using? Can you upload your code?

Please find the code here. I am using test with name deepstream-imagedata-multistream from python app (8.0 KB)

In your code, the tiler_sink_pad_buffer_probe() is attached to nvinfer src pad, so the color format in buf_surface is NV12 or I420 but not RGBA. Please refer to the original deepstream-imagedata-multistream script.