applied patches from #1005
authorVadim Pisarevsky <no@email>
Mon, 13 Jun 2011 22:04:28 +0000 (22:04 +0000)
committerVadim Pisarevsky <no@email>
Mon, 13 Jun 2011 22:04:28 +0000 (22:04 +0000)
modules/highgui/src/window_QT.cpp
modules/python/src2/cv2.cpp

index d04666b..3727a64 100755 (executable)
 #if defined(HAVE_QT)\r
 \r
 #include <window_QT.h>\r
+#include <math.h>\r
+#ifdef _WIN32\r
+#include <windows.h>\r
+#define usleep Sleep\r
+#endif\r
+\r
+#ifndef M_PI\r
+#define M_PI           3.14159265358979323846\r
+#endif\r
 \r
 //Static and global first\r
 static GuiReceiver *guiMainThread = NULL;\r
index 9737f49..447c66b 100644 (file)
@@ -525,10 +525,10 @@ template<typename _Tp> 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)))