How to get RGB Sensor Data with Argus library

For my progect, We need to get ARGB Data(processed by ISP WhiteBalance)
I’m learnning some argus sample yuvJpeg/useAutoWhiteBalance/oneShot,
But I still not know how to get camera sensor RGB Sensor data with argus api.
It is better if you can provide us more sample code?

HI 27653276,
The output Frames from Argus API is EGLImage and currently supports only YUV420 output. You may have to convert the EGLImage to NvBuffer in order to get the processed frame in ARGB format.

You can refer this link for reference to get processed frames.

There are other samples available which can also help you understand.
Refer 13_multicamera and 09_camera_jpeg_capture samples inside tegra_multimedia_api/samples.

You may have to choose the following NvBufferColorFormat:


Thank you very much for your kindly help!

I’m refer to 09_camera_jpeg_capture samples to learn how to get ARGB format data from YCbCr420

// Get the IImageNativeBuffer extension interface.
NV::IImageNativeBuffer *iNativeBuffer =
if (!iNativeBuffer)
ORIGINATE_ERROR(“IImageNativeBuffer not supported by Image.”);

    // If we don't already have a buffer, create one from this image.
    // Otherwise, just blit to our buffer.
    if (m_dmabuf == -1)
        m_dmabuf = iNativeBuffer->createNvBuffer(iStream->getResolution(),
        if (m_dmabuf == -1)
            CONSUMER_PRINT("\tFailed to create NvBuffer\n");
    else if (iNativeBuffer->copyToNvBuffer(m_dmabuf) != STATUS_OK)
        ORIGINATE_ERROR("Failed to copy frame to NvBuffer.");

    // Process frame.
    processV4L2Fd(m_dmabuf, iFrame->getNumber());

   the 'm_dmabuf' is one handle for NvBuffer  
   My question is how to get the CPU data pointer for finial ARGB Data from NvBuffer.
   Are there any document or sample how to access NvBuffer?


Hi Martin,
You need to know the plane sizes and copy accordingly to a pointer using memcpy. Kindly check these two forum threads. They can help you on how to access the CPU pointer from NvBuffers.