Hi Jerry,
Is there any way to get buffer of frame from libargus when it’s running? I saw in file Argus/Stream.h line 45 it says current only stream type STREAM_TYPE_EGL is supported. And under this type, there is a API interface called IImage::mapBuffer which can capture preview frame to cpu from EGL, is that true and can this work? And what will be the format of the buffer got by cpu with the IImage::mapBuffer ? in sample codes file yuvJpeg/main.cpp I saw the buffer got has some header bytes, seems not only frame data. And what’s the format of frame data in the buffer? Is that nv12 or something else?
Thanks
Bing
I just got some new clew: the default format is PIXEL_FMT_Ycbcr_420_888, seems be NV12 according to line 760 of file Dispatcher.cpp. but the two buffer size seems be some bigger then NV12: one is of size 2097152, another is of size: 1048576. For my 1920x1080 sensor, I think it should be size 2073600 and 2073600/2, So why the buffers’ size are some bigger?
Thanks
Bing.Yan
Suppose need alignment.
You can reference to yuvJpeg of MMAPI sample code.
Thanks @ShaneCCC ,
Could you give more details about the alignment? I want to get the valid 1920x1080 frame data from the 2097152 x 3/2 size buffer.
Thanks
Bing.Yan
I think don’t need to care the size and you can reference to the sample code to get the data from the buffer for post processing.
Thanks
Hi @ShaneCCC
I’m using opencv to process the buffer to convert the YUV data to Mat. So I need the correct frame data . Do you have any idea about other ways to convert the buffer to Mat of opencv regardless the actual size of the buffer?
Thanks
Bing.Yan
Hi,
Please refer to the patch for Jetson Nano/Jetpack 4:
NVBuffer (FD) to opencv Mat - #6 by DaneLLL
Hi @DaneLLL
Thank you so much. Your solution really helps. Now I can get Mat from preview stream of sensor and do other process freely.
Bing.Yan
Hi @DaneLLL ,
BTW, do you know how to getWbGains in 13_multicam demo? I added the getWbGains call in the demo codes and added setAwbMode(AWB_MODE_AUTO), but got all 1.0f result and no changes between frames.
Thanks
Bing.yan
Hi,
For further query, please create a new topic. We will have team check and advise.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.