Conversion and difference between DW_CAMERA_RAW_IMAGE and DW_CAMERA_PROCESSED_IMAGE

Hi,

I’m writing a code where I have to get dwImageNvMedia from camera in raw (DW_CAMERA_RAW_IMAGE) format, and convert it to dwImageNvMedia RGBA. I found an example in driveworks where they are using DW_CAMERA_PROCESSED_IMAGE from camera and converting that dwImageNvMedia directly to RGBA.

I tried to change the code to get dwImageNvMedia camera image in DW_CAMERA_RAW_IMAGE format, but if I try to convert that dwImageNvMedia to RGBA, following the example from camera_multiple_gmsl, I get NvMedia2DBlitEx: Bad surface type combination error.

Sample code:
[i]
// image properties

dwImageProperties cameraImageProperties;
dwSensorCamera_getImageProperties(&cameraImageProperties, DW_CAMERA_RAW_IMAGE, sensor);
dwImageProperties displayImageProperties = cameraImageProperties;
displayImageProperties.pxlFormat         = DW_IMAGE_RGBA;
displayImageProperties.planeCount        = 1;

// init converter!

result = dwImageFormatConverter_initialize(&raw2rgba, cameraImageProperties.type, sdk);

// init rgba dwImageNvMedia

dwImageNvMedia rgba{};
result = dwImageNvMedia_create(&rgba, &displayImageProperties, sdk);

// get image from camera and try to convert it!

result = dwSensorCamera_getImageNvMedia(&frameNVMraw, DW_CAMERA_RAW_IMAGE, frameHandle);
result = dwImageFormatConverter_copyConvertNvMedia(frameNVMrgba, frameNVMraw, raw2rgba);
  --> error (NvMedia2DBlitEx: Bad surface type combination)[/i]

Furthermore,
what’s the easiest way to change driveworks example to use DW_CAMERA_RAW_IMAGE insted of DW_CAMERA_PROCESSED_IMAGE ?

Also, is it possible to get DW_CAMERA_RAW_IMAGE from camera, convert it to YUV format and get DW_CAMERA_PROCESSED_IMAGE out of it. Like a converter between DW_CAMERA_RAW_IMAGE and DW_CAMERA_PROCESSED_IMAGE?

Thanks in advance,
Anja

Dear anja,
Duplicated. https://devtalk.nvidia.com/default/topic/1031513/driveworks/conversion-and-difference-between-dw_camera_raw_image-and-dw_camera_processed_image-/