Saving m_dmabuf into OpenCV Mat Object in 09_camera_jpeg_capture example

I’m trying to get a better understanding of how to use the libargus library so I started to go through the 09_camera_jpeg_capture example.

The end goal is to save the captured image data into a OpenCV Mat object so I can do various image processing on said frames, but I’m very confused on how to do just that.

What I do understand is that in the bool ConsumerThread::threadExecute() function is where the actual frames are being captured and in the bool CaptureConsumerThread::processV4L2Fd(int32_t fd, uint64_t frameNumber) is where the captured frames are being written to a file.

What I’m really confused about is where exactly between those two functions should I be ‘properly’ saving the image data as an OpenCV Mat object and where to display the captured image; I know it’s already being done with EGL but I want to display the captured images for a sanity check, using cv::imshow().

Please refer to this patch for mapping NvBuffer to cv::Mat:
NVBuffer (FD) to opencv Mat - #6 by DaneLLL

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