Hi,
I’m trying to get the (EBD) data that is produced by a sensor using Lib Argus , a couple of posts pointed that it should be possible:
*https://devtalk.nvidia.com/default/topic/1030163/embedded-metadata-ebd-for-mipi-csi2-on-tx1/#5242706
*https://devtalk.nvidia.com/default/topic/1026113/jetson-tx1/obtain-information-from-raw-buffer-when-using-nvcamerasrc/post/5219504/
I’m quite sure I got the configuration on the DTB right by setting the variable on the mode with the amount of bytes that that will be generated:
embedded_metadata_height = "1";
So my current block is accessing that data using LibArgus; I actually haven’t been able to find a explicit example on how to get to the specific interfaces. Using argus_camera I have been able to check that the extension to get that data SensorPrivateMetadata is supported (this information was provided by the stdout logs of the argus_camera application):
Argus extensions:
BayerSharpnessMap: supported
DebugCaptureSession: supported
DeFog: supported
FaceDetect: supported
InternalFrameCount: supported
SensorPrivateMetadata: supported
According to the documentation there are a couple of objects and interfaces available for either gathering information about the EBD support or accessing the actual data. According to my understanding :
a -ISensorPrivateMetadataCaps : Interface used to query the availability and size in bytes of sensor private metadata. Should be accessible from the CameraDevice.
b -ISensorPrivateMetadata: Interface used to access sensor private metadata. Should be accesible from the container for metadata generated by a single completed capture; the object CaptureMetadata generated after a IEventCaptureComplete event.
c -SensorPrivateMetadata: This data is metadata that the sensor embeds inside the frame, the type and formating of which depends on the sensor. It is up to the user to correctly parse the data based on the specifics of the sensor used. Should be accessible from the CameraDevice.
Given this information ; I tried the following;
1- I tried to get the ISensorPrivateMetadataCaps from cameraDevice:
std::vector<CameraDevice*> cameraDevices;
EXIT_IF_NOT_OK(iCameraProvider->getCameraDevices(&cameraDevices),
"Failed to get camera devices");
EXIT_IF_NULL(cameraDevices.size(), "No camera devices available");
if (cameraDevices.size() <= options.cameraIndex)
{
printf("Camera device specified on the command line is not available\n"); //I don't see this error, execution continues properly
return EXIT_FAILURE;
}
/*Sensor metadata Caps*/
const Ext::ISensorPrivateMetadataCaps *ISensorMetadataCap =
interface_cast<const Ext::ISensorPrivateMetadataCaps>(cameraDevices[options.cameraIndex]);
if(!ISensorMetadataCap)
{
printf( "Failed to get ISensorPrivateMetadata Caps Interface\n"); //I get this message , which means the returned object is NULL
}
2- I tried to get the ISensorPrivateMetadata from CaptureMetadata after a captured event
const Event* event = iQueue->getEvent(iQueue->getSize() - 1);
const IEventCaptureComplete *iEventCaptureComplete
= interface_cast<const IEventCaptureComplete>(event);
EXIT_IF_NULL(iEventCaptureComplete, "Failed to get EventCaptureComplete Interface"); //I don't see this error, execution continues properly
const CaptureMetadata *metaData = iEventCaptureComplete->getMetadata();
const ICaptureMetadata* iMetadata = interface_cast<const ICaptureMetadata>(metaData);
EXIT_IF_NULL(iMetadata, "Failed to get CaptureMetadata Interface"); //I don't see this error, execution continues properly
/*Sensor metadata Interface*/
const Ext::ISensorPrivateMetadata *ISensorMetadata =
interface_cast<const Ext::ISensorPrivateMetadata>(metaData);
if(!ISensorMetadata)
{
printf( "Failed to get ISensorPrivateMetadata Interface\n");//I get this message , which means the returned object is NULL
}
No luck so far , on both cases trying to access the Metadata interfaces return a NULL pointer. Any hints , recommendations or pointers to an example on how to get the actual metadata will be gladly appreciated.
Best Regards,
JJ