merged all the latest changes from 2.4 to trunk
This commit is contained in:
@@ -18,9 +18,15 @@
|
||||
#include "opencv2/video/tracking.hpp"
|
||||
#include "opencv2/video/background_segm.hpp"
|
||||
#include "opencv2/photo/photo.hpp"
|
||||
#include "opencv2/nonfree/nonfree.hpp"
|
||||
#include "opencv2/highgui/highgui.hpp"
|
||||
|
||||
#include "opencv2/opencv_modules.hpp"
|
||||
#ifdef HAVE_OPENCV_NONFREE
|
||||
#include "opencv2/nonfree/nonfree.hpp"
|
||||
static bool makeUseOfNonfree = cv::initModule_nonfree();
|
||||
#endif
|
||||
|
||||
|
||||
using cv::flann::IndexParams;
|
||||
using cv::flann::SearchParams;
|
||||
|
||||
@@ -370,8 +376,9 @@ static bool pyopencv_to(PyObject* obj, uchar& value, const char* name = "<unknow
|
||||
{
|
||||
if(!obj || obj == Py_None)
|
||||
return true;
|
||||
value = (int)PyInt_AsLong(obj);
|
||||
return value != -1 || !PyErr_Occurred();
|
||||
int ivalue = (int)PyInt_AsLong(obj);
|
||||
value = cv::saturate_cast<uchar>(ivalue);
|
||||
return ivalue != -1 || !PyErr_Occurred();
|
||||
}
|
||||
|
||||
static PyObject* pyopencv_from(double value)
|
||||
|
||||
@@ -545,7 +545,7 @@ static PyObject *cvmat_array_struct(cvmat_t *cva)
|
||||
|
||||
static PyObject *cvmatnd_array_struct(cvmatnd_t *cva)
|
||||
{
|
||||
CvMatND *m;
|
||||
CvMatND *m = 0;
|
||||
convert_to_CvMatND((PyObject *)cva, &m, "");
|
||||
|
||||
arrayTrack *at = new arrayTrack;
|
||||
@@ -693,7 +693,7 @@ static size_t cvmatnd_size(CvMatND *m)
|
||||
|
||||
static PyObject *cvmatnd_tostring(PyObject *self, PyObject *args)
|
||||
{
|
||||
CvMatND *m;
|
||||
CvMatND *m = 0;
|
||||
if (!convert_to_CvMatND(self, &m, "self"))
|
||||
return NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user