get_nvds_buf_Surface: Currently we only support RGBA/RGB color Format

dGPU
DS7

Getting this error for the following sequence in a probe placed at the sink pad of an NVDOSD instance:

get_nvds_buf_Surface: Currently we only support RGBA/RGB color Format

This is the code (literally 1:1 copied from here deepstream_python_apps/apps/deepstream-imagedata-multistream/deepstream_imagedata-multistream.py at 216ce3a08a61566cb3abcffdc0ddae30a57eb6b0 · NVIDIA-AI-IOT/deepstream_python_apps · GitHub

      n_frame = pyds.get_nvds_buf_surface(hash(gst_buffer), frame_meta.batch_id)
      rect_params = obj_meta.rect_params
      frame_copy = np.array(n_frame, copy=True, order='C')
      frame_copy = cv2.cvtColor(frame_copy, cv2.COLOR_RGBA2BGRA)
      top = int(rect_params['top'])
      left = int(rect_params['left'])
      width = int(rect_params['width'])
      height = int(rect_params['height'])
      cropped_frame = frame_copy[top:top + height, left:left + width]
      cv2.imwrite('./test.jpg', cropped_frame)

I mean I have a basic understanding of what this error could mean, but no idea, how to tackle this.

OK, got a hint here RuntimeError: get_nvds_buf_Surface: Currently we only support RGBA color Format - #6 by isaac-223

and after a second view to the sample I see the conversion.

Sorry for the late reply, Is this still an DeepStream issue to support? Thanks!

Yes, it’s solved. I somehow opened two issues and solved that in the other Accessing nvds_buf_surface - #5 by foreverneilyoung

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.