Update the trunk to the OpenCV's CVS (2008-07-14)
[opencv] / interfaces / swig / python / _ml.cpp
index d86b8e4..ff6819c 100644 (file)
@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.31
+ * Version 1.3.35
  * 
  * This file is not intended to be easily readable and contains a number of 
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -12,7 +12,7 @@
 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
 
 #ifdef __cplusplus
-template<class T> class SwigValueWrapper {
+template<typename T> class SwigValueWrapper {
     T *tt;
 public:
     SwigValueWrapper() : tt(0) { }
@@ -25,6 +25,10 @@ public:
 private:
     SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
 };
+
+template <typename T> T SwigValueInit() {
+  return T();
+}
 #endif
 
 /* -----------------------------------------------------------------------------
@@ -34,14 +38,14 @@ private:
 
 /* template workaround for compilers that cannot correctly implement the C++ standard */
 #ifndef SWIGTEMPLATEDISAMBIGUATOR
-# if defined(__SUNPRO_CC)
-#   if (__SUNPRO_CC <= 0x560)
-#     define SWIGTEMPLATEDISAMBIGUATOR template
-#   else
-#     define SWIGTEMPLATEDISAMBIGUATOR 
-#   endif
+# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
+#  define SWIGTEMPLATEDISAMBIGUATOR template
+# elif defined(__HP_aCC)
+/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
+/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
+#  define SWIGTEMPLATEDISAMBIGUATOR template
 # else
-#   define SWIGTEMPLATEDISAMBIGUATOR 
+#  define SWIGTEMPLATEDISAMBIGUATOR
 # endif
 #endif
 
@@ -124,6 +128,12 @@ private:
 # define _CRT_SECURE_NO_DEPRECATE
 #endif
 
+/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
+#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
+# define _SCL_SECURE_NO_DEPRECATE
+#endif
+
+
 
 /* Python.h has to appear first */
 #include <Python.h>
@@ -137,7 +147,7 @@ private:
 
 /* This should only be incremented when either the layout of swig_type_info changes,
    or for whatever reason, the runtime changes incompatibly */
-#define SWIG_RUNTIME_VERSION "3"
+#define SWIG_RUNTIME_VERSION "4"
 
 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
 #ifdef SWIG_TYPE_TABLE
@@ -172,6 +182,7 @@ private:
 
 /* Flags for pointer conversions */
 #define SWIG_POINTER_DISOWN        0x1
+#define SWIG_CAST_NEW_MEMORY       0x2
 
 /* Flags for new pointer objects */
 #define SWIG_POINTER_OWN           0x1
@@ -312,10 +323,10 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
 extern "C" {
 #endif
 
-typedef void *(*swig_converter_func)(void *);
+typedef void *(*swig_converter_func)(void *, int *);
 typedef struct swig_type_info *(*swig_dycast_func)(void **);
 
-/* Structure to store inforomation on one type */
+/* Structure to store information on one type */
 typedef struct swig_type_info {
   const char             *name;                        /* mangled name of this type */
   const char             *str;                 /* human readable name of this type */
@@ -360,7 +371,7 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
     while ((*f2 == ' ') && (f2 != l2)) ++f2;
     if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
   }
-  return (l1 - f1) - (l2 - f2);
+  return (int)((l1 - f1) - (l2 - f2));
 }
 
 /*
@@ -442,8 +453,8 @@ SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
   Cast a pointer up an inheritance hierarchy
 */
 SWIGRUNTIMEINLINE void *
-SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
-  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
+SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
+  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
 }
 
 /* 
@@ -867,7 +878,7 @@ SWIG_Python_AddErrorMsg(const char* mesg)
     Py_DECREF(old_str);
     Py_DECREF(value);
   } else {
-    PyErr_Format(PyExc_RuntimeError, mesg);
+    PyErr_SetString(PyExc_RuntimeError, mesg);
   }
 }
 
@@ -1107,14 +1118,14 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
 /* Unpack the argument tuple */
 
 SWIGINTERN int
-SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyObject **objs)
+SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
 {
   if (!args) {
     if (!min && !max) {
       return 1;
     } else {
       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
-                  name, (min == max ? "" : "at least "), min);
+                  name, (min == max ? "" : "at least "), (int)min);
       return 0;
     }
   }  
@@ -1122,14 +1133,14 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyOb
     PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
     return 0;
   } else {
-    register int l = PyTuple_GET_SIZE(args);
+    register Py_ssize_t l = PyTuple_GET_SIZE(args);
     if (l < min) {
       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
-                  name, (min == max ? "" : "at least "), min, l);
+                  name, (min == max ? "" : "at least "), (int)min, (int)l);
       return 0;
     } else if (l > max) {
       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
-                  name, (min == max ? "" : "at most "), max, l);
+                  name, (min == max ? "" : "at most "), (int)max, (int)l);
       return 0;
     } else {
       register int i;
@@ -1427,7 +1438,7 @@ PySwigObject_dealloc(PyObject *v)
 {
   PySwigObject *sobj = (PySwigObject *) v;
   PyObject *next = sobj->next;
-  if (sobj->own) {
+  if (sobj->own == SWIG_POINTER_OWN) {
     swig_type_info *ty = sobj->ty;
     PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
     PyObject *destroy = data ? data->destroy : 0;
@@ -1445,12 +1456,13 @@ PySwigObject_dealloc(PyObject *v)
        res = ((*meth)(mself, v));
       }
       Py_XDECREF(res);
-    } else {
-      const char *name = SWIG_TypePrettyName(ty);
+    } 
 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
-      printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name);
-#endif
+    else {
+      const char *name = SWIG_TypePrettyName(ty);
+      printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
     }
+#endif
   } 
   Py_XDECREF(next);
   PyObject_DEL(v);
@@ -1608,9 +1620,11 @@ _PySwigObject_type(void) {
     (unaryfunc)0,                 /*nb_float*/
     (unaryfunc)PySwigObject_oct,  /*nb_oct*/
     (unaryfunc)PySwigObject_hex,  /*nb_hex*/
-#if PY_VERSION_HEX >= 0x02020000
-    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ 
-#elif PY_VERSION_HEX >= 0x02000000
+#if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
+#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
+#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
     0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
 #endif
   };
@@ -1953,7 +1967,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj)
 
 SWIGRUNTIME int
 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
