applied patches from #1005

pull/13383/head
Vadim Pisarevsky 14 years ago
parent 238b94cbf1
commit 23d211bfed
  1. 9
      modules/highgui/src/window_QT.cpp
  2. 4
      modules/python/src2/cv2.cpp

@ -42,6 +42,15 @@
#if defined(HAVE_QT)
#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 GuiReceiver *guiMainThread = NULL;

@ -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)))

Loading…
Cancel
Save