Hello,
I am using a digital trigger to take pictures of a moving transport belt with products, I set the trigger up as in the example:
//ext trigger
camRgb->initialControl.setFrameSyncMode(dai::CameraControl::FrameSyncMode::INPUT);
camRgb->initialControl.setExternalTrigger(4, 3);
How can I retreive only the last taken image? Using the following code results in two images per trigger:
int LuxonisCam::Get_img(Mat& Color, Mat& Depth) {
auto inRgb = qRgb->get<dai::ImgFrame>();
auto inDepth = qDepth->get<dai::ImgFrame>();
if (inDepth && inRgb) {
Color = inRgb->getCvFrame();
Depth = inDepth->getCvFrame();
rotate(Color, Color, ROTATE_180);
rotate(Depth, Depth, ROTATE_180);
return 1;
}
return 0;
}
Thanks,
Pim