Receiving Raw bayer image from EGLStream

Hi, I am using Jetson MMAPI codes to get some images from a camera. I could be able to use EGLStream::NV::IImageNativeBuffer to recieve yuv images and convert them to RGB, but now I need to access the raw bayer image.
I have checked the code in argus_rawBayerOutput sample and noticed usage of EGLStream::IImage2D * class and exporting the data as a headerless file into the hard disk:

EGLStream::IFrame *iBayerWithIspFrame = Argus::interface_cast<EGLStream::IFrame>(bayerWithIspFrame);
EGLStream::Image *bayerWithIspImage = iBayerWithIspFrame->getImage();
EGLStream::IImage *iBayerWithIspImage = Argus::interface_cast<EGLStream::IImage>(bayerWithIspImage);
EGLStream::IImage2D *iBayerWithIspImage2D = Argus::interface_cast<EGLStream::IImage2D>(bayerWithIspImage);
EGLStream::IImageHeaderlessFile *iBayerWithIspImageHeadelessFile =
       Argus::interface_cast<EGLStream::IImageHeaderlessFile>(bayerWithIspImage);
status = iBayerWithIspImageHeadelessFile->writeHeaderlessFile(bayerWithIspOutputFileName);
printf("Wrote bayerWithOutIsp file : %s\n", bayerWithOutIspOutputFileName);

However, I don’t need to save data like that, rather I need to have access to the Bayer data on GPU memory. As I understood, IImageHeaderlessFile can only provide CPU access for exporting the data on hard disk, not a gpu memory.

I have checked and I can have the data as EGLStream::IImage2Dbut how can I convert it to a custom array (e.g. uint16_t* ) on GPU memory for further processes?

Maybe reference to cudaBayerDemosaic for buffer transfer.

Thanks

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