I faced the following error while trying to create a RGB image :
Driveworks exception thrown: DW_FAILURE: Image: imageAttributesToNvMediaSurfaceType, Invalid image pixel format.
[2021-07-18 22:47:07] DW Error DW_FAILURE executing DW function:
dwImage_create(&mHandle_NVMrgb, rgbaImageProperties, mSdk)
What I have tried:
dwImageProperties rgbaImageProperties{};
// In order to stream we prepare the properties of the image
CHECK_DW_ERROR(dwSensorCamera_getImageProperties(&rgbaImageProperties, DW_CAMERA_OUTPUT_NATIVE_PROCESSED, mCamera));
rgbaImageProperties.type = DW_IMAGE_NVMEDIA;
rgbaImageProperties.memoryLayout = DW_IMAGE_MEMORY_TYPE_DEFAULT;
rgbaImageProperties.format = DW_IMAGE_FORMAT_RGB_UINT8;
//Output image for copyconverstion from YUV to RGBA
CHECK_DW_ERROR(dwImage_create(&mHandle_NVMrgb, rgbaImageProperties, mSdk));
//copyConvertion to DW_IMAGE_FORMAT_RGB_UINT8
CHECK_DW_ERROR(dwImage_copyConvert(mHandle_NVMrgb, mHandle_NVM, mSdk));
The error is happening at dwImage_create,
My goal here is to convert the native YUV420-uint8 image to a RGB format or BGR format.
When I try with rgbaImageProperties.format = DW_IMAGE_FORMAT_RGBA_UINT8;
the CopyConversion works fine, but I dont want RGBA.
Please provide the following info (check/uncheck the boxes after clicking “+ Create Topic”):
Software Version
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other
Target Operating System
Linux
QNX
other
Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other
SDK Manager Version
1.5.0.7774
other
Host Machine Version
native Ubuntu 18.04
other