Skip to content
Snippets Groups Projects
Commit 49a2d7a4 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Specify opencv components

parent 31bb6591
No related branches found
No related tags found
1 merge request!250Resolves #309 reduce unwanted timer precision
Pipeline #20622 passed
...@@ -29,7 +29,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") ...@@ -29,7 +29,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
include(Findglog) include(Findglog)
find_package( OpenCV REQUIRED ) find_package( OpenCV REQUIRED COMPONENTS core imgproc highgui cudaimgproc calib3d imgcodecs videoio aruco cudaarithm cudastereo cudaoptflow face tracking quality)
find_package( Threads REQUIRED ) find_package( Threads REQUIRED )
find_package( URIParser REQUIRED ) find_package( URIParser REQUIRED )
find_package( MsgPack REQUIRED ) find_package( MsgPack REQUIRED )
......
...@@ -92,9 +92,9 @@ static void waitTimePoint() { ...@@ -92,9 +92,9 @@ static void waitTimePoint() {
if (hprec_) { if (hprec_) {
// Spin loop until exact grab time // Spin loop until exact grab time
//LOG(INFO) << "Spin Delay: " << (now / 40) << " = " << (40 - (now%40)); // Accurate to around 4 micro seconds.
if (sincelast != mspf) { if (sincelast != mspf) {
// TODO: Try using sleep_for for msdelay-1
target = now / mspf; target = now / mspf;
while ((now/mspf) == target) { while ((now/mspf) == target) {
_mm_pause(); // SSE2 nano pause intrinsic _mm_pause(); // SSE2 nano pause intrinsic
...@@ -102,6 +102,7 @@ static void waitTimePoint() { ...@@ -102,6 +102,7 @@ static void waitTimePoint() {
}; };
} }
} else { } else {
// Accurate to just under 1 millisecond usually
if (sincelast != mspf) sleep_for(milliseconds(msdelay)); if (sincelast != mspf) sleep_for(milliseconds(msdelay));
now = get_time(); now = get_time();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment