In the drive AGX orin platform, the result of converting the camera image to yuv is incorrect

Software Version
DRIVE OS 6.0.6

Target Operating System
Linux

Hardware Platform
DRIVE AGX Orin Developer Kit (not sure its number)

In the drive AGX orin platform, the result of converting the camera image to yuv is incorrect,My code looks like this:
1、Create memory for image, and create a streamer

        dwImageProperties cpuProp{};
        cpuProp.type         = DW_IMAGE_CUDA;
        cpuProp.width        = 640;
        cpuProp.height       = 480;
        cpuProp.format       = DW_IMAGE_FORMAT_YUV420_UINT8_PLANAR;
        cpuProp.memoryLayout = DW_IMAGE_MEMORY_TYPE_DEFAULT; // not necessary to specify if init with {}
        dwStatus status = dwImage_create(&m_yuvCPU, cpuProp, m_context);
        if (status != DW_SUCCESS)
        {
            logError("Cannot create m_yuvCPU: %s\n", dwGetStatusName(status));
            return false;
        }

        status = dwImageStreamer_initialize(&m_streamerCUDA2CPU, &cpuProp, DW_IMAGE_CPU, m_context);
        if (status != DW_SUCCESS)
        {
            logError("Cannot init image streamer m_streamerCUDA2CPU: %s\n", dwGetStatusName(status));
            return false;
        }

2、Convert image:

CHECK_DW_ERROR(dwSensorCamera_getImage(&m_imageRGBA, DW_CAMERA_OUTPUT_CUDA_RGBA_UINT8, m_frame));

// format convert the RGB into YUV
status = dwImage_copyConvert(m_yuvCPU, m_imageRGBA, m_context);
if (status != DW_SUCCESS)
{
	std::stringstream err;
	err << "Cannot format convert: " << dwGetStatusName(status);
	throw std::runtime_error(err.str().c_str());
}

3、post image to cpu,and save:

// post the cpu image. This will push the the image through the stream for type conversion.
status = dwImageStreamer_producerSend(m_yuvCPU, m_streamerCUDA2CPU);
if (status != DW_SUCCESS)
{
    std::stringstream err;
    err << "Cannot post m_yuvCPU in m_streamerCUDA2CPU: " << dwGetStatusName(status);
    throw std::runtime_error(err.str().c_str());
}        

dwImageHandle_t cpuImageYuv;
// receive a yuv that we can save
status = dwImageStreamer_consumerReceive(&cpuImageYuv, 1000, m_streamerCUDA2CPU);
if (status != DW_SUCCESS)
{
    std::stringstream err;
    err << "Cannot return yuv image to m_streamerCUDA2CPU: " << dwGetStatusName(status);
    throw std::runtime_error(err.str().c_str());
}

// get an image from the frame
dwImageCPU* imgCPU;
CHECK_DW_ERROR(dwImage_getCPU(&imgCPU, cpuImageYuv));

FILE* fp;
fp = fopen("/home/nvidia/test_trans.yuv", "wb");
if (!fp)
{
    std::cout << "fopen error!" << std::endl;
    return;
}
fwrite(imgCPU->data[0], imgCPU->prop.width*imgCPU->prop.height*2, 1, fp);
// fwrite(imgCUDA->dptr[0], imgCUDA->pitch*imgCUDA->prop.height, 1, fp);
std::cout << "width: " << imgCPU->prop.width << std::endl;
std::cout << "height: " << imgCPU->prop.height << std::endl;

// fwrite(pImageCpu, imgCUDA->prop.width*imgCUDA->prop.height, 1, fp);
fclose(fp);

status = dwImageStreamer_consumerReturn(&cpuImageYuv, m_streamerCUDA2CPU);
if (status != DW_SUCCESS)
{
    std::stringstream err;
    err << "Cannot return YUV image to m_streamerCUDA2CPU: " << dwGetStatusName(status);
    throw std::runtime_error(err.str().c_str());
}

status = dwImageStreamer_producerReturn(nullptr, 1000, m_streamerCUDA2CPU);
if ((status != DW_SUCCESS))
{
    std::stringstream err;
    err << "Cannot return YUV image to m_streamerCUDA2CPU: " << dwGetStatusName(status);
    throw std::runtime_error(err.str().c_str());
}

After executing the above code, the file test_trans.yuv is obtained. After viewing this file, it is found to be in the 8bpp format, and the desired result is not obtained. The yuv file I want is in yuv 420 format

test_trans.yuv (600 KB)
This is the yuv file I got. But it’s not what I expected.

Dear @TomFord,
Could you check the supported YUV image formats at DriveWorks SDK Reference: Image Interface