Argus,Open CV,RGB image

Hi,

I am trying to get an RGB image on my Qt window using Argus.

int fd = iNativeBuffer->createNvBuffer(iEglOutputStreams[0]->getResolution(), NvBufferColorFormat_YUV420, NvBufferLayout_Pitch);

void *pdata = NULL;

NvBufferParams params;

NvBufferGetParams(fd, &params);

NvBufferMemMap(fd, 0, NvBufferMem_Read, &pdata);

NvBufferMemSyncForCpu(fd, 0, &pdata);

I followed the above steps but it only results in getting the Y component of the YUV420 image on my window and looks to be a grayscale.I am aware of using Open Cv to perform the conversion to RGB but it takes 3 milli seconds and won’t fit our optimisation goals.

Can proper guidance be given to get the RGB image from the createNvBuffer() function as I am aware of the Color format NvBufferColorFormat_ARGB32 but I am not able to use it properly as the appropriate step should be given in the OpenCV Mat or the QImage to get the proper image.

Thanks in Advance!

Have reference to /usr/src/jetson_multimedia_api/samples/unittest_samples/transform_unit_sample this sample code.

Also reference to below topic.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.