diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-03-20 10:25:20 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-03-20 10:25:26 +0100 |
commit | 3921bf36d40ed83bb0690f24b0b480ed618f1a88 (patch) | |
tree | 8a61e436e0d867ebe4130bd77d3dbc2d3594069c /tracker-pt/module | |
parent | 67108c8ffe71a78d8f548510f36d1d63c512befd (diff) |
tracker/pt: get rid of magic constant
Diffstat (limited to 'tracker-pt/module')
-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; } |