Commit 23d211bf authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

applied patches from #1005

parent 238b94cb
...@@ -42,6 +42,15 @@ ...@@ -42,6 +42,15 @@
#if defined(HAVE_QT) #if defined(HAVE_QT)
#include <window_QT.h> #include <window_QT.h>
#include <math.h>
#ifdef _WIN32
#include <windows.h>
#define usleep Sleep
#endif
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
//Static and global first //Static and global first
static GuiReceiver *guiMainThread = NULL; static GuiReceiver *guiMainThread = NULL;
......
...@@ -525,10 +525,10 @@ template<typename _Tp> struct pyopencvVecConverter ...@@ -525,10 +525,10 @@ template<typename _Tp> struct pyopencvVecConverter
} }
if( channels > 1 ) if( channels > 1 )
{ {
if( PyArray_Check(obj)) if( PyArray_Check(item))
{ {
Mat src; Mat src;
pyopencv_to(obj, src, name); pyopencv_to(item, src, name);
if( src.dims != 2 || src.channels() != 1 || if( src.dims != 2 || src.channels() != 1 ||
((src.cols != 1 || src.rows != channels) && ((src.cols != 1 || src.rows != channels) &&
(src.cols != channels || src.rows != 1))) (src.cols != channels || src.rows != 1)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment