Whats the meaning of dw image type

Hi,
I am tracing the gmsl camera sample and find that there are four types of dw image type as below, and I have questions as below:

84 typedef enum dwImageType {
85     DW_IMAGE_CPU  = 0,
86     DW_IMAGE_GL   = 1,
87     DW_IMAGE_CUDA = 2,
88 #ifdef VIBRANTE
89     DW_IMAGE_NVMEDIA = 3,
90 #endif
91 } dwImageType;
  1. When I read topics in forum, I found someone got camera image type is DW_IMAGE_CUDA, and someone is DW_IMAGE_NVMEDIA. Does this type depends on different output type(DW_CAMERA_OUTPUT_NATIVE_PROCESSED…) set? Or the different camera has different type?

  2. In the sample, it always need to transfer to DW_IMAGE_GL to do rendering in sample window. But I try to initialize a streamer that transfer to DW_IMAGE_GL, I will get DW_NOT_AVAILABLE error. I can only init streamer with output type CPU, or CUDA. Any GL library I miss to link?

  3. I am confused about when I should use which image type? I can image that GL type for EGL render, CUDA for GPU handle this image, and NvMEDIA for nvmedia functions. But what is the CPU for? Does it means handle image in the CPU?

  4. A example for question 3, when I want to get the raw image and save to file, I don’t know what type I should use. The CPU type(dw_ImageCPU->data), NvMEDIA type(autoware sample)? or GL type to render to a file?
    Although the capture sample shows us serializing image by CUDA type.

Hi Cyan,

For any image you would need to call dwImage_create() followed by a dwImage_destroy() if not needed anymore.

The 4 four different image types are described in detail under the Documentation: Development Guide → Image Processing → Images

Basically this article is answering all your questions, so I would guess you just did not find it yet.

Please let me know if you still have questions remaining that I can help you with.

Best regards,
Fabian