Wrong timestamp from libargus EGLStream::MetadataContainer

Hi,
I am using libargus(JP4.6.4) to sync two imx477. I tried to create capture session with two devices and use two EGLStream process each image separately. I aquired frame and got metadata of each image from each EGLStream by using:

// get frame
CUresult r =
        cuEGLStreamConsumerAcquireFrame(&m_connection, &m_resource, &m_stream, timeout);
cuGraphicsResourceGetMappedEglFrame(&m_frame, m_resource, 0, 0);

// Get capture meta data
UniqueObj<EGLStream::MetadataContainer> metadataContainer(
    EGLStream::MetadataContainer::create(
        EGL_NO_DISPLAY, m_iEGLOutputStream->getEGLStream()));

I let two camera capturing a same clock in the screen. I set the frame duration as 100ms(10fps) and apparently two images are not aligned because I saw the time difference in two image is larger than one frame duration(100ms or 200ms), while they have same timestamp from their metadata.
What may cause this kind of difference? How can I aligned images from two streams and get the right timestamp?

Hi,
Please refer to the patch to get timestamps of SoF and EoF:
Argus::ICaptureMetadata::getSensorTimestamp clock domain in L4T 32.4.4 - #10 by JerryChang

The Argus stack doe snot do synchronization to multiple cameras, and you may check to have hardware sync pin in the design to synchronize the cameras.

  1. Based on the above code, I obtained the frame data and metadata separately through two functions. However, how can I ensure that the frame data corresponds one-to-one with the metadata? I’m not sure how many frames and metadata entries are in your buffer. Is there a way to retrieve both the frame and its corresponding metadata simultaneously?
  2. What’s meaning of the getSensorTimestamp fom the metadata? What’s the difference between getSensorTimestamp() and getSensorEofTimestampTsc().

you may see-also Argus::ICaptureMetadata::getSensorTimestamp clock domain in L4T 32.4.4 - #8 by JerryChang

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