Hi,
I want to calibrate my Ip cam using calibration sample but I have got some latency 1 s when I run program and when I start calibration sometime 10s (ten seconds!).
I have write this small program and try to understand what happen :
Mat view0;
for(i = 0;i<tps.size();i++)
{
if( capture.isOpened() )
{
tps[i] = getTickCount();
while (!capture.grab());
capture.retrieve(view0);
//view0.copyTo(view);
}
}
for(i = 1;i<tps.size();i++)
{
cout << (tps[i] - tps[i-1])/getTickFrequency() << "\n";
}
and it gives me these results : 22 values like 0.04s (first images) and after 0.852972s and many values like 0.5s (when buffer is empty?)
I understand that MJPG is a flow and you have to read all flow to have last image. Is it right?
Is it possible to flush flow before reading?
Thanks for yours answers