Hello,
We have a system that comprises of 3 IMX377 cameras.
We have developed software that captures and stores images on event from all three cameras sequentially using the Argus library.
There appears to be a problem and sometimes one of the cameras will return an image from a previous timestamp.
Is there a way to clear the frames prior to each capture ?
Here is a sample of our code in case it helps.
while(iSession->isRepeating()){
cout<<"Stuck on request wait till finish\n";
}
status = iSession->waitForIdle(7);
if(status != Argus::STATUS_OK) {
cout<<"Problem on request "<<status<<"\n";
iSession->cancelRequests();
}
uint32_t requestId = iSession->capture(request.get());
if(!requestId) {
cout<<"Failed to submit capture request\n";
return -3;
}
Argus::UniqueObj<EGLStream::Frame> frame(iFrameConsumer->acquireFrame());
EGLStream::IFrame *iFrame = Argus::interface_cast<EGLStream::IFrame>(frame);
if(!iFrame) {
cout<<"Failed to get IFrame interface\n";
return -1;
}
EGLStream::Image *image = iFrame->getImage();
if(!image) {
cout<<"Failed to get Image from iFrame->getImage()\n";
return -1;
}
EGLStream::IImageJPEG *iImageJPEG = Argus::interface_cast<EGLStream::IImageJPEG>(image);
if(!iImageJPEG) {
cout<<"Failed to get ImageJPEG Interface\n";
return -1;
}
status = iImageJPEG->writeJPEG(filename.c_str());
if(status!=Argus::STATUS_OK) {
cout<<"Failed to write JPEG\n";
return -1;
}
Ideally, I would like to purge any remaining frames at the end of this function.
Thank you in advance.