hi,
I want to know how to get the image data frome tegra_multimedia_api samples ,and convert the image date to opencv Mat.
// Acquire a frame.
UniqueObj<Frame> frame(iFrameConsumers[i]->acquireFrame());
IFrame *iFrame = interface_cast<IFrame>(frame);
if (!iFrame)
break;
// Get the IImageNativeBuffer extension interface.
NV::IImageNativeBuffer *iNativeBuffer =
interface_cast<NV::IImageNativeBuffer>(iFrame->getImage());
if (!iNativeBuffer)
ORIGINATE_ERROR("IImageNativeBuffer not supported by Image.");
thess are the code to get the image ,but how to get the format and size of the image ,then conver to opencv Mat?
Hi,
Please run with ‘–disable-jpg’.
The JPEG encoder does not expect RGBA buffers so you need to disable it.
Also please try ‘export DISPLAY=:1’ and check if you can get information via ‘xrandr’.