I’m using a consumer thread to acquire video images using the IFrameConsumer
interface. Here is a brief code snippet:
bool videoCamera::threadExecute() {
const unsigned int plane = 0;
const std::string capturedVideoFrames = "Captured video frames";
const auto *iStream = Argus::interface_cast<Argus::IEGLOutputStream>(m_stream);
const auto *iEglOutputStream = Argus::interface_cast<Argus::IEGLOutputStream>(m_stream);
const Argus::Size2D streamResolution = iEglOutputStream->getResolution();
// Wait until the producer has connected to the stream.
if (iStream->waitUntilConnected() != Argus::STATUS_OK)
ORIGINATE_ERROR("Stream failed to connect.");
// Continue until this thread is terminated.
auto *iFrameConsumer = Argus::interface_cast<EGLStream::IFrameConsumer>(m_consumer);
while (true) {
// The absence of a frame indicates this thread has been terminated.
Argus::UniqueObj<EGLStream::Frame> frame(iFrameConsumer->acquireFrame());
if (!frame) {
break;
}
// Create an IFrame interface to gain access to the Image in the Frame.
auto *iFrame = Argus::interface_cast<EGLStream::IFrame>(frame);
if (!iFrame) {
ORIGINATE_ERROR("Failed to get IFrame interface.");
}
...
}
return true;
}
Is it possible to obtain the camera metadata associated with each frame and/or image? I need information such as the exposure time and gain that were used when the image was captured by the camera. It appears that only the IEventCaptureComplete
interface provides this information (via the getMetadata()
method), but that API appears to be incompatible with the interface I’m using.
Thanks!