summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/module
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-03-20 10:25:20 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-03-20 10:25:26 +0100
commit3921bf36d40ed83bb0690f24b0b480ed618f1a88 (patch)
tree8a61e436e0d867ebe4130bd77d3dbc2d3594069c /tracker-pt/module
parent67108c8ffe71a78d8f548510f36d1d63c512befd (diff)
tracker/pt: get rid of magic constant
Diffstat (limited to 'tracker-pt/module')
-rw-r--r--tracker-pt/module/camera.cpp3
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;
}