diff options
Diffstat (limited to 'tracker-pt/module/camera.cpp')
-rw-r--r-- | tracker-pt/module/camera.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tracker-pt/module/camera.cpp b/tracker-pt/module/camera.cpp index 687f5bff..a17aaffb 100644 --- a/tracker-pt/module/camera.cpp +++ b/tracker-pt/module/camera.cpp @@ -138,6 +138,9 @@ bool Camera::get_frame_(cv::Mat& img) auto [ frame, ret ] = cap->get_frame(); if (ret) { + int stride = frame.stride; + if (stride == 0) + stride = cv::Mat::AUTO_STEP; img = cv::Mat(frame.height, frame.width, CV_8UC(frame.channels), (void*)frame.data, frame.stride); return true; } |