Get pitched eglframes than array

Hi,

Is it possible to get camera frames captured on PX2 as pitched memory instead of CUarray so we can get raw device pointer instead?

I’m calling the following two APIs to get camera frames in cuda egl pipeline:
cuEGLStreamConsumerAcquireFrame
cuGraphicsResourceGetMappedEglFrame

There seems to be with no option to specify that I want the frame to be saved in pitched memory when receiving CUeglFrame?

Dear cjluo,
Did you check using DWImageStreamer instead of EGLStream. It is wrapper over EGLStream which simplifies ImageFrame transfer across NVMedia/CUDA/GL.

Does DWImageStreamer support pitched memory?

Dear @cjluo,
Yes. you can get dwImageCUDA object and can read the image data from that structure.

Is it possible to get camera frames captured on PX2 as pitched memory

If you are looking to get CUDA Image buffers corresponding to captured images, you can take a look at object detector sample in DW. It feeds the live camera data to DNN as a CUDA buffer for processing.

Thanks Siva. Unfortunately my PX2 is still on old release (4.1.8) and we cannot upgrade to 5.0 above due to camera compatibility. Is it possible to get camera frame as pitched memory using EglStream?

Dear @cjluo,
I want the frame to be saved in pitched memory when receiving CUeglFrame?

That is not possible. Once you receive the frame on CUDA consumer, the frameType parameter will indicate whether it is pitch linear or block. Accordingly you need to read data from pPitch or pArray pointers. Please check
https://docs.nvidia.com/cuda/cuda-runtime-api/structcudaEglFrame.html#structcudaEglFrame

I see. Thanks for the confirmation