The Argus cudaHistogram sample shows a way to move images quickly from the camera into the GPU, but it only can act on the luminance channel.
From what I can tell, the cuGraphicsResourceGetMappedEglFrame gives you a pointer to a something that wants to be turned into to a 2d surface. Because this sample code works
CUDA_RESOURCE_DESC cudaResourceDesc; memset(&cudaResourceDesc, 0, sizeof(cudaResourceDesc)); cudaResourceDesc.resType = CU_RESOURCE_TYPE_ARRAY; cudaResourceDesc.res.array.hArray = cudaEGLFrame.frame.pArray; CUsurfObject cudaSurfObj = 0; cuResult = cuSurfObjectCreate(&cudaSurfObj, &cudaResourceDesc);
But change that pArray to pArray to try to get at the color information and it stops working.
How can one convert that CUeglFrame into a straightforward array of integers so that you can do some calculations on it?