Argus ==> CUDA ==> JPEG

Hi,

I’m using Argus to capture frames from a camera and output these to an EglStream which is consumed by a CUDA consumer. (Using cudaEglStreamConsumerConnect()/cudaEglStreamConsumerAcquireFrame() from CUDA runtime API).

Further, I use CUDA to apply some treatment to the captured frames.

The next step would be to JPEG encode these altered frames, but I’m at loss on how to do that.
I was originally thinking to use NvJpegEncoder, but it requires a file descriptor for the frame which I don’t have (Or more likely I do not know how to get)

Anybody got any ideas on how I can do this ?

Hi,
Would suggest check this sample:

/usr/src/jetson_multimedia_api/samples/09_camera_jpeg_capture/

And you can call the following functions to get CUDA pointer:

NvEGLImageFromFd();
cuGraphicsEGLRegisterImage();
cuGraphicsResourceGetMappedEglFrame();

Please check HandleEGLImage() in the samples.

Hi @DaneLLL ,

Thanks for the fast reply. I’ll take a look.

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