-  if (own) {
+  if (own == SWIG_POINTER_OWN) {
     PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
     if (sobj) {
       int oldown = sobj->own;
@@ -1974,6 +1988,8 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
     return SWIG_OK;
   } else {
     PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
+    if (own)
+      *own = 0;
     while (sobj) {
       void *vptr = sobj->ptr;
       if (ty) {
@@ -1987,7 +2003,15 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
          if (!tc) {
            sobj = (PySwigObject *)sobj->next;
          } else {
-           if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
+           if (ptr) {
+              int newmemory = 0;
+              *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+              if (newmemory == SWIG_CAST_NEW_MEMORY) {
+                assert(own);
+                if (own)
+                  *own = *own | SWIG_CAST_NEW_MEMORY;
+              }
+            }
            break;
          }
        }
@@ -1997,7 +2021,8 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
       }
     }
     if (sobj) {
-      if (own) *own = sobj->own;
+      if (own)
+        *own = *own | sobj->own;
       if (flags & SWIG_POINTER_DISOWN) {
        sobj->own = 0;
       }
@@ -2062,8 +2087,13 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
     }
     if (ty) {
       swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
-      if (!tc) return SWIG_ERROR;
-      *ptr = SWIG_TypeCast(tc,vptr);
+      if (tc) {
+        int newmemory = 0;
+        *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
+        assert(!newmemory); /* newmemory handling not yet implemented */
+      } else {
+        return SWIG_ERROR;
+      }
     } else {
       *ptr = vptr;
     }
@@ -2621,13 +2651,14 @@ static PyAPI_FUNC(double) PyFloat_AS_DOUBLE (PyObject *obj) {
 #define SWIGTYPE_p_p_double swig_types[122]
 #define SWIGTYPE_p_p_float swig_types[123]
 #define SWIGTYPE_p_p_unsigned_char swig_types[124]
-#define SWIGTYPE_p_size_t swig_types[125]
-#define SWIGTYPE_p_unsigned_char swig_types[126]
-#define SWIGTYPE_p_unsigned_long_long swig_types[127]
-#define SWIGTYPE_p_unsigned_short swig_types[128]
-#define SWIGTYPE_p_void swig_types[129]
-static swig_type_info *swig_types[131];
-static swig_module_info swig_module = {swig_types, 130, 0, 0, 0, 0};
+#define SWIGTYPE_p_signed_char swig_types[125]
+#define SWIGTYPE_p_size_t swig_types[126]
+#define SWIGTYPE_p_unsigned_char swig_types[127]
+#define SWIGTYPE_p_unsigned_long_long swig_types[128]
+#define SWIGTYPE_p_unsigned_short swig_types[129]
+#define SWIGTYPE_p_void swig_types[130]
+static swig_type_info *swig_types[132];
+static swig_module_info swig_module = {swig_types, 131, 0, 0, 0, 0};
 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
 
@@ -2646,7 +2677,7 @@ static swig_module_info swig_module = {swig_types, 130, 0, 0, 0, 0};
 
 #define SWIG_name    "_ml"
 
-#define SWIGVERSION 0x010331 
+#define SWIGVERSION 0x010335 
 #define SWIG_VERSION SWIGVERSION
 
 
@@ -2674,7 +2705,9 @@ namespace swig {
     
     PyObject_ptr(PyObject *obj, bool initial_ref = true) :_obj(obj)
     {
-      if (initial_ref) Py_XINCREF(_obj);
+      if (initial_ref) {
+        Py_XINCREF(_obj);
+      }
     }
     
     PyObject_ptr & operator=(const PyObject_ptr& item) 
@@ -2841,6 +2874,16 @@ static CvPoint2D32f PyObject_to_CvPoint2D32f(PyObject * obj){
        return cvPoint2D32f(0,0);
 }
 
+/* Check if this object can be interpreted as a CvScalar */
+static bool CvScalar_Check(PyObject * obj){
+       void * vptr;
+    CvScalar val;
+       return SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvScalar,     0 ) != -1 ||
+              SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvPoint2D32f, 0 ) != -1 ||
+           SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvPoint,      0 ) != -1 ||
+              PyObject_AsDoubleArray(obj, val.val, 4) !=-1;
+}
+
 static CvScalar PyObject_to_CvScalar(PyObject * obj){
        CvScalar val;
        CvScalar * ptr;
@@ -3112,14 +3155,12 @@ SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
 
 
 #include <limits.h>
-#ifndef LLONG_MIN
-# define LLONG_MIN     LONG_LONG_MIN
-#endif
-#ifndef LLONG_MAX
-# define LLONG_MAX     LONG_LONG_MAX
-#endif
-#ifndef ULLONG_MAX
-# define ULLONG_MAX    ULONG_LONG_MAX
+#if !defined(SWIG_NO_LLONG_MAX)
+# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
+#   define LLONG_MAX __LONG_LONG_MAX__
+#   define LLONG_MIN (-LLONG_MAX - 1LL)
+#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
+# endif
 #endif
 
 
@@ -3367,18 +3408,11 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
 SWIGINTERN int
 SWIG_AsVal_bool (PyObject *obj, bool *val)
 {
-  if (obj == Py_True) {
-    if (val) *val = true;
-    return SWIG_OK;
-  } else if (obj == Py_False) {
-    if (val) *val = false;
-    return SWIG_OK;
-  } else {
-    long v = 0;
-    int res = SWIG_AddCast(SWIG_AsVal_long (obj, val ? &v : 0));
-    if (SWIG_IsOK(res) && val) *val = v ? true : false;
-    return res;
-  }
+  int r = PyObject_IsTrue(obj);
+  if (r == -1)
+    return SWIG_ERROR;
+  if (val) *val = r ? true : false;
+  return SWIG_OK;
 }
 
 
@@ -3579,7 +3613,7 @@ SWIGINTERN PyObject *_wrap_delete_CvRNG_Wrapper(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -3591,7 +3625,7 @@ fail:
 
 SWIGINTERN PyObject *CvRNG_Wrapper_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvRNG_Wrapper, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -3754,7 +3788,7 @@ SWIGINTERN PyObject *_wrap_delete_CvSubdiv2DEdge_Wrapper(PyObject *SWIGUNUSEDPAR
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -3766,7 +3800,7 @@ fail:
 
 SWIGINTERN PyObject *CvSubdiv2DEdge_Wrapper_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvSubdiv2DEdge_Wrapper, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -4016,7 +4050,7 @@ SWIGINTERN PyObject *_wrap_new_CvVectors(PyObject *SWIGUNUSEDPARM(self), PyObjec
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvVectors, SWIG_POINTER_NEW |  0 );
@@ -4045,7 +4079,7 @@ SWIGINTERN PyObject *_wrap_delete_CvVectors(PyObject *SWIGUNUSEDPARM(self), PyOb
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -4057,7 +4091,7 @@ fail:
 
 SWIGINTERN PyObject *CvVectors_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvVectors, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -4234,7 +4268,7 @@ SWIGINTERN PyObject *_wrap_new_CvVectors_data(PyObject *SWIGUNUSEDPARM(self), Py
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvVectors_data, SWIG_POINTER_NEW |  0 );
@@ -4263,7 +4297,7 @@ SWIGINTERN PyObject *_wrap_delete_CvVectors_data(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -4275,7 +4309,7 @@ fail:
 
 SWIGINTERN PyObject *CvVectors_data_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvVectors_data, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -4291,7 +4325,7 @@ SWIGINTERN PyObject *_wrap_new_CvStatModel(PyObject *SWIGUNUSEDPARM(self), PyObj
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvStatModel, SWIG_POINTER_NEW |  0 );
@@ -4320,7 +4354,7 @@ SWIGINTERN PyObject *_wrap_delete_CvStatModel(PyObject *SWIGUNUSEDPARM(self), Py
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -4349,7 +4383,7 @@ SWIGINTERN PyObject *_wrap_CvStatModel_clear(PyObject *SWIGUNUSEDPARM(self), PyO
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -4398,7 +4432,7 @@ SWIGINTERN PyObject *_wrap_CvStatModel_save__SWIG_0(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -4441,7 +4475,7 @@ SWIGINTERN PyObject *_wrap_CvStatModel_save__SWIG_1(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -4459,7 +4493,7 @@ SWIGINTERN PyObject *_wrap_CvStatModel_save(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 3); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -4495,7 +4529,10 @@ SWIGINTERN PyObject *_wrap_CvStatModel_save(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvStatModel_save'.\n  Possible C/C++ prototypes are:\n    save(char const *,char const *)\n    save(char const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvStatModel_save'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    save(CvStatModel *,char const *,char const *)\n"
+    "    save(CvStatModel *,char const *)\n");
   return NULL;
 }
 
@@ -4539,7 +4576,7 @@ SWIGINTERN PyObject *_wrap_CvStatModel_load__SWIG_0(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -4582,7 +4619,7 @@ SWIGINTERN PyObject *_wrap_CvStatModel_load__SWIG_1(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -4600,7 +4637,7 @@ SWIGINTERN PyObject *_wrap_CvStatModel_load(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 3); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -4636,7 +4673,10 @@ SWIGINTERN PyObject *_wrap_CvStatModel_load(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvStatModel_load'.\n  Possible C/C++ prototypes are:\n    load(char const *,char const *)\n    load(char const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvStatModel_load'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    load(CvStatModel *,char const *,char const *)\n"
+    "    load(CvStatModel *,char const *)\n");
   return NULL;
 }
 
@@ -4679,7 +4719,7 @@ SWIGINTERN PyObject *_wrap_CvStatModel_write(PyObject *SWIGUNUSEDPARM(self), PyO
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -4728,7 +4768,7 @@ SWIGINTERN PyObject *_wrap_CvStatModel_read(PyObject *SWIGUNUSEDPARM(self), PyOb
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -4740,7 +4780,7 @@ fail:
 
 SWIGINTERN PyObject *CvStatModel_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvStatModel, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -4756,7 +4796,7 @@ SWIGINTERN PyObject *_wrap_new_CvParamGrid__SWIG_0(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvParamGrid, SWIG_POINTER_NEW |  0 );
@@ -4804,7 +4844,7 @@ SWIGINTERN PyObject *_wrap_new_CvParamGrid__SWIG_1(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvParamGrid, SWIG_POINTER_NEW |  0 );
@@ -4820,7 +4860,7 @@ SWIGINTERN PyObject *_wrap_new_CvParamGrid(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 3); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -4851,7 +4891,10 @@ SWIGINTERN PyObject *_wrap_new_CvParamGrid(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvParamGrid'.\n  Possible C/C++ prototypes are:\n    CvParamGrid()\n    CvParamGrid(double,double,double)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvParamGrid'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    CvParamGrid()\n"
+    "    CvParamGrid(double,double,double)\n");
   return NULL;
 }
 
@@ -4876,7 +4919,7 @@ SWIGINTERN PyObject *_wrap_CvParamGrid_check(PyObject *SWIGUNUSEDPARM(self), PyO
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -5064,7 +5107,7 @@ SWIGINTERN PyObject *_wrap_delete_CvParamGrid(PyObject *SWIGUNUSEDPARM(self), Py
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -5076,7 +5119,7 @@ fail:
 
 SWIGINTERN PyObject *CvParamGrid_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvParamGrid, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -5092,7 +5135,7 @@ SWIGINTERN PyObject *_wrap_new_CvNormalBayesClassifier__SWIG_0(PyObject *SWIGUNU
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvNormalBayesClassifier, SWIG_POINTER_NEW |  0 );
@@ -5121,7 +5164,7 @@ SWIGINTERN PyObject *_wrap_delete_CvNormalBayesClassifier(PyObject *SWIGUNUSEDPA
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -5178,7 +5221,7 @@ SWIGINTERN PyObject *_wrap_new_CvNormalBayesClassifier__SWIG_1(PyObject *SWIGUNU
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvNormalBayesClassifier, SWIG_POINTER_NEW |  0 );
@@ -5226,7 +5269,7 @@ SWIGINTERN PyObject *_wrap_new_CvNormalBayesClassifier__SWIG_2(PyObject *SWIGUNU
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvNormalBayesClassifier, SWIG_POINTER_NEW |  0 );
@@ -5265,7 +5308,7 @@ SWIGINTERN PyObject *_wrap_new_CvNormalBayesClassifier__SWIG_3(PyObject *SWIGUNU
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvNormalBayesClassifier, SWIG_POINTER_NEW |  0 );
@@ -5281,7 +5324,7 @@ SWIGINTERN PyObject *_wrap_new_CvNormalBayesClassifier(PyObject *self, PyObject
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 4); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -5347,7 +5390,12 @@ SWIGINTERN PyObject *_wrap_new_CvNormalBayesClassifier(PyObject *self, PyObject
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvNormalBayesClassifier'.\n  Possible C/C++ prototypes are:\n    CvNormalBayesClassifier()\n    CvNormalBayesClassifier(CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    CvNormalBayesClassifier(CvMat const *,CvMat const *,CvMat const *)\n    CvNormalBayesClassifier(CvMat const *,CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvNormalBayesClassifier'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    CvNormalBayesClassifier()\n"
+    "    CvNormalBayesClassifier(CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    CvNormalBayesClassifier(CvMat const *,CvMat const *,CvMat const *)\n"
+    "    CvNormalBayesClassifier(CvMat const *,CvMat const *)\n");
   return NULL;
 }
 
@@ -5417,7 +5465,7 @@ SWIGINTERN PyObject *_wrap_CvNormalBayesClassifier_train__SWIG_0(PyObject *SWIGU
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -5483,7 +5531,7 @@ SWIGINTERN PyObject *_wrap_CvNormalBayesClassifier_train__SWIG_1(PyObject *SWIGU
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -5540,7 +5588,7 @@ SWIGINTERN PyObject *_wrap_CvNormalBayesClassifier_train__SWIG_2(PyObject *SWIGU
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -5588,7 +5636,7 @@ SWIGINTERN PyObject *_wrap_CvNormalBayesClassifier_train__SWIG_3(PyObject *SWIGU
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -5604,7 +5652,7 @@ SWIGINTERN PyObject *_wrap_CvNormalBayesClassifier_train(PyObject *self, PyObjec
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 6); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -5717,7 +5765,12 @@ SWIGINTERN PyObject *_wrap_CvNormalBayesClassifier_train(PyObject *self, PyObjec
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvNormalBayesClassifier_train'.\n  Possible C/C++ prototypes are:\n    train(CvMat const *,CvMat const *,CvMat const *,CvMat const *,bool)\n    train(CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvNormalBayesClassifier_train'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    train(CvNormalBayesClassifier *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,bool)\n"
+    "    train(CvNormalBayesClassifier *,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvNormalBayesClassifier *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvNormalBayesClassifier *,CvMat const *,CvMat const *)\n");
   return NULL;
 }
 
@@ -5760,7 +5813,7 @@ SWIGINTERN PyObject *_wrap_CvNormalBayesClassifier_predict__SWIG_0(PyObject *SWI
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_float(static_cast< float >(result));
@@ -5799,7 +5852,7 @@ SWIGINTERN PyObject *_wrap_CvNormalBayesClassifier_predict__SWIG_1(PyObject *SWI
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_float(static_cast< float >(result));
@@ -5815,7 +5868,7 @@ SWIGINTERN PyObject *_wrap_CvNormalBayesClassifier_predict(PyObject *self, PyObj
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 3); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -5854,7 +5907,10 @@ SWIGINTERN PyObject *_wrap_CvNormalBayesClassifier_predict(PyObject *self, PyObj
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvNormalBayesClassifier_predict'.\n  Possible C/C++ prototypes are:\n    predict(CvMat const *,CvMat *)\n    predict(CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvNormalBayesClassifier_predict'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    predict(CvNormalBayesClassifier const *,CvMat const *,CvMat *)\n"
+    "    predict(CvNormalBayesClassifier const *,CvMat const *)\n");
   return NULL;
 }
 
@@ -5878,7 +5934,7 @@ SWIGINTERN PyObject *_wrap_CvNormalBayesClassifier_clear(PyObject *SWIGUNUSEDPAR
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -5926,7 +5982,7 @@ SWIGINTERN PyObject *_wrap_CvNormalBayesClassifier_write(PyObject *SWIGUNUSEDPAR
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -5975,7 +6031,7 @@ SWIGINTERN PyObject *_wrap_CvNormalBayesClassifier_read(PyObject *SWIGUNUSEDPARM
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -5987,7 +6043,7 @@ fail:
 
 SWIGINTERN PyObject *CvNormalBayesClassifier_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvNormalBayesClassifier, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -6003,7 +6059,7 @@ SWIGINTERN PyObject *_wrap_new_CvKNearest__SWIG_0(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvKNearest, SWIG_POINTER_NEW |  0 );
@@ -6032,7 +6088,7 @@ SWIGINTERN PyObject *_wrap_delete_CvKNearest(PyObject *SWIGUNUSEDPARM(self), PyO
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -6098,7 +6154,7 @@ SWIGINTERN PyObject *_wrap_new_CvKNearest__SWIG_1(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvKNearest, SWIG_POINTER_NEW |  0 );
@@ -6155,7 +6211,7 @@ SWIGINTERN PyObject *_wrap_new_CvKNearest__SWIG_2(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvKNearest, SWIG_POINTER_NEW |  0 );
@@ -6203,7 +6259,7 @@ SWIGINTERN PyObject *_wrap_new_CvKNearest__SWIG_3(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvKNearest, SWIG_POINTER_NEW |  0 );
@@ -6242,7 +6298,7 @@ SWIGINTERN PyObject *_wrap_new_CvKNearest__SWIG_4(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvKNearest, SWIG_POINTER_NEW |  0 );
@@ -6258,7 +6314,7 @@ SWIGINTERN PyObject *_wrap_new_CvKNearest(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 5); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -6356,7 +6412,13 @@ SWIGINTERN PyObject *_wrap_new_CvKNearest(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvKNearest'.\n  Possible C/C++ prototypes are:\n    CvKNearest()\n    CvKNearest(CvMat const *,CvMat const *,CvMat const *,bool,int)\n    CvKNearest(CvMat const *,CvMat const *,CvMat const *,bool)\n    CvKNearest(CvMat const *,CvMat const *,CvMat const *)\n    CvKNearest(CvMat const *,CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvKNearest'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    CvKNearest()\n"
+    "    CvKNearest(CvMat const *,CvMat const *,CvMat const *,bool,int)\n"
+    "    CvKNearest(CvMat const *,CvMat const *,CvMat const *,bool)\n"
+    "    CvKNearest(CvMat const *,CvMat const *,CvMat const *)\n"
+    "    CvKNearest(CvMat const *,CvMat const *)\n");
   return NULL;
 }
 
@@ -6435,7 +6497,7 @@ SWIGINTERN PyObject *_wrap_CvKNearest_train__SWIG_0(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -6510,7 +6572,7 @@ SWIGINTERN PyObject *_wrap_CvKNearest_train__SWIG_1(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -6576,7 +6638,7 @@ SWIGINTERN PyObject *_wrap_CvKNearest_train__SWIG_2(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -6633,7 +6695,7 @@ SWIGINTERN PyObject *_wrap_CvKNearest_train__SWIG_3(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -6681,7 +6743,7 @@ SWIGINTERN PyObject *_wrap_CvKNearest_train__SWIG_4(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -6697,7 +6759,7 @@ SWIGINTERN PyObject *_wrap_CvKNearest_train(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 7); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -6854,7 +6916,13 @@ SWIGINTERN PyObject *_wrap_CvKNearest_train(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvKNearest_train'.\n  Possible C/C++ prototypes are:\n    train(CvMat const *,CvMat const *,CvMat const *,bool,int,bool)\n    train(CvMat const *,CvMat const *,CvMat const *,bool,int)\n    train(CvMat const *,CvMat const *,CvMat const *,bool)\n    train(CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvKNearest_train'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    train(CvKNearest *,CvMat const *,CvMat const *,CvMat const *,bool,int,bool)\n"
+    "    train(CvKNearest *,CvMat const *,CvMat const *,CvMat const *,bool,int)\n"
+    "    train(CvKNearest *,CvMat const *,CvMat const *,CvMat const *,bool)\n"
+    "    train(CvKNearest *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvKNearest *,CvMat const *,CvMat const *)\n");
   return NULL;
 }
 
@@ -6935,7 +7003,7 @@ SWIGINTERN PyObject *_wrap_CvKNearest_find_nearest__SWIG_0(PyObject *SWIGUNUSEDP
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_float(static_cast< float >(result));
@@ -7012,7 +7080,7 @@ SWIGINTERN PyObject *_wrap_CvKNearest_find_nearest__SWIG_1(PyObject *SWIGUNUSEDP
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_float(static_cast< float >(result));
@@ -7080,7 +7148,7 @@ SWIGINTERN PyObject *_wrap_CvKNearest_find_nearest__SWIG_2(PyObject *SWIGUNUSEDP
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_float(static_cast< float >(result));
@@ -7137,7 +7205,7 @@ SWIGINTERN PyObject *_wrap_CvKNearest_find_nearest__SWIG_3(PyObject *SWIGUNUSEDP
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_float(static_cast< float >(result));
@@ -7185,7 +7253,7 @@ SWIGINTERN PyObject *_wrap_CvKNearest_find_nearest__SWIG_4(PyObject *SWIGUNUSEDP
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_float(static_cast< float >(result));
@@ -7201,7 +7269,7 @@ SWIGINTERN PyObject *_wrap_CvKNearest_find_nearest(PyObject *self, PyObject *arg
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 7); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -7357,7 +7425,13 @@ SWIGINTERN PyObject *_wrap_CvKNearest_find_nearest(PyObject *self, PyObject *arg
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvKNearest_find_nearest'.\n  Possible C/C++ prototypes are:\n    find_nearest(CvMat const *,int,CvMat *,float const **,CvMat *,CvMat *)\n    find_nearest(CvMat const *,int,CvMat *,float const **,CvMat *)\n    find_nearest(CvMat const *,int,CvMat *,float const **)\n    find_nearest(CvMat const *,int,CvMat *)\n    find_nearest(CvMat const *,int)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvKNearest_find_nearest'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    find_nearest(CvKNearest const *,CvMat const *,int,CvMat *,float const **,CvMat *,CvMat *)\n"
+    "    find_nearest(CvKNearest const *,CvMat const *,int,CvMat *,float const **,CvMat *)\n"
+    "    find_nearest(CvKNearest const *,CvMat const *,int,CvMat *,float const **)\n"
+    "    find_nearest(CvKNearest const *,CvMat const *,int,CvMat *)\n"
+    "    find_nearest(CvKNearest const *,CvMat const *,int)\n");
   return NULL;
 }
 
@@ -7381,7 +7455,7 @@ SWIGINTERN PyObject *_wrap_CvKNearest_clear(PyObject *SWIGUNUSEDPARM(self), PyOb
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -7411,7 +7485,7 @@ SWIGINTERN PyObject *_wrap_CvKNearest_get_max_k(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_int(static_cast< int >(result));
@@ -7441,7 +7515,7 @@ SWIGINTERN PyObject *_wrap_CvKNearest_get_var_count(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_int(static_cast< int >(result));
@@ -7471,7 +7545,7 @@ SWIGINTERN PyObject *_wrap_CvKNearest_get_sample_count(PyObject *SWIGUNUSEDPARM(
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_int(static_cast< int >(result));
@@ -7501,7 +7575,7 @@ SWIGINTERN PyObject *_wrap_CvKNearest_is_regression(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -7513,7 +7587,7 @@ fail:
 
 SWIGINTERN PyObject *CvKNearest_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvKNearest, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -7529,7 +7603,7 @@ SWIGINTERN PyObject *_wrap_new_CvSVMParams__SWIG_0(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvSVMParams, SWIG_POINTER_NEW |  0 );
@@ -7648,7 +7722,7 @@ SWIGINTERN PyObject *_wrap_new_CvSVMParams__SWIG_1(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvSVMParams, SWIG_POINTER_NEW |  0 );
@@ -7664,7 +7738,7 @@ SWIGINTERN PyObject *_wrap_new_CvSVMParams(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 10); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -7734,7 +7808,10 @@ SWIGINTERN PyObject *_wrap_new_CvSVMParams(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvSVMParams'.\n  Possible C/C++ prototypes are:\n    CvSVMParams()\n    CvSVMParams(int,int,double,double,double,double,double,double,CvMat *,CvTermCriteria)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvSVMParams'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    CvSVMParams()\n"
+    "    CvSVMParams(int,int,double,double,double,double,double,double,CvMat *,CvTermCriteria)\n");
   return NULL;
 }
 
@@ -8288,7 +8365,7 @@ SWIGINTERN PyObject *_wrap_delete_CvSVMParams(PyObject *SWIGUNUSEDPARM(self), Py
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -8300,7 +8377,7 @@ fail:
 
 SWIGINTERN PyObject *CvSVMParams_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvSVMParams, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -8316,7 +8393,7 @@ SWIGINTERN PyObject *_wrap_new_CvSVMKernel__SWIG_0(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvSVMKernel, SWIG_POINTER_NEW |  0 );
@@ -8354,7 +8431,7 @@ SWIGINTERN PyObject *_wrap_new_CvSVMKernel__SWIG_1(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvSVMKernel, SWIG_POINTER_NEW |  0 );
@@ -8370,7 +8447,7 @@ SWIGINTERN PyObject *_wrap_new_CvSVMKernel(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 2); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -8393,7 +8470,10 @@ SWIGINTERN PyObject *_wrap_new_CvSVMKernel(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvSVMKernel'.\n  Possible C/C++ prototypes are:\n    CvSVMKernel()\n    CvSVMKernel(CvSVMParams const *,CvSVMKernel::Calc)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvSVMKernel'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    CvSVMKernel()\n"
+    "    CvSVMKernel(CvSVMParams const *,CvSVMKernel::Calc)\n");
   return NULL;
 }
 
@@ -8435,7 +8515,7 @@ SWIGINTERN PyObject *_wrap_CvSVMKernel_create(PyObject *SWIGUNUSEDPARM(self), Py
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -8464,7 +8544,7 @@ SWIGINTERN PyObject *_wrap_delete_CvSVMKernel(PyObject *SWIGUNUSEDPARM(self), Py
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -8493,7 +8573,7 @@ SWIGINTERN PyObject *_wrap_CvSVMKernel_clear(PyObject *SWIGUNUSEDPARM(self), PyO
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -8569,7 +8649,7 @@ SWIGINTERN PyObject *_wrap_CvSVMKernel_calc(PyObject *SWIGUNUSEDPARM(self), PyOb
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -8768,7 +8848,7 @@ SWIGINTERN PyObject *_wrap_CvSVMKernel_calc_non_rbf_base(PyObject *SWIGUNUSEDPAR
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -8844,7 +8924,7 @@ SWIGINTERN PyObject *_wrap_CvSVMKernel_calc_linear(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -8920,7 +9000,7 @@ SWIGINTERN PyObject *_wrap_CvSVMKernel_calc_rbf(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -8996,7 +9076,7 @@ SWIGINTERN PyObject *_wrap_CvSVMKernel_calc_poly(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -9072,7 +9152,7 @@ SWIGINTERN PyObject *_wrap_CvSVMKernel_calc_sigmoid(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -9084,7 +9164,7 @@ fail:
 
 SWIGINTERN PyObject *CvSVMKernel_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvSVMKernel, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -9259,7 +9339,7 @@ SWIGINTERN PyObject *_wrap_new_CvSVMKernelRow(PyObject *SWIGUNUSEDPARM(self), Py
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvSVMKernelRow, SWIG_POINTER_NEW |  0 );
@@ -9288,7 +9368,7 @@ SWIGINTERN PyObject *_wrap_delete_CvSVMKernelRow(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -9300,7 +9380,7 @@ fail:
 
 SWIGINTERN PyObject *CvSVMKernelRow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvSVMKernelRow, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -9581,7 +9661,7 @@ SWIGINTERN PyObject *_wrap_new_CvSVMSolutionInfo(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvSVMSolutionInfo, SWIG_POINTER_NEW |  0 );
@@ -9610,7 +9690,7 @@ SWIGINTERN PyObject *_wrap_delete_CvSVMSolutionInfo(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -9622,7 +9702,7 @@ fail:
 
 SWIGINTERN PyObject *CvSVMSolutionInfo_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvSVMSolutionInfo, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -9638,7 +9718,7 @@ SWIGINTERN PyObject *_wrap_new_CvSVMSolver__SWIG_0(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvSVMSolver, SWIG_POINTER_NEW |  0 );
@@ -9653,7 +9733,7 @@ SWIGINTERN PyObject *_wrap_new_CvSVMSolver__SWIG_1(PyObject *SWIGUNUSEDPARM(self
   int arg1 ;
   int arg2 ;
   float **arg3 = (float **) 0 ;
-  char *arg4 = (char *) 0 ;
+  schar *arg4 = (schar *) 0 ;
   int arg5 ;
   double *arg6 = (double *) 0 ;
   double arg7 ;
@@ -9670,9 +9750,8 @@ SWIGINTERN PyObject *_wrap_new_CvSVMSolver__SWIG_1(PyObject *SWIGUNUSEDPARM(self
   int ecode2 = 0 ;
   void *vptr3 ;
   float *buffer3 ;
-  int res4 ;
-  char *buf4 = 0 ;
-  int alloc4 = 0 ;
+  void *argp4 = 0 ;
+  int res4 = 0 ;
   int val5 ;
   int ecode5 = 0 ;
   void *argp6 = 0 ;
@@ -9717,11 +9796,11 @@ SWIGINTERN PyObject *_wrap_new_CvSVMSolver__SWIG_1(PyObject *SWIGUNUSEDPARM(self
     buffer3 = (float *) vptr3;
     arg3=&buffer3;
   }
-  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
+  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_signed_char, 0 |  0 );
   if (!SWIG_IsOK(res4)) {
-    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CvSVMSolver" "', argument " "4"" of type '" "char *""'");
+    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CvSVMSolver" "', argument " "4"" of type '" "schar *""'"); 
   }
-  arg4 = reinterpret_cast< char * >(buf4);
+  arg4 = reinterpret_cast< schar * >(argp4);
   ecode5 = SWIG_AsVal_int(obj4, &val5);
   if (!SWIG_IsOK(ecode5)) {
     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CvSVMSolver" "', argument " "5"" of type '" "int""'");
@@ -9776,14 +9855,12 @@ SWIGINTERN PyObject *_wrap_new_CvSVMSolver__SWIG_1(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvSVMSolver, SWIG_POINTER_NEW |  0 );
-  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   return resultobj;
 fail:
-  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   return NULL;
 }
 
@@ -9794,7 +9871,7 @@ SWIGINTERN PyObject *_wrap_new_CvSVMSolver(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 13); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -9817,7 +9894,8 @@ SWIGINTERN PyObject *_wrap_new_CvSVMSolver(PyObject *self, PyObject *args) {
         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_p_float, 0);
         _v = SWIG_CheckState(res);
         if (_v) {
-          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
+          void *vptr = 0;
+          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_signed_char, 0);
           _v = SWIG_CheckState(res);
           if (_v) {
             {
@@ -9876,7 +9954,10 @@ SWIGINTERN PyObject *_wrap_new_CvSVMSolver(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvSVMSolver'.\n  Possible C/C++ prototypes are:\n    CvSVMSolver()\n    CvSVMSolver(int,int,float const **,char *,int,double *,double,double,CvMemStorage *,CvSVMKernel *,CvSVMSolver::GetRow,CvSVMSolver::SelectWorkingSet,CvSVMSolver::CalcRho)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvSVMSolver'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    CvSVMSolver()\n"
+    "    CvSVMSolver(int,int,float const **,schar *,int,double *,double,double,CvMemStorage *,CvSVMKernel *,CvSVMSolver::GetRow,CvSVMSolver::SelectWorkingSet,CvSVMSolver::CalcRho)\n");
   return NULL;
 }
 
@@ -9887,7 +9968,7 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_create(PyObject *SWIGUNUSEDPARM(self), Py
   int arg2 ;
   int arg3 ;
   float **arg4 = (float **) 0 ;
-  char *arg5 = (char *) 0 ;
+  schar *arg5 = (schar *) 0 ;
   int arg6 ;
   double *arg7 = (double *) 0 ;
   double arg8 ;
@@ -9906,9 +9987,8 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_create(PyObject *SWIGUNUSEDPARM(self), Py
   int ecode3 = 0 ;
   void *vptr4 ;
   float *buffer4 ;
-  int res5 ;
-  char *buf5 = 0 ;
-  int alloc5 = 0 ;
+  void *argp5 = 0 ;
+  int res5 = 0 ;
   int val6 ;
   int ecode6 = 0 ;
   void *argp7 = 0 ;
@@ -9959,11 +10039,11 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_create(PyObject *SWIGUNUSEDPARM(self), Py
     buffer4 = (float *) vptr4;
     arg4=&buffer4;
   }
-  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
+  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_signed_char, 0 |  0 );
   if (!SWIG_IsOK(res5)) {
-    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CvSVMSolver_create" "', argument " "5"" of type '" "char *""'");
+    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CvSVMSolver_create" "', argument " "5"" of type '" "schar *""'"); 
   }
-  arg5 = reinterpret_cast< char * >(buf5);
+  arg5 = reinterpret_cast< schar * >(argp5);
   ecode6 = SWIG_AsVal_int(obj5, &val6);
   if (!SWIG_IsOK(ecode6)) {
     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CvSVMSolver_create" "', argument " "6"" of type '" "int""'");
@@ -10018,14 +10098,12 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_create(PyObject *SWIGUNUSEDPARM(self), Py
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
-  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
   return resultobj;
 fail:
-  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
   return NULL;
 }
 
@@ -10049,7 +10127,7 @@ SWIGINTERN PyObject *_wrap_delete_CvSVMSolver(PyObject *SWIGUNUSEDPARM(self), Py
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -10078,7 +10156,7 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_clear(PyObject *SWIGUNUSEDPARM(self), PyO
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -10120,7 +10198,7 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_solve_generic(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -10136,7 +10214,7 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_solve_c_svc(PyObject *SWIGUNUSEDPARM(self
   int arg2 ;
   int arg3 ;
   float **arg4 = (float **) 0 ;
-  char *arg5 = (char *) 0 ;
+  schar *arg5 = (schar *) 0 ;
   double arg6 ;
   double arg7 ;
   CvMemStorage *arg8 = (CvMemStorage *) 0 ;
@@ -10152,9 +10230,8 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_solve_c_svc(PyObject *SWIGUNUSEDPARM(self
   int ecode3 = 0 ;
   void *vptr4 ;
   float *buffer4 ;
-  int res5 ;
-  char *buf5 = 0 ;
-  int alloc5 = 0 ;
+  void *argp5 = 0 ;
+  int res5 = 0 ;
   double val6 ;
   int ecode6 = 0 ;
   double val7 ;
@@ -10202,11 +10279,11 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_solve_c_svc(PyObject *SWIGUNUSEDPARM(self
     buffer4 = (float *) vptr4;
     arg4=&buffer4;
   }
-  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
+  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_signed_char, 0 |  0 );
   if (!SWIG_IsOK(res5)) {
-    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CvSVMSolver_solve_c_svc" "', argument " "5"" of type '" "char *""'");
+    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CvSVMSolver_solve_c_svc" "', argument " "5"" of type '" "schar *""'"); 
   }
-  arg5 = reinterpret_cast< char * >(buf5);
+  arg5 = reinterpret_cast< schar * >(argp5);
   ecode6 = SWIG_AsVal_double(obj5, &val6);
   if (!SWIG_IsOK(ecode6)) {
     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CvSVMSolver_solve_c_svc" "', argument " "6"" of type '" "double""'");
@@ -10246,14 +10323,12 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_solve_c_svc(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
-  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
   return resultobj;
 fail:
-  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
   return NULL;
 }
 
@@ -10264,7 +10339,7 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_solve_nu_svc(PyObject *SWIGUNUSEDPARM(sel
   int arg2 ;
   int arg3 ;
   float **arg4 = (float **) 0 ;
-  char *arg5 = (char *) 0 ;
+  schar *arg5 = (schar *) 0 ;
   CvMemStorage *arg6 = (CvMemStorage *) 0 ;
   CvSVMKernel *arg7 = (CvSVMKernel *) 0 ;
   double *arg8 = (double *) 0 ;
@@ -10278,9 +10353,8 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_solve_nu_svc(PyObject *SWIGUNUSEDPARM(sel
   int ecode3 = 0 ;
   void *vptr4 ;
   float *buffer4 ;
-  int res5 ;
-  char *buf5 = 0 ;
-  int alloc5 = 0 ;
+  void *argp5 = 0 ;
+  int res5 = 0 ;
   void *argp6 = 0 ;
   int res6 = 0 ;
   void *argp7 = 0 ;
@@ -10322,11 +10396,11 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_solve_nu_svc(PyObject *SWIGUNUSEDPARM(sel
     buffer4 = (float *) vptr4;
     arg4=&buffer4;
   }
-  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
+  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_signed_char, 0 |  0 );
   if (!SWIG_IsOK(res5)) {
-    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CvSVMSolver_solve_nu_svc" "', argument " "5"" of type '" "char *""'");
+    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CvSVMSolver_solve_nu_svc" "', argument " "5"" of type '" "schar *""'"); 
   }
-  arg5 = reinterpret_cast< char * >(buf5);
+  arg5 = reinterpret_cast< schar * >(argp5);
   res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_CvMemStorage, 0 |  0 );
   if (!SWIG_IsOK(res6)) {
     SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "CvSVMSolver_solve_nu_svc" "', argument " "6"" of type '" "CvMemStorage *""'"); 
@@ -10356,14 +10430,12 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_solve_nu_svc(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
-  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
   return resultobj;
 fail:
-  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
   return NULL;
 }
 
@@ -10456,7 +10528,7 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_solve_one_class(PyObject *SWIGUNUSEDPARM(
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -10563,7 +10635,7 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_solve_eps_svr(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -10670,7 +10742,7 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_solve_nu_svr(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -10718,7 +10790,7 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_get_row_base(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 |  0 );
@@ -10766,7 +10838,7 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_get_row(PyObject *SWIGUNUSEDPARM(self), P
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 |  0 );
@@ -11417,12 +11489,11 @@ fail:
 SWIGINTERN PyObject *_wrap_CvSVMSolver_alpha_status_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   CvSVMSolver *arg1 = (CvSVMSolver *) 0 ;
-  char *arg2 = (char *) 0 ;
+  schar *arg2 = (schar *) 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
-  int res2 ;
-  char *buf2 = 0 ;
-  int alloc2 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   
@@ -11432,23 +11503,16 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_alpha_status_set(PyObject *SWIGUNUSEDPARM
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvSVMSolver_alpha_status_set" "', argument " "1"" of type '" "CvSVMSolver *""'"); 
   }
   arg1 = reinterpret_cast< CvSVMSolver * >(argp1);
-  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_signed_char, SWIG_POINTER_DISOWN |  0 );
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvSVMSolver_alpha_status_set" "', argument " "2"" of type '" "char *""'");
-  }
-  arg2 = reinterpret_cast< char * >(buf2);
-  if (arg1->alpha_status) delete[] arg1->alpha_status;
-  if (arg2) {
-    size_t size = strlen(reinterpret_cast< const char * >(arg2)) + 1;
-    arg1->alpha_status = (char *)reinterpret_cast< char* >(memcpy((new char[size]), reinterpret_cast< const char * >(arg2), sizeof(char)*(size)));
-  } else {
-    arg1->alpha_status = 0;
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvSVMSolver_alpha_status_set" "', argument " "2"" of type '" "schar *""'"); 
   }
+  arg2 = reinterpret_cast< schar * >(argp2);
+  if (arg1) (arg1)->alpha_status = arg2;
+  
   resultobj = SWIG_Py_Void();
-  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   return resultobj;
 fail:
-  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   return NULL;
 }
 
@@ -11456,7 +11520,7 @@ fail:
 SWIGINTERN PyObject *_wrap_CvSVMSolver_alpha_status_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   CvSVMSolver *arg1 = (CvSVMSolver *) 0 ;
-  char *result = 0 ;
+  schar *result = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
@@ -11467,8 +11531,8 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_alpha_status_get(PyObject *SWIGUNUSEDPARM
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvSVMSolver_alpha_status_get" "', argument " "1"" of type '" "CvSVMSolver *""'"); 
   }
   arg1 = reinterpret_cast< CvSVMSolver * >(argp1);
-  result = (char *) ((arg1)->alpha_status);
-  resultobj = SWIG_FromCharPtr((const char *)result);
+  result = (schar *) ((arg1)->alpha_status);
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_signed_char, 0 |  0 );
   return resultobj;
 fail:
   return NULL;
@@ -11478,12 +11542,11 @@ fail:
 SWIGINTERN PyObject *_wrap_CvSVMSolver_y_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   CvSVMSolver *arg1 = (CvSVMSolver *) 0 ;
-  char *arg2 = (char *) 0 ;
+  schar *arg2 = (schar *) 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
-  int res2 ;
-  char *buf2 = 0 ;
-  int alloc2 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   
@@ -11493,23 +11556,16 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_y_set(PyObject *SWIGUNUSEDPARM(self), PyO
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvSVMSolver_y_set" "', argument " "1"" of type '" "CvSVMSolver *""'"); 
   }
   arg1 = reinterpret_cast< CvSVMSolver * >(argp1);
-  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_signed_char, SWIG_POINTER_DISOWN |  0 );
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvSVMSolver_y_set" "', argument " "2"" of type '" "char *""'");
-  }
-  arg2 = reinterpret_cast< char * >(buf2);
-  if (arg1->y) delete[] arg1->y;
-  if (arg2) {
-    size_t size = strlen(reinterpret_cast< const char * >(arg2)) + 1;
-    arg1->y = (char *)reinterpret_cast< char* >(memcpy((new char[size]), reinterpret_cast< const char * >(arg2), sizeof(char)*(size)));
-  } else {
-    arg1->y = 0;
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvSVMSolver_y_set" "', argument " "2"" of type '" "schar *""'"); 
   }
+  arg2 = reinterpret_cast< schar * >(argp2);
+  if (arg1) (arg1)->y = arg2;
+  
   resultobj = SWIG_Py_Void();
-  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   return resultobj;
 fail:
-  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   return NULL;
 }
 
@@ -11517,7 +11573,7 @@ fail:
 SWIGINTERN PyObject *_wrap_CvSVMSolver_y_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   CvSVMSolver *arg1 = (CvSVMSolver *) 0 ;
-  char *result = 0 ;
+  schar *result = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
@@ -11528,8 +11584,8 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_y_get(PyObject *SWIGUNUSEDPARM(self), PyO
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvSVMSolver_y_get" "', argument " "1"" of type '" "CvSVMSolver *""'"); 
   }
   arg1 = reinterpret_cast< CvSVMSolver * >(argp1);
-  result = (char *) ((arg1)->y);
-  resultobj = SWIG_FromCharPtr((const char *)result);
+  result = (schar *) ((arg1)->y);
+  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_signed_char, 0 |  0 );
   return resultobj;
 fail:
   return NULL;
@@ -12066,7 +12122,7 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_select_working_set(PyObject *SWIGUNUSEDPA
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -12120,7 +12176,7 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_select_working_set_nu_svm(PyObject *SWIGU
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -12173,7 +12229,7 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_calc_rho(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -12226,7 +12282,7 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_calc_rho_nu_svm(PyObject *SWIGUNUSEDPARM(
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -12292,7 +12348,7 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_get_row_svc(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 |  0 );
@@ -12358,7 +12414,7 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_get_row_one_class(PyObject *SWIGUNUSEDPAR
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 |  0 );
@@ -12424,7 +12480,7 @@ SWIGINTERN PyObject *_wrap_CvSVMSolver_get_row_svr(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 |  0 );
@@ -12436,7 +12492,7 @@ fail:
 
 SWIGINTERN PyObject *CvSVMSolver_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvSVMSolver, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -12664,7 +12720,7 @@ SWIGINTERN PyObject *_wrap_new_CvSVMDecisionFunc(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvSVMDecisionFunc, SWIG_POINTER_NEW |  0 );
@@ -12693,7 +12749,7 @@ SWIGINTERN PyObject *_wrap_delete_CvSVMDecisionFunc(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -12705,7 +12761,7 @@ fail:
 
 SWIGINTERN PyObject *CvSVMDecisionFunc_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvSVMDecisionFunc, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -12721,7 +12777,7 @@ SWIGINTERN PyObject *_wrap_new_CvSVM__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvSVM, SWIG_POINTER_NEW |  0 );
@@ -12750,7 +12806,7 @@ SWIGINTERN PyObject *_wrap_delete_CvSVM(PyObject *SWIGUNUSEDPARM(self), PyObject
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -12824,7 +12880,7 @@ SWIGINTERN PyObject *_wrap_new_CvSVM__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvSVM, SWIG_POINTER_NEW |  0 );
@@ -12881,7 +12937,7 @@ SWIGINTERN PyObject *_wrap_new_CvSVM__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvSVM, SWIG_POINTER_NEW |  0 );
@@ -12929,7 +12985,7 @@ SWIGINTERN PyObject *_wrap_new_CvSVM__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvSVM, SWIG_POINTER_NEW |  0 );
@@ -12968,7 +13024,7 @@ SWIGINTERN PyObject *_wrap_new_CvSVM__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyO
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvSVM, SWIG_POINTER_NEW |  0 );
@@ -12984,7 +13040,7 @@ SWIGINTERN PyObject *_wrap_new_CvSVM(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 5); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -13078,7 +13134,13 @@ SWIGINTERN PyObject *_wrap_new_CvSVM(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvSVM'.\n  Possible C/C++ prototypes are:\n    CvSVM()\n    CvSVM(CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvSVMParams)\n    CvSVM(CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    CvSVM(CvMat const *,CvMat const *,CvMat const *)\n    CvSVM(CvMat const *,CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvSVM'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    CvSVM()\n"
+    "    CvSVM(CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvSVMParams)\n"
+    "    CvSVM(CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    CvSVM(CvMat const *,CvMat const *,CvMat const *)\n"
+    "    CvSVM(CvMat const *,CvMat const *)\n");
   return NULL;
 }
 
@@ -13156,7 +13218,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_train__SWIG_0(PyObject *SWIGUNUSEDPARM(self), P
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -13222,7 +13284,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_train__SWIG_1(PyObject *SWIGUNUSEDPARM(self), P
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -13279,7 +13341,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_train__SWIG_2(PyObject *SWIGUNUSEDPARM(self), P
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -13327,7 +13389,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_train__SWIG_3(PyObject *SWIGUNUSEDPARM(self), P
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -13343,7 +13405,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_train(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 6); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -13454,7 +13516,12 @@ SWIGINTERN PyObject *_wrap_CvSVM_train(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvSVM_train'.\n  Possible C/C++ prototypes are:\n    train(CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvSVMParams)\n    train(CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvSVM_train'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    train(CvSVM *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvSVMParams)\n"
+    "    train(CvSVM *,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvSVM *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvSVM *,CvMat const *,CvMat const *)\n");
   return NULL;
 }
 
@@ -13643,7 +13710,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_train_auto__SWIG_0(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -13820,7 +13887,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_train_auto__SWIG_1(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -13980,7 +14047,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_train_auto__SWIG_2(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -14123,7 +14190,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_train_auto__SWIG_3(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -14249,7 +14316,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_train_auto__SWIG_4(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -14358,7 +14425,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_train_auto__SWIG_5(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -14450,7 +14517,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_train_auto__SWIG_6(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -14533,7 +14600,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_train_auto__SWIG_7(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -14549,7 +14616,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_train_auto(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 13); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -14945,7 +15012,16 @@ SWIGINTERN PyObject *_wrap_CvSVM_train_auto(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvSVM_train_auto'.\n  Possible C/C++ prototypes are:\n    train_auto(CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvSVMParams,int,CvParamGrid,CvParamGrid,CvParamGrid,CvParamGrid,CvParamGrid,CvParamGrid)\n    train_auto(CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvSVMParams,int,CvParamGrid,CvParamGrid,CvParamGrid,CvParamGrid,CvParamGrid)\n    train_auto(CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvSVMParams,int,CvParamGrid,CvParamGrid,CvParamGrid,CvParamGrid)\n    train_auto(CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvSVMParams,int,CvParamGrid,CvParamGrid,CvParamGrid)\n    train_auto(CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvSVMParams,int,CvParamGrid,CvParamGrid)\n    train_auto(CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvSVMParams,int,CvParamGrid)\n    train_auto(CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvSVMParams,int)\n    train_auto(CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvSVMParams)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvSVM_train_auto'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    train_auto(CvSVM *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvSVMParams,int,CvParamGrid,CvParamGrid,CvParamGrid,CvParamGrid,CvParamGrid,CvParamGrid)\n"
+    "    train_auto(CvSVM *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvSVMParams,int,CvParamGrid,CvParamGrid,CvParamGrid,CvParamGrid,CvParamGrid)\n"
+    "    train_auto(CvSVM *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvSVMParams,int,CvParamGrid,CvParamGrid,CvParamGrid,CvParamGrid)\n"
+    "    train_auto(CvSVM *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvSVMParams,int,CvParamGrid,CvParamGrid,CvParamGrid)\n"
+    "    train_auto(CvSVM *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvSVMParams,int,CvParamGrid,CvParamGrid)\n"
+    "    train_auto(CvSVM *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvSVMParams,int,CvParamGrid)\n"
+    "    train_auto(CvSVM *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvSVMParams,int)\n"
+    "    train_auto(CvSVM *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvSVMParams)\n");
   return NULL;
 }
 
@@ -14979,7 +15055,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_predict(PyObject *SWIGUNUSEDPARM(self), PyObjec
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_float(static_cast< float >(result));
@@ -15009,7 +15085,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_get_support_vector_count(PyObject *SWIGUNUSEDPA
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_int(static_cast< int >(result));
@@ -15048,7 +15124,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_get_support_vector(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 |  0 );
@@ -15078,7 +15154,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_get_params(PyObject *SWIGUNUSEDPARM(self), PyOb
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj((new CvSVMParams(static_cast< const CvSVMParams& >(result))), SWIGTYPE_p_CvSVMParams, SWIG_POINTER_OWN |  0 );
@@ -15107,7 +15183,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_clear(PyObject *SWIGUNUSEDPARM(self), PyObject
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -15137,7 +15213,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_get_default_grid(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj((new CvParamGrid(static_cast< const CvParamGrid& >(result))), SWIGTYPE_p_CvParamGrid, SWIG_POINTER_OWN |  0 );
@@ -15185,7 +15261,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_write(PyObject *SWIGUNUSEDPARM(self), PyObject
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -15234,7 +15310,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_read(PyObject *SWIGUNUSEDPARM(self), PyObject *
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -15264,7 +15340,7 @@ SWIGINTERN PyObject *_wrap_CvSVM_get_var_count(PyObject *SWIGUNUSEDPARM(self), P
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_int(static_cast< int >(result));
@@ -15276,7 +15352,7 @@ fail:
 
 SWIGINTERN PyObject *CvSVM_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvSVM, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -15292,7 +15368,7 @@ SWIGINTERN PyObject *_wrap_new_CvEMParams__SWIG_0(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvEMParams, SWIG_POINTER_NEW |  0 );
@@ -15393,7 +15469,7 @@ SWIGINTERN PyObject *_wrap_new_CvEMParams__SWIG_1(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvEMParams, SWIG_POINTER_NEW |  0 );
@@ -15485,7 +15561,7 @@ SWIGINTERN PyObject *_wrap_new_CvEMParams__SWIG_2(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvEMParams, SWIG_POINTER_NEW |  0 );
@@ -15568,7 +15644,7 @@ SWIGINTERN PyObject *_wrap_new_CvEMParams__SWIG_3(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvEMParams, SWIG_POINTER_NEW |  0 );
@@ -15642,7 +15718,7 @@ SWIGINTERN PyObject *_wrap_new_CvEMParams__SWIG_4(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvEMParams, SWIG_POINTER_NEW |  0 );
@@ -15707,7 +15783,7 @@ SWIGINTERN PyObject *_wrap_new_CvEMParams__SWIG_5(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvEMParams, SWIG_POINTER_NEW |  0 );
@@ -15755,7 +15831,7 @@ SWIGINTERN PyObject *_wrap_new_CvEMParams__SWIG_6(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvEMParams, SWIG_POINTER_NEW |  0 );
@@ -15794,7 +15870,7 @@ SWIGINTERN PyObject *_wrap_new_CvEMParams__SWIG_7(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvEMParams, SWIG_POINTER_NEW |  0 );
@@ -15824,7 +15900,7 @@ SWIGINTERN PyObject *_wrap_new_CvEMParams__SWIG_8(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvEMParams, SWIG_POINTER_NEW |  0 );
@@ -15840,7 +15916,7 @@ SWIGINTERN PyObject *_wrap_new_CvEMParams(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 8); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -16077,7 +16153,17 @@ SWIGINTERN PyObject *_wrap_new_CvEMParams(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvEMParams'.\n  Possible C/C++ prototypes are:\n    CvEMParams()\n    CvEMParams(int,int,int,CvTermCriteria,CvMat const *,CvMat const *,CvMat const *,CvMat const **)\n    CvEMParams(int,int,int,CvTermCriteria,CvMat const *,CvMat const *,CvMat const *)\n    CvEMParams(int,int,int,CvTermCriteria,CvMat const *,CvMat const *)\n    CvEMParams(int,int,int,CvTermCriteria,CvMat const *)\n    CvEMParams(int,int,int,CvTermCriteria)\n    CvEMParams(int,int,int)\n    CvEMParams(int,int)\n    CvEMParams(int)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvEMParams'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    CvEMParams()\n"
+    "    CvEMParams(int,int,int,CvTermCriteria,CvMat const *,CvMat const *,CvMat const *,CvMat const **)\n"
+    "    CvEMParams(int,int,int,CvTermCriteria,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    CvEMParams(int,int,int,CvTermCriteria,CvMat const *,CvMat const *)\n"
+    "    CvEMParams(int,int,int,CvTermCriteria,CvMat const *)\n"
+    "    CvEMParams(int,int,int,CvTermCriteria)\n"
+    "    CvEMParams(int,int,int)\n"
+    "    CvEMParams(int,int)\n"
+    "    CvEMParams(int)\n");
   return NULL;
 }
 
@@ -16525,7 +16611,7 @@ SWIGINTERN PyObject *_wrap_delete_CvEMParams(PyObject *SWIGUNUSEDPARM(self), PyO
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -16537,7 +16623,7 @@ fail:
 
 SWIGINTERN PyObject *CvEMParams_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvEMParams, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -16553,7 +16639,7 @@ SWIGINTERN PyObject *_wrap_new_CvEM(PyObject *SWIGUNUSEDPARM(self), PyObject *ar
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvEM, SWIG_POINTER_NEW |  0 );
@@ -16582,7 +16668,7 @@ SWIGINTERN PyObject *_wrap_delete_CvEM(PyObject *SWIGUNUSEDPARM(self), PyObject
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -16656,7 +16742,7 @@ SWIGINTERN PyObject *_wrap_CvEM_train__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -16721,7 +16807,7 @@ SWIGINTERN PyObject *_wrap_CvEM_train__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -16769,7 +16855,7 @@ SWIGINTERN PyObject *_wrap_CvEM_train__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -16808,7 +16894,7 @@ SWIGINTERN PyObject *_wrap_CvEM_train__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -16824,7 +16910,7 @@ SWIGINTERN PyObject *_wrap_CvEM_train(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 5); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -16914,7 +17000,12 @@ SWIGINTERN PyObject *_wrap_CvEM_train(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvEM_train'.\n  Possible C/C++ prototypes are:\n    train(CvMat const *,CvMat const *,CvEMParams,CvMat *)\n    train(CvMat const *,CvMat const *,CvEMParams)\n    train(CvMat const *,CvMat const *)\n    train(CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvEM_train'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    train(CvEM *,CvMat const *,CvMat const *,CvEMParams,CvMat *)\n"
+    "    train(CvEM *,CvMat const *,CvMat const *,CvEMParams)\n"
+    "    train(CvEM *,CvMat const *,CvMat const *)\n"
+    "    train(CvEM *,CvMat const *)\n");
   return NULL;
 }
 
@@ -16957,7 +17048,7 @@ SWIGINTERN PyObject *_wrap_CvEM_predict(PyObject *SWIGUNUSEDPARM(self), PyObject
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_float(static_cast< float >(result));
@@ -16986,7 +17077,7 @@ SWIGINTERN PyObject *_wrap_CvEM_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -17016,7 +17107,7 @@ SWIGINTERN PyObject *_wrap_CvEM_get_nclusters(PyObject *SWIGUNUSEDPARM(self), Py
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_int(static_cast< int >(result));
@@ -17046,7 +17137,7 @@ SWIGINTERN PyObject *_wrap_CvEM_get_means(PyObject *SWIGUNUSEDPARM(self), PyObje
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvMat, 0 |  0 );
@@ -17076,7 +17167,7 @@ SWIGINTERN PyObject *_wrap_CvEM_get_weights(PyObject *SWIGUNUSEDPARM(self), PyOb
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvMat, 0 |  0 );
@@ -17106,7 +17197,7 @@ SWIGINTERN PyObject *_wrap_CvEM_get_probs(PyObject *SWIGUNUSEDPARM(self), PyObje
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvMat, 0 |  0 );
@@ -17136,7 +17227,7 @@ SWIGINTERN PyObject *_wrap_CvEM_get_covs(PyObject *SWIGUNUSEDPARM(self), PyObjec
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = result;
@@ -17148,7 +17239,7 @@ fail:
 
 SWIGINTERN PyObject *CvEM_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvEM, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -17270,7 +17361,7 @@ SWIGINTERN PyObject *_wrap_new_CvPair32s32f(PyObject *SWIGUNUSEDPARM(self), PyOb
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvPair32s32f, SWIG_POINTER_NEW |  0 );
@@ -17299,7 +17390,7 @@ SWIGINTERN PyObject *_wrap_delete_CvPair32s32f(PyObject *SWIGUNUSEDPARM(self), P
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -17311,7 +17402,7 @@ fail:
 
 SWIGINTERN PyObject *CvPair32s32f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvPair32s32f, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -17539,7 +17630,7 @@ SWIGINTERN PyObject *_wrap_new_CvDTreeSplit(PyObject *SWIGUNUSEDPARM(self), PyOb
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeSplit, SWIG_POINTER_NEW |  0 );
@@ -17568,7 +17659,7 @@ SWIGINTERN PyObject *_wrap_delete_CvDTreeSplit(PyObject *SWIGUNUSEDPARM(self), P
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -17580,7 +17671,7 @@ fail:
 
 SWIGINTERN PyObject *CvDTreeSplit_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvDTreeSplit, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -18727,7 +18818,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeNode_get_num_valid(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_int(static_cast< int >(result));
@@ -18774,7 +18865,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeNode_set_num_valid(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -18795,7 +18886,7 @@ SWIGINTERN PyObject *_wrap_new_CvDTreeNode(PyObject *SWIGUNUSEDPARM(self), PyObj
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeNode, SWIG_POINTER_NEW |  0 );
@@ -18824,7 +18915,7 @@ SWIGINTERN PyObject *_wrap_delete_CvDTreeNode(PyObject *SWIGUNUSEDPARM(self), Py
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -18836,7 +18927,7 @@ fail:
 
 SWIGINTERN PyObject *CvDTreeNode_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvDTreeNode, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -19329,7 +19420,7 @@ SWIGINTERN PyObject *_wrap_new_CvDTreeParams__SWIG_0(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeParams, SWIG_POINTER_NEW |  0 );
@@ -19431,7 +19522,7 @@ SWIGINTERN PyObject *_wrap_new_CvDTreeParams__SWIG_1(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeParams, SWIG_POINTER_NEW |  0 );
@@ -19447,7 +19538,7 @@ SWIGINTERN PyObject *_wrap_new_CvDTreeParams(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 9); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -19513,7 +19604,10 @@ SWIGINTERN PyObject *_wrap_new_CvDTreeParams(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvDTreeParams'.\n  Possible C/C++ prototypes are:\n    CvDTreeParams()\n    CvDTreeParams(int,int,float,bool,int,int,bool,bool,float const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvDTreeParams'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    CvDTreeParams()\n"
+    "    CvDTreeParams(int,int,float,bool,int,int,bool,bool,float const *)\n");
   return NULL;
 }
 
@@ -19537,7 +19631,7 @@ SWIGINTERN PyObject *_wrap_delete_CvDTreeParams(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -19549,7 +19643,7 @@ fail:
 
 SWIGINTERN PyObject *CvDTreeParams_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvDTreeParams, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -19565,7 +19659,7 @@ SWIGINTERN PyObject *_wrap_new_CvDTreeTrainData__SWIG_0(PyObject *SWIGUNUSEDPARM
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeTrainData, SWIG_POINTER_NEW |  0 );
@@ -19679,7 +19773,7 @@ SWIGINTERN PyObject *_wrap_new_CvDTreeTrainData__SWIG_1(PyObject *SWIGUNUSEDPARM
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeTrainData, SWIG_POINTER_NEW |  0 );
@@ -19784,7 +19878,7 @@ SWIGINTERN PyObject *_wrap_new_CvDTreeTrainData__SWIG_2(PyObject *SWIGUNUSEDPARM
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeTrainData, SWIG_POINTER_NEW |  0 );
@@ -19880,7 +19974,7 @@ SWIGINTERN PyObject *_wrap_new_CvDTreeTrainData__SWIG_3(PyObject *SWIGUNUSEDPARM
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeTrainData, SWIG_POINTER_NEW |  0 );
@@ -19964,7 +20058,7 @@ SWIGINTERN PyObject *_wrap_new_CvDTreeTrainData__SWIG_4(PyObject *SWIGUNUSEDPARM
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeTrainData, SWIG_POINTER_NEW |  0 );
@@ -20039,7 +20133,7 @@ SWIGINTERN PyObject *_wrap_new_CvDTreeTrainData__SWIG_5(PyObject *SWIGUNUSEDPARM
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeTrainData, SWIG_POINTER_NEW |  0 );
@@ -20105,7 +20199,7 @@ SWIGINTERN PyObject *_wrap_new_CvDTreeTrainData__SWIG_6(PyObject *SWIGUNUSEDPARM
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeTrainData, SWIG_POINTER_NEW |  0 );
@@ -20162,7 +20256,7 @@ SWIGINTERN PyObject *_wrap_new_CvDTreeTrainData__SWIG_7(PyObject *SWIGUNUSEDPARM
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeTrainData, SWIG_POINTER_NEW |  0 );
@@ -20210,7 +20304,7 @@ SWIGINTERN PyObject *_wrap_new_CvDTreeTrainData__SWIG_8(PyObject *SWIGUNUSEDPARM
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeTrainData, SWIG_POINTER_NEW |  0 );
@@ -20226,7 +20320,7 @@ SWIGINTERN PyObject *_wrap_new_CvDTreeTrainData(PyObject *self, PyObject *args)
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 10); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -20535,7 +20629,17 @@ SWIGINTERN PyObject *_wrap_new_CvDTreeTrainData(PyObject *self, PyObject *args)
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvDTreeTrainData'.\n  Possible C/C++ prototypes are:\n    CvDTreeTrainData()\n    CvDTreeTrainData(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvDTreeParams const &,bool,bool)\n    CvDTreeTrainData(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvDTreeParams const &,bool)\n    CvDTreeTrainData(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvDTreeParams const &)\n    CvDTreeTrainData(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    CvDTreeTrainData(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    CvDTreeTrainData(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *)\n    CvDTreeTrainData(CvMat const *,int,CvMat const *,CvMat const *)\n    CvDTreeTrainData(CvMat const *,int,CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvDTreeTrainData'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    CvDTreeTrainData()\n"
+    "    CvDTreeTrainData(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvDTreeParams const &,bool,bool)\n"
+    "    CvDTreeTrainData(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvDTreeParams const &,bool)\n"
+    "    CvDTreeTrainData(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvDTreeParams const &)\n"
+    "    CvDTreeTrainData(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    CvDTreeTrainData(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    CvDTreeTrainData(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    CvDTreeTrainData(CvMat const *,int,CvMat const *,CvMat const *)\n"
+    "    CvDTreeTrainData(CvMat const *,int,CvMat const *)\n");
   return NULL;
 }
 
@@ -20559,7 +20663,7 @@ SWIGINTERN PyObject *_wrap_delete_CvDTreeTrainData(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -20690,7 +20794,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_set_data__SWIG_0(PyObject *SWIGUNUSE
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -20812,7 +20916,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_set_data__SWIG_1(PyObject *SWIGUNUSE
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -20925,7 +21029,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_set_data__SWIG_2(PyObject *SWIGUNUSE
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -21029,7 +21133,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_set_data__SWIG_3(PyObject *SWIGUNUSE
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -21121,7 +21225,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_set_data__SWIG_4(PyObject *SWIGUNUSE
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -21204,7 +21308,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_set_data__SWIG_5(PyObject *SWIGUNUSE
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -21278,7 +21382,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_set_data__SWIG_6(PyObject *SWIGUNUSE
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -21343,7 +21447,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_set_data__SWIG_7(PyObject *SWIGUNUSE
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -21399,7 +21503,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_set_data__SWIG_8(PyObject *SWIGUNUSE
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -21415,7 +21519,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_set_data(PyObject *self, PyObject *a
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 12); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -21828,7 +21932,17 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_set_data(PyObject *self, PyObject *a
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvDTreeTrainData_set_data'.\n  Possible C/C++ prototypes are:\n    set_data(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvDTreeParams const &,bool,bool,bool)\n    set_data(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvDTreeParams const &,bool,bool)\n    set_data(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvDTreeParams const &,bool)\n    set_data(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvDTreeParams const &)\n    set_data(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    set_data(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    set_data(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *)\n    set_data(CvMat const *,int,CvMat const *,CvMat const *)\n    set_data(CvMat const *,int,CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvDTreeTrainData_set_data'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    set_data(CvDTreeTrainData *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvDTreeParams const &,bool,bool,bool)\n"
+    "    set_data(CvDTreeTrainData *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvDTreeParams const &,bool,bool)\n"
+    "    set_data(CvDTreeTrainData *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvDTreeParams const &,bool)\n"
+    "    set_data(CvDTreeTrainData *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvDTreeParams const &)\n"
+    "    set_data(CvDTreeTrainData *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    set_data(CvDTreeTrainData *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    set_data(CvDTreeTrainData *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    set_data(CvDTreeTrainData *,CvMat const *,int,CvMat const *,CvMat const *)\n"
+    "    set_data(CvDTreeTrainData *,CvMat const *,int,CvMat const *)\n");
   return NULL;
 }
 
@@ -21897,7 +22011,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_get_vectors__SWIG_0(PyObject *SWIGUN
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -21962,7 +22076,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_get_vectors__SWIG_1(PyObject *SWIGUN
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -21978,7 +22092,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_get_vectors(PyObject *self, PyObject
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 6); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -22048,7 +22162,10 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_get_vectors(PyObject *self, PyObject
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvDTreeTrainData_get_vectors'.\n  Possible C/C++ prototypes are:\n    get_vectors(CvMat const *,float *,uchar *,float *,bool)\n    get_vectors(CvMat const *,float *,uchar *,float *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvDTreeTrainData_get_vectors'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    get_vectors(CvDTreeTrainData *,CvMat const *,float *,uchar *,float *,bool)\n"
+    "    get_vectors(CvDTreeTrainData *,CvMat const *,float *,uchar *,float *)\n");
   return NULL;
 }
 
@@ -22082,7 +22199,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_subsample_data(PyObject *SWIGUNUSEDP
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeNode, 0 |  0 );
@@ -22120,7 +22237,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_write_params(PyObject *SWIGUNUSEDPAR
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -22167,7 +22284,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_read_params(PyObject *SWIGUNUSEDPARM
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -22196,7 +22313,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_clear(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -22226,7 +22343,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_get_num_classes(PyObject *SWIGUNUSED
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_int(static_cast< int >(result));
@@ -22265,7 +22382,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_get_var_type(PyObject *SWIGUNUSEDPAR
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_int(static_cast< int >(result));
@@ -22295,7 +22412,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_get_work_var_count(PyObject *SWIGUNU
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_int(static_cast< int >(result));
@@ -22334,7 +22451,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_get_class_labels(PyObject *SWIGUNUSE
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 |  0 );
@@ -22373,7 +22490,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_get_ord_responses(PyObject *SWIGUNUS
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 |  0 );
@@ -22412,7 +22529,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_get_labels(PyObject *SWIGUNUSEDPARM(
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 |  0 );
@@ -22460,7 +22577,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_get_cat_var_data(PyObject *SWIGUNUSE
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 |  0 );
@@ -22508,7 +22625,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_get_ord_var_data(PyObject *SWIGUNUSE
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvPair32s32f, 0 |  0 );
@@ -22547,7 +22664,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_get_child_buf_idx(PyObject *SWIGUNUS
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_int(static_cast< int >(result));
@@ -22589,7 +22706,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_set_params(PyObject *SWIGUNUSEDPARM(
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -22655,7 +22772,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_new_node(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeNode, 0 |  0 );
@@ -22730,7 +22847,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_new_split_ord(PyObject *SWIGUNUSEDPA
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeSplit, 0 |  0 );
@@ -22778,7 +22895,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_new_split_cat(PyObject *SWIGUNUSEDPA
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeSplit, 0 |  0 );
@@ -22816,7 +22933,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_free_node_data(PyObject *SWIGUNUSEDP
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -22845,7 +22962,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_free_train_data(PyObject *SWIGUNUSED
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -22883,7 +23000,7 @@ SWIGINTERN PyObject *_wrap_CvDTreeTrainData_free_node(PyObject *SWIGUNUSEDPARM(s
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -24613,7 +24730,7 @@ fail:
 
 SWIGINTERN PyObject *CvDTreeTrainData_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvDTreeTrainData, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -24629,7 +24746,7 @@ SWIGINTERN PyObject *_wrap_new_CvDTree(PyObject *SWIGUNUSEDPARM(self), PyObject
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTree, SWIG_POINTER_NEW |  0 );
@@ -24658,7 +24775,7 @@ SWIGINTERN PyObject *_wrap_delete_CvDTree(PyObject *SWIGUNUSEDPARM(self), PyObje
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -24768,7 +24885,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_train__SWIG_0(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -24861,7 +24978,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_train__SWIG_1(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -24945,7 +25062,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_train__SWIG_2(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -25020,7 +25137,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_train__SWIG_3(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -25086,7 +25203,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_train__SWIG_4(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -25143,7 +25260,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_train__SWIG_5(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -25191,7 +25308,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_train__SWIG_6(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -25207,7 +25324,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_train(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 9); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -25456,7 +25573,15 @@ SWIGINTERN PyObject *_wrap_CvDTree_train(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvDTree_train'.\n  Possible C/C++ prototypes are:\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvDTreeParams)\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,int,CvMat const *,CvMat const *)\n    train(CvMat const *,int,CvMat const *)\n    train(CvDTreeTrainData *,CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvDTree_train'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    train(CvDTree *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvDTreeParams)\n"
+    "    train(CvDTree *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvDTree *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvDTree *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvDTree *,CvMat const *,int,CvMat const *,CvMat const *)\n"
+    "    train(CvDTree *,CvMat const *,int,CvMat const *)\n"
+    "    train(CvDTree *,CvDTreeTrainData *,CvMat const *)\n");
   return NULL;
 }
 
@@ -25508,7 +25633,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_predict__SWIG_0(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeNode, 0 |  0 );
@@ -25556,7 +25681,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_predict__SWIG_1(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeNode, 0 |  0 );
@@ -25595,7 +25720,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_predict__SWIG_2(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeNode, 0 |  0 );
@@ -25611,7 +25736,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_predict(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 4); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -25675,7 +25800,11 @@ SWIGINTERN PyObject *_wrap_CvDTree_predict(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvDTree_predict'.\n  Possible C/C++ prototypes are:\n    predict(CvMat const *,CvMat const *,bool)\n    predict(CvMat const *,CvMat const *)\n    predict(CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvDTree_predict'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    predict(CvDTree const *,CvMat const *,CvMat const *,bool)\n"
+    "    predict(CvDTree const *,CvMat const *,CvMat const *)\n"
+    "    predict(CvDTree const *,CvMat const *)\n");
   return NULL;
 }
 
@@ -25700,7 +25829,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_get_var_importance(PyObject *SWIGUNUSEDPARM(s
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvMat, 0 |  0 );
@@ -25729,7 +25858,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_clear(PyObject *SWIGUNUSEDPARM(self), PyObjec
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -25776,7 +25905,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_read__SWIG_0(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -25824,7 +25953,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_write__SWIG_0(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -25882,7 +26011,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_read__SWIG_1(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -25898,7 +26027,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_read(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 4); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -25947,7 +26076,10 @@ SWIGINTERN PyObject *_wrap_CvDTree_read(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvDTree_read'.\n  Possible C/C++ prototypes are:\n    read(CvFileStorage *,CvFileNode *)\n    read(CvFileStorage *,CvFileNode *,CvDTreeTrainData *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvDTree_read'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    read(CvDTree *,CvFileStorage *,CvFileNode *)\n"
+    "    read(CvDTree *,CvFileStorage *,CvFileNode *,CvDTreeTrainData *)\n");
   return NULL;
 }
 
@@ -25980,7 +26112,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_write__SWIG_1(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -25996,7 +26128,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_write(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 3); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -26034,7 +26166,10 @@ SWIGINTERN PyObject *_wrap_CvDTree_write(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvDTree_write'.\n  Possible C/C++ prototypes are:\n    write(CvFileStorage *,char const *)\n    write(CvFileStorage *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvDTree_write'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    write(CvDTree *,CvFileStorage *,char const *)\n"
+    "    write(CvDTree *,CvFileStorage *)\n");
   return NULL;
 }
 
@@ -26059,7 +26194,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_get_root(PyObject *SWIGUNUSEDPARM(self), PyOb
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeNode, 0 |  0 );
@@ -26089,7 +26224,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_get_pruned_tree_idx(PyObject *SWIGUNUSEDPARM(
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_int(static_cast< int >(result));
@@ -26119,7 +26254,7 @@ SWIGINTERN PyObject *_wrap_CvDTree_get_data(PyObject *SWIGUNUSEDPARM(self), PyOb
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvDTreeTrainData, 0 |  0 );
@@ -26131,7 +26266,7 @@ fail:
 
 SWIGINTERN PyObject *CvDTree_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvDTree, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -26147,7 +26282,7 @@ SWIGINTERN PyObject *_wrap_new_CvForestTree(PyObject *SWIGUNUSEDPARM(self), PyOb
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvForestTree, SWIG_POINTER_NEW |  0 );
@@ -26176,7 +26311,7 @@ SWIGINTERN PyObject *_wrap_delete_CvForestTree(PyObject *SWIGUNUSEDPARM(self), P
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -26233,7 +26368,7 @@ SWIGINTERN PyObject *_wrap_CvForestTree_train__SWIG_0(PyObject *SWIGUNUSEDPARM(s
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -26263,7 +26398,7 @@ SWIGINTERN PyObject *_wrap_CvForestTree_get_var_count(PyObject *SWIGUNUSEDPARM(s
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_int(static_cast< int >(result));
@@ -26328,7 +26463,7 @@ SWIGINTERN PyObject *_wrap_CvForestTree_read__SWIG_0(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -26438,7 +26573,7 @@ SWIGINTERN PyObject *_wrap_CvForestTree_train__SWIG_1(PyObject *SWIGUNUSEDPARM(s
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -26531,7 +26666,7 @@ SWIGINTERN PyObject *_wrap_CvForestTree_train__SWIG_2(PyObject *SWIGUNUSEDPARM(s
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -26615,7 +26750,7 @@ SWIGINTERN PyObject *_wrap_CvForestTree_train__SWIG_3(PyObject *SWIGUNUSEDPARM(s
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -26690,7 +26825,7 @@ SWIGINTERN PyObject *_wrap_CvForestTree_train__SWIG_4(PyObject *SWIGUNUSEDPARM(s
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -26756,7 +26891,7 @@ SWIGINTERN PyObject *_wrap_CvForestTree_train__SWIG_5(PyObject *SWIGUNUSEDPARM(s
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -26813,7 +26948,7 @@ SWIGINTERN PyObject *_wrap_CvForestTree_train__SWIG_6(PyObject *SWIGUNUSEDPARM(s
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -26861,7 +26996,7 @@ SWIGINTERN PyObject *_wrap_CvForestTree_train__SWIG_7(PyObject *SWIGUNUSEDPARM(s
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -26877,7 +27012,7 @@ SWIGINTERN PyObject *_wrap_CvForestTree_train(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 9); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -27150,7 +27285,16 @@ SWIGINTERN PyObject *_wrap_CvForestTree_train(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvForestTree_train'.\n  Possible C/C++ prototypes are:\n    train(CvDTreeTrainData *,CvMat const *,CvRTrees *)\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvDTreeParams)\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,int,CvMat const *,CvMat const *)\n    train(CvMat const *,int,CvMat const *)\n    train(CvDTreeTrainData *,CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvForestTree_train'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    train(CvForestTree *,CvDTreeTrainData *,CvMat const *,CvRTrees *)\n"
+    "    train(CvForestTree *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvDTreeParams)\n"
+    "    train(CvForestTree *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvForestTree *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvForestTree *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvForestTree *,CvMat const *,int,CvMat const *,CvMat const *)\n"
+    "    train(CvForestTree *,CvMat const *,int,CvMat const *)\n"
+    "    train(CvForestTree *,CvDTreeTrainData *,CvMat const *)\n");
   return NULL;
 }
 
@@ -27192,7 +27336,7 @@ SWIGINTERN PyObject *_wrap_CvForestTree_read__SWIG_1(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -27248,7 +27392,7 @@ SWIGINTERN PyObject *_wrap_CvForestTree_read__SWIG_2(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -27264,7 +27408,7 @@ SWIGINTERN PyObject *_wrap_CvForestTree_read(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 5); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -27342,14 +27486,18 @@ SWIGINTERN PyObject *_wrap_CvForestTree_read(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvForestTree_read'.\n  Possible C/C++ prototypes are:\n    read(CvFileStorage *,CvFileNode *,CvRTrees *,CvDTreeTrainData *)\n    read(CvFileStorage *,CvFileNode *)\n    read(CvFileStorage *,CvFileNode *,CvDTreeTrainData *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvForestTree_read'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    read(CvForestTree *,CvFileStorage *,CvFileNode *,CvRTrees *,CvDTreeTrainData *)\n"
+    "    read(CvForestTree *,CvFileStorage *,CvFileNode *)\n"
+    "    read(CvForestTree *,CvFileStorage *,CvFileNode *,CvDTreeTrainData *)\n");
   return NULL;
 }
 
 
 SWIGINTERN PyObject *CvForestTree_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvForestTree, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -27524,7 +27672,7 @@ SWIGINTERN PyObject *_wrap_new_CvRTParams__SWIG_0(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvRTParams, SWIG_POINTER_NEW |  0 );
@@ -27644,7 +27792,7 @@ SWIGINTERN PyObject *_wrap_new_CvRTParams__SWIG_1(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvRTParams, SWIG_POINTER_NEW |  0 );
@@ -27660,7 +27808,7 @@ SWIGINTERN PyObject *_wrap_new_CvRTParams(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 11); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -27738,7 +27886,10 @@ SWIGINTERN PyObject *_wrap_new_CvRTParams(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvRTParams'.\n  Possible C/C++ prototypes are:\n    CvRTParams()\n    CvRTParams(int,int,float,bool,int,float const *,bool,int,int,float,int)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvRTParams'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    CvRTParams()\n"
+    "    CvRTParams(int,int,float,bool,int,float const *,bool,int,int,float,int)\n");
   return NULL;
 }
 
@@ -27762,7 +27913,7 @@ SWIGINTERN PyObject *_wrap_delete_CvRTParams(PyObject *SWIGUNUSEDPARM(self), PyO
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -27774,7 +27925,7 @@ fail:
 
 SWIGINTERN PyObject *CvRTParams_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvRTParams, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -27790,7 +27941,7 @@ SWIGINTERN PyObject *_wrap_new_CvRTrees(PyObject *SWIGUNUSEDPARM(self), PyObject
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvRTrees, SWIG_POINTER_NEW |  0 );
@@ -27819,7 +27970,7 @@ SWIGINTERN PyObject *_wrap_delete_CvRTrees(PyObject *SWIGUNUSEDPARM(self), PyObj
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -27929,7 +28080,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_train__SWIG_0(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -28022,7 +28173,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_train__SWIG_1(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -28106,7 +28257,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_train__SWIG_2(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -28181,7 +28332,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_train__SWIG_3(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -28247,7 +28398,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_train__SWIG_4(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -28304,7 +28455,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_train__SWIG_5(PyObject *SWIGUNUSEDPARM(self)
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -28320,7 +28471,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_train(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 9); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -28550,7 +28701,14 @@ SWIGINTERN PyObject *_wrap_CvRTrees_train(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvRTrees_train'.\n  Possible C/C++ prototypes are:\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvRTParams)\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,int,CvMat const *,CvMat const *)\n    train(CvMat const *,int,CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvRTrees_train'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    train(CvRTrees *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvRTParams)\n"
+    "    train(CvRTrees *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvRTrees *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvRTrees *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvRTrees *,CvMat const *,int,CvMat const *,CvMat const *)\n"
+    "    train(CvRTrees *,CvMat const *,int,CvMat const *)\n");
   return NULL;
 }
 
@@ -28593,7 +28751,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_predict__SWIG_0(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_float(static_cast< float >(result));
@@ -28632,7 +28790,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_predict__SWIG_1(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_float(static_cast< float >(result));
@@ -28648,7 +28806,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_predict(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 3); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -28687,7 +28845,10 @@ SWIGINTERN PyObject *_wrap_CvRTrees_predict(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvRTrees_predict'.\n  Possible C/C++ prototypes are:\n    predict(CvMat const *,CvMat const *)\n    predict(CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvRTrees_predict'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    predict(CvRTrees const *,CvMat const *,CvMat const *)\n"
+    "    predict(CvRTrees const *,CvMat const *)\n");
   return NULL;
 }
 
@@ -28711,7 +28872,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_clear(PyObject *SWIGUNUSEDPARM(self), PyObje
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -28741,7 +28902,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_get_var_importance(PyObject *SWIGUNUSEDPARM(
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvMat, 0 |  0 );
@@ -28807,7 +28968,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_get_proximity__SWIG_0(PyObject *SWIGUNUSEDPA
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_float(static_cast< float >(result));
@@ -28864,7 +29025,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_get_proximity__SWIG_1(PyObject *SWIGUNUSEDPA
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_float(static_cast< float >(result));
@@ -28912,7 +29073,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_get_proximity__SWIG_2(PyObject *SWIGUNUSEDPA
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_float(static_cast< float >(result));
@@ -28928,7 +29089,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_get_proximity(PyObject *self, PyObject *args
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 5); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -29006,7 +29167,11 @@ SWIGINTERN PyObject *_wrap_CvRTrees_get_proximity(PyObject *self, PyObject *args
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvRTrees_get_proximity'.\n  Possible C/C++ prototypes are:\n    get_proximity(CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    get_proximity(CvMat const *,CvMat const *,CvMat const *)\n    get_proximity(CvMat const *,CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvRTrees_get_proximity'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    get_proximity(CvRTrees const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    get_proximity(CvRTrees const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    get_proximity(CvRTrees const *,CvMat const *,CvMat const *)\n");
   return NULL;
 }
 
@@ -29048,7 +29213,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_read(PyObject *SWIGUNUSEDPARM(self), PyObjec
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -29096,7 +29261,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_write(PyObject *SWIGUNUSEDPARM(self), PyObje
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -29128,7 +29293,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_get_active_var_mask(PyObject *SWIGUNUSEDPARM
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvMat, 0 |  0 );
@@ -29158,7 +29323,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_get_rng(PyObject *SWIGUNUSEDPARM(self), PyOb
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   {
@@ -29191,7 +29356,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_get_tree_count(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_int(static_cast< int >(result));
@@ -29230,7 +29395,7 @@ SWIGINTERN PyObject *_wrap_CvRTrees_get_tree(PyObject *SWIGUNUSEDPARM(self), PyO
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvForestTree, 0 |  0 );
@@ -29242,7 +29407,7 @@ fail:
 
 SWIGINTERN PyObject *CvRTrees_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvRTrees, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -29470,7 +29635,7 @@ SWIGINTERN PyObject *_wrap_new_CvBoostParams__SWIG_0(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvBoostParams, SWIG_POINTER_NEW |  0 );
@@ -29545,7 +29710,7 @@ SWIGINTERN PyObject *_wrap_new_CvBoostParams__SWIG_1(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvBoostParams, SWIG_POINTER_NEW |  0 );
@@ -29561,7 +29726,7 @@ SWIGINTERN PyObject *_wrap_new_CvBoostParams(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 6); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -29609,7 +29774,10 @@ SWIGINTERN PyObject *_wrap_new_CvBoostParams(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvBoostParams'.\n  Possible C/C++ prototypes are:\n    CvBoostParams()\n    CvBoostParams(int,int,double,int,bool,float const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvBoostParams'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    CvBoostParams()\n"
+    "    CvBoostParams(int,int,double,int,bool,float const *)\n");
   return NULL;
 }
 
@@ -29633,7 +29801,7 @@ SWIGINTERN PyObject *_wrap_delete_CvBoostParams(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -29645,7 +29813,7 @@ fail:
 
 SWIGINTERN PyObject *CvBoostParams_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvBoostParams, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -29661,7 +29829,7 @@ SWIGINTERN PyObject *_wrap_new_CvBoostTree(PyObject *SWIGUNUSEDPARM(self), PyObj
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvBoostTree, SWIG_POINTER_NEW |  0 );
@@ -29690,7 +29858,7 @@ SWIGINTERN PyObject *_wrap_delete_CvBoostTree(PyObject *SWIGUNUSEDPARM(self), Py
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -29747,7 +29915,7 @@ SWIGINTERN PyObject *_wrap_CvBoostTree_train__SWIG_0(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -29785,7 +29953,7 @@ SWIGINTERN PyObject *_wrap_CvBoostTree_scale(PyObject *SWIGUNUSEDPARM(self), PyO
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -29850,7 +30018,7 @@ SWIGINTERN PyObject *_wrap_CvBoostTree_read__SWIG_0(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -29879,7 +30047,7 @@ SWIGINTERN PyObject *_wrap_CvBoostTree_clear(PyObject *SWIGUNUSEDPARM(self), PyO
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -29989,7 +30157,7 @@ SWIGINTERN PyObject *_wrap_CvBoostTree_train__SWIG_1(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -30082,7 +30250,7 @@ SWIGINTERN PyObject *_wrap_CvBoostTree_train__SWIG_2(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -30166,7 +30334,7 @@ SWIGINTERN PyObject *_wrap_CvBoostTree_train__SWIG_3(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -30241,7 +30409,7 @@ SWIGINTERN PyObject *_wrap_CvBoostTree_train__SWIG_4(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -30307,7 +30475,7 @@ SWIGINTERN PyObject *_wrap_CvBoostTree_train__SWIG_5(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -30364,7 +30532,7 @@ SWIGINTERN PyObject *_wrap_CvBoostTree_train__SWIG_6(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -30412,7 +30580,7 @@ SWIGINTERN PyObject *_wrap_CvBoostTree_train__SWIG_7(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -30428,7 +30596,7 @@ SWIGINTERN PyObject *_wrap_CvBoostTree_train(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 9); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -30701,7 +30869,16 @@ SWIGINTERN PyObject *_wrap_CvBoostTree_train(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvBoostTree_train'.\n  Possible C/C++ prototypes are:\n    train(CvDTreeTrainData *,CvMat const *,CvBoost *)\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvDTreeParams)\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,int,CvMat const *,CvMat const *)\n    train(CvMat const *,int,CvMat const *)\n    train(CvDTreeTrainData *,CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvBoostTree_train'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    train(CvBoostTree *,CvDTreeTrainData *,CvMat const *,CvBoost *)\n"
+    "    train(CvBoostTree *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvDTreeParams)\n"
+    "    train(CvBoostTree *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvBoostTree *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvBoostTree *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvBoostTree *,CvMat const *,int,CvMat const *,CvMat const *)\n"
+    "    train(CvBoostTree *,CvMat const *,int,CvMat const *)\n"
+    "    train(CvBoostTree *,CvDTreeTrainData *,CvMat const *)\n");
   return NULL;
 }
 
@@ -30743,7 +30920,7 @@ SWIGINTERN PyObject *_wrap_CvBoostTree_read__SWIG_1(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -30799,7 +30976,7 @@ SWIGINTERN PyObject *_wrap_CvBoostTree_read__SWIG_2(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -30815,7 +30992,7 @@ SWIGINTERN PyObject *_wrap_CvBoostTree_read(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 5); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -30893,14 +31070,18 @@ SWIGINTERN PyObject *_wrap_CvBoostTree_read(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvBoostTree_read'.\n  Possible C/C++ prototypes are:\n    read(CvFileStorage *,CvFileNode *,CvBoost *,CvDTreeTrainData *)\n    read(CvFileStorage *,CvFileNode *)\n    read(CvFileStorage *,CvFileNode *,CvDTreeTrainData *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvBoostTree_read'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    read(CvBoostTree *,CvFileStorage *,CvFileNode *,CvBoost *,CvDTreeTrainData *)\n"
+    "    read(CvBoostTree *,CvFileStorage *,CvFileNode *)\n"
+    "    read(CvBoostTree *,CvFileStorage *,CvFileNode *,CvDTreeTrainData *)\n");
   return NULL;
 }
 
 
 SWIGINTERN PyObject *CvBoostTree_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvBoostTree, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -30916,7 +31097,7 @@ SWIGINTERN PyObject *_wrap_new_CvBoost__SWIG_0(PyObject *SWIGUNUSEDPARM(self), P
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvBoost, SWIG_POINTER_NEW |  0 );
@@ -30945,7 +31126,7 @@ SWIGINTERN PyObject *_wrap_delete_CvBoost(PyObject *SWIGUNUSEDPARM(self), PyObje
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -31046,7 +31227,7 @@ SWIGINTERN PyObject *_wrap_new_CvBoost__SWIG_1(PyObject *SWIGUNUSEDPARM(self), P
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvBoost, SWIG_POINTER_NEW |  0 );
@@ -31130,7 +31311,7 @@ SWIGINTERN PyObject *_wrap_new_CvBoost__SWIG_2(PyObject *SWIGUNUSEDPARM(self), P
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvBoost, SWIG_POINTER_NEW |  0 );
@@ -31205,7 +31386,7 @@ SWIGINTERN PyObject *_wrap_new_CvBoost__SWIG_3(PyObject *SWIGUNUSEDPARM(self), P
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvBoost, SWIG_POINTER_NEW |  0 );
@@ -31271,7 +31452,7 @@ SWIGINTERN PyObject *_wrap_new_CvBoost__SWIG_4(PyObject *SWIGUNUSEDPARM(self), P
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvBoost, SWIG_POINTER_NEW |  0 );
@@ -31328,7 +31509,7 @@ SWIGINTERN PyObject *_wrap_new_CvBoost__SWIG_5(PyObject *SWIGUNUSEDPARM(self), P
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvBoost, SWIG_POINTER_NEW |  0 );
@@ -31376,7 +31557,7 @@ SWIGINTERN PyObject *_wrap_new_CvBoost__SWIG_6(PyObject *SWIGUNUSEDPARM(self), P
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvBoost, SWIG_POINTER_NEW |  0 );
@@ -31392,7 +31573,7 @@ SWIGINTERN PyObject *_wrap_new_CvBoost(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 8); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -31595,7 +31776,15 @@ SWIGINTERN PyObject *_wrap_new_CvBoost(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvBoost'.\n  Possible C/C++ prototypes are:\n    CvBoost()\n    CvBoost(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvBoostParams)\n    CvBoost(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    CvBoost(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    CvBoost(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *)\n    CvBoost(CvMat const *,int,CvMat const *,CvMat const *)\n    CvBoost(CvMat const *,int,CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvBoost'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    CvBoost()\n"
+    "    CvBoost(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvBoostParams)\n"
+    "    CvBoost(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    CvBoost(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    CvBoost(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    CvBoost(CvMat const *,int,CvMat const *,CvMat const *)\n"
+    "    CvBoost(CvMat const *,int,CvMat const *)\n");
   return NULL;
 }
 
@@ -31709,7 +31898,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_train__SWIG_0(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -31819,7 +32008,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_train__SWIG_1(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -31912,7 +32101,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_train__SWIG_2(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -31996,7 +32185,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_train__SWIG_3(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -32071,7 +32260,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_train__SWIG_4(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -32137,7 +32326,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_train__SWIG_5(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -32194,7 +32383,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_train__SWIG_6(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_bool(static_cast< bool >(result));
@@ -32210,7 +32399,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_train(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 10); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -32495,7 +32684,15 @@ SWIGINTERN PyObject *_wrap_CvBoost_train(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvBoost_train'.\n  Possible C/C++ prototypes are:\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvBoostParams,bool)\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvBoostParams)\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,int,CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,int,CvMat const *,CvMat const *)\n    train(CvMat const *,int,CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvBoost_train'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    train(CvBoost *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvBoostParams,bool)\n"
+    "    train(CvBoost *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvBoostParams)\n"
+    "    train(CvBoost *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvBoost *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvBoost *,CvMat const *,int,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvBoost *,CvMat const *,int,CvMat const *,CvMat const *)\n"
+    "    train(CvBoost *,CvMat const *,int,CvMat const *)\n");
   return NULL;
 }
 
@@ -32573,7 +32770,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_predict__SWIG_0(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_float(static_cast< float >(result));
@@ -32647,7 +32844,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_predict__SWIG_1(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_float(static_cast< float >(result));
@@ -32704,7 +32901,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_predict__SWIG_2(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_float(static_cast< float >(result));
@@ -32752,7 +32949,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_predict__SWIG_3(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_float(static_cast< float >(result));
@@ -32791,7 +32988,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_predict__SWIG_4(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_float(static_cast< float >(result));
@@ -32807,7 +33004,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_predict(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 6); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -32932,7 +33129,13 @@ SWIGINTERN PyObject *_wrap_CvBoost_predict(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvBoost_predict'.\n  Possible C/C++ prototypes are:\n    predict(CvMat const *,CvMat const *,CvMat *,CvSlice,bool)\n    predict(CvMat const *,CvMat const *,CvMat *,CvSlice)\n    predict(CvMat const *,CvMat const *,CvMat *)\n    predict(CvMat const *,CvMat const *)\n    predict(CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvBoost_predict'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    predict(CvBoost const *,CvMat const *,CvMat const *,CvMat *,CvSlice,bool)\n"
+    "    predict(CvBoost const *,CvMat const *,CvMat const *,CvMat *,CvSlice)\n"
+    "    predict(CvBoost const *,CvMat const *,CvMat const *,CvMat *)\n"
+    "    predict(CvBoost const *,CvMat const *,CvMat const *)\n"
+    "    predict(CvBoost const *,CvMat const *)\n");
   return NULL;
 }
 
@@ -32973,7 +33176,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_prune(PyObject *SWIGUNUSEDPARM(self), PyObjec
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -33002,7 +33205,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_clear(PyObject *SWIGUNUSEDPARM(self), PyObjec
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -33050,7 +33253,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_write(PyObject *SWIGUNUSEDPARM(self), PyObjec
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -33099,7 +33302,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_read(PyObject *SWIGUNUSEDPARM(self), PyObject
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -33129,7 +33332,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_get_weak_predictors(PyObject *SWIGUNUSEDPARM(
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvSeq, 0 |  0 );
@@ -33159,7 +33362,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_get_weights(PyObject *SWIGUNUSEDPARM(self), P
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvMat, 0 |  0 );
@@ -33189,7 +33392,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_get_subtree_weights(PyObject *SWIGUNUSEDPARM(
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvMat, 0 |  0 );
@@ -33219,7 +33422,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_get_weak_response(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvMat, 0 |  0 );
@@ -33252,7 +33455,7 @@ SWIGINTERN PyObject *_wrap_CvBoost_get_params(PyObject *SWIGUNUSEDPARM(self), Py
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvBoostParams, 0 |  0 );
@@ -33264,7 +33467,7 @@ fail:
 
 SWIGINTERN PyObject *CvBoost_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvBoost, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -33280,7 +33483,7 @@ SWIGINTERN PyObject *_wrap_new_CvANN_MLP_TrainParams__SWIG_0(PyObject *SWIGUNUSE
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvANN_MLP_TrainParams, SWIG_POINTER_NEW |  0 );
@@ -33345,7 +33548,7 @@ SWIGINTERN PyObject *_wrap_new_CvANN_MLP_TrainParams__SWIG_1(PyObject *SWIGUNUSE
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvANN_MLP_TrainParams, SWIG_POINTER_NEW |  0 );
@@ -33401,7 +33604,7 @@ SWIGINTERN PyObject *_wrap_new_CvANN_MLP_TrainParams__SWIG_2(PyObject *SWIGUNUSE
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvANN_MLP_TrainParams, SWIG_POINTER_NEW |  0 );
@@ -33417,7 +33620,7 @@ SWIGINTERN PyObject *_wrap_new_CvANN_MLP_TrainParams(PyObject *self, PyObject *a
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 4); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -33472,7 +33675,11 @@ SWIGINTERN PyObject *_wrap_new_CvANN_MLP_TrainParams(PyObject *self, PyObject *a
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvANN_MLP_TrainParams'.\n  Possible C/C++ prototypes are:\n    CvANN_MLP_TrainParams()\n    CvANN_MLP_TrainParams(CvTermCriteria,int,double,double)\n    CvANN_MLP_TrainParams(CvTermCriteria,int,double)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvANN_MLP_TrainParams'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    CvANN_MLP_TrainParams()\n"
+    "    CvANN_MLP_TrainParams(CvTermCriteria,int,double,double)\n"
+    "    CvANN_MLP_TrainParams(CvTermCriteria,int,double)\n");
   return NULL;
 }
 
@@ -33496,7 +33703,7 @@ SWIGINTERN PyObject *_wrap_delete_CvANN_MLP_TrainParams(PyObject *SWIGUNUSEDPARM
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -33985,7 +34192,7 @@ fail:
 
 SWIGINTERN PyObject *CvANN_MLP_TrainParams_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvANN_MLP_TrainParams, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -34001,7 +34208,7 @@ SWIGINTERN PyObject *_wrap_new_CvANN_MLP__SWIG_0(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvANN_MLP, SWIG_POINTER_NEW |  0 );
@@ -34058,7 +34265,7 @@ SWIGINTERN PyObject *_wrap_new_CvANN_MLP__SWIG_1(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvANN_MLP, SWIG_POINTER_NEW |  0 );
@@ -34106,7 +34313,7 @@ SWIGINTERN PyObject *_wrap_new_CvANN_MLP__SWIG_2(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvANN_MLP, SWIG_POINTER_NEW |  0 );
@@ -34145,7 +34352,7 @@ SWIGINTERN PyObject *_wrap_new_CvANN_MLP__SWIG_3(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvANN_MLP, SWIG_POINTER_NEW |  0 );
@@ -34175,7 +34382,7 @@ SWIGINTERN PyObject *_wrap_new_CvANN_MLP__SWIG_4(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvANN_MLP, SWIG_POINTER_NEW |  0 );
@@ -34191,7 +34398,7 @@ SWIGINTERN PyObject *_wrap_new_CvANN_MLP(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 4); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -34272,7 +34479,13 @@ SWIGINTERN PyObject *_wrap_new_CvANN_MLP(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvANN_MLP'.\n  Possible C/C++ prototypes are:\n    CvANN_MLP()\n    CvANN_MLP(CvMat const *,int,double,double)\n    CvANN_MLP(CvMat const *,int,double)\n    CvANN_MLP(CvMat const *,int)\n    CvANN_MLP(CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CvANN_MLP'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    CvANN_MLP()\n"
+    "    CvANN_MLP(CvMat const *,int,double,double)\n"
+    "    CvANN_MLP(CvMat const *,int,double)\n"
+    "    CvANN_MLP(CvMat const *,int)\n"
+    "    CvANN_MLP(CvMat const *)\n");
   return NULL;
 }
 
@@ -34296,7 +34509,7 @@ SWIGINTERN PyObject *_wrap_delete_CvANN_MLP(PyObject *SWIGUNUSEDPARM(self), PyOb
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -34361,7 +34574,7 @@ SWIGINTERN PyObject *_wrap_CvANN_MLP_create__SWIG_0(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -34417,7 +34630,7 @@ SWIGINTERN PyObject *_wrap_CvANN_MLP_create__SWIG_1(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -34464,7 +34677,7 @@ SWIGINTERN PyObject *_wrap_CvANN_MLP_create__SWIG_2(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -34502,7 +34715,7 @@ SWIGINTERN PyObject *_wrap_CvANN_MLP_create__SWIG_3(PyObject *SWIGUNUSEDPARM(sel
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -34518,7 +34731,7 @@ SWIGINTERN PyObject *_wrap_CvANN_MLP_create(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 5); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -34616,7 +34829,12 @@ SWIGINTERN PyObject *_wrap_CvANN_MLP_create(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvANN_MLP_create'.\n  Possible C/C++ prototypes are:\n    create(CvMat const *,int,double,double)\n    create(CvMat const *,int,double)\n    create(CvMat const *,int)\n    create(CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvANN_MLP_create'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    create(CvANN_MLP *,CvMat const *,int,double,double)\n"
+    "    create(CvANN_MLP *,CvMat const *,int,double)\n"
+    "    create(CvANN_MLP *,CvMat const *,int)\n"
+    "    create(CvANN_MLP *,CvMat const *)\n");
   return NULL;
 }
 
@@ -34703,7 +34921,7 @@ SWIGINTERN PyObject *_wrap_CvANN_MLP_train__SWIG_0(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_int(static_cast< int >(result));
@@ -34786,7 +35004,7 @@ SWIGINTERN PyObject *_wrap_CvANN_MLP_train__SWIG_1(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_int(static_cast< int >(result));
@@ -34852,7 +35070,7 @@ SWIGINTERN PyObject *_wrap_CvANN_MLP_train__SWIG_2(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_int(static_cast< int >(result));
@@ -34909,7 +35127,7 @@ SWIGINTERN PyObject *_wrap_CvANN_MLP_train__SWIG_3(PyObject *SWIGUNUSEDPARM(self
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_int(static_cast< int >(result));
@@ -34925,7 +35143,7 @@ SWIGINTERN PyObject *_wrap_CvANN_MLP_train(PyObject *self, PyObject *args) {
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 7); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -35056,7 +35274,12 @@ SWIGINTERN PyObject *_wrap_CvANN_MLP_train(PyObject *self, PyObject *args) {
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvANN_MLP_train'.\n  Possible C/C++ prototypes are:\n    train(CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvANN_MLP_TrainParams,int)\n    train(CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvANN_MLP_TrainParams)\n    train(CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n    train(CvMat const *,CvMat const *,CvMat const *)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvANN_MLP_train'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    train(CvANN_MLP *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvANN_MLP_TrainParams,int)\n"
+    "    train(CvANN_MLP *,CvMat const *,CvMat const *,CvMat const *,CvMat const *,CvANN_MLP_TrainParams)\n"
+    "    train(CvANN_MLP *,CvMat const *,CvMat const *,CvMat const *,CvMat const *)\n"
+    "    train(CvANN_MLP *,CvMat const *,CvMat const *,CvMat const *)\n");
   return NULL;
 }
 
@@ -35099,7 +35322,7 @@ SWIGINTERN PyObject *_wrap_CvANN_MLP_predict(PyObject *SWIGUNUSEDPARM(self), PyO
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_float(static_cast< float >(result));
@@ -35128,7 +35351,7 @@ SWIGINTERN PyObject *_wrap_CvANN_MLP_clear(PyObject *SWIGUNUSEDPARM(self), PyObj
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -35175,7 +35398,7 @@ SWIGINTERN PyObject *_wrap_CvANN_MLP_read(PyObject *SWIGUNUSEDPARM(self), PyObje
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -35223,7 +35446,7 @@ SWIGINTERN PyObject *_wrap_CvANN_MLP_write(PyObject *SWIGUNUSEDPARM(self), PyObj
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -35255,7 +35478,7 @@ SWIGINTERN PyObject *_wrap_CvANN_MLP_get_layer_count(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_From_int(static_cast< int >(result));
@@ -35285,7 +35508,7 @@ SWIGINTERN PyObject *_wrap_CvANN_MLP_get_layer_sizes(PyObject *SWIGUNUSEDPARM(se
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvMat, 0 |  0 );
@@ -35324,7 +35547,7 @@ SWIGINTERN PyObject *_wrap_CvANN_MLP_get_weights(PyObject *SWIGUNUSEDPARM(self),
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
@@ -35336,7 +35559,7 @@ fail:
 
 SWIGINTERN PyObject *CvANN_MLP_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_CvANN_MLP, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -35392,7 +35615,7 @@ SWIGINTERN PyObject *_wrap_cvRandMVNormal(PyObject *SWIGUNUSEDPARM(self), PyObje
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -35468,7 +35691,7 @@ SWIGINTERN PyObject *_wrap_cvRandGaussMixture(PyObject *SWIGUNUSEDPARM(self), Py
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -35543,7 +35766,7 @@ SWIGINTERN PyObject *_wrap_cvCreateTestSet__varargs__(PyObject *SWIGUNUSEDPARM(s
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -35595,7 +35818,7 @@ SWIGINTERN PyObject *_wrap_cvCompleteSymm(PyObject *SWIGUNUSEDPARM(self), PyObje
     } 
     catch (...) 
     {
-      return NULL;
+      SWIG_fail;
     } 
   }
   resultobj = SWIG_Py_Void();
@@ -36149,52 +36372,52 @@ static PyMethodDef SwigMethods[] = {
 
 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
 
-static void *_p_CvNormalBayesClassifierTo_p_CvStatModel(void *x) {
+static void *_p_CvNormalBayesClassifierTo_p_CvStatModel(void *x, int *newmemory) {
     return (void *)((CvStatModel *)  ((CvNormalBayesClassifier *) x));
 }
-static void *_p_CvSVMTo_p_CvStatModel(void *x) {
+static void *_p_CvSVMTo_p_CvStatModel(void *x, int *newmemory) {
     return (void *)((CvStatModel *)  ((CvSVM *) x));
 }
-static void *_p_CvANN_MLPTo_p_CvStatModel(void *x) {
+static void *_p_CvANN_MLPTo_p_CvStatModel(void *x, int *newmemory) {
     return (void *)((CvStatModel *)  ((CvANN_MLP *) x));
 }
-static void *_p_CvKNearestTo_p_CvStatModel(void *x) {
+static void *_p_CvKNearestTo_p_CvStatModel(void *x, int *newmemory) {
     return (void *)((CvStatModel *)  ((CvKNearest *) x));
 }
-static void *_p_CvForestTreeTo_p_CvStatModel(void *x) {
+static void *_p_CvForestTreeTo_p_CvStatModel(void *x, int *newmemory) {
     return (void *)((CvStatModel *) (CvDTree *) ((CvForestTree *) x));
 }
-static void *_p_CvRTreesTo_p_CvStatModel(void *x) {
+static void *_p_CvRTreesTo_p_CvStatModel(void *x, int *newmemory) {
     return (void *)((CvStatModel *)  ((CvRTrees *) x));
 }
-static void *_p_CvBoostTreeTo_p_CvStatModel(void *x) {
+static void *_p_CvBoostTreeTo_p_CvStatModel(void *x, int *newmemory) {
     return (void *)((CvStatModel *) (CvDTree *) ((CvBoostTree *) x));
 }
-static void *_p_CvEMTo_p_CvStatModel(void *x) {
+static void *_p_CvEMTo_p_CvStatModel(void *x, int *newmemory) {
     return (void *)((CvStatModel *)  ((CvEM *) x));
 }
-static void *_p_CvDTreeTo_p_CvStatModel(void *x) {
+static void *_p_CvDTreeTo_p_CvStatModel(void *x, int *newmemory) {
     return (void *)((CvStatModel *)  ((CvDTree *) x));
 }
-static void *_p_CvBoostTo_p_CvStatModel(void *x) {
+static void *_p_CvBoostTo_p_CvStatModel(void *x, int *newmemory) {
     return (void *)((CvStatModel *)  ((CvBoost *) x));
 }
-static void *_p_CvRTParamsTo_p_CvDTreeParams(void *x) {
+static void *_p_CvRTParamsTo_p_CvDTreeParams(void *x, int *newmemory) {
     return (void *)((CvDTreeParams *)  ((CvRTParams *) x));
 }
-static void *_p_CvBoostParamsTo_p_CvDTreeParams(void *x) {
+static void *_p_CvBoostParamsTo_p_CvDTreeParams(void *x, int *newmemory) {
     return (void *)((CvDTreeParams *)  ((CvBoostParams *) x));
 }
-static void *_p_CvForestTreeTo_p_CvDTree(void *x) {
+static void *_p_CvForestTreeTo_p_CvDTree(void *x, int *newmemory) {
     return (void *)((CvDTree *)  ((CvForestTree *) x));
 }
-static void *_p_CvBoostTreeTo_p_CvDTree(void *x) {
+static void *_p_CvBoostTreeTo_p_CvDTree(void *x, int *newmemory) {
     return (void *)((CvDTree *)  ((CvBoostTree *) x));
 }
 static swig_type_info _swigt__m_CvSVMKernel__f_int_int_p_p_q_const__float_p_q_const__float_p_float__void = {"_m_CvSVMKernel__f_int_int_p_p_q_const__float_p_q_const__float_p_float__void", "void (CvSVMKernel::*)(int,int,float const **,float const *,float *)|CvSVMKernel::Calc", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__m_CvSVMSolver__f_int_p_float_p_float_bool__p_float = {"_m_CvSVMSolver__f_int_p_float_p_float_bool__p_float", "float *(CvSVMSolver::*)(int,float *,float *,bool)|CvSVMSolver::GetRow", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__m_CvSVMSolver__f_int_p_float_p_float_bool__p_float = {"_m_CvSVMSolver__f_int_p_float_p_float_bool__p_float", "CvSVMSolver::GetRow|float *(CvSVMSolver::*)(int,float *,float *,bool)", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__m_CvSVMSolver__f_r_double_r_double__void = {"_m_CvSVMSolver__f_r_double_r_double__void", "void (CvSVMSolver::*)(double &,double &)|CvSVMSolver::CalcRho", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__m_CvSVMSolver__f_r_int_r_int__bool = {"_m_CvSVMSolver__f_r_int_r_int__bool", "bool (CvSVMSolver::*)(int &,int &)|CvSVMSolver::SelectWorkingSet", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__m_CvSVMSolver__f_r_int_r_int__bool = {"_m_CvSVMSolver__f_r_int_r_int__bool", "CvSVMSolver::SelectWorkingSet|bool (CvSVMSolver::*)(int &,int &)", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_Calc = {"_p_Calc", "Calc *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_CalcRho = {"_p_CalcRho", "CalcRho *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_Cv32suf = {"_p_Cv32suf", "Cv32suf *", 0, 0, (void*)0, 0};
@@ -36211,7 +36434,7 @@ static swig_type_info _swigt__p_CvChain = {"_p_CvChain", "CvChain *", 0, 0, (voi
 static swig_type_info _swigt__p_CvChainPtReader = {"_p_CvChainPtReader", "CvChainPtReader *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_CvConDensation = {"_p_CvConDensation", "CvConDensation *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_CvConnectedComp = {"_p_CvConnectedComp", "CvConnectedComp *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_CvContour = {"_p_CvContour", "CvContour *|CvPoint2DSeq *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_CvContour = {"_p_CvContour", "CvPoint2DSeq *|CvContour *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_CvContourTree = {"_p_CvContourTree", "CvContourTree *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_CvConvexityDefect = {"_p_CvConvexityDefect", "CvConvexityDefect *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_CvDTree = {"_p_CvDTree", "CvDTree *", 0, 0, (void*)0, 0};
@@ -36310,17 +36533,18 @@ static swig_type_info _swigt__p_bool = {"_p_bool", "bool *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_long_long = {"_p_long_long", "long long *|int64 *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_int = {"_p_int", "CvHistType *|int *|CVStatus *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_long_long = {"_p_long_long", "int64 *|long long *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_p_CvMat = {"_p_p_CvMat", "CvMat **", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_p_float = {"_p_p_float", "float **", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_p_unsigned_char = {"_p_p_unsigned_char", "unsigned char **|uchar **", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "schar *|signed char *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *|CvSubdiv2DEdge *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uchar *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "unsigned long long *|CvRNG *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "uchar *|unsigned char *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "uint64 *|unsigned long long *|CvRNG *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|ushort *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_void = {"_p_void", "void *|CvArr *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_void = {"_p_void", "CvArr *|void *", 0, 0, (void*)0, 0};
 
 static swig_type_info *swig_type_initial[] = {
   &_swigt__m_CvSVMKernel__f_int_int_p_p_q_const__float_p_q_const__float_p_float__void,
@@ -36448,6 +36672,7 @@ static swig_type_info *swig_type_initial[] = {
   &_swigt__p_p_double,
   &_swigt__p_p_float,
   &_swigt__p_p_unsigned_char,
+  &_swigt__p_signed_char,
   &_swigt__p_size_t,
   &_swigt__p_unsigned_char,
   &_swigt__p_unsigned_long_long,
@@ -36580,6 +36805,7 @@ static swig_cast_info _swigc__p_p_CvMat[] = {  {&_swigt__p_p_CvMat, 0, 0, 0},{0,
 static swig_cast_info _swigc__p_p_double[] = {  {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_p_float[] = {  {&_swigt__p_p_float, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_p_unsigned_char[] = {  {&_swigt__p_p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_signed_char[] = {  {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_size_t[] = {  {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_unsigned_long_long[] = {  {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}};
@@ -36712,6 +36938,7 @@ static swig_cast_info *swig_cast_initial[] = {
   _swigc__p_p_double,
   _swigc__p_p_float,
   _swigc__p_p_unsigned_char,
+  _swigc__p_signed_char,
   _swigc__p_size_t,
   _swigc__p_unsigned_char,
   _swigc__p_unsigned_long_long,
@@ -36785,7 +37012,7 @@ SWIGRUNTIME void
 SWIG_InitializeModule(void *clientdata) {
   size_t i;
   swig_module_info *module_head, *iter;
-  int found;
+  int found, init;
   
   clientdata = clientdata;
   
@@ -36795,6 +37022,9 @@ SWIG_InitializeModule(void *clientdata) {
     swig_module.type_initial = swig_type_initial;
     swig_module.cast_initial = swig_cast_initial;
     swig_module.next = &swig_module;
+    init = 1;
+  } else {
+    init = 0;
   }
   
   /* Try and load any already created modules */
@@ -36823,6 +37053,12 @@ SWIG_InitializeModule(void *clientdata) {
     module_head->next = &swig_module;
   }
   
+  /* When multiple interpeters are used, a module could have already been initialized in
+       a different interpreter, but not yet have a pointer in this interpreter.
+       In this case, we do not want to continue adding types... everything should be
+       set up already */
+  if (init == 0) return;
+  
   /* Now work on filling in swig_module.types */
 #ifdef SWIGRUNTIME_DEBUG
   printf("SWIG_InitializeModule: size %d\n", swig_module.size);