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, ¶ms);
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!