From 9a2358628b284c7422e845a81d6c4b2f13b3661b Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Mon, 16 Jan 2012 13:22:28 +0000 Subject: [PATCH] minor fix --- samples/gpu/optical_flow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/gpu/optical_flow.cpp b/samples/gpu/optical_flow.cpp index 0549f7bc6d..92b476bce4 100644 --- a/samples/gpu/optical_flow.cpp +++ b/samples/gpu/optical_flow.cpp @@ -208,7 +208,7 @@ int main(int argc, const char* argv[]) while (true) { - int key = toupper(waitKey(10)); + int key = toupper(waitKey(10) & 0xff); switch (key) { @@ -282,6 +282,7 @@ void getFlowField(const Mat& u, const Mat& v, Mat& flowField) const float* ptr_u = u.ptr(i); const float* ptr_v = v.ptr(i); + Vec4b* row = flowField.ptr(i); for (int j = 0; j < flowField.cols; ++j)