mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 09:41:38 +08:00
Using usleep rather than waitkey
This commit is contained in:
@@ -154,7 +154,7 @@ int main( int argc, const char** argv )
|
|||||||
while (cap.read(frame))
|
while (cap.read(frame))
|
||||||
{
|
{
|
||||||
detectandshow(&alpr, frame, "", outputJson);
|
detectandshow(&alpr, frame, "", outputJson);
|
||||||
cv::waitKey(1);
|
usleep(1000);
|
||||||
framenum++;
|
framenum++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -177,7 +177,8 @@ int main( int argc, const char** argv )
|
|||||||
detectandshow( &alpr, latestFrame, "", outputJson);
|
detectandshow( &alpr, latestFrame, "", outputJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
cv::waitKey(10);
|
// Sleep 10ms
|
||||||
|
usleep(10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
videoBuffer.disconnect();
|
videoBuffer.disconnect();
|
||||||
@@ -205,7 +206,7 @@ int main( int argc, const char** argv )
|
|||||||
|
|
||||||
detectandshow( &alpr, frame, "", outputJson);
|
detectandshow( &alpr, frame, "", outputJson);
|
||||||
//create a 1ms delay
|
//create a 1ms delay
|
||||||
cv::waitKey(1);
|
usleep(1000);
|
||||||
framenum++;
|
framenum++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -146,7 +146,9 @@ AlprFullDetails AlprImpl::recognizeFullDetails(cv::Mat img)
|
|||||||
|
|
||||||
|
|
||||||
displayImage(config, "Main Image", img);
|
displayImage(config, "Main Image", img);
|
||||||
cv::waitKey(1);
|
|
||||||
|
// Sleep 1ms
|
||||||
|
usleep(1000);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user