From 23d211bfedfa92b0b31d34d57c883a22b0b94a68 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Mon, 13 Jun 2011 22:04:28 +0000 Subject: [PATCH] applied patches from #1005 --- modules/highgui/src/window_QT.cpp | 9 +++++++++ modules/python/src2/cv2.cpp | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/highgui/src/window_QT.cpp b/modules/highgui/src/window_QT.cpp index d04666bbd..3727a64e6 100755 --- a/modules/highgui/src/window_QT.cpp +++ b/modules/highgui/src/window_QT.cpp @@ -42,6 +42,15 @@ #if defined(HAVE_QT) #include +#include +#ifdef _WIN32 +#include +#define usleep Sleep +#endif + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif //Static and global first static GuiReceiver *guiMainThread = NULL; diff --git a/modules/python/src2/cv2.cpp b/modules/python/src2/cv2.cpp index 9737f49c3..447c66b85 100644 --- a/modules/python/src2/cv2.cpp +++ b/modules/python/src2/cv2.cpp @@ -525,10 +525,10 @@ template struct pyopencvVecConverter } if( channels > 1 ) { - if( PyArray_Check(obj)) + if( PyArray_Check(item)) { Mat src; - pyopencv_to(obj, src, name); + pyopencv_to(item, src, name); if( src.dims != 2 || src.channels() != 1 || ((src.cols != 1 || src.rows != channels) && (src.cols != channels || src.rows != 1)))