1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
5 * This file is not intended to be easily readable and contains a number of
6 * coding conventions designed to improve portability and efficiency. Do not make
7 * changes to this file unless you know what you are doing--modify the SWIG
8 * interface file instead.
9 * ----------------------------------------------------------------------------- */
12 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
15 template<typename T> class SwigValueWrapper {
18 SwigValueWrapper() : tt(0) { }
19 SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
20 SwigValueWrapper(const T& t) : tt(new T(t)) { }
21 ~SwigValueWrapper() { delete tt; }
22 SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
23 operator T&() const { return *tt; }
24 T *operator&() { return tt; }
26 SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
29 template <typename T> T SwigValueInit() {
34 /* -----------------------------------------------------------------------------
35 * This section contains generic SWIG labels for method/variable
36 * declarations/attributes, and other compiler dependent labels.
37 * ----------------------------------------------------------------------------- */
39 /* template workaround for compilers that cannot correctly implement the C++ standard */
40 #ifndef SWIGTEMPLATEDISAMBIGUATOR
41 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
42 # define SWIGTEMPLATEDISAMBIGUATOR template
43 # elif defined(__HP_aCC)
44 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
45 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
46 # define SWIGTEMPLATEDISAMBIGUATOR template
48 # define SWIGTEMPLATEDISAMBIGUATOR
52 /* inline attribute */
54 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
55 # define SWIGINLINE inline
61 /* attribute recognised by some compilers to avoid 'unused' warnings */
63 # if defined(__GNUC__)
64 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
65 # define SWIGUNUSED __attribute__ ((__unused__))
70 # define SWIGUNUSED __attribute__ ((__unused__))
76 #ifndef SWIGUNUSEDPARM
78 # define SWIGUNUSEDPARM(p)
80 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
84 /* internal SWIG method */
86 # define SWIGINTERN static SWIGUNUSED
89 /* internal inline SWIG method */
90 #ifndef SWIGINTERNINLINE
91 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
94 /* exporting methods */
95 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
96 # ifndef GCC_HASCLASSVISIBILITY
97 # define GCC_HASCLASSVISIBILITY
102 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
103 # if defined(STATIC_LINKED)
106 # define SWIGEXPORT __declspec(dllexport)
109 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
110 # define SWIGEXPORT __attribute__ ((visibility("default")))
117 /* calling conventions for Windows */
119 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
120 # define SWIGSTDCALL __stdcall
126 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
127 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
128 # define _CRT_SECURE_NO_DEPRECATE
131 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
132 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
133 # define _SCL_SECURE_NO_DEPRECATE
138 /* Python.h has to appear first */
141 /* -----------------------------------------------------------------------------
144 * This file contains generic CAPI SWIG runtime support for pointer
146 * ----------------------------------------------------------------------------- */
148 /* This should only be incremented when either the layout of swig_type_info changes,
149 or for whatever reason, the runtime changes incompatibly */
150 #define SWIG_RUNTIME_VERSION "4"
152 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
153 #ifdef SWIG_TYPE_TABLE
154 # define SWIG_QUOTE_STRING(x) #x
155 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
156 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
158 # define SWIG_TYPE_TABLE_NAME
162 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
163 creating a static or dynamic library from the swig runtime code.
164 In 99.9% of the cases, swig just needs to declare them as 'static'.
166 But only do this if is strictly necessary, ie, if you have problems
167 with your compiler or so.
171 # define SWIGRUNTIME SWIGINTERN
174 #ifndef SWIGRUNTIMEINLINE
175 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
178 /* Generic buffer size */
179 #ifndef SWIG_BUFFER_SIZE
180 # define SWIG_BUFFER_SIZE 1024
183 /* Flags for pointer conversions */
184 #define SWIG_POINTER_DISOWN 0x1
185 #define SWIG_CAST_NEW_MEMORY 0x2
187 /* Flags for new pointer objects */
188 #define SWIG_POINTER_OWN 0x1
192 Flags/methods for returning states.
194 The swig conversion methods, as ConvertPtr, return and integer
195 that tells if the conversion was successful or not. And if not,
196 an error code can be returned (see swigerrors.swg for the codes).
198 Use the following macros/flags to set or process the returning
201 In old swig versions, you usually write code as:
203 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
209 Now you can be more explicit as:
211 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
212 if (SWIG_IsOK(res)) {
218 that seems to be the same, but now you can also do
221 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
222 if (SWIG_IsOK(res)) {
224 if (SWIG_IsNewObj(res) {
234 I.e., now SWIG_ConvertPtr can return new objects and you can
235 identify the case and take care of the deallocation. Of course that
236 requires also to SWIG_ConvertPtr to return new result values, as
238 int SWIG_ConvertPtr(obj, ptr,...) {
240 if (<need new object>) {
241 *ptr = <ptr to new allocated object>;
244 *ptr = <ptr to old object>;
252 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
253 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
256 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
257 allows to return the 'cast rank', for example, if you have this
264 food(1) // cast rank '1' (1 -> 1.0)
265 fooi(1) // cast rank '0'
267 just use the SWIG_AddCast()/SWIG_CheckState()
272 #define SWIG_ERROR (-1)
273 #define SWIG_IsOK(r) (r >= 0)
274 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
276 /* The CastRankLimit says how many bits are used for the cast rank */
277 #define SWIG_CASTRANKLIMIT (1 << 8)
278 /* The NewMask denotes the object was created (using new/malloc) */
279 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
280 /* The TmpMask is for in/out typemaps that use temporal objects */
281 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
282 /* Simple returning values */
283 #define SWIG_BADOBJ (SWIG_ERROR)
284 #define SWIG_OLDOBJ (SWIG_OK)
285 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
286 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
287 /* Check, add and del mask methods */
288 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
289 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
290 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
291 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
292 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
293 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
297 #if defined(SWIG_CASTRANK_MODE)
298 # ifndef SWIG_TypeRank
299 # define SWIG_TypeRank unsigned long
301 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
302 # define SWIG_MAXCASTRANK (2)
304 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
305 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
306 SWIGINTERNINLINE int SWIG_AddCast(int r) {
307 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
309 SWIGINTERNINLINE int SWIG_CheckState(int r) {
310 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
312 #else /* no cast-rank mode */
313 # define SWIG_AddCast
314 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
326 typedef void *(*swig_converter_func)(void *, int *);
327 typedef struct swig_type_info *(*swig_dycast_func)(void **);
329 /* Structure to store information on one type */
330 typedef struct swig_type_info {
331 const char *name; /* mangled name of this type */
332 const char *str; /* human readable name of this type */
333 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
334 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
335 void *clientdata; /* language specific type data */
336 int owndata; /* flag if the structure owns the clientdata */
339 /* Structure to store a type and conversion function used for casting */
340 typedef struct swig_cast_info {
341 swig_type_info *type; /* pointer to type that is equivalent to this type */
342 swig_converter_func converter; /* function to cast the void pointers */
343 struct swig_cast_info *next; /* pointer to next cast in linked list */
344 struct swig_cast_info *prev; /* pointer to the previous cast */
347 /* Structure used to store module information
348 * Each module generates one structure like this, and the runtime collects
349 * all of these structures and stores them in a circularly linked list.*/
350 typedef struct swig_module_info {
351 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
352 size_t size; /* Number of types in this module */
353 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
354 swig_type_info **type_initial; /* Array of initially generated type structures */
355 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
356 void *clientdata; /* Language specific module data */
360 Compare two type names skipping the space characters, therefore
361 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
363 Return 0 when the two name types are equivalent, as in
364 strncmp, but skipping ' '.
367 SWIG_TypeNameComp(const char *f1, const char *l1,
368 const char *f2, const char *l2) {
369 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
370 while ((*f1 == ' ') && (f1 != l1)) ++f1;
371 while ((*f2 == ' ') && (f2 != l2)) ++f2;
372 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
374 return (int)((l1 - f1) - (l2 - f2));
378 Check type equivalence in a name list like <name1>|<name2>|...
379 Return 0 if not equal, 1 if equal
382 SWIG_TypeEquiv(const char *nb, const char *tb) {
384 const char* te = tb + strlen(tb);
386 while (!equiv && *ne) {
387 for (nb = ne; *ne; ++ne) {
388 if (*ne == '|') break;
390 equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
397 Check type equivalence in a name list like <name1>|<name2>|...
398 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
401 SWIG_TypeCompare(const char *nb, const char *tb) {
403 const char* te = tb + strlen(tb);
405 while (!equiv && *ne) {
406 for (nb = ne; *ne; ++ne) {
407 if (*ne == '|') break;
409 equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
416 /* think of this as a c++ template<> or a scheme macro */
417 #define SWIG_TypeCheck_Template(comparison, ty) \
419 swig_cast_info *iter = ty->cast; \
422 if (iter == ty->cast) return iter; \
423 /* Move iter to the top of the linked list */ \
424 iter->prev->next = iter->next; \
426 iter->next->prev = iter->prev; \
427 iter->next = ty->cast; \
429 if (ty->cast) ty->cast->prev = iter; \
441 SWIGRUNTIME swig_cast_info *
442 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
443 SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
446 /* Same as previous function, except strcmp is replaced with a pointer comparison */
447 SWIGRUNTIME swig_cast_info *
448 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
449 SWIG_TypeCheck_Template(iter->type == from, into);
453 Cast a pointer up an inheritance hierarchy
455 SWIGRUNTIMEINLINE void *
456 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
457 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
461 Dynamic pointer casting. Down an inheritance hierarchy
463 SWIGRUNTIME swig_type_info *
464 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
465 swig_type_info *lastty = ty;
466 if (!ty || !ty->dcast) return ty;
467 while (ty && (ty->dcast)) {
468 ty = (*ty->dcast)(ptr);
475 Return the name associated with this type
477 SWIGRUNTIMEINLINE const char *
478 SWIG_TypeName(const swig_type_info *ty) {
483 Return the pretty name associated with this type,
484 that is an unmangled type name in a form presentable to the user.
486 SWIGRUNTIME const char *
487 SWIG_TypePrettyName(const swig_type_info *type) {
488 /* The "str" field contains the equivalent pretty names of the
489 type, separated by vertical-bar characters. We choose
490 to print the last name, as it is often (?) the most
492 if (!type) return NULL;
493 if (type->str != NULL) {
494 const char *last_name = type->str;
496 for (s = type->str; *s; s++)
497 if (*s == '|') last_name = s+1;
505 Set the clientdata field for a type
508 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
509 swig_cast_info *cast = ti->cast;
510 /* if (ti->clientdata == clientdata) return; */
511 ti->clientdata = clientdata;
514 if (!cast->converter) {
515 swig_type_info *tc = cast->type;
516 if (!tc->clientdata) {
517 SWIG_TypeClientData(tc, clientdata);
524 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
525 SWIG_TypeClientData(ti, clientdata);
530 Search for a swig_type_info structure only by mangled name
531 Search is a O(log #types)
533 We start searching at module start, and finish searching when start == end.
534 Note: if start == end at the beginning of the function, we go all the way around
537 SWIGRUNTIME swig_type_info *
538 SWIG_MangledTypeQueryModule(swig_module_info *start,
539 swig_module_info *end,
541 swig_module_info *iter = start;
544 register size_t l = 0;
545 register size_t r = iter->size - 1;
547 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
548 register size_t i = (l + r) >> 1;
549 const char *iname = iter->types[i]->name;
551 register int compare = strcmp(name, iname);
553 return iter->types[i];
554 } else if (compare < 0) {
560 } else if (compare > 0) {
564 break; /* should never happen */
569 } while (iter != end);
574 Search for a swig_type_info structure for either a mangled name or a human readable name.
575 It first searches the mangled names of the types, which is a O(log #types)
576 If a type is not found it then searches the human readable names, which is O(#types).
578 We start searching at module start, and finish searching when start == end.
579 Note: if start == end at the beginning of the function, we go all the way around
582 SWIGRUNTIME swig_type_info *
583 SWIG_TypeQueryModule(swig_module_info *start,
584 swig_module_info *end,
586 /* STEP 1: Search the name field using binary search */
587 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
591 /* STEP 2: If the type hasn't been found, do a complete search
592 of the str field (the human readable name) */
593 swig_module_info *iter = start;
595 register size_t i = 0;
596 for (; i < iter->size; ++i) {
597 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
598 return iter->types[i];
601 } while (iter != end);
604 /* neither found a match */
609 Pack binary data into a string
612 SWIG_PackData(char *c, void *ptr, size_t sz) {
613 static const char hex[17] = "0123456789abcdef";
614 register const unsigned char *u = (unsigned char *) ptr;
615 register const unsigned char *eu = u + sz;
616 for (; u != eu; ++u) {
617 register unsigned char uu = *u;
618 *(c++) = hex[(uu & 0xf0) >> 4];
619 *(c++) = hex[uu & 0xf];
625 Unpack binary data from a string
627 SWIGRUNTIME const char *
628 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
629 register unsigned char *u = (unsigned char *) ptr;
630 register const unsigned char *eu = u + sz;
631 for (; u != eu; ++u) {
632 register char d = *(c++);
633 register unsigned char uu;
634 if ((d >= '0') && (d <= '9'))
635 uu = ((d - '0') << 4);
636 else if ((d >= 'a') && (d <= 'f'))
637 uu = ((d - ('a'-10)) << 4);
641 if ((d >= '0') && (d <= '9'))
643 else if ((d >= 'a') && (d <= 'f'))
644 uu |= (d - ('a'-10));
653 Pack 'void *' into a string buffer.
656 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
658 if ((2*sizeof(void *) + 2) > bsz) return 0;
660 r = SWIG_PackData(r,&ptr,sizeof(void *));
661 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
666 SWIGRUNTIME const char *
667 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
669 if (strcmp(c,"NULL") == 0) {
676 return SWIG_UnpackData(++c,ptr,sizeof(void *));
680 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
682 size_t lname = (name ? strlen(name) : 0);
683 if ((2*sz + 2 + lname) > bsz) return 0;
685 r = SWIG_PackData(r,ptr,sz);
687 strncpy(r,name,lname+1);
694 SWIGRUNTIME const char *
695 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
697 if (strcmp(c,"NULL") == 0) {
704 return SWIG_UnpackData(++c,ptr,sz);
712 #define SWIG_UnknownError -1
713 #define SWIG_IOError -2
714 #define SWIG_RuntimeError -3
715 #define SWIG_IndexError -4
716 #define SWIG_TypeError -5
717 #define SWIG_DivisionByZero -6
718 #define SWIG_OverflowError -7
719 #define SWIG_SyntaxError -8
720 #define SWIG_ValueError -9
721 #define SWIG_SystemError -10
722 #define SWIG_AttributeError -11
723 #define SWIG_MemoryError -12
724 #define SWIG_NullReferenceError -13
729 /* Add PyOS_snprintf for old Pythons */
730 #if PY_VERSION_HEX < 0x02020000
731 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
732 # define PyOS_snprintf _snprintf
734 # define PyOS_snprintf snprintf
738 /* A crude PyString_FromFormat implementation for old Pythons */
739 #if PY_VERSION_HEX < 0x02020000
741 #ifndef SWIG_PYBUFFER_SIZE
742 # define SWIG_PYBUFFER_SIZE 1024
746 PyString_FromFormat(const char *fmt, ...) {
748 char buf[SWIG_PYBUFFER_SIZE * 2];
751 res = vsnprintf(buf, sizeof(buf), fmt, ap);
753 return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
757 /* Add PyObject_Del for old Pythons */
758 #if PY_VERSION_HEX < 0x01060000
759 # define PyObject_Del(op) PyMem_DEL((op))
762 # define PyObject_DEL PyObject_Del
765 /* A crude PyExc_StopIteration exception for old Pythons */
766 #if PY_VERSION_HEX < 0x02020000
767 # ifndef PyExc_StopIteration
768 # define PyExc_StopIteration PyExc_RuntimeError
770 # ifndef PyObject_GenericGetAttr
771 # define PyObject_GenericGetAttr 0
774 /* Py_NotImplemented is defined in 2.1 and up. */
775 #if PY_VERSION_HEX < 0x02010000
776 # ifndef Py_NotImplemented
777 # define Py_NotImplemented PyExc_RuntimeError
782 /* A crude PyString_AsStringAndSize implementation for old Pythons */
783 #if PY_VERSION_HEX < 0x02010000
784 # ifndef PyString_AsStringAndSize
785 # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
789 /* PySequence_Size for old Pythons */
790 #if PY_VERSION_HEX < 0x02000000
791 # ifndef PySequence_Size
792 # define PySequence_Size PySequence_Length
797 /* PyBool_FromLong for old Pythons */
798 #if PY_VERSION_HEX < 0x02030000
800 PyObject *PyBool_FromLong(long ok)
802 PyObject *result = ok ? Py_True : Py_False;
808 /* Py_ssize_t for old Pythons */
809 /* This code is as recommended by: */
810 /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
811 #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
812 typedef int Py_ssize_t;
813 # define PY_SSIZE_T_MAX INT_MAX
814 # define PY_SSIZE_T_MIN INT_MIN
817 /* -----------------------------------------------------------------------------
819 * ----------------------------------------------------------------------------- */
821 SWIGRUNTIME PyObject*
822 SWIG_Python_ErrorType(int code) {
825 case SWIG_MemoryError:
826 type = PyExc_MemoryError;
829 type = PyExc_IOError;
831 case SWIG_RuntimeError:
832 type = PyExc_RuntimeError;
834 case SWIG_IndexError:
835 type = PyExc_IndexError;
838 type = PyExc_TypeError;
840 case SWIG_DivisionByZero:
841 type = PyExc_ZeroDivisionError;
843 case SWIG_OverflowError:
844 type = PyExc_OverflowError;
846 case SWIG_SyntaxError:
847 type = PyExc_SyntaxError;
849 case SWIG_ValueError:
850 type = PyExc_ValueError;
852 case SWIG_SystemError:
853 type = PyExc_SystemError;
855 case SWIG_AttributeError:
856 type = PyExc_AttributeError;
859 type = PyExc_RuntimeError;
866 SWIG_Python_AddErrorMsg(const char* mesg)
870 PyObject *traceback = 0;
872 if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
874 PyObject *old_str = PyObject_Str(value);
877 PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
881 PyErr_SetString(PyExc_RuntimeError, mesg);
887 #if defined(SWIG_PYTHON_NO_THREADS)
888 # if defined(SWIG_PYTHON_THREADS)
889 # undef SWIG_PYTHON_THREADS
892 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
893 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
894 # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
895 # define SWIG_PYTHON_USE_GIL
898 # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
899 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
900 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
902 # ifdef __cplusplus /* C++ code */
903 class SWIG_Python_Thread_Block {
905 PyGILState_STATE state;
907 void end() { if (status) { PyGILState_Release(state); status = false;} }
908 SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
909 ~SWIG_Python_Thread_Block() { end(); }
911 class SWIG_Python_Thread_Allow {
915 void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
916 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
917 ~SWIG_Python_Thread_Allow() { end(); }
919 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
920 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
921 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
922 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
924 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
925 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
926 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
927 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
929 # else /* Old thread way, not implemented, user must provide it */
930 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
931 # define SWIG_PYTHON_INITIALIZE_THREADS
933 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
934 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
936 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
937 # define SWIG_PYTHON_THREAD_END_BLOCK
939 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
940 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
942 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
943 # define SWIG_PYTHON_THREAD_END_ALLOW
946 #else /* No thread support */
947 # define SWIG_PYTHON_INITIALIZE_THREADS
948 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
949 # define SWIG_PYTHON_THREAD_END_BLOCK
950 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
951 # define SWIG_PYTHON_THREAD_END_ALLOW
954 /* -----------------------------------------------------------------------------
955 * Python API portion that goes into the runtime
956 * ----------------------------------------------------------------------------- */
965 /* -----------------------------------------------------------------------------
966 * Constant declarations
967 * ----------------------------------------------------------------------------- */
970 #define SWIG_PY_POINTER 4
971 #define SWIG_PY_BINARY 5
973 /* Constant information structure */
974 typedef struct swig_const_info {
980 swig_type_info **ptype;
991 /* -----------------------------------------------------------------------------
992 * See the LICENSE file for information on copyright, usage and redistribution
993 * of SWIG, and the README file for authors - http://www.swig.org/release.html.
997 * This file contains the runtime support for Python modules
998 * and includes code for managing global variables and pointer
1001 * ----------------------------------------------------------------------------- */
1003 /* Common SWIG API */
1005 /* for raw pointers */
1006 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1007 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1008 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1009 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags)
1010 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1011 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1012 #define swig_owntype int
1014 /* for raw packed data */
1015 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1016 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1018 /* for class or struct pointers */
1019 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1020 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1022 /* for C or C++ function pointers */
1023 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1024 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0)
1026 /* for C++ member pointers, ie, member methods */
1027 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1028 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1033 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule()
1034 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1035 #define SWIG_NewClientData(obj) PySwigClientData_New(obj)
1037 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1038 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1039 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1040 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1041 #define SWIG_fail goto fail
1044 /* Runtime API implementation */
1046 /* Error manipulation */
1049 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1050 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1051 PyErr_SetObject(errtype, obj);
1053 SWIG_PYTHON_THREAD_END_BLOCK;
1057 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1058 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1059 PyErr_SetString(errtype, (char *) msg);
1060 SWIG_PYTHON_THREAD_END_BLOCK;
1063 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1065 /* Set a constant value */
1068 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1069 PyDict_SetItemString(d, (char*) name, obj);
1073 /* Append a value to the result obj */
1075 SWIGINTERN PyObject*
1076 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1077 #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1080 } else if (result == Py_None) {
1084 if (!PyList_Check(result)) {
1085 PyObject *o2 = result;
1086 result = PyList_New(1);
1087 PyList_SetItem(result, 0, o2);
1089 PyList_Append(result,obj);
1098 } else if (result == Py_None) {
1102 if (!PyTuple_Check(result)) {
1104 result = PyTuple_New(1);
1105 PyTuple_SET_ITEM(result, 0, o2);
1107 o3 = PyTuple_New(1);
1108 PyTuple_SET_ITEM(o3, 0, obj);
1110 result = PySequence_Concat(o2, o3);
1118 /* Unpack the argument tuple */
1121 SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1127 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1128 name, (min == max ? "" : "at least "), (int)min);
1132 if (!PyTuple_Check(args)) {
1133 PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1136 register Py_ssize_t l = PyTuple_GET_SIZE(args);
1138 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1139 name, (min == max ? "" : "at least "), (int)min, (int)l);
1141 } else if (l > max) {
1142 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1143 name, (min == max ? "" : "at most "), (int)max, (int)l);
1147 for (i = 0; i < l; ++i) {
1148 objs[i] = PyTuple_GET_ITEM(args, i);
1150 for (; l < max; ++l) {
1158 /* A functor is a function object with one single object argument */
1159 #if PY_VERSION_HEX >= 0x02020000
1160 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1162 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
1166 Helper for static pointer initialization for both C and C++ code, for example
1167 static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1170 #define SWIG_STATIC_POINTER(var) var
1172 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1175 /* -----------------------------------------------------------------------------
1176 * Pointer declarations
1177 * ----------------------------------------------------------------------------- */
1179 /* Flags for new pointer objects */
1180 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1181 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1183 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1192 /* How to access Py_None */
1193 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
1194 # ifndef SWIG_PYTHON_NO_BUILD_NONE
1195 # ifndef SWIG_PYTHON_BUILD_NONE
1196 # define SWIG_PYTHON_BUILD_NONE
1201 #ifdef SWIG_PYTHON_BUILD_NONE
1204 # define Py_None SWIG_Py_None()
1206 SWIGRUNTIMEINLINE PyObject *
1209 PyObject *none = Py_BuildValue((char*)"");
1213 SWIGRUNTIME PyObject *
1216 static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
1221 /* The python void return value */
1223 SWIGRUNTIMEINLINE PyObject *
1226 PyObject *none = Py_None;
1231 /* PySwigClientData */
1242 SWIGRUNTIMEINLINE int
1243 SWIG_Python_CheckImplicit(swig_type_info *ty)
1245 PySwigClientData *data = (PySwigClientData *)ty->clientdata;
1246 return data ? data->implicitconv : 0;
1249 SWIGRUNTIMEINLINE PyObject *
1250 SWIG_Python_ExceptionType(swig_type_info *desc) {
1251 PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0;
1252 PyObject *klass = data ? data->klass : 0;
1253 return (klass ? klass : PyExc_RuntimeError);
1257 SWIGRUNTIME PySwigClientData *
1258 PySwigClientData_New(PyObject* obj)
1263 PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData));
1264 /* the klass element */
1266 Py_INCREF(data->klass);
1267 /* the newraw method and newargs arguments used to create a new raw instance */
1268 if (PyClass_Check(obj)) {
1270 data->newargs = obj;
1273 #if (PY_VERSION_HEX < 0x02020000)
1276 data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
1279 Py_INCREF(data->newraw);
1280 data->newargs = PyTuple_New(1);
1281 PyTuple_SetItem(data->newargs, 0, obj);
1283 data->newargs = obj;
1285 Py_INCREF(data->newargs);
1287 /* the destroy method, aka as the C++ delete method */
1288 data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
1289 if (PyErr_Occurred()) {
1293 if (data->destroy) {
1295 Py_INCREF(data->destroy);
1296 flags = PyCFunction_GET_FLAGS(data->destroy);
1298 data->delargs = !(flags & (METH_O));
1305 data->implicitconv = 0;
1311 PySwigClientData_Del(PySwigClientData* data)
1313 Py_XDECREF(data->newraw);
1314 Py_XDECREF(data->newargs);
1315 Py_XDECREF(data->destroy);
1318 /* =============== PySwigObject =====================*/
1328 SWIGRUNTIME PyObject *
1329 PySwigObject_long(PySwigObject *v)
1331 return PyLong_FromVoidPtr(v->ptr);
1334 SWIGRUNTIME PyObject *
1335 PySwigObject_format(const char* fmt, PySwigObject *v)
1337 PyObject *res = NULL;
1338 PyObject *args = PyTuple_New(1);
1340 if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) {
1341 PyObject *ofmt = PyString_FromString(fmt);
1343 res = PyString_Format(ofmt,args);
1352 SWIGRUNTIME PyObject *
1353 PySwigObject_oct(PySwigObject *v)
1355 return PySwigObject_format("%o",v);
1358 SWIGRUNTIME PyObject *
1359 PySwigObject_hex(PySwigObject *v)
1361 return PySwigObject_format("%x",v);
1364 SWIGRUNTIME PyObject *
1366 PySwigObject_repr(PySwigObject *v)
1368 PySwigObject_repr(PySwigObject *v, PyObject *args)
1371 const char *name = SWIG_TypePrettyName(v->ty);
1372 PyObject *hex = PySwigObject_hex(v);
1373 PyObject *repr = PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString_AsString(hex));
1377 PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next);
1379 PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args);
1381 PyString_ConcatAndDel(&repr,nrep);
1387 PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
1390 PyObject *repr = PySwigObject_repr(v);
1392 PyObject *repr = PySwigObject_repr(v, NULL);
1395 fputs(PyString_AsString(repr), fp);
1403 SWIGRUNTIME PyObject *
1404 PySwigObject_str(PySwigObject *v)
1406 char result[SWIG_BUFFER_SIZE];
1407 return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
1408 PyString_FromString(result) : 0;
1412 PySwigObject_compare(PySwigObject *v, PySwigObject *w)
1416 return (i < j) ? -1 : ((i > j) ? 1 : 0);
1419 SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
1421 SWIGRUNTIME PyTypeObject*
1422 PySwigObject_type(void) {
1423 static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
1427 SWIGRUNTIMEINLINE int
1428 PySwigObject_Check(PyObject *op) {
1429 return ((op)->ob_type == PySwigObject_type())
1430 || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0);
1433 SWIGRUNTIME PyObject *
1434 PySwigObject_New(void *ptr, swig_type_info *ty, int own);
1437 PySwigObject_dealloc(PyObject *v)
1439 PySwigObject *sobj = (PySwigObject *) v;
1440 PyObject *next = sobj->next;
1441 if (sobj->own == SWIG_POINTER_OWN) {
1442 swig_type_info *ty = sobj->ty;
1443 PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
1444 PyObject *destroy = data ? data->destroy : 0;
1446 /* destroy is always a VARARGS method */
1448 if (data->delargs) {
1449 /* we need to create a temporal object to carry the destroy operation */
1450 PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0);
1451 res = SWIG_Python_CallFunctor(destroy, tmp);
1454 PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1455 PyObject *mself = PyCFunction_GET_SELF(destroy);
1456 res = ((*meth)(mself, v));
1460 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1462 const char *name = SWIG_TypePrettyName(ty);
1463 printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1471 SWIGRUNTIME PyObject*
1472 PySwigObject_append(PyObject* v, PyObject* next)
1474 PySwigObject *sobj = (PySwigObject *) v;
1477 if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
1480 if (!PySwigObject_Check(next)) {
1485 return SWIG_Py_Void();
1488 SWIGRUNTIME PyObject*
1490 PySwigObject_next(PyObject* v)
1492 PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1495 PySwigObject *sobj = (PySwigObject *) v;
1497 Py_INCREF(sobj->next);
1500 return SWIG_Py_Void();
1504 SWIGINTERN PyObject*
1506 PySwigObject_disown(PyObject *v)
1508 PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1511 PySwigObject *sobj = (PySwigObject *)v;
1513 return SWIG_Py_Void();
1516 SWIGINTERN PyObject*
1518 PySwigObject_acquire(PyObject *v)
1520 PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1523 PySwigObject *sobj = (PySwigObject *)v;
1524 sobj->own = SWIG_POINTER_OWN;
1525 return SWIG_Py_Void();
1528 SWIGINTERN PyObject*
1529 PySwigObject_own(PyObject *v, PyObject *args)
1532 #if (PY_VERSION_HEX < 0x02020000)
1533 if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
1535 if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
1542 PySwigObject *sobj = (PySwigObject *)v;
1543 PyObject *obj = PyBool_FromLong(sobj->own);
1546 if (PyObject_IsTrue(val)) {
1547 PySwigObject_acquire(v);
1549 PySwigObject_disown(v);
1552 if (PyObject_IsTrue(val)) {
1553 PySwigObject_acquire(v,args);
1555 PySwigObject_disown(v,args);
1565 swigobject_methods[] = {
1566 {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
1567 {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"},
1568 {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1569 {(char *)"append", (PyCFunction)PySwigObject_append, METH_O, (char *)"appends another 'this' object"},
1570 {(char *)"next", (PyCFunction)PySwigObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
1571 {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_NOARGS, (char *)"returns object representation"},
1576 swigobject_methods[] = {
1577 {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
1578 {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
1579 {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1580 {(char *)"append", (PyCFunction)PySwigObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
1581 {(char *)"next", (PyCFunction)PySwigObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
1582 {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_VARARGS, (char *)"returns object representation"},
1587 #if PY_VERSION_HEX < 0x02020000
1588 SWIGINTERN PyObject *
1589 PySwigObject_getattr(PySwigObject *sobj,char *name)
1591 return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
1595 SWIGRUNTIME PyTypeObject*
1596 _PySwigObject_type(void) {
1597 static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1599 static PyNumberMethods PySwigObject_as_number = {
1600 (binaryfunc)0, /*nb_add*/
1601 (binaryfunc)0, /*nb_subtract*/
1602 (binaryfunc)0, /*nb_multiply*/
1603 (binaryfunc)0, /*nb_divide*/
1604 (binaryfunc)0, /*nb_remainder*/
1605 (binaryfunc)0, /*nb_divmod*/
1606 (ternaryfunc)0,/*nb_power*/
1607 (unaryfunc)0, /*nb_negative*/
1608 (unaryfunc)0, /*nb_positive*/
1609 (unaryfunc)0, /*nb_absolute*/
1610 (inquiry)0, /*nb_nonzero*/
1617 (coercion)0, /*nb_coerce*/
1618 (unaryfunc)PySwigObject_long, /*nb_int*/
1619 (unaryfunc)PySwigObject_long, /*nb_long*/
1620 (unaryfunc)0, /*nb_float*/
1621 (unaryfunc)PySwigObject_oct, /*nb_oct*/
1622 (unaryfunc)PySwigObject_hex, /*nb_hex*/
1623 #if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
1624 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1625 #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
1626 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
1627 #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
1628 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
1632 static PyTypeObject pyswigobject_type;
1633 static int type_init = 0;
1635 const PyTypeObject tmp
1637 PyObject_HEAD_INIT(NULL)
1639 (char *)"PySwigObject", /* tp_name */
1640 sizeof(PySwigObject), /* tp_basicsize */
1641 0, /* tp_itemsize */
1642 (destructor)PySwigObject_dealloc, /* tp_dealloc */
1643 (printfunc)PySwigObject_print, /* tp_print */
1644 #if PY_VERSION_HEX < 0x02020000
1645 (getattrfunc)PySwigObject_getattr, /* tp_getattr */
1647 (getattrfunc)0, /* tp_getattr */
1649 (setattrfunc)0, /* tp_setattr */
1650 (cmpfunc)PySwigObject_compare, /* tp_compare */
1651 (reprfunc)PySwigObject_repr, /* tp_repr */
1652 &PySwigObject_as_number, /* tp_as_number */
1653 0, /* tp_as_sequence */
1654 0, /* tp_as_mapping */
1655 (hashfunc)0, /* tp_hash */
1656 (ternaryfunc)0, /* tp_call */
1657 (reprfunc)PySwigObject_str, /* tp_str */
1658 PyObject_GenericGetAttr, /* tp_getattro */
1659 0, /* tp_setattro */
1660 0, /* tp_as_buffer */
1661 Py_TPFLAGS_DEFAULT, /* tp_flags */
1662 swigobject_doc, /* tp_doc */
1663 0, /* tp_traverse */
1665 0, /* tp_richcompare */
1666 0, /* tp_weaklistoffset */
1667 #if PY_VERSION_HEX >= 0x02020000
1669 0, /* tp_iternext */
1670 swigobject_methods, /* tp_methods */
1675 0, /* tp_descr_get */
1676 0, /* tp_descr_set */
1677 0, /* tp_dictoffset */
1686 0, /* tp_subclasses */
1687 0, /* tp_weaklist */
1689 #if PY_VERSION_HEX >= 0x02030000
1693 0,0,0,0 /* tp_alloc -> tp_next */
1696 pyswigobject_type = tmp;
1697 pyswigobject_type.ob_type = &PyType_Type;
1700 return &pyswigobject_type;
1703 SWIGRUNTIME PyObject *
1704 PySwigObject_New(void *ptr, swig_type_info *ty, int own)
1706 PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type());
1713 return (PyObject *)sobj;
1716 /* -----------------------------------------------------------------------------
1717 * Implements a simple Swig Packed type, and use it instead of string
1718 * ----------------------------------------------------------------------------- */
1728 PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
1730 char result[SWIG_BUFFER_SIZE];
1731 fputs("<Swig Packed ", fp);
1732 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1736 fputs(v->ty->name,fp);
1741 SWIGRUNTIME PyObject *
1742 PySwigPacked_repr(PySwigPacked *v)
1744 char result[SWIG_BUFFER_SIZE];
1745 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1746 return PyString_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
1748 return PyString_FromFormat("<Swig Packed %s>", v->ty->name);
1752 SWIGRUNTIME PyObject *
1753 PySwigPacked_str(PySwigPacked *v)
1755 char result[SWIG_BUFFER_SIZE];
1756 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
1757 return PyString_FromFormat("%s%s", result, v->ty->name);
1759 return PyString_FromString(v->ty->name);
1764 PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w)
1768 int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
1769 return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
1772 SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
1774 SWIGRUNTIME PyTypeObject*
1775 PySwigPacked_type(void) {
1776 static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
1780 SWIGRUNTIMEINLINE int
1781 PySwigPacked_Check(PyObject *op) {
1782 return ((op)->ob_type == _PySwigPacked_type())
1783 || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0);
1787 PySwigPacked_dealloc(PyObject *v)
1789 if (PySwigPacked_Check(v)) {
1790 PySwigPacked *sobj = (PySwigPacked *) v;
1796 SWIGRUNTIME PyTypeObject*
1797 _PySwigPacked_type(void) {
1798 static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
1799 static PyTypeObject pyswigpacked_type;
1800 static int type_init = 0;
1802 const PyTypeObject tmp
1804 PyObject_HEAD_INIT(NULL)
1806 (char *)"PySwigPacked", /* tp_name */
1807 sizeof(PySwigPacked), /* tp_basicsize */
1808 0, /* tp_itemsize */
1809 (destructor)PySwigPacked_dealloc, /* tp_dealloc */
1810 (printfunc)PySwigPacked_print, /* tp_print */
1811 (getattrfunc)0, /* tp_getattr */
1812 (setattrfunc)0, /* tp_setattr */
1813 (cmpfunc)PySwigPacked_compare, /* tp_compare */
1814 (reprfunc)PySwigPacked_repr, /* tp_repr */
1815 0, /* tp_as_number */
1816 0, /* tp_as_sequence */
1817 0, /* tp_as_mapping */
1818 (hashfunc)0, /* tp_hash */
1819 (ternaryfunc)0, /* tp_call */
1820 (reprfunc)PySwigPacked_str, /* tp_str */
1821 PyObject_GenericGetAttr, /* tp_getattro */
1822 0, /* tp_setattro */
1823 0, /* tp_as_buffer */
1824 Py_TPFLAGS_DEFAULT, /* tp_flags */
1825 swigpacked_doc, /* tp_doc */
1826 0, /* tp_traverse */
1828 0, /* tp_richcompare */
1829 0, /* tp_weaklistoffset */
1830 #if PY_VERSION_HEX >= 0x02020000
1832 0, /* tp_iternext */
1838 0, /* tp_descr_get */
1839 0, /* tp_descr_set */
1840 0, /* tp_dictoffset */
1849 0, /* tp_subclasses */
1850 0, /* tp_weaklist */
1852 #if PY_VERSION_HEX >= 0x02030000
1856 0,0,0,0 /* tp_alloc -> tp_next */
1859 pyswigpacked_type = tmp;
1860 pyswigpacked_type.ob_type = &PyType_Type;
1863 return &pyswigpacked_type;
1866 SWIGRUNTIME PyObject *
1867 PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty)
1869 PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type());
1871 void *pack = malloc(size);
1873 memcpy(pack, ptr, size);
1878 PyObject_DEL((PyObject *) sobj);
1882 return (PyObject *) sobj;
1885 SWIGRUNTIME swig_type_info *
1886 PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
1888 if (PySwigPacked_Check(obj)) {
1889 PySwigPacked *sobj = (PySwigPacked *)obj;
1890 if (sobj->size != size) return 0;
1891 memcpy(ptr, sobj->pack, size);
1898 /* -----------------------------------------------------------------------------
1899 * pointers/data manipulation
1900 * ----------------------------------------------------------------------------- */
1902 SWIGRUNTIMEINLINE PyObject *
1905 return PyString_FromString("this");
1908 SWIGRUNTIME PyObject *
1911 static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
1915 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
1917 SWIGRUNTIME PySwigObject *
1918 SWIG_Python_GetSwigThis(PyObject *pyobj)
1920 if (PySwigObject_Check(pyobj)) {
1921 return (PySwigObject *) pyobj;
1924 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
1925 if (PyInstance_Check(pyobj)) {
1926 obj = _PyInstance_Lookup(pyobj, SWIG_This());
1928 PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
1929 if (dictptr != NULL) {
1930 PyObject *dict = *dictptr;
1931 obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
1933 #ifdef PyWeakref_CheckProxy
1934 if (PyWeakref_CheckProxy(pyobj)) {
1935 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
1936 return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
1939 obj = PyObject_GetAttr(pyobj,SWIG_This());
1943 if (PyErr_Occurred()) PyErr_Clear();
1949 obj = PyObject_GetAttr(pyobj,SWIG_This());
1953 if (PyErr_Occurred()) PyErr_Clear();
1957 if (obj && !PySwigObject_Check(obj)) {
1958 /* a PyObject is called 'this', try to get the 'real this'
1959 PySwigObject from it */
1960 return SWIG_Python_GetSwigThis(obj);
1962 return (PySwigObject *)obj;
1966 /* Acquire a pointer value */
1969 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
1970 if (own == SWIG_POINTER_OWN) {
1971 PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
1973 int oldown = sobj->own;
1981 /* Convert a pointer value */
1984 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
1985 if (!obj) return SWIG_ERROR;
1986 if (obj == Py_None) {
1990 PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
1994 void *vptr = sobj->ptr;
1996 swig_type_info *to = sobj->ty;
1998 /* no type cast needed */
1999 if (ptr) *ptr = vptr;
2002 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2004 sobj = (PySwigObject *)sobj->next;
2008 *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2009 if (newmemory == SWIG_CAST_NEW_MEMORY) {
2012 *own = *own | SWIG_CAST_NEW_MEMORY;
2019 if (ptr) *ptr = vptr;
2025 *own = *own | sobj->own;
2026 if (flags & SWIG_POINTER_DISOWN) {
2031 int res = SWIG_ERROR;
2032 if (flags & SWIG_POINTER_IMPLICIT_CONV) {
2033 PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
2034 if (data && !data->implicitconv) {
2035 PyObject *klass = data->klass;
2038 data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2039 impconv = SWIG_Python_CallFunctor(klass, obj);
2040 data->implicitconv = 0;
2041 if (PyErr_Occurred()) {
2046 PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv);
2049 res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2050 if (SWIG_IsOK(res)) {
2053 /* transfer the ownership to 'ptr' */
2055 res = SWIG_AddCast(res);
2056 res = SWIG_AddNewMask(res);
2058 res = SWIG_AddCast(res);
2072 /* Convert a function ptr value */
2075 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2076 if (!PyCFunction_Check(obj)) {
2077 return SWIG_ConvertPtr(obj, ptr, ty, 0);
2081 /* here we get the method pointer for callbacks */
2082 const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2083 const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2085 desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2086 if (!desc) return SWIG_ERROR;
2089 swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
2092 *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2093 assert(!newmemory); /* newmemory handling not yet implemented */
2104 /* Convert a packed value value */
2107 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2108 swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz);
2109 if (!to) return SWIG_ERROR;
2112 /* check type cast? */
2113 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2114 if (!tc) return SWIG_ERROR;
2120 /* -----------------------------------------------------------------------------
2121 * Create a new pointer object
2122 * ----------------------------------------------------------------------------- */
2125 Create a new instance object, whitout calling __init__, and set the
2129 SWIGRUNTIME PyObject*
2130 SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this)
2132 #if (PY_VERSION_HEX >= 0x02020000)
2134 PyObject *newraw = data->newraw;
2136 inst = PyObject_Call(newraw, data->newargs, NULL);
2138 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2139 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2140 if (dictptr != NULL) {
2141 PyObject *dict = *dictptr;
2143 dict = PyDict_New();
2145 PyDict_SetItem(dict, SWIG_This(), swig_this);
2149 PyObject *key = SWIG_This();
2150 PyObject_SetAttr(inst, key, swig_this);
2154 PyObject *dict = PyDict_New();
2155 PyDict_SetItem(dict, SWIG_This(), swig_this);
2156 inst = PyInstance_NewRaw(data->newargs, dict);
2161 #if (PY_VERSION_HEX >= 0x02010000)
2163 PyObject *dict = PyDict_New();
2164 PyDict_SetItem(dict, SWIG_This(), swig_this);
2165 inst = PyInstance_NewRaw(data->newargs, dict);
2167 return (PyObject *) inst;
2169 PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
2173 inst->in_class = (PyClassObject *)data->newargs;
2174 Py_INCREF(inst->in_class);
2175 inst->in_dict = PyDict_New();
2176 if (inst->in_dict == NULL) {
2180 #ifdef Py_TPFLAGS_HAVE_WEAKREFS
2181 inst->in_weakreflist = NULL;
2183 #ifdef Py_TPFLAGS_GC
2184 PyObject_GC_Init(inst);
2186 PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
2187 return (PyObject *) inst;
2193 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2196 #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2197 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2198 if (dictptr != NULL) {
2201 dict = PyDict_New();
2204 PyDict_SetItem(dict, SWIG_This(), swig_this);
2208 dict = PyObject_GetAttrString(inst, (char*)"__dict__");
2209 PyDict_SetItem(dict, SWIG_This(), swig_this);
2214 SWIGINTERN PyObject *
2215 SWIG_Python_InitShadowInstance(PyObject *args) {
2217 if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
2220 PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2222 PySwigObject_append((PyObject*) sthis, obj[1]);
2224 SWIG_Python_SetSwigThis(obj[0], obj[1]);
2226 return SWIG_Py_Void();
2230 /* Create a new pointer object */
2232 SWIGRUNTIME PyObject *
2233 SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
2235 return SWIG_Py_Void();
2237 int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2238 PyObject *robj = PySwigObject_New(ptr, type, own);
2239 PySwigClientData *clientdata = type ? (PySwigClientData *)(type->clientdata) : 0;
2240 if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2241 PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2251 /* Create a new packed object */
2253 SWIGRUNTIMEINLINE PyObject *
2254 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2255 return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2258 /* -----------------------------------------------------------------------------*
2260 * -----------------------------------------------------------------------------*/
2262 #ifdef SWIG_LINK_RUNTIME
2263 void *SWIG_ReturnGlobalTypeList(void *);
2266 SWIGRUNTIME swig_module_info *
2267 SWIG_Python_GetModule(void) {
2268 static void *type_pointer = (void *)0;
2269 /* first check if module already created */
2270 if (!type_pointer) {
2271 #ifdef SWIG_LINK_RUNTIME
2272 type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2274 type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2275 (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
2276 if (PyErr_Occurred()) {
2278 type_pointer = (void *)0;
2282 return (swig_module_info *) type_pointer;
2285 #if PY_MAJOR_VERSION < 2
2286 /* PyModule_AddObject function was introduced in Python 2.0. The following function
2287 is copied out of Python/modsupport.c in python version 2.3.4 */
2289 PyModule_AddObject(PyObject *m, char *name, PyObject *o)
2292 if (!PyModule_Check(m)) {
2293 PyErr_SetString(PyExc_TypeError,
2294 "PyModule_AddObject() needs module as first arg");
2298 PyErr_SetString(PyExc_TypeError,
2299 "PyModule_AddObject() needs non-NULL value");
2303 dict = PyModule_GetDict(m);
2305 /* Internal error -- modules must have a dict! */
2306 PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
2307 PyModule_GetName(m));
2310 if (PyDict_SetItemString(dict, name, o))
2318 SWIG_Python_DestroyModule(void *vptr)
2320 swig_module_info *swig_module = (swig_module_info *) vptr;
2321 swig_type_info **types = swig_module->types;
2323 for (i =0; i < swig_module->size; ++i) {
2324 swig_type_info *ty = types[i];
2326 PySwigClientData *data = (PySwigClientData *) ty->clientdata;
2327 if (data) PySwigClientData_Del(data);
2330 Py_DECREF(SWIG_This());
2334 SWIG_Python_SetModule(swig_module_info *swig_module) {
2335 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
2337 PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2338 swig_empty_runtime_method_table);
2339 PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
2340 if (pointer && module) {
2341 PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
2343 Py_XDECREF(pointer);
2347 /* The python cached type query */
2348 SWIGRUNTIME PyObject *
2349 SWIG_Python_TypeCache(void) {
2350 static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2354 SWIGRUNTIME swig_type_info *
2355 SWIG_Python_TypeQuery(const char *type)
2357 PyObject *cache = SWIG_Python_TypeCache();
2358 PyObject *key = PyString_FromString(type);
2359 PyObject *obj = PyDict_GetItem(cache, key);
2360 swig_type_info *descriptor;
2362 descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
2364 swig_module_info *swig_module = SWIG_Python_GetModule();
2365 descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2367 obj = PyCObject_FromVoidPtr(descriptor, NULL);
2368 PyDict_SetItem(cache, key, obj);
2377 For backward compatibility only
2379 #define SWIG_POINTER_EXCEPTION 0
2380 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2381 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2384 SWIG_Python_AddErrMesg(const char* mesg, int infront)
2386 if (PyErr_Occurred()) {
2388 PyObject *value = 0;
2389 PyObject *traceback = 0;
2390 PyErr_Fetch(&type, &value, &traceback);
2392 PyObject *old_str = PyObject_Str(value);
2396 PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str));
2398 PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
2409 SWIG_Python_ArgFail(int argnum)
2411 if (PyErr_Occurred()) {
2412 /* add information about failing argument */
2414 PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2415 return SWIG_Python_AddErrMesg(mesg, 1);
2421 SWIGRUNTIMEINLINE const char *
2422 PySwigObject_GetDesc(PyObject *self)
2424 PySwigObject *v = (PySwigObject *)self;
2425 swig_type_info *ty = v ? v->ty : 0;
2426 return ty ? ty->str : (char*)"";
2430 SWIG_Python_TypeError(const char *type, PyObject *obj)
2433 #if defined(SWIG_COBJECT_TYPES)
2434 if (obj && PySwigObject_Check(obj)) {
2435 const char *otype = (const char *) PySwigObject_GetDesc(obj);
2437 PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received",
2444 const char *otype = (obj ? obj->ob_type->tp_name : 0);
2446 PyObject *str = PyObject_Str(obj);
2447 const char *cstr = str ? PyString_AsString(str) : 0;
2449 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2452 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2459 PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2461 PyErr_Format(PyExc_TypeError, "unexpected type is received");
2466 /* Convert a pointer value, signal an exception on a type mismatch */
2468 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
2470 if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2472 if (flags & SWIG_POINTER_EXCEPTION) {
2473 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2474 SWIG_Python_ArgFail(argnum);
2490 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2492 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2496 /* define the PyAPI_FUNC macro if it doesn't exist, for example with Python
2497 version below 2.3... But not really tested... */
2499 # define PyAPI_FUNC(RTYPE) RTYPE
2502 /* remove the PyInt_AS_LONG if defined, as this cause problems on RedHat */
2503 #ifdef PyInt_AS_LONG
2504 #undef PyInt_AS_LONG
2507 /* wrapper to the better function PyInt_AsLong, removing problems
2508 with RedHat (I hope) */
2509 static PyAPI_FUNC(long) PyInt_AS_LONG (PyObject *obj) {
2510 return PyInt_AsLong (obj);
2513 /* remove the PyFloat_AS_DOUBLE if defined, to prevent errors */
2514 #ifdef PyFloat_AS_DOUBLE
2515 #undef PyFloat_AS_DOUBLE
2518 /* wrapper to the better function PyFloat_AS_DOUBLE, to prevent errors */
2519 static PyAPI_FUNC(double) PyFloat_AS_DOUBLE (PyObject *obj) {
2520 return PyFloat_AsDouble (obj);
2524 #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
2527 /* -------- TYPES TABLE (BEGIN) -------- */
2529 #define SWIGTYPE_p_Cv32suf swig_types[0]
2530 #define SWIGTYPE_p_Cv64suf swig_types[1]
2531 #define SWIGTYPE_p_CvAttrList swig_types[2]
2532 #define SWIGTYPE_p_CvAvgComp swig_types[3]
2533 #define SWIGTYPE_p_CvBox2D swig_types[4]
2534 #define SWIGTYPE_p_CvCapture swig_types[5]
2535 #define SWIGTYPE_p_CvChain swig_types[6]
2536 #define SWIGTYPE_p_CvChainPtReader swig_types[7]
2537 #define SWIGTYPE_p_CvConDensation swig_types[8]
2538 #define SWIGTYPE_p_CvConnectedComp swig_types[9]
2539 #define SWIGTYPE_p_CvContour swig_types[10]
2540 #define SWIGTYPE_p_CvContourTree swig_types[11]
2541 #define SWIGTYPE_p_CvConvexityDefect swig_types[12]
2542 #define SWIGTYPE_p_CvFileNode swig_types[13]
2543 #define SWIGTYPE_p_CvFileStorage swig_types[14]
2544 #define SWIGTYPE_p_CvFilter swig_types[15]
2545 #define SWIGTYPE_p_CvFont swig_types[16]
2546 #define SWIGTYPE_p_CvGenericHash swig_types[17]
2547 #define SWIGTYPE_p_CvGraph swig_types[18]
2548 #define SWIGTYPE_p_CvGraphEdge swig_types[19]
2549 #define SWIGTYPE_p_CvGraphScanner swig_types[20]
2550 #define SWIGTYPE_p_CvGraphVtx swig_types[21]
2551 #define SWIGTYPE_p_CvGraphVtx2D swig_types[22]
2552 #define SWIGTYPE_p_CvHaarClassifier swig_types[23]
2553 #define SWIGTYPE_p_CvHaarClassifierCascade swig_types[24]
2554 #define SWIGTYPE_p_CvHaarFeature swig_types[25]
2555 #define SWIGTYPE_p_CvHaarStageClassifier swig_types[26]
2556 #define SWIGTYPE_p_CvHidHaarClassifierCascade swig_types[27]
2557 #define SWIGTYPE_p_CvHistogram swig_types[28]
2558 #define SWIGTYPE_p_CvHuMoments swig_types[29]
2559 #define SWIGTYPE_p_CvKalman swig_types[30]
2560 #define SWIGTYPE_p_CvLineIterator swig_types[31]
2561 #define SWIGTYPE_p_CvMat swig_types[32]
2562 #define SWIGTYPE_p_CvMatND swig_types[33]
2563 #define SWIGTYPE_p_CvMatrix3 swig_types[34]
2564 #define SWIGTYPE_p_CvMemBlock swig_types[35]
2565 #define SWIGTYPE_p_CvMemStorage swig_types[36]
2566 #define SWIGTYPE_p_CvMemStoragePos swig_types[37]
2567 #define SWIGTYPE_p_CvModuleInfo swig_types[38]
2568 #define SWIGTYPE_p_CvMoments swig_types[39]
2569 #define SWIGTYPE_p_CvNArrayIterator swig_types[40]
2570 #define SWIGTYPE_p_CvNextEdgeType swig_types[41]
2571 #define SWIGTYPE_p_CvPOSITObject swig_types[42]
2572 #define SWIGTYPE_p_CvPluginFuncInfo swig_types[43]
2573 #define SWIGTYPE_p_CvPoint swig_types[44]
2574 #define SWIGTYPE_p_CvPoint2D32f swig_types[45]
2575 #define SWIGTYPE_p_CvPoint2D64f swig_types[46]
2576 #define SWIGTYPE_p_CvPoint3D32f swig_types[47]
2577 #define SWIGTYPE_p_CvPoint3D64f swig_types[48]
2578 #define SWIGTYPE_p_CvQuadEdge2D swig_types[49]
2579 #define SWIGTYPE_p_CvRNG_Wrapper swig_types[50]
2580 #define SWIGTYPE_p_CvRect swig_types[51]
2581 #define SWIGTYPE_p_CvScalar swig_types[52]
2582 #define SWIGTYPE_p_CvSeq swig_types[53]
2583 #define SWIGTYPE_p_CvSeqBlock swig_types[54]
2584 #define SWIGTYPE_p_CvSeqReader swig_types[55]
2585 #define SWIGTYPE_p_CvSeqWriter swig_types[56]
2586 #define SWIGTYPE_p_CvSet swig_types[57]
2587 #define SWIGTYPE_p_CvSetElem swig_types[58]
2588 #define SWIGTYPE_p_CvSize swig_types[59]
2589 #define SWIGTYPE_p_CvSize2D32f swig_types[60]
2590 #define SWIGTYPE_p_CvSlice swig_types[61]
2591 #define SWIGTYPE_p_CvSparseMat swig_types[62]
2592 #define SWIGTYPE_p_CvSparseMatIterator swig_types[63]
2593 #define SWIGTYPE_p_CvSparseNode swig_types[64]
2594 #define SWIGTYPE_p_CvString swig_types[65]
2595 #define SWIGTYPE_p_CvStringHashNode swig_types[66]
2596 #define SWIGTYPE_p_CvSubdiv2D swig_types[67]
2597 #define SWIGTYPE_p_CvSubdiv2DEdge_Wrapper swig_types[68]
2598 #define SWIGTYPE_p_CvSubdiv2DPoint swig_types[69]
2599 #define SWIGTYPE_p_CvSubdiv2DPointLocation swig_types[70]
2600 #define SWIGTYPE_p_CvTermCriteria swig_types[71]
2601 #define SWIGTYPE_p_CvTreeNodeIterator swig_types[72]
2602 #define SWIGTYPE_p_CvTypeInfo swig_types[73]
2603 #define SWIGTYPE_p_CvTypedSeqT_CvConnectedComp_t swig_types[74]
2604 #define SWIGTYPE_p_CvTypedSeqT_CvPoint2D32f_t swig_types[75]
2605 #define SWIGTYPE_p_CvTypedSeqT_CvPoint_t swig_types[76]
2606 #define SWIGTYPE_p_CvTypedSeqT_CvQuadEdge2D_t swig_types[77]
2607 #define SWIGTYPE_p_CvTypedSeqT_CvRect_t swig_types[78]
2608 #define SWIGTYPE_p_CvTypedSeqT_CvSeq_p_t swig_types[79]
2609 #define SWIGTYPE_p_CvTypedSeqT_CvTupleT_CvPoint_2_t_t swig_types[80]
2610 #define SWIGTYPE_p_CvTypedSeqT_CvTupleT_float_2_t_t swig_types[81]
2611 #define SWIGTYPE_p_CvTypedSeqT_CvTupleT_float_3_t_t swig_types[82]
2612 #define SWIGTYPE_p_CvVideoWriter swig_types[83]
2613 #define SWIGTYPE_p_CvvImage swig_types[84]
2614 #define SWIGTYPE_p__IplConvKernel swig_types[85]
2615 #define SWIGTYPE_p__IplConvKernelFP swig_types[86]
2616 #define SWIGTYPE_p__IplImage swig_types[87]
2617 #define SWIGTYPE_p__IplROI swig_types[88]
2618 #define SWIGTYPE_p__IplTileInfo swig_types[89]
2619 #define SWIGTYPE_p_allocator_type swig_types[90]
2620 #define SWIGTYPE_p_char swig_types[91]
2621 #define SWIGTYPE_p_difference_type swig_types[92]
2622 #define SWIGTYPE_p_f_int__void swig_types[93]
2623 #define SWIGTYPE_p_f_int_int_int_int_p_void__void swig_types[94]
2624 #define SWIGTYPE_p_int swig_types[95]
2625 #define SWIGTYPE_p_long_long swig_types[96]
2626 #define SWIGTYPE_p_p_char swig_types[97]
2627 #define SWIGTYPE_p_signed_char swig_types[98]
2628 #define SWIGTYPE_p_size_t swig_types[99]
2629 #define SWIGTYPE_p_size_type swig_types[100]
2630 #define SWIGTYPE_p_unsigned_char swig_types[101]
2631 #define SWIGTYPE_p_unsigned_long_long swig_types[102]
2632 #define SWIGTYPE_p_unsigned_short swig_types[103]
2633 #define SWIGTYPE_p_value_type swig_types[104]
2634 #define SWIGTYPE_p_void swig_types[105]
2635 static swig_type_info *swig_types[107];
2636 static swig_module_info swig_module = {swig_types, 106, 0, 0, 0, 0};
2637 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2638 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2640 /* -------- TYPES TABLE (END) -------- */
2642 #if (PY_VERSION_HEX <= 0x02000000)
2643 # if !defined(SWIG_PYTHON_CLASSIC)
2644 # error "This python version requires swig to be run with the '-classic' option"
2648 /*-----------------------------------------------
2649 @(target):= _highgui.so
2650 ------------------------------------------------*/
2651 #define SWIG_init init_highgui
2653 #define SWIG_name "_highgui"
2655 #define SWIGVERSION 0x010335
2656 #define SWIG_VERSION SWIGVERSION
2659 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
2660 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
2663 #include <stdexcept>
2667 class PyObject_ptr {
2672 PyObject_ptr() :_obj(0)
2676 PyObject_ptr(const PyObject_ptr& item) : _obj(item._obj)
2681 PyObject_ptr(PyObject *obj, bool initial_ref = true) :_obj(obj)
2688 PyObject_ptr & operator=(const PyObject_ptr& item)
2690 Py_XINCREF(item._obj);
2701 operator PyObject *() const
2706 PyObject *operator->() const
2715 struct PyObject_var : PyObject_ptr {
2716 PyObject_var(PyObject* obj = 0) : PyObject_ptr(obj, false) { }
2718 PyObject_var & operator = (PyObject* obj)
2728 #include <cxtypes.h>
2730 #include <highgui.h>
2731 #include "pyhelpers.h"
2732 #include "pycvseq.hpp"
2736 static CvArr * PyObject_to_CvArr(PyObject * obj, bool * freearg);
2737 static CvArr * PySequence_to_CvArr( PyObject * obj );
2739 // convert a python sequence/array/list object into a c-array
2740 #define PyObject_AsArrayImpl(func, ctype, ptype) \
2741 int func(PyObject * obj, ctype * array, int len){ \
2742 void * mat_vptr=NULL; \
2743 void * im_vptr=NULL; \
2744 if(PyNumber_Check(obj)){ \
2745 memset( array, 0, sizeof(ctype)*len ); \
2746 array[0] = PyObject_As##ptype( obj ); \
2748 else if(PyList_Check(obj) || PyTuple_Check(obj)){ \
2749 int seqsize = PySequence_Size(obj); \
2750 for(int i=0; i<len && i<seqsize; i++){ \
2752 array[i] = PyObject_As##ptype( PySequence_GetItem(obj, i) ); \
2759 else if( SWIG_ConvertPtr(obj, &mat_vptr, SWIGTYPE_p_CvMat, 0)!=-1 || \
2760 SWIG_ConvertPtr(obj, &im_vptr, SWIGTYPE_p__IplImage, 0)!=-1) \
2762 CvMat * mat = (CvMat *) mat_vptr; \
2764 if(im_vptr) mat = cvGetMat(im_vptr, &stub); \
2765 if( mat->rows!=1 && mat->cols!=1 ){ \
2766 PyErr_SetString( PyExc_TypeError, \
2767 "PyObject_As*Array: CvArr must be row or column vector" ); \
2770 if( mat->rows==1 && mat->cols==1 ){ \
2772 if( len!=CV_MAT_CN(mat->type) ){ \
2773 PyErr_SetString( PyExc_TypeError, \
2774 "PyObject_As*Array: CvArr channels != length" ); \
2777 val = cvGet1D(mat, 0); \
2778 for(int i=0; i<len; i++){ \
2779 array[i] = (ctype) val.val[i]; \
2783 mat = cvReshape(mat, &stub, -1, mat->rows*mat->cols); \
2784 if( mat->rows != len ){ \
2785 PyErr_SetString( PyExc_TypeError, \
2786 "PyObject_As*Array: CvArr rows or cols must equal length" ); \
2789 for(int i=0; i<len; i++){ \
2790 CvScalar val = cvGet1D(mat, i); \
2791 array[i] = (ctype) val.val[0]; \
2796 PyErr_SetString( PyExc_TypeError, \
2797 "PyObject_As*Array: Expected a number, sequence or CvArr" ); \
2803 PyObject_AsArrayImpl( PyObject_AsFloatArray, float, Double );
2804 PyObject_AsArrayImpl( PyObject_AsDoubleArray, double, Double );
2805 PyObject_AsArrayImpl( PyObject_AsLongArray, int, Long );
2807 static CvPoint PyObject_to_CvPoint(PyObject * obj){
2810 CvPoint2D32f * ptr2D32f;
2813 if( SWIG_ConvertPtr(obj, (void**)&ptr, SWIGTYPE_p_CvPoint, 0) != -1) {
2816 if( SWIG_ConvertPtr(obj, (void**)&ptr2D32f, SWIGTYPE_p_CvPoint2D32f, 0) != -1) {
2817 return cvPointFrom32f( *ptr2D32f );
2819 if( SWIG_ConvertPtr(obj, (void**)&scalar, SWIGTYPE_p_CvScalar, 0) != -1) {
2820 return cvPointFrom32f(cvPoint2D32f( scalar->val[0], scalar->val[1] ));
2822 if(PyObject_AsLongArray(obj, (int *) &val, 2) != -1){
2826 PyErr_SetString( PyExc_TypeError, "could not convert to CvPoint");
2827 return cvPoint(0,0);
2830 static CvPoint2D32f PyObject_to_CvPoint2D32f(PyObject * obj){
2832 CvPoint2D32f *ptr2D32f;
2835 if( SWIG_ConvertPtr(obj, (void**)&ptr2D32f, SWIGTYPE_p_CvPoint2D32f, 0) != -1) {
2838 if( SWIG_ConvertPtr(obj, (void**)&ptr, SWIGTYPE_p_CvPoint, 0) != -1) {
2839 return cvPointTo32f(*ptr);
2841 if( SWIG_ConvertPtr(obj, (void**)&scalar, SWIGTYPE_p_CvScalar, 0) != -1) {
2842 return cvPoint2D32f( scalar->val[0], scalar->val[1] );
2844 if(PyObject_AsFloatArray(obj, (float *) &val, 2) != -1){
2847 PyErr_SetString(PyExc_TypeError, "could not convert to CvPoint2D32f");
2848 return cvPoint2D32f(0,0);
2851 /* Check if this object can be interpreted as a CvScalar */
2852 static bool CvScalar_Check(PyObject * obj){
2855 return SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvScalar, 0 ) != -1 ||
2856 SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvPoint2D32f, 0 ) != -1 ||
2857 SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvPoint, 0 ) != -1 ||
2858 PyObject_AsDoubleArray(obj, val.val, 4) !=-1;
2861 static CvScalar PyObject_to_CvScalar(PyObject * obj){
2864 CvPoint2D32f *ptr2D32f;
2867 if( SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvScalar, 0 ) != -1)
2869 ptr = (CvScalar *) vptr;
2872 if( SWIG_ConvertPtr(obj, (void**)&ptr2D32f, SWIGTYPE_p_CvPoint2D32f, 0) != -1) {
2873 return cvScalar(ptr2D32f->x, ptr2D32f->y);
2875 if( SWIG_ConvertPtr(obj, (void**)&pt_ptr, SWIGTYPE_p_CvPoint, 0) != -1) {
2876 return cvScalar(pt_ptr->x, pt_ptr->y);
2878 if(PyObject_AsDoubleArray(obj, val.val, 4)!=-1){
2881 return cvScalar(-1,-1,-1,-1);
2884 /* if python sequence type, convert to CvMat or CvMatND */
2885 static CvArr * PyObject_to_CvArr(PyObject * obj, bool * freearg){
2889 // check if OpenCV type
2890 if( PySwigObject_Check(obj) ){
2891 SWIG_ConvertPtr(obj, &cvarr, 0, SWIG_POINTER_EXCEPTION);
2893 else if(PyList_Check(obj) || PyTuple_Check(obj)){
2894 cvarr = PySequence_to_CvArr( obj );
2895 *freearg = (cvarr != NULL);
2897 else if(PyLong_Check(obj) && PyLong_AsLong(obj)==0){
2901 SWIG_ConvertPtr(obj, (void**)&cvarr, 0, SWIG_POINTER_EXCEPTION);
2906 static int PyObject_GetElemType(PyObject * obj){
2908 if(SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvPoint, 0) != -1) return CV_32SC2;
2909 if(SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvSize, 0) != -1) return CV_32SC2;
2910 if(SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvRect, 0) != -1) return CV_32SC4;
2911 if(SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvSize2D32f, 0) != -1) return CV_32FC2;
2912 if(SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvPoint2D32f, 0) != -1) return CV_32FC2;
2913 if(SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvPoint3D32f, 0) != -1) return CV_32FC3;
2914 if(SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvPoint2D64f, 0) != -1) return CV_64FC2;
2915 if(SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvPoint3D64f, 0) != -1) return CV_64FC3;
2916 if(SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvScalar, 0) != -1) return CV_64FC4;
2917 if(PyTuple_Check(obj) || PyList_Check(obj)) return CV_MAKE_TYPE(CV_32F, PySequence_Size( obj ));
2918 if(PyLong_Check(obj)) return CV_32S;
2922 // Would like this to convert Python lists to CvMat
2923 // Also lists of CvPoints, CvScalars, CvMats? etc
2924 static CvArr * PySequence_to_CvArr( PyObject * obj ){
2925 int dims[CV_MAX_DIM] = {1,1,1};
2930 // figure out dimensions
2932 (PyTuple_Check(item) || PyList_Check(item));
2933 item = PySequence_GetItem(item, 0))
2935 dims[ndim] = PySequence_Size( item );
2941 PyErr_SetString(PyExc_TypeError, "Cannot convert an empty python object to a CvArr");
2945 cvtype = PyObject_GetElemType(item);
2946 // collapse last dim into NCH if we found a single channel, but the last dim is <=3
2947 if(CV_MAT_CN(cvtype)==1 && dims[ndim-1]>1 && dims[ndim-1]<4){
2948 cvtype=CV_MAKE_TYPE(cvtype, dims[ndim-1]);
2954 PyErr_SetString(PyExc_TypeError, "Could not determine OpenCV element type of Python sequence");
2960 CvMat *m = cvCreateMat(dims[0], dims[1], cvtype);
2961 for(int i=0; i<dims[0]; i++){
2962 PyObject * rowobj = PySequence_GetItem(obj, i);
2964 // double check size
2965 assert((PyTuple_Check(rowobj) || PyList_Check(rowobj)) &&
2966 PySequence_Size(rowobj) == dims[1]);
2968 for(int j=0; j<dims[1]; j++){
2969 PyObject * colobj = PySequence_GetItem(rowobj, j);
2970 cvSet2D( m, i, j, PyObject_to_CvScalar( colobj ) );
2974 cvSet1D(m, i, PyObject_to_CvScalar( rowobj ) );
2981 PyErr_SetString(PyExc_TypeError, "Cannot convert Python Object to CvArr -- ndim > 3");
2988 class CvRNG_Wrapper {
2992 CvRNG_Wrapper( const CvRNG & val ) :
2996 CvRNG * ptr() { return &m_val; }
2997 CvRNG & ref() { return m_val; }
2998 bool operator==(const CvRNG_Wrapper & x){
2999 return m_val==x.m_val;
3001 bool operator!=(const CvRNG_Wrapper & x){
3002 return m_val!=x.m_val;
3008 SWIG_AsVal_double (PyObject *obj, double *val)
3010 int res = SWIG_TypeError;
3011 if (PyFloat_Check(obj)) {
3012 if (val) *val = PyFloat_AsDouble(obj);
3014 } else if (PyInt_Check(obj)) {
3015 if (val) *val = PyInt_AsLong(obj);
3017 } else if (PyLong_Check(obj)) {
3018 double v = PyLong_AsDouble(obj);
3019 if (!PyErr_Occurred()) {
3026 #ifdef SWIG_PYTHON_CAST_MODE
3029 double d = PyFloat_AsDouble(obj);
3030 if (!PyErr_Occurred()) {
3032 return SWIG_AddCast(SWIG_OK);
3037 long v = PyLong_AsLong(obj);
3038 if (!PyErr_Occurred()) {
3040 return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3057 SWIGINTERNINLINE int
3058 SWIG_CanCastAsInteger(double *d, double min, double max) {
3060 if ((min <= x && x <= max)) {
3061 double fx = floor(x);
3062 double cx = ceil(x);
3063 double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3064 if ((errno == EDOM) || (errno == ERANGE)) {
3067 double summ, reps, diff;
3070 } else if (rd > x) {
3077 if (reps < 8*DBL_EPSILON) {
3088 SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
3090 if (PyInt_Check(obj)) {
3091 long v = PyInt_AsLong(obj);
3096 return SWIG_OverflowError;
3098 } else if (PyLong_Check(obj)) {
3099 unsigned long v = PyLong_AsUnsignedLong(obj);
3100 if (!PyErr_Occurred()) {
3107 #ifdef SWIG_PYTHON_CAST_MODE
3110 unsigned long v = PyLong_AsUnsignedLong(obj);
3111 if (!PyErr_Occurred()) {
3113 return SWIG_AddCast(SWIG_OK);
3119 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3120 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
3121 if (val) *val = (unsigned long)(d);
3127 return SWIG_TypeError;
3132 #if !defined(SWIG_NO_LLONG_MAX)
3133 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3134 # define LLONG_MAX __LONG_LONG_MAX__
3135 # define LLONG_MIN (-LLONG_MAX - 1LL)
3136 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3142 SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val)
3144 int res = SWIG_TypeError;
3145 if (PyLong_Check(obj)) {
3146 unsigned long long v = PyLong_AsUnsignedLongLong(obj);
3147 if (!PyErr_Occurred()) {
3155 res = SWIG_AsVal_unsigned_SS_long (obj,&v);
3156 if (SWIG_IsOK(res)) {
3161 #ifdef SWIG_PYTHON_CAST_MODE
3163 const double mant_max = 1LL << DBL_MANT_DIG;
3165 res = SWIG_AsVal_double (obj,&d);
3166 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
3167 if (val) *val = (unsigned long long)(d);
3168 return SWIG_AddCast(res);
3170 res = SWIG_TypeError;
3177 SWIGINTERNINLINE PyObject*
3178 SWIG_From_bool (bool value)
3180 return PyBool_FromLong(value ? 1 : 0);
3185 class CvSubdiv2DEdge_Wrapper {
3187 CvSubdiv2DEdge m_val;
3189 CvSubdiv2DEdge_Wrapper( const CvSubdiv2DEdge & val ) :
3193 CvSubdiv2DEdge * ptr() { return &m_val; }
3194 CvSubdiv2DEdge & ref() { return m_val; }
3195 bool operator==(const CvSubdiv2DEdge_Wrapper & x){
3196 return m_val==x.m_val;
3198 bool operator!=(const CvSubdiv2DEdge_Wrapper & x){
3199 return m_val!=x.m_val;
3204 SWIGINTERNINLINE int
3205 SWIG_AsVal_size_t (PyObject * obj, size_t *val)
3208 int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
3209 if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
3214 /* This encapsulates the python callback and user_data for mouse callback */
3215 struct PyCvMouseCBData {
3217 PyObject * user_data;
3219 /* This encapsulates the python callback and user_data for mouse callback */
3220 /* C helper function which is responsible for calling
3221 the Python real trackbar callback function */
3222 static void icvPyOnMouse (int event, int x, int y,
3223 int flags, PyCvMouseCBData * param) {
3225 /* Must ensure this thread has a lock on the interpreter */
3226 PyGILState_STATE state = PyGILState_Ensure();
3230 /* the argument of the callback ready to be passed to Python code */
3231 PyObject *arg1 = PyInt_FromLong (event);
3232 PyObject *arg2 = PyInt_FromLong (x);
3233 PyObject *arg3 = PyInt_FromLong (y);
3234 PyObject *arg4 = PyInt_FromLong (flags);
3235 PyObject *arg5 = param->user_data; // assume this is already a PyObject
3237 /* build the tuple for calling the Python callback */
3238 PyObject *arglist = Py_BuildValue ("(OOOOO)",
3239 arg1, arg2, arg3, arg4, arg5);
3241 /* call the Python callback */
3242 result = PyEval_CallObject (param->py_func, arglist);
3244 /* Errors in Python callback get swallowed, so report them here */
3247 cvError( CV_StsInternal, "icvPyOnMouse", "", __FILE__, __LINE__);
3251 Py_XDECREF (result);
3253 /* Release Interpreter lock */
3254 PyGILState_Release(state);
3258 void cvSetMouseCallbackPy( const char* window_name, PyObject * on_mouse, PyObject * param=NULL ){
3259 // TODO potential memory leak if mouse callback is redefined
3260 PyCvMouseCBData * py_callback = new PyCvMouseCBData;
3261 py_callback->py_func = on_mouse;
3262 py_callback->user_data = param ? param : Py_None;
3264 Py_XINCREF(py_callback->py_func);
3265 Py_XINCREF(py_callback->user_data);
3267 cvSetMouseCallback( window_name, (CvMouseCallback) icvPyOnMouse, (void *) py_callback );
3271 SWIGINTERN swig_type_info*
3272 SWIG_pchar_descriptor(void)
3274 static int init = 0;
3275 static swig_type_info* info = 0;
3277 info = SWIG_TypeQuery("_p_char");
3285 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
3287 if (PyString_Check(obj)) {
3288 char *cstr; Py_ssize_t len;
3289 PyString_AsStringAndSize(obj, &cstr, &len);
3293 In python the user should not be able to modify the inner
3294 string representation. To warranty that, if you define
3295 SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
3296 buffer is always returned.
3298 The default behavior is just to return the pointer value,
3301 #if defined(SWIG_PYTHON_SAFE_CSTRINGS)
3302 if (*alloc != SWIG_OLDOBJ)
3304 if (*alloc == SWIG_NEWOBJ)
3307 *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
3308 *alloc = SWIG_NEWOBJ;
3312 *alloc = SWIG_OLDOBJ;
3315 *cptr = PyString_AsString(obj);
3318 if (psize) *psize = len + 1;
3321 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3322 if (pchar_descriptor) {
3324 if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3325 if (cptr) *cptr = (char *) vptr;
3326 if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3327 if (alloc) *alloc = SWIG_OLDOBJ;
3332 return SWIG_TypeError;
3339 PyObject * cvWaitKeyPy(int delay=0){
3340 // In order for the event processing thread to run a python callback
3341 // it must acquire the global interpreter lock, but cvWaitKey blocks, so
3342 // this thread can never release the lock. So release it here.
3343 PyThreadState * thread_state = PyEval_SaveThread();
3344 int res = cvWaitKey(delay);
3345 PyEval_RestoreThread( thread_state );
3347 char str[2]={(char)res,0};
3349 return PyLong_FromLong(-1);
3351 return PyString_FromString(str);
3356 SWIG_AsVal_long (PyObject *obj, long* val)
3358 if (PyInt_Check(obj)) {
3359 if (val) *val = PyInt_AsLong(obj);
3361 } else if (PyLong_Check(obj)) {
3362 long v = PyLong_AsLong(obj);
3363 if (!PyErr_Occurred()) {
3370 #ifdef SWIG_PYTHON_CAST_MODE
3373 long v = PyInt_AsLong(obj);
3374 if (!PyErr_Occurred()) {
3376 return SWIG_AddCast(SWIG_OK);
3382 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3383 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3384 if (val) *val = (long)(d);
3390 return SWIG_TypeError;
3395 SWIG_AsVal_int (PyObject * obj, int *val)
3398 int res = SWIG_AsVal_long (obj, &v);
3399 if (SWIG_IsOK(res)) {
3400 if ((v < INT_MIN || v > INT_MAX)) {
3401 return SWIG_OverflowError;
3403 if (val) *val = static_cast< int >(v);
3410 #include "highgui.h"
3414 struct stop_iteration {
3417 struct PySwigIterator {
3422 PySwigIterator(PyObject *seq) : _seq(seq)
3427 virtual ~PySwigIterator() {}
3429 // Access iterator method, required by Python
3430 virtual PyObject *value() const = 0;
3432 // Forward iterator method, required by Python
3433 virtual PySwigIterator *incr(size_t n = 1) = 0;
3435 // Backward iterator method, very common in C++, but not required in Python
3436 virtual PySwigIterator *decr(size_t n = 1)
3438 throw stop_iteration();
3441 // Random access iterator methods, but not required in Python
3442 virtual ptrdiff_t distance(const PySwigIterator &x) const
3444 throw std::invalid_argument("operation not supported");
3447 virtual bool equal (const PySwigIterator &x) const
3449 throw std::invalid_argument("operation not supported");
3452 // C++ common/needed methods
3453 virtual PySwigIterator *copy() const = 0;
3457 SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads
3458 PyObject *obj = value();
3460 SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
3464 PyObject *previous()
3466 SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads
3468 PyObject *obj = value();
3469 SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
3473 PySwigIterator *advance(ptrdiff_t n)
3475 return (n > 0) ? incr(n) : decr(-n);
3478 bool operator == (const PySwigIterator& x) const
3483 bool operator != (const PySwigIterator& x) const
3485 return ! operator==(x);
3488 PySwigIterator& operator += (ptrdiff_t n)
3493 PySwigIterator& operator -= (ptrdiff_t n)
3495 return *advance(-n);
3498 PySwigIterator* operator + (ptrdiff_t n) const
3500 return copy()->advance(n);
3503 PySwigIterator* operator - (ptrdiff_t n) const
3505 return copy()->advance(-n);
3508 ptrdiff_t operator - (const PySwigIterator& x) const
3510 return x.distance(*this);
3513 static swig_type_info* descriptor() {
3514 static int init = 0;
3515 static swig_type_info* desc = 0;
3517 desc = SWIG_TypeQuery("swig::PySwigIterator *");
3527 template <class Type>
3528 struct noconst_traits {
3529 typedef Type noconst_type;
3532 template <class Type>
3533 struct noconst_traits<const Type> {
3534 typedef Type noconst_type;
3540 struct pointer_category { };
3541 struct value_category { };
3544 General traits that provides type_name and type_info
3546 template <class Type> struct traits { };
3548 template <class Type>
3549 inline const char* type_name() {
3550 return traits<typename noconst_traits<Type >::noconst_type >::type_name();
3553 template <class Type>
3554 struct traits_info {
3555 static swig_type_info *type_query(std::string name) {
3557 return SWIG_TypeQuery(name.c_str());
3559 static swig_type_info *type_info() {
3560 static swig_type_info *info = type_query(type_name<Type>());
3565 template <class Type>
3566 inline swig_type_info *type_info() {
3567 return traits_info<Type>::type_info();
3571 Partial specialization for pointers
3573 template <class Type> struct traits <Type *> {
3574 typedef pointer_category category;
3575 static std::string make_ptr_name(const char* name) {
3576 std::string ptrname = name;
3580 static const char* type_name() {
3581 static std::string name = make_ptr_name(swig::type_name<Type>());
3582 return name.c_str();
3586 template <class Type, class Category>
3587 struct traits_as { };
3589 template <class Type, class Category>
3590 struct traits_check { };
3597 Traits that provides the from method
3599 template <class Type> struct traits_from_ptr {
3600 static PyObject *from(Type *val, int owner = 0) {
3601 return SWIG_NewPointerObj(val, type_info<Type>(), owner);
3605 template <class Type> struct traits_from {
3606 static PyObject *from(const Type& val) {
3607 return traits_from_ptr<Type>::from(new Type(val), 1);
3611 template <class Type> struct traits_from<Type *> {
3612 static PyObject *from(Type* val) {
3613 return traits_from_ptr<Type>::from(val, 0);
3617 template <class Type> struct traits_from<const Type *> {
3618 static PyObject *from(const Type* val) {
3619 return traits_from_ptr<Type>::from(const_cast<Type*>(val), 0);
3624 template <class Type>
3625 inline PyObject *from(const Type& val) {
3626 return traits_from<Type>::from(val);
3629 template <class Type>
3630 inline PyObject *from_ptr(Type* val, int owner) {
3631 return traits_from_ptr<Type>::from(val, owner);
3635 Traits that provides the asval/as/check method
3637 template <class Type>
3638 struct traits_asptr {
3639 static int asptr(PyObject *obj, Type **val) {
3641 int res = (SWIG_ConvertPtr(obj, (void**)&p, type_info<Type>(), 0) == SWIG_OK) ? SWIG_OLDOBJ : 0;
3642 if (SWIG_IsOK(res)) {
3649 template <class Type>
3650 inline int asptr(PyObject *obj, Type **vptr) {
3651 return traits_asptr<Type>::asptr(obj, vptr);
3654 template <class Type>
3655 struct traits_asval {
3656 static int asval(PyObject *obj, Type *val) {
3659 int res = traits_asptr<Type>::asptr(obj, &p);
3660 if (!SWIG_IsOK(res)) return res;
3662 typedef typename noconst_traits<Type>::noconst_type noconst_type;
3663 *(const_cast<noconst_type*>(val)) = *p;
3664 if (SWIG_IsNewObj(res)){
3666 res = SWIG_DelNewMask(res);
3673 return traits_asptr<Type>::asptr(obj, (Type **)(0));
3678 template <class Type> struct traits_asval<Type*> {
3679 static int asval(PyObject *obj, Type **val) {
3681 typedef typename noconst_traits<Type>::noconst_type noconst_type;
3682 noconst_type *p = 0;
3683 int res = traits_asptr<noconst_type>::asptr(obj, &p);
3684 if (SWIG_IsOK(res)) {
3685 *(const_cast<noconst_type**>(val)) = p;
3689 return traits_asptr<Type>::asptr(obj, (Type **)(0));
3694 template <class Type>
3695 inline int asval(PyObject *obj, Type *val) {
3696 return traits_asval<Type>::asval(obj, val);
3699 template <class Type>
3700 struct traits_as<Type, value_category> {
3701 static Type as(PyObject *obj, bool throw_error) {
3703 int res = asval(obj, &v);
3704 if (!obj || !SWIG_IsOK(res)) {
3705 if (!PyErr_Occurred()) {
3706 SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
3708 if (throw_error) throw std::invalid_argument("bad type");
3714 template <class Type>
3715 struct traits_as<Type, pointer_category> {
3716 static Type as(PyObject *obj, bool throw_error) {
3718 int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
3719 if (SWIG_IsOK(res) && v) {
3720 if (SWIG_IsNewObj(res)) {
3728 // Uninitialized return value, no Type() constructor required.
3729 static Type *v_def = (Type*) malloc(sizeof(Type));
3730 if (!PyErr_Occurred()) {
3731 SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
3733 if (throw_error) throw std::invalid_argument("bad type");
3734 memset(v_def,0,sizeof(Type));
3740 template <class Type>
3741 struct traits_as<Type*, pointer_category> {
3742 static Type* as(PyObject *obj, bool throw_error) {
3744 int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
3745 if (SWIG_IsOK(res)) {
3748 if (!PyErr_Occurred()) {
3749 SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
3751 if (throw_error) throw std::invalid_argument("bad type");
3757 template <class Type>
3758 inline Type as(PyObject *obj, bool te = false) {
3759 return traits_as<Type, typename traits<Type>::category>::as(obj, te);
3762 template <class Type>
3763 struct traits_check<Type, value_category> {
3764 static bool check(PyObject *obj) {
3765 int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR;
3766 return SWIG_IsOK(res) ? true : false;
3770 template <class Type>
3771 struct traits_check<Type, pointer_category> {
3772 static bool check(PyObject *obj) {
3773 int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR;
3774 return SWIG_IsOK(res) ? true : false;
3778 template <class Type>
3779 inline bool check(PyObject *obj) {
3780 return traits_check<Type, typename traits<Type>::category>::check(obj);
3785 #include <functional>
3789 struct less <PyObject *>: public binary_function<PyObject *, PyObject *, bool>
3792 operator()(PyObject * v, PyObject *w) const
3795 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3796 res = PyObject_Compare(v, w) < 0;
3797 SWIG_PYTHON_THREAD_END_BLOCK;
3803 struct less <swig::PyObject_ptr>: public binary_function<swig::PyObject_ptr, swig::PyObject_ptr, bool>
3806 operator()(const swig::PyObject_ptr& v, const swig::PyObject_ptr& w) const
3808 return std::less<PyObject *>()(v, w);
3813 struct less <swig::PyObject_var>: public binary_function<swig::PyObject_var, swig::PyObject_var, bool>
3816 operator()(const swig::PyObject_var& v, const swig::PyObject_var& w) const
3818 return std::less<PyObject *>()(v, w);
3825 template <> struct traits<PyObject *> {
3826 typedef value_category category;
3827 static const char* type_name() { return "PyObject *"; }
3830 template <> struct traits_asval<PyObject * > {
3831 typedef PyObject * value_type;
3832 static int asval(PyObject *obj, value_type *val) {
3833 if (val) *val = obj;
3839 struct traits_check<PyObject *, value_category> {
3840 static bool check(PyObject *) {
3845 template <> struct traits_from<PyObject *> {
3846 typedef PyObject * value_type;
3847 static PyObject *from(const value_type& val) {
3857 check_index(ptrdiff_t i, size_t size, bool insert = false) {
3859 if ((size_t) (-i) <= size)
3860 return (size_t) (i + size);
3861 } else if ( (size_t) i < size ) {
3863 } else if (insert && ((size_t) i == size)) {
3867 throw std::out_of_range("index out of range");
3871 slice_index(ptrdiff_t i, size_t size) {
3873 if ((size_t) (-i) <= size) {
3874 return (size_t) (i + size);
3876 throw std::out_of_range("index out of range");
3879 return ( (size_t) i < size ) ? ((size_t) i) : size;
3883 template <class Sequence, class Difference>
3884 inline typename Sequence::iterator
3885 getpos(Sequence* self, Difference i) {
3886 typename Sequence::iterator pos = self->begin();
3887 std::advance(pos, check_index(i,self->size()));
3891 template <class Sequence, class Difference>
3892 inline typename Sequence::const_iterator
3893 cgetpos(const Sequence* self, Difference i) {
3894 typename Sequence::const_iterator pos = self->begin();
3895 std::advance(pos, check_index(i,self->size()));
3899 template <class Sequence, class Difference>
3901 getslice(const Sequence* self, Difference i, Difference j) {
3902 typename Sequence::size_type size = self->size();
3903 typename Sequence::size_type ii = swig::check_index(i, size);
3904 typename Sequence::size_type jj = swig::slice_index(j, size);
3907 typename Sequence::const_iterator vb = self->begin();
3908 typename Sequence::const_iterator ve = self->begin();
3909 std::advance(vb,ii);
3910 std::advance(ve,jj);
3911 return new Sequence(vb, ve);
3913 return new Sequence();
3917 template <class Sequence, class Difference, class InputSeq>
3919 setslice(Sequence* self, Difference i, Difference j, const InputSeq& v) {
3920 typename Sequence::size_type size = self->size();
3921 typename Sequence::size_type ii = swig::check_index(i, size, true);
3922 typename Sequence::size_type jj = swig::slice_index(j, size);
3923 if (jj < ii) jj = ii;
3924 size_t ssize = jj - ii;
3925 if (ssize <= v.size()) {
3926 typename Sequence::iterator sb = self->begin();
3927 typename InputSeq::const_iterator vmid = v.begin();
3928 std::advance(sb,ii);
3929 std::advance(vmid, jj - ii);
3930 self->insert(std::copy(v.begin(), vmid, sb), vmid, v.end());
3932 typename Sequence::iterator sb = self->begin();
3933 typename Sequence::iterator se = self->begin();
3934 std::advance(sb,ii);
3935 std::advance(se,jj);
3937 self->insert(sb, v.begin(), v.end());
3941 template <class Sequence, class Difference>
3943 delslice(Sequence* self, Difference i, Difference j) {
3944 typename Sequence::size_type size = self->size();
3945 typename Sequence::size_type ii = swig::check_index(i, size, true);
3946 typename Sequence::size_type jj = swig::slice_index(j, size);
3948 typename Sequence::iterator sb = self->begin();
3949 typename Sequence::iterator se = self->begin();
3950 std::advance(sb,ii);
3951 std::advance(se,jj);
3958 #if !defined(SWIG_STD_NOITERATOR_TRAITS_STL)
3962 template <class Iterator>
3963 struct iterator_traits {
3964 typedef ptrdiff_t difference_type;
3965 typedef typename Iterator::value_type value_type;
3968 #if defined(__SUNPRO_CC) && defined(_RWSTD_VER)
3969 template <class Iterator, class Category,class T, class Reference, class Pointer, class Distance>
3970 struct iterator_traits<__reverse_bi_iterator<Iterator,Category,T,Reference,Pointer,Distance> > {
3971 typedef Distance difference_type;
3972 typedef T value_type;
3977 struct iterator_traits<T*> {
3978 typedef T value_type;
3979 typedef ptrdiff_t difference_type;
3982 template<typename _InputIterator>
3983 inline typename iterator_traits<_InputIterator>::difference_type
3984 distance(_InputIterator __first, _InputIterator __last)
3986 typename iterator_traits<_InputIterator>::difference_type __n = 0;
3987 while (__first != __last) {
3998 template<typename OutIterator>
3999 class PySwigIterator_T : public PySwigIterator
4002 typedef OutIterator out_iterator;
4003 typedef typename std::iterator_traits<out_iterator>::value_type value_type;
4004 typedef PySwigIterator_T<out_iterator> self_type;
4006 PySwigIterator_T(out_iterator curr, PyObject *seq)
4007 : PySwigIterator(seq), current(curr)
4011 const out_iterator& get_current() const
4017 bool equal (const PySwigIterator &iter) const
4019 const self_type *iters = dynamic_cast<const self_type *>(&iter);
4021 return (current == iters->get_current());
4023 throw std::invalid_argument("bad iterator type");
4027 ptrdiff_t distance(const PySwigIterator &iter) const
4029 const self_type *iters = dynamic_cast<const self_type *>(&iter);
4031 return std::distance(current, iters->get_current());
4033 throw std::invalid_argument("bad iterator type");
4038 out_iterator current;
4041 template <class ValueType>
4044 typedef const ValueType& argument_type;
4045 typedef PyObject *result_type;
4046 result_type operator()(argument_type v) const
4048 return swig::from(v);
4052 template<typename OutIterator,
4053 typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
4054 typename FromOper = from_oper<ValueType> >
4055 class PySwigIteratorOpen_T : public PySwigIterator_T<OutIterator>
4059 typedef OutIterator out_iterator;
4060 typedef ValueType value_type;
4061 typedef PySwigIterator_T<out_iterator> base;
4062 typedef PySwigIteratorOpen_T<OutIterator, ValueType, FromOper> self_type;
4064 PySwigIteratorOpen_T(out_iterator curr, PyObject *seq)
4065 : PySwigIterator_T<OutIterator>(curr, seq)
4069 PyObject *value() const {
4070 return from(static_cast<const value_type&>(*(base::current)));
4073 PySwigIterator *copy() const
4075 return new self_type(*this);
4078 PySwigIterator *incr(size_t n = 1)
4086 PySwigIterator *decr(size_t n = 1)
4095 template<typename OutIterator,
4096 typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
4097 typename FromOper = from_oper<ValueType> >
4098 class PySwigIteratorClosed_T : public PySwigIterator_T<OutIterator>
4102 typedef OutIterator out_iterator;
4103 typedef ValueType value_type;
4104 typedef PySwigIterator_T<out_iterator> base;
4105 typedef PySwigIteratorClosed_T<OutIterator, ValueType, FromOper> self_type;
4107 PySwigIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq)
4108 : PySwigIterator_T<OutIterator>(curr, seq), begin(first), end(last)
4112 PyObject *value() const {
4113 if (base::current == end) {
4114 throw stop_iteration();
4116 return from(static_cast<const value_type&>(*(base::current)));
4120 PySwigIterator *copy() const
4122 return new self_type(*this);
4125 PySwigIterator *incr(size_t n = 1)
4128 if (base::current == end) {
4129 throw stop_iteration();
4137 PySwigIterator *decr(size_t n = 1)
4140 if (base::current == begin) {
4141 throw stop_iteration();
4154 template<typename OutIter>
4155 inline PySwigIterator*
4156 make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0)
4158 return new PySwigIteratorClosed_T<OutIter>(current, begin, end, seq);
4161 template<typename OutIter>
4162 inline PySwigIterator*
4163 make_output_iterator(const OutIter& current, PyObject *seq = 0)
4165 return new PySwigIteratorOpen_T<OutIter>(current, seq);
4173 struct PySequence_Ref
4175 PySequence_Ref(PyObject* seq, int index)
4176 : _seq(seq), _index(index)
4182 swig::PyObject_var item = PySequence_GetItem(_seq, _index);
4184 return swig::as<T>(item, true);
4185 } catch (std::exception& e) {
4187 sprintf(msg, "in sequence element %d ", _index);
4188 if (!PyErr_Occurred()) {
4189 SWIG_Error(SWIG_TypeError, swig::type_name<T>());
4191 SWIG_Python_AddErrorMsg(msg);
4192 SWIG_Python_AddErrorMsg(e.what());
4197 PySequence_Ref& operator=(const T& v)
4199 PySequence_SetItem(_seq, _index, swig::from<T>(v));
4209 struct PySequence_ArrowProxy
4211 PySequence_ArrowProxy(const T& x): m_value(x) {}
4212 const T* operator->() const { return &m_value; }
4213 operator const T*() const { return &m_value; }
4217 template <class T, class Reference >
4218 struct PySequence_InputIterator
4220 typedef PySequence_InputIterator<T, Reference > self;
4222 typedef std::random_access_iterator_tag iterator_category;
4223 typedef Reference reference;
4224 typedef T value_type;
4226 typedef int difference_type;
4228 PySequence_InputIterator()
4232 PySequence_InputIterator(PyObject* seq, int index)
4233 : _seq(seq), _index(index)
4237 reference operator*() const
4239 return reference(_seq, _index);
4242 PySequence_ArrowProxy<T>
4243 operator->() const {
4244 return PySequence_ArrowProxy<T>(operator*());
4247 bool operator==(const self& ri) const
4249 return (_index == ri._index) && (_seq == ri._seq);
4252 bool operator!=(const self& ri) const
4254 return !(operator==(ri));
4257 self& operator ++ ()
4263 self& operator -- ()
4269 self& operator += (difference_type n)
4275 self operator +(difference_type n) const
4277 return self(_seq, _index + n);
4280 self& operator -= (difference_type n)
4286 self operator -(difference_type n) const
4288 return self(_seq, _index - n);
4291 difference_type operator - (const self& ri) const
4293 return _index - ri._index;
4296 bool operator < (const self& ri) const
4298 return _index < ri._index;
4302 operator[](difference_type n) const
4304 return reference(_seq, _index + n);
4309 difference_type _index;
4313 struct PySequence_Cont
4315 typedef PySequence_Ref<T> reference;
4316 typedef const PySequence_Ref<T> const_reference;
4317 typedef T value_type;
4319 typedef int difference_type;
4320 typedef int size_type;
4321 typedef const pointer const_pointer;
4322 typedef PySequence_InputIterator<T, reference> iterator;
4323 typedef PySequence_InputIterator<T, const_reference> const_iterator;
4325 PySequence_Cont(PyObject* seq) : _seq(0)
4327 if (!PySequence_Check(seq)) {
4328 throw std::invalid_argument("a sequence is expected");
4339 size_type size() const
4341 return static_cast<size_type>(PySequence_Size(_seq));
4351 return iterator(_seq, 0);
4354 const_iterator begin() const
4356 return const_iterator(_seq, 0);
4361 return iterator(_seq, size());
4364 const_iterator end() const
4366 return const_iterator(_seq, size());
4369 reference operator[](difference_type n)
4371 return reference(_seq, n);
4374 const_reference operator[](difference_type n) const
4376 return const_reference(_seq, n);
4379 bool check(bool set_err = true) const
4382 for (int i = 0; i < s; ++i) {
4383 swig::PyObject_var item = PySequence_GetItem(_seq, i);
4384 if (!swig::check<value_type>(item)) {
4387 sprintf(msg, "in sequence element %d", i);
4388 SWIG_Error(SWIG_RuntimeError, msg);
4403 CvMat * cvLoadImageMat(const char* filename, int iscolor=CV_LOAD_IMAGE_COLOR ){
4404 return cvLoadImageM(filename, iscolor);
4408 CvMat * cvRetrieveFrame__CvMat( CvCapture* capture ){
4409 IplImage * im = cvRetrieveFrame(capture);
4411 CvMat * mat = (CvMat *)cvAlloc(sizeof(CvMat));
4412 mat = cvGetMat(im, mat);
4419 CvMat * cvQueryFrame__CvMat( CvCapture * capture ){
4420 IplImage * im = cvQueryFrame(capture);
4422 CvMat * mat = (CvMat *)cvAlloc(sizeof(CvMat));
4423 mat = cvGetMat(im, mat);
4431 SWIG_AsCharArray(PyObject * obj, char *val, size_t size)
4433 char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ;
4434 int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc);
4435 if (SWIG_IsOK(res)) {
4436 if ((csize == size + 1) && cptr && !(cptr[csize-1])) --csize;
4437 if (csize <= size) {
4439 if (csize) memcpy(val, cptr, csize*sizeof(char));
4440 if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char));
4442 if (alloc == SWIG_NEWOBJ) {
4444 res = SWIG_DelNewMask(res);
4448 if (alloc == SWIG_NEWOBJ) delete[] cptr;
4450 return SWIG_TypeError;
4455 SWIG_AsVal_char (PyObject * obj, char *val)
4457 int res = SWIG_AsCharArray(obj, val, 1);
4458 if (!SWIG_IsOK(res)) {
4460 res = SWIG_AddCast(SWIG_AsVal_long (obj, &v));
4461 if (SWIG_IsOK(res)) {
4462 if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) {
4463 if (val) *val = static_cast< char >(v);
4465 res = SWIG_OverflowError;
4473 #define SWIG_From_long PyInt_FromLong
4476 SWIGINTERNINLINE PyObject *
4477 SWIG_From_int (int value)
4479 return SWIG_From_long (value);
4483 SWIGINTERNINLINE PyObject *
4484 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
4487 if (size > INT_MAX) {
4488 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
4489 return pchar_descriptor ?
4490 SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
4492 return PyString_FromStringAndSize(carray, static_cast< int >(size));
4495 return SWIG_Py_Void();
4500 SWIGINTERNINLINE PyObject *
4501 SWIG_FromCharPtr(const char *cptr)
4503 return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
4507 #define SWIG_From_double PyFloat_FromDouble
4512 SWIGINTERN PyObject *_wrap_new_CvRNG_Wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4513 PyObject *resultobj = 0;
4515 CvRNG_Wrapper *result = 0 ;
4517 unsigned long long val1 ;
4519 PyObject * obj0 = 0 ;
4521 if (!PyArg_ParseTuple(args,(char *)"O:new_CvRNG_Wrapper",&obj0)) SWIG_fail;
4522 ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val1);
4523 if (!SWIG_IsOK(ecode1)) {
4524 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CvRNG_Wrapper" "', argument " "1"" of type '" "CvRNG""'");
4526 temp1 = static_cast< CvRNG >(val1);
4528 result = (CvRNG_Wrapper *)new CvRNG_Wrapper((CvRNG const &)*arg1);
4529 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvRNG_Wrapper, SWIG_POINTER_NEW | 0 );
4536 SWIGINTERN PyObject *_wrap_CvRNG_Wrapper_ptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4537 PyObject *resultobj = 0;
4538 CvRNG_Wrapper *arg1 = (CvRNG_Wrapper *) 0 ;
4542 PyObject * obj0 = 0 ;
4544 if (!PyArg_ParseTuple(args,(char *)"O:CvRNG_Wrapper_ptr",&obj0)) SWIG_fail;
4545 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvRNG_Wrapper, 0 | 0 );
4546 if (!SWIG_IsOK(res1)) {
4547 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvRNG_Wrapper_ptr" "', argument " "1"" of type '" "CvRNG_Wrapper *""'");
4549 arg1 = reinterpret_cast< CvRNG_Wrapper * >(argp1);
4550 result = (CvRNG *)(arg1)->ptr();
4551 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_long_long, 0 | 0 );
4558 SWIGINTERN PyObject *_wrap_CvRNG_Wrapper_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4559 PyObject *resultobj = 0;
4560 CvRNG_Wrapper *arg1 = (CvRNG_Wrapper *) 0 ;
4564 PyObject * obj0 = 0 ;
4566 if (!PyArg_ParseTuple(args,(char *)"O:CvRNG_Wrapper_ref",&obj0)) SWIG_fail;
4567 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvRNG_Wrapper, 0 | 0 );
4568 if (!SWIG_IsOK(res1)) {
4569 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvRNG_Wrapper_ref" "', argument " "1"" of type '" "CvRNG_Wrapper *""'");
4571 arg1 = reinterpret_cast< CvRNG_Wrapper * >(argp1);
4573 CvRNG &_result_ref = (arg1)->ref();
4574 result = (CvRNG *) &_result_ref;
4576 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_long_long, 0 | 0 );
4583 SWIGINTERN PyObject *_wrap_CvRNG_Wrapper___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4584 PyObject *resultobj = 0;
4585 CvRNG_Wrapper *arg1 = (CvRNG_Wrapper *) 0 ;
4586 CvRNG_Wrapper *arg2 = 0 ;
4592 PyObject * obj0 = 0 ;
4593 PyObject * obj1 = 0 ;
4595 if (!PyArg_ParseTuple(args,(char *)"OO:CvRNG_Wrapper___eq__",&obj0,&obj1)) SWIG_fail;
4596 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvRNG_Wrapper, 0 | 0 );
4597 if (!SWIG_IsOK(res1)) {
4598 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvRNG_Wrapper___eq__" "', argument " "1"" of type '" "CvRNG_Wrapper *""'");
4600 arg1 = reinterpret_cast< CvRNG_Wrapper * >(argp1);
4601 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_CvRNG_Wrapper, 0 | 0);
4602 if (!SWIG_IsOK(res2)) {
4603 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvRNG_Wrapper___eq__" "', argument " "2"" of type '" "CvRNG_Wrapper const &""'");
4606 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CvRNG_Wrapper___eq__" "', argument " "2"" of type '" "CvRNG_Wrapper const &""'");
4608 arg2 = reinterpret_cast< CvRNG_Wrapper * >(argp2);
4609 result = (bool)(arg1)->operator ==((CvRNG_Wrapper const &)*arg2);
4610 resultobj = SWIG_From_bool(static_cast< bool >(result));
4617 SWIGINTERN PyObject *_wrap_CvRNG_Wrapper___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4618 PyObject *resultobj = 0;
4619 CvRNG_Wrapper *arg1 = (CvRNG_Wrapper *) 0 ;
4620 CvRNG_Wrapper *arg2 = 0 ;
4626 PyObject * obj0 = 0 ;
4627 PyObject * obj1 = 0 ;
4629 if (!PyArg_ParseTuple(args,(char *)"OO:CvRNG_Wrapper___ne__",&obj0,&obj1)) SWIG_fail;
4630 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvRNG_Wrapper, 0 | 0 );
4631 if (!SWIG_IsOK(res1)) {
4632 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvRNG_Wrapper___ne__" "', argument " "1"" of type '" "CvRNG_Wrapper *""'");
4634 arg1 = reinterpret_cast< CvRNG_Wrapper * >(argp1);
4635 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_CvRNG_Wrapper, 0 | 0);
4636 if (!SWIG_IsOK(res2)) {
4637 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvRNG_Wrapper___ne__" "', argument " "2"" of type '" "CvRNG_Wrapper const &""'");
4640 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CvRNG_Wrapper___ne__" "', argument " "2"" of type '" "CvRNG_Wrapper const &""'");
4642 arg2 = reinterpret_cast< CvRNG_Wrapper * >(argp2);
4643 result = (bool)(arg1)->operator !=((CvRNG_Wrapper const &)*arg2);
4644 resultobj = SWIG_From_bool(static_cast< bool >(result));
4651 SWIGINTERN PyObject *_wrap_delete_CvRNG_Wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4652 PyObject *resultobj = 0;
4653 CvRNG_Wrapper *arg1 = (CvRNG_Wrapper *) 0 ;
4656 PyObject * obj0 = 0 ;
4658 if (!PyArg_ParseTuple(args,(char *)"O:delete_CvRNG_Wrapper",&obj0)) SWIG_fail;
4659 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvRNG_Wrapper, SWIG_POINTER_DISOWN | 0 );
4660 if (!SWIG_IsOK(res1)) {
4661 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CvRNG_Wrapper" "', argument " "1"" of type '" "CvRNG_Wrapper *""'");
4663 arg1 = reinterpret_cast< CvRNG_Wrapper * >(argp1);
4673 resultobj = SWIG_Py_Void();
4680 SWIGINTERN PyObject *CvRNG_Wrapper_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4682 if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
4683 SWIG_TypeNewClientData(SWIGTYPE_p_CvRNG_Wrapper, SWIG_NewClientData(obj));
4684 return SWIG_Py_Void();
4687 SWIGINTERN PyObject *_wrap_new_CvSubdiv2DEdge_Wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4688 PyObject *resultobj = 0;
4689 CvSubdiv2DEdge *arg1 = 0 ;
4690 CvSubdiv2DEdge_Wrapper *result = 0 ;
4691 CvSubdiv2DEdge temp1 ;
4694 PyObject * obj0 = 0 ;
4696 if (!PyArg_ParseTuple(args,(char *)"O:new_CvSubdiv2DEdge_Wrapper",&obj0)) SWIG_fail;
4697 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
4698 if (!SWIG_IsOK(ecode1)) {
4699 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CvSubdiv2DEdge_Wrapper" "', argument " "1"" of type '" "CvSubdiv2DEdge""'");
4701 temp1 = static_cast< CvSubdiv2DEdge >(val1);
4703 result = (CvSubdiv2DEdge_Wrapper *)new CvSubdiv2DEdge_Wrapper((CvSubdiv2DEdge const &)*arg1);
4704 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvSubdiv2DEdge_Wrapper, SWIG_POINTER_NEW | 0 );
4711 SWIGINTERN PyObject *_wrap_CvSubdiv2DEdge_Wrapper_ptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4712 PyObject *resultobj = 0;
4713 CvSubdiv2DEdge_Wrapper *arg1 = (CvSubdiv2DEdge_Wrapper *) 0 ;
4714 CvSubdiv2DEdge *result = 0 ;
4717 PyObject * obj0 = 0 ;
4719 if (!PyArg_ParseTuple(args,(char *)"O:CvSubdiv2DEdge_Wrapper_ptr",&obj0)) SWIG_fail;
4720 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvSubdiv2DEdge_Wrapper, 0 | 0 );
4721 if (!SWIG_IsOK(res1)) {
4722 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvSubdiv2DEdge_Wrapper_ptr" "', argument " "1"" of type '" "CvSubdiv2DEdge_Wrapper *""'");
4724 arg1 = reinterpret_cast< CvSubdiv2DEdge_Wrapper * >(argp1);
4725 result = (CvSubdiv2DEdge *)(arg1)->ptr();
4726 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_size_t, 0 | 0 );
4733 SWIGINTERN PyObject *_wrap_CvSubdiv2DEdge_Wrapper_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4734 PyObject *resultobj = 0;
4735 CvSubdiv2DEdge_Wrapper *arg1 = (CvSubdiv2DEdge_Wrapper *) 0 ;
4736 CvSubdiv2DEdge *result = 0 ;
4739 PyObject * obj0 = 0 ;
4741 if (!PyArg_ParseTuple(args,(char *)"O:CvSubdiv2DEdge_Wrapper_ref",&obj0)) SWIG_fail;
4742 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvSubdiv2DEdge_Wrapper, 0 | 0 );
4743 if (!SWIG_IsOK(res1)) {
4744 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvSubdiv2DEdge_Wrapper_ref" "', argument " "1"" of type '" "CvSubdiv2DEdge_Wrapper *""'");
4746 arg1 = reinterpret_cast< CvSubdiv2DEdge_Wrapper * >(argp1);
4748 CvSubdiv2DEdge &_result_ref = (arg1)->ref();
4749 result = (CvSubdiv2DEdge *) &_result_ref;
4751 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_size_t, 0 | 0 );
4758 SWIGINTERN PyObject *_wrap_CvSubdiv2DEdge_Wrapper___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4759 PyObject *resultobj = 0;
4760 CvSubdiv2DEdge_Wrapper *arg1 = (CvSubdiv2DEdge_Wrapper *) 0 ;
4761 CvSubdiv2DEdge_Wrapper *arg2 = 0 ;
4767 PyObject * obj0 = 0 ;
4768 PyObject * obj1 = 0 ;
4770 if (!PyArg_ParseTuple(args,(char *)"OO:CvSubdiv2DEdge_Wrapper___eq__",&obj0,&obj1)) SWIG_fail;
4771 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvSubdiv2DEdge_Wrapper, 0 | 0 );
4772 if (!SWIG_IsOK(res1)) {
4773 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvSubdiv2DEdge_Wrapper___eq__" "', argument " "1"" of type '" "CvSubdiv2DEdge_Wrapper *""'");
4775 arg1 = reinterpret_cast< CvSubdiv2DEdge_Wrapper * >(argp1);
4776 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_CvSubdiv2DEdge_Wrapper, 0 | 0);
4777 if (!SWIG_IsOK(res2)) {
4778 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvSubdiv2DEdge_Wrapper___eq__" "', argument " "2"" of type '" "CvSubdiv2DEdge_Wrapper const &""'");
4781 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CvSubdiv2DEdge_Wrapper___eq__" "', argument " "2"" of type '" "CvSubdiv2DEdge_Wrapper const &""'");
4783 arg2 = reinterpret_cast< CvSubdiv2DEdge_Wrapper * >(argp2);
4784 result = (bool)(arg1)->operator ==((CvSubdiv2DEdge_Wrapper const &)*arg2);
4785 resultobj = SWIG_From_bool(static_cast< bool >(result));
4792 SWIGINTERN PyObject *_wrap_CvSubdiv2DEdge_Wrapper___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4793 PyObject *resultobj = 0;
4794 CvSubdiv2DEdge_Wrapper *arg1 = (CvSubdiv2DEdge_Wrapper *) 0 ;
4795 CvSubdiv2DEdge_Wrapper *arg2 = 0 ;
4801 PyObject * obj0 = 0 ;
4802 PyObject * obj1 = 0 ;
4804 if (!PyArg_ParseTuple(args,(char *)"OO:CvSubdiv2DEdge_Wrapper___ne__",&obj0,&obj1)) SWIG_fail;
4805 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvSubdiv2DEdge_Wrapper, 0 | 0 );
4806 if (!SWIG_IsOK(res1)) {
4807 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvSubdiv2DEdge_Wrapper___ne__" "', argument " "1"" of type '" "CvSubdiv2DEdge_Wrapper *""'");
4809 arg1 = reinterpret_cast< CvSubdiv2DEdge_Wrapper * >(argp1);
4810 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_CvSubdiv2DEdge_Wrapper, 0 | 0);
4811 if (!SWIG_IsOK(res2)) {
4812 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvSubdiv2DEdge_Wrapper___ne__" "', argument " "2"" of type '" "CvSubdiv2DEdge_Wrapper const &""'");
4815 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CvSubdiv2DEdge_Wrapper___ne__" "', argument " "2"" of type '" "CvSubdiv2DEdge_Wrapper const &""'");
4817 arg2 = reinterpret_cast< CvSubdiv2DEdge_Wrapper * >(argp2);
4818 result = (bool)(arg1)->operator !=((CvSubdiv2DEdge_Wrapper const &)*arg2);
4819 resultobj = SWIG_From_bool(static_cast< bool >(result));
4826 SWIGINTERN PyObject *_wrap_delete_CvSubdiv2DEdge_Wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4827 PyObject *resultobj = 0;
4828 CvSubdiv2DEdge_Wrapper *arg1 = (CvSubdiv2DEdge_Wrapper *) 0 ;
4831 PyObject * obj0 = 0 ;
4833 if (!PyArg_ParseTuple(args,(char *)"O:delete_CvSubdiv2DEdge_Wrapper",&obj0)) SWIG_fail;
4834 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvSubdiv2DEdge_Wrapper, SWIG_POINTER_DISOWN | 0 );
4835 if (!SWIG_IsOK(res1)) {
4836 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CvSubdiv2DEdge_Wrapper" "', argument " "1"" of type '" "CvSubdiv2DEdge_Wrapper *""'");
4838 arg1 = reinterpret_cast< CvSubdiv2DEdge_Wrapper * >(argp1);
4848 resultobj = SWIG_Py_Void();
4855 SWIGINTERN PyObject *CvSubdiv2DEdge_Wrapper_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4857 if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
4858 SWIG_TypeNewClientData(SWIGTYPE_p_CvSubdiv2DEdge_Wrapper, SWIG_NewClientData(obj));
4859 return SWIG_Py_Void();
4862 SWIGINTERN PyObject *_wrap_cvSetMouseCallback__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4863 PyObject *resultobj = 0;
4864 char *arg1 = (char *) 0 ;
4865 PyObject *arg2 = (PyObject *) 0 ;
4866 PyObject *arg3 = (PyObject *) 0 ;
4870 PyObject * obj0 = 0 ;
4871 PyObject * obj1 = 0 ;
4872 PyObject * obj2 = 0 ;
4874 if (!PyArg_ParseTuple(args,(char *)"OOO:cvSetMouseCallback",&obj0,&obj1,&obj2)) SWIG_fail;
4875 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
4876 if (!SWIG_IsOK(res1)) {
4877 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvSetMouseCallback" "', argument " "1"" of type '" "char const *""'");
4879 arg1 = reinterpret_cast< char * >(buf1);
4882 cvSetMouseCallbackPy((char const *)arg1,arg2,arg3);
4883 resultobj = SWIG_Py_Void();
4884 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4887 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4892 SWIGINTERN PyObject *_wrap_cvSetMouseCallback__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4893 PyObject *resultobj = 0;
4894 char *arg1 = (char *) 0 ;
4895 PyObject *arg2 = (PyObject *) 0 ;
4899 PyObject * obj0 = 0 ;
4900 PyObject * obj1 = 0 ;
4902 if (!PyArg_ParseTuple(args,(char *)"OO:cvSetMouseCallback",&obj0,&obj1)) SWIG_fail;
4903 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
4904 if (!SWIG_IsOK(res1)) {
4905 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvSetMouseCallback" "', argument " "1"" of type '" "char const *""'");
4907 arg1 = reinterpret_cast< char * >(buf1);
4909 cvSetMouseCallbackPy((char const *)arg1,arg2);
4910 resultobj = SWIG_Py_Void();
4911 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4914 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4919 SWIGINTERN PyObject *_wrap_cvSetMouseCallback(PyObject *self, PyObject *args) {
4924 if (!PyTuple_Check(args)) SWIG_fail;
4925 argc = (int)PyObject_Length(args);
4926 for (ii = 0; (ii < argc) && (ii < 3); ii++) {
4927 argv[ii] = PyTuple_GET_ITEM(args,ii);
4931 int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
4932 _v = SWIG_CheckState(res);
4934 _v = (argv[1] != 0);
4936 return _wrap_cvSetMouseCallback__SWIG_1(self, args);
4942 int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
4943 _v = SWIG_CheckState(res);
4945 _v = (argv[1] != 0);
4947 _v = (argv[2] != 0);
4949 return _wrap_cvSetMouseCallback__SWIG_0(self, args);
4956 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cvSetMouseCallback'.\n"
4957 " Possible C/C++ prototypes are:\n"
4958 " cvSetMouseCallbackPy(char const *,PyObject *,PyObject *)\n"
4959 " cvSetMouseCallbackPy(char const *,PyObject *)\n");
4965 /* C helper function which is responsible for calling
4966 the Python real trackbar callback function */
4967 static void icvPyOnTrackbar( PyObject * py_cb_func, int pos) {
4969 /* Must ensure this thread has a lock on the interpreter */
4970 PyGILState_STATE state = PyGILState_Ensure();
4974 /* the argument of the callback ready to be passed to Python code */
4975 PyObject *arg1 = PyInt_FromLong (pos);
4977 /* build the tuple for calling the Python callback */
4978 PyObject *arglist = Py_BuildValue ("(O)", arg1);
4980 /* call the Python callback */
4981 result = PyEval_CallObject (py_cb_func, arglist);
4983 /* Errors in Python callback get swallowed, so report them here */
4986 cvError( CV_StsInternal, "icvPyOnTrackbar", "", __FILE__, __LINE__);
4991 Py_XDECREF (result);
4993 /* Release Interpreter lock */
4994 PyGILState_Release(state);
4997 #define ICV_PY_MAX_CB 10
4999 struct PyCvTrackbar {
5000 CvTrackbarCallback cv_func;
5005 static int my_trackbar_cb_size=0;
5006 extern PyCvTrackbar my_trackbar_cb_funcs[ICV_PY_MAX_CB];
5009 static void icvPyTrackbarCB0(int pos){
5010 if(!my_trackbar_cb_funcs[0].py_func) return;
5011 icvPyOnTrackbar( my_trackbar_cb_funcs[0].py_func, pos );
5015 static void icvPyTrackbarCB1(int pos){
5016 if(!my_trackbar_cb_funcs[1].py_func) return;
5017 icvPyOnTrackbar( my_trackbar_cb_funcs[1].py_func, pos );
5021 static void icvPyTrackbarCB2(int pos){
5022 if(!my_trackbar_cb_funcs[2].py_func) return;
5023 icvPyOnTrackbar( my_trackbar_cb_funcs[2].py_func, pos );
5027 static void icvPyTrackbarCB3(int pos){
5028 if(!my_trackbar_cb_funcs[3].py_func) return;
5029 icvPyOnTrackbar( my_trackbar_cb_funcs[3].py_func, pos );
5033 static void icvPyTrackbarCB4(int pos){
5034 if(!my_trackbar_cb_funcs[4].py_func) return;
5035 icvPyOnTrackbar( my_trackbar_cb_funcs[4].py_func, pos );
5039 static void icvPyTrackbarCB5(int pos){
5040 if(!my_trackbar_cb_funcs[5].py_func) return;
5041 icvPyOnTrackbar( my_trackbar_cb_funcs[5].py_func, pos );
5045 static void icvPyTrackbarCB6(int pos){
5046 if(!my_trackbar_cb_funcs[6].py_func) return;
5047 icvPyOnTrackbar( my_trackbar_cb_funcs[6].py_func, pos );
5051 static void icvPyTrackbarCB7(int pos){
5052 if(!my_trackbar_cb_funcs[7].py_func) return;
5053 icvPyOnTrackbar( my_trackbar_cb_funcs[7].py_func, pos );
5057 static void icvPyTrackbarCB8(int pos){
5058 if(!my_trackbar_cb_funcs[8].py_func) return;
5059 icvPyOnTrackbar( my_trackbar_cb_funcs[8].py_func, pos );
5063 static void icvPyTrackbarCB9(int pos){
5064 if(!my_trackbar_cb_funcs[9].py_func) return;
5065 icvPyOnTrackbar( my_trackbar_cb_funcs[9].py_func, pos );
5069 PyCvTrackbar my_trackbar_cb_funcs[ICV_PY_MAX_CB] = {
5070 /*@SWIG:highgui.i,176,%ICV_PY_CB_TAB_ENTRY@*/
5071 {(CvTrackbarCallback) icvPyTrackbarCB0, NULL, NULL }
5073 /*@SWIG:highgui.i,176,%ICV_PY_CB_TAB_ENTRY@*/
5074 {(CvTrackbarCallback) icvPyTrackbarCB1, NULL, NULL }
5076 /*@SWIG:highgui.i,176,%ICV_PY_CB_TAB_ENTRY@*/
5077 {(CvTrackbarCallback) icvPyTrackbarCB2, NULL, NULL }
5079 /*@SWIG:highgui.i,176,%ICV_PY_CB_TAB_ENTRY@*/
5080 {(CvTrackbarCallback) icvPyTrackbarCB3, NULL, NULL }
5082 /*@SWIG:highgui.i,176,%ICV_PY_CB_TAB_ENTRY@*/
5083 {(CvTrackbarCallback) icvPyTrackbarCB4, NULL, NULL }
5085 /*@SWIG:highgui.i,176,%ICV_PY_CB_TAB_ENTRY@*/
5086 {(CvTrackbarCallback) icvPyTrackbarCB5, NULL, NULL }
5088 /*@SWIG:highgui.i,176,%ICV_PY_CB_TAB_ENTRY@*/
5089 {(CvTrackbarCallback) icvPyTrackbarCB6, NULL, NULL }
5091 /*@SWIG:highgui.i,176,%ICV_PY_CB_TAB_ENTRY@*/
5092 {(CvTrackbarCallback) icvPyTrackbarCB7, NULL, NULL }
5094 /*@SWIG:highgui.i,176,%ICV_PY_CB_TAB_ENTRY@*/
5095 {(CvTrackbarCallback) icvPyTrackbarCB8, NULL, NULL }
5097 /*@SWIG:highgui.i,176,%ICV_PY_CB_TAB_ENTRY@*/
5098 {(CvTrackbarCallback) icvPyTrackbarCB9, NULL, NULL }
5102 SWIGINTERN PyObject *_wrap_cvWaitKey__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5103 PyObject *resultobj = 0;
5105 PyObject *result = 0 ;
5108 PyObject * obj0 = 0 ;
5110 if (!PyArg_ParseTuple(args,(char *)"O:cvWaitKey",&obj0)) SWIG_fail;
5111 ecode1 = SWIG_AsVal_int(obj0, &val1);
5112 if (!SWIG_IsOK(ecode1)) {
5113 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cvWaitKey" "', argument " "1"" of type '" "int""'");
5115 arg1 = static_cast< int >(val1);
5116 result = (PyObject *)cvWaitKeyPy(arg1);
5124 SWIGINTERN PyObject *_wrap_cvWaitKey__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5125 PyObject *resultobj = 0;
5126 PyObject *result = 0 ;
5128 if (!PyArg_ParseTuple(args,(char *)":cvWaitKey")) SWIG_fail;
5129 result = (PyObject *)cvWaitKeyPy();
5137 SWIGINTERN PyObject *_wrap_cvWaitKey(PyObject *self, PyObject *args) {
5142 if (!PyTuple_Check(args)) SWIG_fail;
5143 argc = (int)PyObject_Length(args);
5144 for (ii = 0; (ii < argc) && (ii < 1); ii++) {
5145 argv[ii] = PyTuple_GET_ITEM(args,ii);
5148 return _wrap_cvWaitKey__SWIG_1(self, args);
5153 int res = SWIG_AsVal_int(argv[0], NULL);
5154 _v = SWIG_CheckState(res);
5157 return _wrap_cvWaitKey__SWIG_0(self, args);
5162 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cvWaitKey'.\n"
5163 " Possible C/C++ prototypes are:\n"
5164 " cvWaitKeyPy(int)\n"
5165 " cvWaitKeyPy()\n");
5170 SWIGINTERN PyObject *_wrap_cvLoadImage__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5171 PyObject *resultobj = 0;
5172 char *arg1 = (char *) 0 ;
5180 PyObject * obj0 = 0 ;
5181 PyObject * obj1 = 0 ;
5183 if (!PyArg_ParseTuple(args,(char *)"OO:cvLoadImage",&obj0,&obj1)) SWIG_fail;
5184 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5185 if (!SWIG_IsOK(res1)) {
5186 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvLoadImage" "', argument " "1"" of type '" "char const *""'");
5188 arg1 = reinterpret_cast< char * >(buf1);
5189 ecode2 = SWIG_AsVal_int(obj1, &val2);
5190 if (!SWIG_IsOK(ecode2)) {
5191 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cvLoadImage" "', argument " "2"" of type '" "int""'");
5193 arg2 = static_cast< int >(val2);
5196 result = (CvMat *)cvLoadImageMat((char const *)arg1,arg2);
5203 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvMat, SWIG_POINTER_OWN | 0 );
5204 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5207 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5212 SWIGINTERN PyObject *_wrap_cvLoadImage__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5213 PyObject *resultobj = 0;
5214 char *arg1 = (char *) 0 ;
5219 PyObject * obj0 = 0 ;
5221 if (!PyArg_ParseTuple(args,(char *)"O:cvLoadImage",&obj0)) SWIG_fail;
5222 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5223 if (!SWIG_IsOK(res1)) {
5224 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvLoadImage" "', argument " "1"" of type '" "char const *""'");
5226 arg1 = reinterpret_cast< char * >(buf1);
5229 result = (CvMat *)cvLoadImageMat((char const *)arg1);
5236 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvMat, SWIG_POINTER_OWN | 0 );
5237 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5240 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5245 SWIGINTERN PyObject *_wrap_cvLoadImage(PyObject *self, PyObject *args) {
5250 if (!PyTuple_Check(args)) SWIG_fail;
5251 argc = (int)PyObject_Length(args);
5252 for (ii = 0; (ii < argc) && (ii < 2); ii++) {
5253 argv[ii] = PyTuple_GET_ITEM(args,ii);
5257 int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
5258 _v = SWIG_CheckState(res);
5260 return _wrap_cvLoadImage__SWIG_1(self, args);
5265 int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
5266 _v = SWIG_CheckState(res);
5269 int res = SWIG_AsVal_int(argv[1], NULL);
5270 _v = SWIG_CheckState(res);
5273 return _wrap_cvLoadImage__SWIG_0(self, args);
5279 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cvLoadImage'.\n"
5280 " Possible C/C++ prototypes are:\n"
5281 " cvLoadImageMat(char const *,int)\n"
5282 " cvLoadImageMat(char const *)\n");
5287 SWIGINTERN PyObject *_wrap_cvRetrieveFrame(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5288 PyObject *resultobj = 0;
5289 CvCapture *arg1 = (CvCapture *) 0 ;
5293 PyObject * obj0 = 0 ;
5295 if (!PyArg_ParseTuple(args,(char *)"O:cvRetrieveFrame",&obj0)) SWIG_fail;
5296 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvCapture, 0 | 0 );
5297 if (!SWIG_IsOK(res1)) {
5298 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvRetrieveFrame" "', argument " "1"" of type '" "CvCapture *""'");
5300 arg1 = reinterpret_cast< CvCapture * >(argp1);
5303 result = (CvMat *)cvRetrieveFrame__CvMat(arg1);
5310 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvMat, 0 | 0 );
5317 SWIGINTERN PyObject *_wrap_cvQueryFrame(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5318 PyObject *resultobj = 0;
5319 CvCapture *arg1 = (CvCapture *) 0 ;
5323 PyObject * obj0 = 0 ;
5325 if (!PyArg_ParseTuple(args,(char *)"O:cvQueryFrame",&obj0)) SWIG_fail;
5326 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvCapture, 0 | 0 );
5327 if (!SWIG_IsOK(res1)) {
5328 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvQueryFrame" "', argument " "1"" of type '" "CvCapture *""'");
5330 arg1 = reinterpret_cast< CvCapture * >(argp1);
5333 result = (CvMat *)cvQueryFrame__CvMat(arg1);
5340 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvMat, 0 | 0 );
5347 SWIGINTERN PyObject *_wrap_CV_FOURCC(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5348 PyObject *resultobj = 0;
5362 PyObject * obj0 = 0 ;
5363 PyObject * obj1 = 0 ;
5364 PyObject * obj2 = 0 ;
5365 PyObject * obj3 = 0 ;
5367 if (!PyArg_ParseTuple(args,(char *)"OOOO:CV_FOURCC",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
5368 ecode1 = SWIG_AsVal_char(obj0, &val1);
5369 if (!SWIG_IsOK(ecode1)) {
5370 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "CV_FOURCC" "', argument " "1"" of type '" "char""'");
5372 arg1 = static_cast< char >(val1);
5373 ecode2 = SWIG_AsVal_char(obj1, &val2);
5374 if (!SWIG_IsOK(ecode2)) {
5375 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CV_FOURCC" "', argument " "2"" of type '" "char""'");
5377 arg2 = static_cast< char >(val2);
5378 ecode3 = SWIG_AsVal_char(obj2, &val3);
5379 if (!SWIG_IsOK(ecode3)) {
5380 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CV_FOURCC" "', argument " "3"" of type '" "char""'");
5382 arg3 = static_cast< char >(val3);
5383 ecode4 = SWIG_AsVal_char(obj3, &val4);
5384 if (!SWIG_IsOK(ecode4)) {
5385 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CV_FOURCC" "', argument " "4"" of type '" "char""'");
5387 arg4 = static_cast< char >(val4);
5390 result = (int)CV_FOURCC(arg1,arg2,arg3,arg4);
5397 resultobj = SWIG_From_int(static_cast< int >(result));
5404 SWIGINTERN PyObject *_wrap_cvInitSystem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5405 PyObject *resultobj = 0;
5407 char **arg2 = (char **) 0 ;
5413 PyObject * obj0 = 0 ;
5414 PyObject * obj1 = 0 ;
5416 if (!PyArg_ParseTuple(args,(char *)"OO:cvInitSystem",&obj0,&obj1)) SWIG_fail;
5417 ecode1 = SWIG_AsVal_int(obj0, &val1);
5418 if (!SWIG_IsOK(ecode1)) {
5419 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cvInitSystem" "', argument " "1"" of type '" "int""'");
5421 arg1 = static_cast< int >(val1);
5423 if ((SWIG_ConvertPtr(obj1, &vptr2, SWIGTYPE_p_char, 1)) == -1){
5426 buffer2 = (char *) vptr2;
5431 result = (int)cvInitSystem(arg1,arg2);
5438 resultobj = SWIG_From_int(static_cast< int >(result));
5445 SWIGINTERN PyObject *_wrap_cvStartWindowThread(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5446 PyObject *resultobj = 0;
5449 if (!PyArg_ParseTuple(args,(char *)":cvStartWindowThread")) SWIG_fail;
5452 result = (int)cvStartWindowThread();
5459 resultobj = SWIG_From_int(static_cast< int >(result));
5466 SWIGINTERN PyObject *_wrap_cvNamedWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5467 PyObject *resultobj = 0;
5468 char *arg1 = (char *) 0 ;
5469 int arg2 = (int) 1 ;
5476 PyObject * obj0 = 0 ;
5477 PyObject * obj1 = 0 ;
5479 if (!PyArg_ParseTuple(args,(char *)"O|O:cvNamedWindow",&obj0,&obj1)) SWIG_fail;
5480 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5481 if (!SWIG_IsOK(res1)) {
5482 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvNamedWindow" "', argument " "1"" of type '" "char const *""'");
5484 arg1 = reinterpret_cast< char * >(buf1);
5486 ecode2 = SWIG_AsVal_int(obj1, &val2);
5487 if (!SWIG_IsOK(ecode2)) {
5488 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cvNamedWindow" "', argument " "2"" of type '" "int""'");
5490 arg2 = static_cast< int >(val2);
5494 result = (int)cvNamedWindow((char const *)arg1,arg2);
5501 resultobj = SWIG_From_int(static_cast< int >(result));
5502 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5505 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5510 SWIGINTERN PyObject *_wrap_cvShowImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5511 PyObject *resultobj = 0;
5512 char *arg1 = (char *) 0 ;
5513 CvArr *arg2 = (CvArr *) 0 ;
5517 bool freearg2 = false ;
5518 PyObject * obj0 = 0 ;
5519 PyObject * obj1 = 0 ;
5521 if (!PyArg_ParseTuple(args,(char *)"OO:cvShowImage",&obj0,&obj1)) SWIG_fail;
5522 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5523 if (!SWIG_IsOK(res1)) {
5524 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvShowImage" "', argument " "1"" of type '" "char const *""'");
5526 arg1 = reinterpret_cast< char * >(buf1);
5528 arg2 = PyObject_to_CvArr(obj1, &freearg2);
5532 cvShowImage((char const *)arg1,(void const *)arg2);
5539 resultobj = SWIG_Py_Void();
5540 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5542 if(arg2!=NULL && freearg2){
5543 cvReleaseData( arg2 );
5549 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5551 if(arg2!=NULL && freearg2){
5552 cvReleaseData( arg2 );
5560 SWIGINTERN PyObject *_wrap_cvResizeWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5561 PyObject *resultobj = 0;
5562 char *arg1 = (char *) 0 ;
5572 PyObject * obj0 = 0 ;
5573 PyObject * obj1 = 0 ;
5574 PyObject * obj2 = 0 ;
5576 if (!PyArg_ParseTuple(args,(char *)"OOO:cvResizeWindow",&obj0,&obj1,&obj2)) SWIG_fail;
5577 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5578 if (!SWIG_IsOK(res1)) {
5579 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvResizeWindow" "', argument " "1"" of type '" "char const *""'");
5581 arg1 = reinterpret_cast< char * >(buf1);
5582 ecode2 = SWIG_AsVal_int(obj1, &val2);
5583 if (!SWIG_IsOK(ecode2)) {
5584 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cvResizeWindow" "', argument " "2"" of type '" "int""'");
5586 arg2 = static_cast< int >(val2);
5587 ecode3 = SWIG_AsVal_int(obj2, &val3);
5588 if (!SWIG_IsOK(ecode3)) {
5589 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cvResizeWindow" "', argument " "3"" of type '" "int""'");
5591 arg3 = static_cast< int >(val3);
5594 cvResizeWindow((char const *)arg1,arg2,arg3);
5601 resultobj = SWIG_Py_Void();
5602 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5605 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5610 SWIGINTERN PyObject *_wrap_cvMoveWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5611 PyObject *resultobj = 0;
5612 char *arg1 = (char *) 0 ;
5622 PyObject * obj0 = 0 ;
5623 PyObject * obj1 = 0 ;
5624 PyObject * obj2 = 0 ;
5626 if (!PyArg_ParseTuple(args,(char *)"OOO:cvMoveWindow",&obj0,&obj1,&obj2)) SWIG_fail;
5627 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5628 if (!SWIG_IsOK(res1)) {
5629 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvMoveWindow" "', argument " "1"" of type '" "char const *""'");
5631 arg1 = reinterpret_cast< char * >(buf1);
5632 ecode2 = SWIG_AsVal_int(obj1, &val2);
5633 if (!SWIG_IsOK(ecode2)) {
5634 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cvMoveWindow" "', argument " "2"" of type '" "int""'");
5636 arg2 = static_cast< int >(val2);
5637 ecode3 = SWIG_AsVal_int(obj2, &val3);
5638 if (!SWIG_IsOK(ecode3)) {
5639 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cvMoveWindow" "', argument " "3"" of type '" "int""'");
5641 arg3 = static_cast< int >(val3);
5644 cvMoveWindow((char const *)arg1,arg2,arg3);
5651 resultobj = SWIG_Py_Void();
5652 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5655 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5660 SWIGINTERN PyObject *_wrap_cvDestroyWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5661 PyObject *resultobj = 0;
5662 char *arg1 = (char *) 0 ;
5666 PyObject * obj0 = 0 ;
5668 if (!PyArg_ParseTuple(args,(char *)"O:cvDestroyWindow",&obj0)) SWIG_fail;
5669 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5670 if (!SWIG_IsOK(res1)) {
5671 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvDestroyWindow" "', argument " "1"" of type '" "char const *""'");
5673 arg1 = reinterpret_cast< char * >(buf1);
5676 cvDestroyWindow((char const *)arg1);
5683 resultobj = SWIG_Py_Void();
5684 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5687 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5692 SWIGINTERN PyObject *_wrap_cvDestroyAllWindows(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5693 PyObject *resultobj = 0;
5695 if (!PyArg_ParseTuple(args,(char *)":cvDestroyAllWindows")) SWIG_fail;
5698 cvDestroyAllWindows();
5705 resultobj = SWIG_Py_Void();
5712 SWIGINTERN PyObject *_wrap_cvGetWindowHandle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5713 PyObject *resultobj = 0;
5714 char *arg1 = (char *) 0 ;
5719 PyObject * obj0 = 0 ;
5721 if (!PyArg_ParseTuple(args,(char *)"O:cvGetWindowHandle",&obj0)) SWIG_fail;
5722 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5723 if (!SWIG_IsOK(res1)) {
5724 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvGetWindowHandle" "', argument " "1"" of type '" "char const *""'");
5726 arg1 = reinterpret_cast< char * >(buf1);
5729 result = (void *)cvGetWindowHandle((char const *)arg1);
5736 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 );
5737 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5740 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5745 SWIGINTERN PyObject *_wrap_cvGetWindowName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5746 PyObject *resultobj = 0;
5747 void *arg1 = (void *) 0 ;
5750 PyObject * obj0 = 0 ;
5752 if (!PyArg_ParseTuple(args,(char *)"O:cvGetWindowName",&obj0)) SWIG_fail;
5753 res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
5754 if (!SWIG_IsOK(res1)) {
5755 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvGetWindowName" "', argument " "1"" of type '" "void *""'");
5759 result = (char *)cvGetWindowName(arg1);
5766 resultobj = SWIG_FromCharPtr((const char *)result);
5773 SWIGINTERN PyObject *_wrap_cvCreateTrackbar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5774 PyObject *resultobj = 0;
5775 char *arg1 = (char *) 0 ;
5776 char *arg2 = (char *) 0 ;
5777 int *arg3 = (int *) 0 ;
5779 CvTrackbarCallback arg5 = (CvTrackbarCallback) 0 ;
5789 PyObject * obj0 = 0 ;
5790 PyObject * obj1 = 0 ;
5791 PyObject * obj2 = 0 ;
5792 PyObject * obj3 = 0 ;
5793 PyObject * obj4 = 0 ;
5795 if (!PyArg_ParseTuple(args,(char *)"OOOOO:cvCreateTrackbar",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
5796 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5797 if (!SWIG_IsOK(res1)) {
5798 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvCreateTrackbar" "', argument " "1"" of type '" "char const *""'");
5800 arg1 = reinterpret_cast< char * >(buf1);
5801 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5802 if (!SWIG_IsOK(res2)) {
5803 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cvCreateTrackbar" "', argument " "2"" of type '" "char const *""'");
5805 arg2 = reinterpret_cast< char * >(buf2);
5807 arg3 = (int *)malloc (sizeof (int));
5808 *arg3 = PyInt_AsLong (obj2);
5810 ecode4 = SWIG_AsVal_int(obj3, &val4);
5811 if (!SWIG_IsOK(ecode4)) {
5812 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cvCreateTrackbar" "', argument " "4"" of type '" "int""'");
5814 arg4 = static_cast< int >(val4);
5816 if(my_trackbar_cb_size == ICV_PY_MAX_CB){
5817 SWIG_exception(SWIG_IndexError, "Exceeded maximum number of trackbars");
5820 my_trackbar_cb_size++;
5822 if (!PyCallable_Check(obj4)) {
5823 PyErr_SetString(PyExc_TypeError, "parameter must be callable");
5826 Py_XINCREF((PyObject*) obj4); /* Add a reference to new callback */
5827 Py_XDECREF(my_trackbar_cb_funcs[my_trackbar_cb_size-1].py_func); /* Dispose of previous callback */
5828 my_trackbar_cb_funcs[my_trackbar_cb_size-1].py_func = (PyObject *) obj4;
5830 /* prepare to call the C function who will register the callback */
5831 arg5 = my_trackbar_cb_funcs[ my_trackbar_cb_size-1 ].cv_func;
5835 result = (int)cvCreateTrackbar((char const *)arg1,(char const *)arg2,arg3,arg4,arg5);
5842 resultobj = SWIG_From_int(static_cast< int >(result));
5843 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5844 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5847 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5848 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5853 SWIGINTERN PyObject *_wrap_cvGetTrackbarPos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5854 PyObject *resultobj = 0;
5855 char *arg1 = (char *) 0 ;
5856 char *arg2 = (char *) 0 ;
5864 PyObject * obj0 = 0 ;
5865 PyObject * obj1 = 0 ;
5867 if (!PyArg_ParseTuple(args,(char *)"OO:cvGetTrackbarPos",&obj0,&obj1)) SWIG_fail;
5868 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5869 if (!SWIG_IsOK(res1)) {
5870 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvGetTrackbarPos" "', argument " "1"" of type '" "char const *""'");
5872 arg1 = reinterpret_cast< char * >(buf1);
5873 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5874 if (!SWIG_IsOK(res2)) {
5875 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cvGetTrackbarPos" "', argument " "2"" of type '" "char const *""'");
5877 arg2 = reinterpret_cast< char * >(buf2);
5880 result = (int)cvGetTrackbarPos((char const *)arg1,(char const *)arg2);
5887 resultobj = SWIG_From_int(static_cast< int >(result));
5888 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5889 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5892 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5893 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5898 SWIGINTERN PyObject *_wrap_cvSetTrackbarPos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5899 PyObject *resultobj = 0;
5900 char *arg1 = (char *) 0 ;
5901 char *arg2 = (char *) 0 ;
5911 PyObject * obj0 = 0 ;
5912 PyObject * obj1 = 0 ;
5913 PyObject * obj2 = 0 ;
5915 if (!PyArg_ParseTuple(args,(char *)"OOO:cvSetTrackbarPos",&obj0,&obj1,&obj2)) SWIG_fail;
5916 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5917 if (!SWIG_IsOK(res1)) {
5918 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvSetTrackbarPos" "', argument " "1"" of type '" "char const *""'");
5920 arg1 = reinterpret_cast< char * >(buf1);
5921 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5922 if (!SWIG_IsOK(res2)) {
5923 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cvSetTrackbarPos" "', argument " "2"" of type '" "char const *""'");
5925 arg2 = reinterpret_cast< char * >(buf2);
5926 ecode3 = SWIG_AsVal_int(obj2, &val3);
5927 if (!SWIG_IsOK(ecode3)) {
5928 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cvSetTrackbarPos" "', argument " "3"" of type '" "int""'");
5930 arg3 = static_cast< int >(val3);
5933 cvSetTrackbarPos((char const *)arg1,(char const *)arg2,arg3);
5940 resultobj = SWIG_Py_Void();
5941 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5942 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5945 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5946 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5951 SWIGINTERN PyObject *_wrap_cvSetMouseCallbackOld(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5952 PyObject *resultobj = 0;
5953 char *arg1 = (char *) 0 ;
5954 CvMouseCallback arg2 = (CvMouseCallback) 0 ;
5955 void *arg3 = (void *) NULL ;
5960 PyObject * obj0 = 0 ;
5961 PyObject * obj1 = 0 ;
5962 PyObject * obj2 = 0 ;
5964 if (!PyArg_ParseTuple(args,(char *)"OO|O:cvSetMouseCallbackOld",&obj0,&obj1,&obj2)) SWIG_fail;
5965 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5966 if (!SWIG_IsOK(res1)) {
5967 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvSetMouseCallbackOld" "', argument " "1"" of type '" "char const *""'");
5969 arg1 = reinterpret_cast< char * >(buf1);
5971 int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_int_int_int_int_p_void__void);
5972 if (!SWIG_IsOK(res)) {
5973 SWIG_exception_fail(SWIG_ArgError(res), "in method '" "cvSetMouseCallbackOld" "', argument " "2"" of type '" "CvMouseCallback""'");
5977 res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
5978 if (!SWIG_IsOK(res3)) {
5979 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cvSetMouseCallbackOld" "', argument " "3"" of type '" "void *""'");
5984 cvSetMouseCallback((char const *)arg1,arg2,arg3);
5991 resultobj = SWIG_Py_Void();
5992 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5995 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
6000 SWIGINTERN PyObject *_wrap_cvLoadImageM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6001 PyObject *resultobj = 0;
6002 char *arg1 = (char *) 0 ;
6003 int arg2 = (int) 1 ;
6010 PyObject * obj0 = 0 ;
6011 PyObject * obj1 = 0 ;
6013 if (!PyArg_ParseTuple(args,(char *)"O|O:cvLoadImageM",&obj0,&obj1)) SWIG_fail;
6014 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
6015 if (!SWIG_IsOK(res1)) {
6016 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvLoadImageM" "', argument " "1"" of type '" "char const *""'");
6018 arg1 = reinterpret_cast< char * >(buf1);
6020 ecode2 = SWIG_AsVal_int(obj1, &val2);
6021 if (!SWIG_IsOK(ecode2)) {
6022 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cvLoadImageM" "', argument " "2"" of type '" "int""'");
6024 arg2 = static_cast< int >(val2);
6028 result = (CvMat *)cvLoadImageM((char const *)arg1,arg2);
6035 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvMat, SWIG_POINTER_OWN | 0 );
6036 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
6039 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
6044 SWIGINTERN PyObject *_wrap_cvSaveImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6045 PyObject *resultobj = 0;
6046 char *arg1 = (char *) 0 ;
6047 CvArr *arg2 = (CvArr *) 0 ;
6052 bool freearg2 = false ;
6053 PyObject * obj0 = 0 ;
6054 PyObject * obj1 = 0 ;
6056 if (!PyArg_ParseTuple(args,(char *)"OO:cvSaveImage",&obj0,&obj1)) SWIG_fail;
6057 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
6058 if (!SWIG_IsOK(res1)) {
6059 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvSaveImage" "', argument " "1"" of type '" "char const *""'");
6061 arg1 = reinterpret_cast< char * >(buf1);
6063 arg2 = PyObject_to_CvArr(obj1, &freearg2);
6067 result = (int)cvSaveImage((char const *)arg1,(void const *)arg2);
6074 resultobj = SWIG_From_int(static_cast< int >(result));
6075 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
6077 if(arg2!=NULL && freearg2){
6078 cvReleaseData( arg2 );
6084 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
6086 if(arg2!=NULL && freearg2){
6087 cvReleaseData( arg2 );
6095 SWIGINTERN PyObject *_wrap_cvConvertImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6096 PyObject *resultobj = 0;
6097 CvArr *arg1 = (CvArr *) 0 ;
6098 CvArr *arg2 = (CvArr *) 0 ;
6099 int arg3 = (int) 0 ;
6100 bool freearg1 = false ;
6101 bool freearg2 = false ;
6104 PyObject * obj0 = 0 ;
6105 PyObject * obj1 = 0 ;
6106 PyObject * obj2 = 0 ;
6108 if (!PyArg_ParseTuple(args,(char *)"OO|O:cvConvertImage",&obj0,&obj1,&obj2)) SWIG_fail;
6110 arg1 = PyObject_to_CvArr(obj0, &freearg1);
6113 arg2 = PyObject_to_CvArr(obj1, &freearg2);
6116 ecode3 = SWIG_AsVal_int(obj2, &val3);
6117 if (!SWIG_IsOK(ecode3)) {
6118 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cvConvertImage" "', argument " "3"" of type '" "int""'");
6120 arg3 = static_cast< int >(val3);
6124 cvConvertImage((void const *)arg1,arg2,arg3);
6131 resultobj = SWIG_Py_Void();
6133 if(arg1!=NULL && freearg1){
6134 cvReleaseData( arg1 );
6139 if(arg2!=NULL && freearg2){
6140 cvReleaseData( arg2 );
6147 if(arg1!=NULL && freearg1){
6148 cvReleaseData( arg1 );
6153 if(arg2!=NULL && freearg2){
6154 cvReleaseData( arg2 );
6162 SWIGINTERN PyObject *_wrap_cvWaitKeyC(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6163 PyObject *resultobj = 0;
6164 int arg1 = (int) 0 ;
6168 PyObject * obj0 = 0 ;
6170 if (!PyArg_ParseTuple(args,(char *)"|O:cvWaitKeyC",&obj0)) SWIG_fail;
6172 ecode1 = SWIG_AsVal_int(obj0, &val1);
6173 if (!SWIG_IsOK(ecode1)) {
6174 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cvWaitKeyC" "', argument " "1"" of type '" "int""'");
6176 arg1 = static_cast< int >(val1);
6180 result = (int)cvWaitKey(arg1);
6187 resultobj = SWIG_From_int(static_cast< int >(result));
6194 SWIGINTERN PyObject *_wrap_cvCreateFileCapture(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6195 PyObject *resultobj = 0;
6196 char *arg1 = (char *) 0 ;
6197 CvCapture *result = 0 ;
6201 PyObject * obj0 = 0 ;
6203 if (!PyArg_ParseTuple(args,(char *)"O:cvCreateFileCapture",&obj0)) SWIG_fail;
6204 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
6205 if (!SWIG_IsOK(res1)) {
6206 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvCreateFileCapture" "', argument " "1"" of type '" "char const *""'");
6208 arg1 = reinterpret_cast< char * >(buf1);
6211 result = (CvCapture *)cvCreateFileCapture((char const *)arg1);
6218 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvCapture, 0 | 0 );
6219 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
6222 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
6227 SWIGINTERN PyObject *_wrap_cvCreateCameraCapture(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6228 PyObject *resultobj = 0;
6230 CvCapture *result = 0 ;
6233 PyObject * obj0 = 0 ;
6235 if (!PyArg_ParseTuple(args,(char *)"O:cvCreateCameraCapture",&obj0)) SWIG_fail;
6236 ecode1 = SWIG_AsVal_int(obj0, &val1);
6237 if (!SWIG_IsOK(ecode1)) {
6238 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cvCreateCameraCapture" "', argument " "1"" of type '" "int""'");
6240 arg1 = static_cast< int >(val1);
6243 result = (CvCapture *)cvCreateCameraCapture(arg1);
6250 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvCapture, 0 | 0 );
6257 SWIGINTERN PyObject *_wrap_cvGrabFrame(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6258 PyObject *resultobj = 0;
6259 CvCapture *arg1 = (CvCapture *) 0 ;
6263 PyObject * obj0 = 0 ;
6265 if (!PyArg_ParseTuple(args,(char *)"O:cvGrabFrame",&obj0)) SWIG_fail;
6266 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvCapture, 0 | 0 );
6267 if (!SWIG_IsOK(res1)) {
6268 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvGrabFrame" "', argument " "1"" of type '" "CvCapture *""'");
6270 arg1 = reinterpret_cast< CvCapture * >(argp1);
6273 result = (int)cvGrabFrame(arg1);
6280 resultobj = SWIG_From_int(static_cast< int >(result));
6287 SWIGINTERN PyObject *_wrap_cvRetrieveFrame__Deprecated(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6288 PyObject *resultobj = 0;
6289 CvCapture *arg1 = (CvCapture *) 0 ;
6290 IplImage *result = 0 ;
6293 PyObject * obj0 = 0 ;
6295 if (!PyArg_ParseTuple(args,(char *)"O:cvRetrieveFrame__Deprecated",&obj0)) SWIG_fail;
6296 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvCapture, 0 | 0 );
6297 if (!SWIG_IsOK(res1)) {
6298 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvRetrieveFrame__Deprecated" "', argument " "1"" of type '" "CvCapture *""'");
6300 arg1 = reinterpret_cast< CvCapture * >(argp1);
6303 result = (IplImage *)cvRetrieveFrame(arg1);
6311 SWIG_exception( SWIG_TypeError, "IplImage * return type is deprecated. Please file a bug report at www.sourceforge.net/opencvlibrary if you see this error message.");
6320 SWIGINTERN PyObject *_wrap_cvQueryFrame__Deprecated(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6321 PyObject *resultobj = 0;
6322 CvCapture *arg1 = (CvCapture *) 0 ;
6323 IplImage *result = 0 ;
6326 PyObject * obj0 = 0 ;
6328 if (!PyArg_ParseTuple(args,(char *)"O:cvQueryFrame__Deprecated",&obj0)) SWIG_fail;
6329 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvCapture, 0 | 0 );
6330 if (!SWIG_IsOK(res1)) {
6331 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvQueryFrame__Deprecated" "', argument " "1"" of type '" "CvCapture *""'");
6333 arg1 = reinterpret_cast< CvCapture * >(argp1);
6336 result = (IplImage *)cvQueryFrame(arg1);
6344 SWIG_exception( SWIG_TypeError, "IplImage * return type is deprecated. Please file a bug report at www.sourceforge.net/opencvlibrary if you see this error message.");
6353 SWIGINTERN PyObject *_wrap_cvGetCaptureProperty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6354 PyObject *resultobj = 0;
6355 CvCapture *arg1 = (CvCapture *) 0 ;
6362 PyObject * obj0 = 0 ;
6363 PyObject * obj1 = 0 ;
6365 if (!PyArg_ParseTuple(args,(char *)"OO:cvGetCaptureProperty",&obj0,&obj1)) SWIG_fail;
6366 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvCapture, 0 | 0 );
6367 if (!SWIG_IsOK(res1)) {
6368 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvGetCaptureProperty" "', argument " "1"" of type '" "CvCapture *""'");
6370 arg1 = reinterpret_cast< CvCapture * >(argp1);
6371 ecode2 = SWIG_AsVal_int(obj1, &val2);
6372 if (!SWIG_IsOK(ecode2)) {
6373 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cvGetCaptureProperty" "', argument " "2"" of type '" "int""'");
6375 arg2 = static_cast< int >(val2);
6378 result = (double)cvGetCaptureProperty(arg1,arg2);
6385 resultobj = SWIG_From_double(static_cast< double >(result));
6392 SWIGINTERN PyObject *_wrap_cvSetCaptureProperty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6393 PyObject *resultobj = 0;
6394 CvCapture *arg1 = (CvCapture *) 0 ;
6404 PyObject * obj0 = 0 ;
6405 PyObject * obj1 = 0 ;
6406 PyObject * obj2 = 0 ;
6408 if (!PyArg_ParseTuple(args,(char *)"OOO:cvSetCaptureProperty",&obj0,&obj1,&obj2)) SWIG_fail;
6409 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvCapture, 0 | 0 );
6410 if (!SWIG_IsOK(res1)) {
6411 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvSetCaptureProperty" "', argument " "1"" of type '" "CvCapture *""'");
6413 arg1 = reinterpret_cast< CvCapture * >(argp1);
6414 ecode2 = SWIG_AsVal_int(obj1, &val2);
6415 if (!SWIG_IsOK(ecode2)) {
6416 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cvSetCaptureProperty" "', argument " "2"" of type '" "int""'");
6418 arg2 = static_cast< int >(val2);
6419 ecode3 = SWIG_AsVal_double(obj2, &val3);
6420 if (!SWIG_IsOK(ecode3)) {
6421 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cvSetCaptureProperty" "', argument " "3"" of type '" "double""'");
6423 arg3 = static_cast< double >(val3);
6426 result = (int)cvSetCaptureProperty(arg1,arg2,arg3);
6433 resultobj = SWIG_From_int(static_cast< int >(result));
6440 SWIGINTERN PyObject *_wrap_cvCreateVideoWriter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6441 PyObject *resultobj = 0;
6442 char *arg1 = (char *) 0 ;
6446 int arg5 = (int) 1 ;
6447 CvVideoWriter *result = 0 ;
6459 PyObject * obj0 = 0 ;
6460 PyObject * obj1 = 0 ;
6461 PyObject * obj2 = 0 ;
6462 PyObject * obj3 = 0 ;
6463 PyObject * obj4 = 0 ;
6465 if (!PyArg_ParseTuple(args,(char *)"OOOO|O:cvCreateVideoWriter",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
6466 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
6467 if (!SWIG_IsOK(res1)) {
6468 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvCreateVideoWriter" "', argument " "1"" of type '" "char const *""'");
6470 arg1 = reinterpret_cast< char * >(buf1);
6471 ecode2 = SWIG_AsVal_int(obj1, &val2);
6472 if (!SWIG_IsOK(ecode2)) {
6473 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cvCreateVideoWriter" "', argument " "2"" of type '" "int""'");
6475 arg2 = static_cast< int >(val2);
6476 ecode3 = SWIG_AsVal_double(obj2, &val3);
6477 if (!SWIG_IsOK(ecode3)) {
6478 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cvCreateVideoWriter" "', argument " "3"" of type '" "double""'");
6480 arg3 = static_cast< double >(val3);
6482 res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_CvSize, 0 | 0);
6483 if (!SWIG_IsOK(res4)) {
6484 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cvCreateVideoWriter" "', argument " "4"" of type '" "CvSize""'");
6487 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cvCreateVideoWriter" "', argument " "4"" of type '" "CvSize""'");
6489 CvSize * temp = reinterpret_cast< CvSize * >(argp4);
6491 if (SWIG_IsNewObj(res4)) delete temp;
6495 ecode5 = SWIG_AsVal_int(obj4, &val5);
6496 if (!SWIG_IsOK(ecode5)) {
6497 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cvCreateVideoWriter" "', argument " "5"" of type '" "int""'");
6499 arg5 = static_cast< int >(val5);
6503 result = (CvVideoWriter *)cvCreateVideoWriter((char const *)arg1,arg2,arg3,arg4,arg5);
6510 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvVideoWriter, SWIG_POINTER_OWN | 0 );
6511 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
6514 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
6519 SWIGINTERN PyObject *_wrap_cvWriteFrame(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6520 PyObject *resultobj = 0;
6521 CvVideoWriter *arg1 = (CvVideoWriter *) 0 ;
6522 IplImage *arg2 = (IplImage *) 0 ;
6527 PyObject * obj0 = 0 ;
6528 PyObject * obj1 = 0 ;
6530 if (!PyArg_ParseTuple(args,(char *)"OO:cvWriteFrame",&obj0,&obj1)) SWIG_fail;
6531 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvVideoWriter, 0 | 0 );
6532 if (!SWIG_IsOK(res1)) {
6533 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvWriteFrame" "', argument " "1"" of type '" "CvVideoWriter *""'");
6535 arg1 = reinterpret_cast< CvVideoWriter * >(argp1);
6538 int res = SWIG_ConvertPtr(obj1, (&vptr), SWIGTYPE_p_CvMat, 0);
6540 SWIG_exception( SWIG_TypeError, "%%typemap(in) IplImage * : could not convert to CvMat");
6543 arg2 = cvGetImage((CvMat *)vptr, &header2);
6547 result = (int)cvWriteFrame(arg1,(_IplImage const *)arg2);
6554 resultobj = SWIG_From_int(static_cast< int >(result));
6561 SWIGINTERN PyObject *_wrap_new_CvvImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6562 PyObject *resultobj = 0;
6563 CvvImage *result = 0 ;
6565 if (!PyArg_ParseTuple(args,(char *)":new_CvvImage")) SWIG_fail;
6568 result = (CvvImage *)new CvvImage();
6575 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvvImage, SWIG_POINTER_NEW | 0 );
6582 SWIGINTERN PyObject *_wrap_delete_CvvImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6583 PyObject *resultobj = 0;
6584 CvvImage *arg1 = (CvvImage *) 0 ;
6587 PyObject * obj0 = 0 ;
6589 if (!PyArg_ParseTuple(args,(char *)"O:delete_CvvImage",&obj0)) SWIG_fail;
6590 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, SWIG_POINTER_DISOWN | 0 );
6591 if (!SWIG_IsOK(res1)) {
6592 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CvvImage" "', argument " "1"" of type '" "CvvImage *""'");
6594 arg1 = reinterpret_cast< CvvImage * >(argp1);
6604 resultobj = SWIG_Py_Void();
6611 SWIGINTERN PyObject *_wrap_CvvImage_Create__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6612 PyObject *resultobj = 0;
6613 CvvImage *arg1 = (CvvImage *) 0 ;
6629 PyObject * obj0 = 0 ;
6630 PyObject * obj1 = 0 ;
6631 PyObject * obj2 = 0 ;
6632 PyObject * obj3 = 0 ;
6633 PyObject * obj4 = 0 ;
6635 if (!PyArg_ParseTuple(args,(char *)"OOOOO:CvvImage_Create",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
6636 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
6637 if (!SWIG_IsOK(res1)) {
6638 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Create" "', argument " "1"" of type '" "CvvImage *""'");
6640 arg1 = reinterpret_cast< CvvImage * >(argp1);
6641 ecode2 = SWIG_AsVal_int(obj1, &val2);
6642 if (!SWIG_IsOK(ecode2)) {
6643 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CvvImage_Create" "', argument " "2"" of type '" "int""'");
6645 arg2 = static_cast< int >(val2);
6646 ecode3 = SWIG_AsVal_int(obj2, &val3);
6647 if (!SWIG_IsOK(ecode3)) {
6648 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CvvImage_Create" "', argument " "3"" of type '" "int""'");
6650 arg3 = static_cast< int >(val3);
6651 ecode4 = SWIG_AsVal_int(obj3, &val4);
6652 if (!SWIG_IsOK(ecode4)) {
6653 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CvvImage_Create" "', argument " "4"" of type '" "int""'");
6655 arg4 = static_cast< int >(val4);
6656 ecode5 = SWIG_AsVal_int(obj4, &val5);
6657 if (!SWIG_IsOK(ecode5)) {
6658 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CvvImage_Create" "', argument " "5"" of type '" "int""'");
6660 arg5 = static_cast< int >(val5);
6663 result = (bool)(arg1)->Create(arg2,arg3,arg4,arg5);
6670 resultobj = SWIG_From_bool(static_cast< bool >(result));
6677 SWIGINTERN PyObject *_wrap_CvvImage_Create__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6678 PyObject *resultobj = 0;
6679 CvvImage *arg1 = (CvvImage *) 0 ;
6692 PyObject * obj0 = 0 ;
6693 PyObject * obj1 = 0 ;
6694 PyObject * obj2 = 0 ;
6695 PyObject * obj3 = 0 ;
6697 if (!PyArg_ParseTuple(args,(char *)"OOOO:CvvImage_Create",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
6698 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
6699 if (!SWIG_IsOK(res1)) {
6700 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Create" "', argument " "1"" of type '" "CvvImage *""'");
6702 arg1 = reinterpret_cast< CvvImage * >(argp1);
6703 ecode2 = SWIG_AsVal_int(obj1, &val2);
6704 if (!SWIG_IsOK(ecode2)) {
6705 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CvvImage_Create" "', argument " "2"" of type '" "int""'");
6707 arg2 = static_cast< int >(val2);
6708 ecode3 = SWIG_AsVal_int(obj2, &val3);
6709 if (!SWIG_IsOK(ecode3)) {
6710 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CvvImage_Create" "', argument " "3"" of type '" "int""'");
6712 arg3 = static_cast< int >(val3);
6713 ecode4 = SWIG_AsVal_int(obj3, &val4);
6714 if (!SWIG_IsOK(ecode4)) {
6715 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CvvImage_Create" "', argument " "4"" of type '" "int""'");
6717 arg4 = static_cast< int >(val4);
6720 result = (bool)(arg1)->Create(arg2,arg3,arg4);
6727 resultobj = SWIG_From_bool(static_cast< bool >(result));
6734 SWIGINTERN PyObject *_wrap_CvvImage_Create(PyObject *self, PyObject *args) {
6739 if (!PyTuple_Check(args)) SWIG_fail;
6740 argc = (int)PyObject_Length(args);
6741 for (ii = 0; (ii < argc) && (ii < 5); ii++) {
6742 argv[ii] = PyTuple_GET_ITEM(args,ii);
6747 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CvvImage, 0);
6748 _v = SWIG_CheckState(res);
6751 int res = SWIG_AsVal_int(argv[1], NULL);
6752 _v = SWIG_CheckState(res);
6756 int res = SWIG_AsVal_int(argv[2], NULL);
6757 _v = SWIG_CheckState(res);
6761 int res = SWIG_AsVal_int(argv[3], NULL);
6762 _v = SWIG_CheckState(res);
6765 return _wrap_CvvImage_Create__SWIG_1(self, args);
6774 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CvvImage, 0);
6775 _v = SWIG_CheckState(res);
6778 int res = SWIG_AsVal_int(argv[1], NULL);
6779 _v = SWIG_CheckState(res);
6783 int res = SWIG_AsVal_int(argv[2], NULL);
6784 _v = SWIG_CheckState(res);
6788 int res = SWIG_AsVal_int(argv[3], NULL);
6789 _v = SWIG_CheckState(res);
6793 int res = SWIG_AsVal_int(argv[4], NULL);
6794 _v = SWIG_CheckState(res);
6797 return _wrap_CvvImage_Create__SWIG_0(self, args);
6806 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvvImage_Create'.\n"
6807 " Possible C/C++ prototypes are:\n"
6808 " Create(CvvImage *,int,int,int,int)\n"
6809 " Create(CvvImage *,int,int,int)\n");
6814 SWIGINTERN PyObject *_wrap_CvvImage_Load__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6815 PyObject *resultobj = 0;
6816 CvvImage *arg1 = (CvvImage *) 0 ;
6817 char *arg2 = (char *) 0 ;
6827 PyObject * obj0 = 0 ;
6828 PyObject * obj1 = 0 ;
6829 PyObject * obj2 = 0 ;
6831 if (!PyArg_ParseTuple(args,(char *)"OOO:CvvImage_Load",&obj0,&obj1,&obj2)) SWIG_fail;
6832 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
6833 if (!SWIG_IsOK(res1)) {
6834 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Load" "', argument " "1"" of type '" "CvvImage *""'");
6836 arg1 = reinterpret_cast< CvvImage * >(argp1);
6837 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
6838 if (!SWIG_IsOK(res2)) {
6839 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvvImage_Load" "', argument " "2"" of type '" "char const *""'");
6841 arg2 = reinterpret_cast< char * >(buf2);
6842 ecode3 = SWIG_AsVal_int(obj2, &val3);
6843 if (!SWIG_IsOK(ecode3)) {
6844 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CvvImage_Load" "', argument " "3"" of type '" "int""'");
6846 arg3 = static_cast< int >(val3);
6849 result = (bool)(arg1)->Load((char const *)arg2,arg3);
6856 resultobj = SWIG_From_bool(static_cast< bool >(result));
6857 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6860 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6865 SWIGINTERN PyObject *_wrap_CvvImage_Load__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6866 PyObject *resultobj = 0;
6867 CvvImage *arg1 = (CvvImage *) 0 ;
6868 char *arg2 = (char *) 0 ;
6875 PyObject * obj0 = 0 ;
6876 PyObject * obj1 = 0 ;
6878 if (!PyArg_ParseTuple(args,(char *)"OO:CvvImage_Load",&obj0,&obj1)) SWIG_fail;
6879 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
6880 if (!SWIG_IsOK(res1)) {
6881 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Load" "', argument " "1"" of type '" "CvvImage *""'");
6883 arg1 = reinterpret_cast< CvvImage * >(argp1);
6884 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
6885 if (!SWIG_IsOK(res2)) {
6886 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvvImage_Load" "', argument " "2"" of type '" "char const *""'");
6888 arg2 = reinterpret_cast< char * >(buf2);
6891 result = (bool)(arg1)->Load((char const *)arg2);
6898 resultobj = SWIG_From_bool(static_cast< bool >(result));
6899 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6902 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6907 SWIGINTERN PyObject *_wrap_CvvImage_Load(PyObject *self, PyObject *args) {
6912 if (!PyTuple_Check(args)) SWIG_fail;
6913 argc = (int)PyObject_Length(args);
6914 for (ii = 0; (ii < argc) && (ii < 3); ii++) {
6915 argv[ii] = PyTuple_GET_ITEM(args,ii);
6920 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CvvImage, 0);
6921 _v = SWIG_CheckState(res);
6923 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
6924 _v = SWIG_CheckState(res);
6926 return _wrap_CvvImage_Load__SWIG_1(self, args);
6933 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CvvImage, 0);
6934 _v = SWIG_CheckState(res);
6936 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
6937 _v = SWIG_CheckState(res);
6940 int res = SWIG_AsVal_int(argv[2], NULL);
6941 _v = SWIG_CheckState(res);
6944 return _wrap_CvvImage_Load__SWIG_0(self, args);
6951 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvvImage_Load'.\n"
6952 " Possible C/C++ prototypes are:\n"
6953 " Load(CvvImage *,char const *,int)\n"
6954 " Load(CvvImage *,char const *)\n");
6959 SWIGINTERN PyObject *_wrap_CvvImage_LoadRect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6960 PyObject *resultobj = 0;
6961 CvvImage *arg1 = (CvvImage *) 0 ;
6962 char *arg2 = (char *) 0 ;
6975 PyObject * obj0 = 0 ;
6976 PyObject * obj1 = 0 ;
6977 PyObject * obj2 = 0 ;
6978 PyObject * obj3 = 0 ;
6980 if (!PyArg_ParseTuple(args,(char *)"OOOO:CvvImage_LoadRect",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
6981 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
6982 if (!SWIG_IsOK(res1)) {
6983 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_LoadRect" "', argument " "1"" of type '" "CvvImage *""'");
6985 arg1 = reinterpret_cast< CvvImage * >(argp1);
6986 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
6987 if (!SWIG_IsOK(res2)) {
6988 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvvImage_LoadRect" "', argument " "2"" of type '" "char const *""'");
6990 arg2 = reinterpret_cast< char * >(buf2);
6991 ecode3 = SWIG_AsVal_int(obj2, &val3);
6992 if (!SWIG_IsOK(ecode3)) {
6993 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CvvImage_LoadRect" "', argument " "3"" of type '" "int""'");
6995 arg3 = static_cast< int >(val3);
6997 res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_CvRect, 0 | 0);
6998 if (!SWIG_IsOK(res4)) {
6999 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CvvImage_LoadRect" "', argument " "4"" of type '" "CvRect""'");
7002 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CvvImage_LoadRect" "', argument " "4"" of type '" "CvRect""'");
7004 CvRect * temp = reinterpret_cast< CvRect * >(argp4);
7006 if (SWIG_IsNewObj(res4)) delete temp;
7011 result = (bool)(arg1)->LoadRect((char const *)arg2,arg3,arg4);
7018 resultobj = SWIG_From_bool(static_cast< bool >(result));
7019 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7022 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7027 SWIGINTERN PyObject *_wrap_CvvImage_Save(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7028 PyObject *resultobj = 0;
7029 CvvImage *arg1 = (CvvImage *) 0 ;
7030 char *arg2 = (char *) 0 ;
7037 PyObject * obj0 = 0 ;
7038 PyObject * obj1 = 0 ;
7040 if (!PyArg_ParseTuple(args,(char *)"OO:CvvImage_Save",&obj0,&obj1)) SWIG_fail;
7041 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7042 if (!SWIG_IsOK(res1)) {
7043 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Save" "', argument " "1"" of type '" "CvvImage *""'");
7045 arg1 = reinterpret_cast< CvvImage * >(argp1);
7046 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
7047 if (!SWIG_IsOK(res2)) {
7048 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvvImage_Save" "', argument " "2"" of type '" "char const *""'");
7050 arg2 = reinterpret_cast< char * >(buf2);
7053 result = (bool)(arg1)->Save((char const *)arg2);
7060 resultobj = SWIG_From_bool(static_cast< bool >(result));
7061 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7064 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7069 SWIGINTERN PyObject *_wrap_CvvImage_CopyOf__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7070 PyObject *resultobj = 0;
7071 CvvImage *arg1 = (CvvImage *) 0 ;
7072 CvvImage *arg2 = 0 ;
7080 PyObject * obj0 = 0 ;
7081 PyObject * obj1 = 0 ;
7082 PyObject * obj2 = 0 ;
7084 if (!PyArg_ParseTuple(args,(char *)"OOO:CvvImage_CopyOf",&obj0,&obj1,&obj2)) SWIG_fail;
7085 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7086 if (!SWIG_IsOK(res1)) {
7087 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_CopyOf" "', argument " "1"" of type '" "CvvImage *""'");
7089 arg1 = reinterpret_cast< CvvImage * >(argp1);
7090 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_CvvImage, 0 );
7091 if (!SWIG_IsOK(res2)) {
7092 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvvImage_CopyOf" "', argument " "2"" of type '" "CvvImage &""'");
7095 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CvvImage_CopyOf" "', argument " "2"" of type '" "CvvImage &""'");
7097 arg2 = reinterpret_cast< CvvImage * >(argp2);
7098 ecode3 = SWIG_AsVal_int(obj2, &val3);
7099 if (!SWIG_IsOK(ecode3)) {
7100 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CvvImage_CopyOf" "', argument " "3"" of type '" "int""'");
7102 arg3 = static_cast< int >(val3);
7105 (arg1)->CopyOf(*arg2,arg3);
7112 resultobj = SWIG_Py_Void();
7119 SWIGINTERN PyObject *_wrap_CvvImage_CopyOf__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7120 PyObject *resultobj = 0;
7121 CvvImage *arg1 = (CvvImage *) 0 ;
7122 CvvImage *arg2 = 0 ;
7127 PyObject * obj0 = 0 ;
7128 PyObject * obj1 = 0 ;
7130 if (!PyArg_ParseTuple(args,(char *)"OO:CvvImage_CopyOf",&obj0,&obj1)) SWIG_fail;
7131 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7132 if (!SWIG_IsOK(res1)) {
7133 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_CopyOf" "', argument " "1"" of type '" "CvvImage *""'");
7135 arg1 = reinterpret_cast< CvvImage * >(argp1);
7136 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_CvvImage, 0 );
7137 if (!SWIG_IsOK(res2)) {
7138 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvvImage_CopyOf" "', argument " "2"" of type '" "CvvImage &""'");
7141 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CvvImage_CopyOf" "', argument " "2"" of type '" "CvvImage &""'");
7143 arg2 = reinterpret_cast< CvvImage * >(argp2);
7146 (arg1)->CopyOf(*arg2);
7153 resultobj = SWIG_Py_Void();
7160 SWIGINTERN PyObject *_wrap_CvvImage_CopyOf__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7161 PyObject *resultobj = 0;
7162 CvvImage *arg1 = (CvvImage *) 0 ;
7163 IplImage *arg2 = (IplImage *) 0 ;
7170 PyObject * obj0 = 0 ;
7171 PyObject * obj1 = 0 ;
7172 PyObject * obj2 = 0 ;
7174 if (!PyArg_ParseTuple(args,(char *)"OOO:CvvImage_CopyOf",&obj0,&obj1,&obj2)) SWIG_fail;
7175 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7176 if (!SWIG_IsOK(res1)) {
7177 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_CopyOf" "', argument " "1"" of type '" "CvvImage *""'");
7179 arg1 = reinterpret_cast< CvvImage * >(argp1);
7182 int res = SWIG_ConvertPtr(obj1, (&vptr), SWIGTYPE_p_CvMat, 0);
7184 SWIG_exception( SWIG_TypeError, "%%typemap(in) IplImage * : could not convert to CvMat");
7187 arg2 = cvGetImage((CvMat *)vptr, &header2);
7189 ecode3 = SWIG_AsVal_int(obj2, &val3);
7190 if (!SWIG_IsOK(ecode3)) {
7191 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CvvImage_CopyOf" "', argument " "3"" of type '" "int""'");
7193 arg3 = static_cast< int >(val3);
7196 (arg1)->CopyOf(arg2,arg3);
7203 resultobj = SWIG_Py_Void();
7210 SWIGINTERN PyObject *_wrap_CvvImage_CopyOf__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7211 PyObject *resultobj = 0;
7212 CvvImage *arg1 = (CvvImage *) 0 ;
7213 IplImage *arg2 = (IplImage *) 0 ;
7217 PyObject * obj0 = 0 ;
7218 PyObject * obj1 = 0 ;
7220 if (!PyArg_ParseTuple(args,(char *)"OO:CvvImage_CopyOf",&obj0,&obj1)) SWIG_fail;
7221 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7222 if (!SWIG_IsOK(res1)) {
7223 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_CopyOf" "', argument " "1"" of type '" "CvvImage *""'");
7225 arg1 = reinterpret_cast< CvvImage * >(argp1);
7228 int res = SWIG_ConvertPtr(obj1, (&vptr), SWIGTYPE_p_CvMat, 0);
7230 SWIG_exception( SWIG_TypeError, "%%typemap(in) IplImage * : could not convert to CvMat");
7233 arg2 = cvGetImage((CvMat *)vptr, &header2);
7237 (arg1)->CopyOf(arg2);
7244 resultobj = SWIG_Py_Void();
7251 SWIGINTERN PyObject *_wrap_CvvImage_CopyOf(PyObject *self, PyObject *args) {
7256 if (!PyTuple_Check(args)) SWIG_fail;
7257 argc = (int)PyObject_Length(args);
7258 for (ii = 0; (ii < argc) && (ii < 3); ii++) {
7259 argv[ii] = PyTuple_GET_ITEM(args,ii);
7264 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CvvImage, 0);
7265 _v = SWIG_CheckState(res);
7268 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_CvvImage, 0);
7269 _v = SWIG_CheckState(res);
7271 return _wrap_CvvImage_CopyOf__SWIG_1(self, args);
7278 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CvvImage, 0);
7279 _v = SWIG_CheckState(res);
7282 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p__IplImage, 0);
7283 _v = SWIG_CheckState(res);
7285 return _wrap_CvvImage_CopyOf__SWIG_3(self, args);
7292 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CvvImage, 0);
7293 _v = SWIG_CheckState(res);
7296 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p__IplImage, 0);
7297 _v = SWIG_CheckState(res);
7300 int res = SWIG_AsVal_int(argv[2], NULL);
7301 _v = SWIG_CheckState(res);
7304 return _wrap_CvvImage_CopyOf__SWIG_2(self, args);
7312 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CvvImage, 0);
7313 _v = SWIG_CheckState(res);
7316 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_CvvImage, 0);
7317 _v = SWIG_CheckState(res);
7320 int res = SWIG_AsVal_int(argv[2], NULL);
7321 _v = SWIG_CheckState(res);
7324 return _wrap_CvvImage_CopyOf__SWIG_0(self, args);
7331 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvvImage_CopyOf'.\n"
7332 " Possible C/C++ prototypes are:\n"
7333 " CopyOf(CvvImage *,CvvImage &,int)\n"
7334 " CopyOf(CvvImage *,CvvImage &)\n"
7335 " CopyOf(CvvImage *,IplImage *,int)\n"
7336 " CopyOf(CvvImage *,IplImage *)\n");
7341 SWIGINTERN PyObject *_wrap_CvvImage_GetImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7342 PyObject *resultobj = 0;
7343 CvvImage *arg1 = (CvvImage *) 0 ;
7344 IplImage *result = 0 ;
7347 PyObject * obj0 = 0 ;
7349 if (!PyArg_ParseTuple(args,(char *)"O:CvvImage_GetImage",&obj0)) SWIG_fail;
7350 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7351 if (!SWIG_IsOK(res1)) {
7352 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_GetImage" "', argument " "1"" of type '" "CvvImage *""'");
7354 arg1 = reinterpret_cast< CvvImage * >(argp1);
7357 result = (IplImage *)(arg1)->GetImage();
7365 SWIG_exception( SWIG_TypeError, "IplImage * return type is deprecated. Please file a bug report at www.sourceforge.net/opencvlibrary if you see this error message.");
7374 SWIGINTERN PyObject *_wrap_CvvImage_Destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7375 PyObject *resultobj = 0;
7376 CvvImage *arg1 = (CvvImage *) 0 ;
7379 PyObject * obj0 = 0 ;
7381 if (!PyArg_ParseTuple(args,(char *)"O:CvvImage_Destroy",&obj0)) SWIG_fail;
7382 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7383 if (!SWIG_IsOK(res1)) {
7384 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Destroy" "', argument " "1"" of type '" "CvvImage *""'");
7386 arg1 = reinterpret_cast< CvvImage * >(argp1);
7396 resultobj = SWIG_Py_Void();
7403 SWIGINTERN PyObject *_wrap_CvvImage_Width(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7404 PyObject *resultobj = 0;
7405 CvvImage *arg1 = (CvvImage *) 0 ;
7409 PyObject * obj0 = 0 ;
7411 if (!PyArg_ParseTuple(args,(char *)"O:CvvImage_Width",&obj0)) SWIG_fail;
7412 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7413 if (!SWIG_IsOK(res1)) {
7414 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Width" "', argument " "1"" of type '" "CvvImage *""'");
7416 arg1 = reinterpret_cast< CvvImage * >(argp1);
7419 result = (int)(arg1)->Width();
7426 resultobj = SWIG_From_int(static_cast< int >(result));
7433 SWIGINTERN PyObject *_wrap_CvvImage_Height(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7434 PyObject *resultobj = 0;
7435 CvvImage *arg1 = (CvvImage *) 0 ;
7439 PyObject * obj0 = 0 ;
7441 if (!PyArg_ParseTuple(args,(char *)"O:CvvImage_Height",&obj0)) SWIG_fail;
7442 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7443 if (!SWIG_IsOK(res1)) {
7444 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Height" "', argument " "1"" of type '" "CvvImage *""'");
7446 arg1 = reinterpret_cast< CvvImage * >(argp1);
7449 result = (int)(arg1)->Height();
7456 resultobj = SWIG_From_int(static_cast< int >(result));
7463 SWIGINTERN PyObject *_wrap_CvvImage_Bpp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7464 PyObject *resultobj = 0;
7465 CvvImage *arg1 = (CvvImage *) 0 ;
7469 PyObject * obj0 = 0 ;
7471 if (!PyArg_ParseTuple(args,(char *)"O:CvvImage_Bpp",&obj0)) SWIG_fail;
7472 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7473 if (!SWIG_IsOK(res1)) {
7474 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Bpp" "', argument " "1"" of type '" "CvvImage *""'");
7476 arg1 = reinterpret_cast< CvvImage * >(argp1);
7479 result = (int)(arg1)->Bpp();
7486 resultobj = SWIG_From_int(static_cast< int >(result));
7493 SWIGINTERN PyObject *_wrap_CvvImage_Fill(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7494 PyObject *resultobj = 0;
7495 CvvImage *arg1 = (CvvImage *) 0 ;
7501 PyObject * obj0 = 0 ;
7502 PyObject * obj1 = 0 ;
7504 if (!PyArg_ParseTuple(args,(char *)"OO:CvvImage_Fill",&obj0,&obj1)) SWIG_fail;
7505 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7506 if (!SWIG_IsOK(res1)) {
7507 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Fill" "', argument " "1"" of type '" "CvvImage *""'");
7509 arg1 = reinterpret_cast< CvvImage * >(argp1);
7510 ecode2 = SWIG_AsVal_int(obj1, &val2);
7511 if (!SWIG_IsOK(ecode2)) {
7512 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CvvImage_Fill" "', argument " "2"" of type '" "int""'");
7514 arg2 = static_cast< int >(val2);
7524 resultobj = SWIG_Py_Void();
7531 SWIGINTERN PyObject *_wrap_CvvImage_Show(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7532 PyObject *resultobj = 0;
7533 CvvImage *arg1 = (CvvImage *) 0 ;
7534 char *arg2 = (char *) 0 ;
7540 PyObject * obj0 = 0 ;
7541 PyObject * obj1 = 0 ;
7543 if (!PyArg_ParseTuple(args,(char *)"OO:CvvImage_Show",&obj0,&obj1)) SWIG_fail;
7544 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7545 if (!SWIG_IsOK(res1)) {
7546 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Show" "', argument " "1"" of type '" "CvvImage *""'");
7548 arg1 = reinterpret_cast< CvvImage * >(argp1);
7549 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
7550 if (!SWIG_IsOK(res2)) {
7551 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvvImage_Show" "', argument " "2"" of type '" "char const *""'");
7553 arg2 = reinterpret_cast< char * >(buf2);
7556 (arg1)->Show((char const *)arg2);
7563 resultobj = SWIG_Py_Void();
7564 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7567 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7572 SWIGINTERN PyObject *CvvImage_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7574 if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
7575 SWIG_TypeNewClientData(SWIGTYPE_p_CvvImage, SWIG_NewClientData(obj));
7576 return SWIG_Py_Void();
7579 static PyMethodDef SwigMethods[] = {
7580 { (char *)"new_CvRNG_Wrapper", _wrap_new_CvRNG_Wrapper, METH_VARARGS, NULL},
7581 { (char *)"CvRNG_Wrapper_ptr", _wrap_CvRNG_Wrapper_ptr, METH_VARARGS, NULL},
7582 { (char *)"CvRNG_Wrapper_ref", _wrap_CvRNG_Wrapper_ref, METH_VARARGS, NULL},
7583 { (char *)"CvRNG_Wrapper___eq__", _wrap_CvRNG_Wrapper___eq__, METH_VARARGS, NULL},
7584 { (char *)"CvRNG_Wrapper___ne__", _wrap_CvRNG_Wrapper___ne__, METH_VARARGS, NULL},
7585 { (char *)"delete_CvRNG_Wrapper", _wrap_delete_CvRNG_Wrapper, METH_VARARGS, (char *)"delete_CvRNG_Wrapper(CvRNG_Wrapper self)"},
7586 { (char *)"CvRNG_Wrapper_swigregister", CvRNG_Wrapper_swigregister, METH_VARARGS, NULL},
7587 { (char *)"new_CvSubdiv2DEdge_Wrapper", _wrap_new_CvSubdiv2DEdge_Wrapper, METH_VARARGS, NULL},
7588 { (char *)"CvSubdiv2DEdge_Wrapper_ptr", _wrap_CvSubdiv2DEdge_Wrapper_ptr, METH_VARARGS, NULL},
7589 { (char *)"CvSubdiv2DEdge_Wrapper_ref", _wrap_CvSubdiv2DEdge_Wrapper_ref, METH_VARARGS, NULL},
7590 { (char *)"CvSubdiv2DEdge_Wrapper___eq__", _wrap_CvSubdiv2DEdge_Wrapper___eq__, METH_VARARGS, NULL},
7591 { (char *)"CvSubdiv2DEdge_Wrapper___ne__", _wrap_CvSubdiv2DEdge_Wrapper___ne__, METH_VARARGS, NULL},
7592 { (char *)"delete_CvSubdiv2DEdge_Wrapper", _wrap_delete_CvSubdiv2DEdge_Wrapper, METH_VARARGS, (char *)"delete_CvSubdiv2DEdge_Wrapper(CvSubdiv2DEdge_Wrapper self)"},
7593 { (char *)"CvSubdiv2DEdge_Wrapper_swigregister", CvSubdiv2DEdge_Wrapper_swigregister, METH_VARARGS, NULL},
7594 { (char *)"cvSetMouseCallback", _wrap_cvSetMouseCallback, METH_VARARGS, NULL},
7595 { (char *)"cvWaitKey", _wrap_cvWaitKey, METH_VARARGS, NULL},
7596 { (char *)"cvLoadImage", _wrap_cvLoadImage, METH_VARARGS, (char *)"\n"
7597 "cvLoadImage(char filename, int iscolor=1) -> CvMat\n"
7598 "cvLoadImage(char filename) -> CvMat\n"
7600 { (char *)"cvRetrieveFrame", _wrap_cvRetrieveFrame, METH_VARARGS, (char *)"cvRetrieveFrame(CvCapture capture) -> CvMat"},
7601 { (char *)"cvQueryFrame", _wrap_cvQueryFrame, METH_VARARGS, (char *)"cvQueryFrame(CvCapture capture) -> CvMat"},
7602 { (char *)"CV_FOURCC", _wrap_CV_FOURCC, METH_VARARGS, (char *)"CV_FOURCC(char c1, char c2, char c3, char c4) -> int"},
7603 { (char *)"cvInitSystem", _wrap_cvInitSystem, METH_VARARGS, (char *)"cvInitSystem(int argc, char argv) -> int"},
7604 { (char *)"cvStartWindowThread", _wrap_cvStartWindowThread, METH_VARARGS, (char *)"cvStartWindowThread() -> int"},
7605 { (char *)"cvNamedWindow", _wrap_cvNamedWindow, METH_VARARGS, (char *)"cvNamedWindow(char name, int flags=1) -> int"},
7606 { (char *)"cvShowImage", _wrap_cvShowImage, METH_VARARGS, (char *)"cvShowImage(char name, CvArr image)"},
7607 { (char *)"cvResizeWindow", _wrap_cvResizeWindow, METH_VARARGS, (char *)"cvResizeWindow(char name, int width, int height)"},
7608 { (char *)"cvMoveWindow", _wrap_cvMoveWindow, METH_VARARGS, (char *)"cvMoveWindow(char name, int x, int y)"},
7609 { (char *)"cvDestroyWindow", _wrap_cvDestroyWindow, METH_VARARGS, (char *)"cvDestroyWindow(char name)"},
7610 { (char *)"cvDestroyAllWindows", _wrap_cvDestroyAllWindows, METH_VARARGS, (char *)"cvDestroyAllWindows()"},
7611 { (char *)"cvGetWindowHandle", _wrap_cvGetWindowHandle, METH_VARARGS, (char *)"cvGetWindowHandle(char name) -> void"},
7612 { (char *)"cvGetWindowName", _wrap_cvGetWindowName, METH_VARARGS, (char *)"cvGetWindowName(void window_handle) -> char"},
7613 { (char *)"cvCreateTrackbar", _wrap_cvCreateTrackbar, METH_VARARGS, (char *)"\n"
7614 "cvCreateTrackbar(char trackbar_name, char window_name, int value, int count, \n"
7615 " CvTrackbarCallback on_change) -> int\n"
7617 { (char *)"cvGetTrackbarPos", _wrap_cvGetTrackbarPos, METH_VARARGS, (char *)"cvGetTrackbarPos(char trackbar_name, char window_name) -> int"},
7618 { (char *)"cvSetTrackbarPos", _wrap_cvSetTrackbarPos, METH_VARARGS, (char *)"cvSetTrackbarPos(char trackbar_name, char window_name, int pos)"},
7619 { (char *)"cvSetMouseCallbackOld", _wrap_cvSetMouseCallbackOld, METH_VARARGS, (char *)"cvSetMouseCallbackOld(char window_name, CvMouseCallback on_mouse, void param=None)"},
7620 { (char *)"cvLoadImageM", _wrap_cvLoadImageM, METH_VARARGS, (char *)"cvLoadImageM(char filename, int iscolor=1) -> CvMat"},
7621 { (char *)"cvSaveImage", _wrap_cvSaveImage, METH_VARARGS, (char *)"cvSaveImage(char filename, CvArr image) -> int"},
7622 { (char *)"cvConvertImage", _wrap_cvConvertImage, METH_VARARGS, (char *)"cvConvertImage(CvArr src, CvArr dst, int flags=0)"},
7623 { (char *)"cvWaitKeyC", _wrap_cvWaitKeyC, METH_VARARGS, (char *)"cvWaitKeyC(int delay=0) -> int"},
7624 { (char *)"cvCreateFileCapture", _wrap_cvCreateFileCapture, METH_VARARGS, (char *)"cvCreateFileCapture(char filename) -> CvCapture"},
7625 { (char *)"cvCreateCameraCapture", _wrap_cvCreateCameraCapture, METH_VARARGS, (char *)"cvCreateCameraCapture(int index) -> CvCapture"},
7626 { (char *)"cvGrabFrame", _wrap_cvGrabFrame, METH_VARARGS, (char *)"cvGrabFrame(CvCapture capture) -> int"},
7627 { (char *)"cvRetrieveFrame__Deprecated", _wrap_cvRetrieveFrame__Deprecated, METH_VARARGS, (char *)"cvRetrieveFrame__Deprecated(CvCapture capture)"},
7628 { (char *)"cvQueryFrame__Deprecated", _wrap_cvQueryFrame__Deprecated, METH_VARARGS, (char *)"cvQueryFrame__Deprecated(CvCapture capture)"},
7629 { (char *)"cvGetCaptureProperty", _wrap_cvGetCaptureProperty, METH_VARARGS, (char *)"cvGetCaptureProperty(CvCapture capture, int property_id) -> double"},
7630 { (char *)"cvSetCaptureProperty", _wrap_cvSetCaptureProperty, METH_VARARGS, (char *)"cvSetCaptureProperty(CvCapture capture, int property_id, double value) -> int"},
7631 { (char *)"cvCreateVideoWriter", _wrap_cvCreateVideoWriter, METH_VARARGS, (char *)"\n"
7632 "cvCreateVideoWriter(char filename, int fourcc, double fps, CvSize frame_size, \n"
7633 " int is_color=1) -> CvVideoWriter\n"
7635 { (char *)"cvWriteFrame", _wrap_cvWriteFrame, METH_VARARGS, (char *)"cvWriteFrame(CvVideoWriter writer, image) -> int"},
7636 { (char *)"new_CvvImage", _wrap_new_CvvImage, METH_VARARGS, (char *)"new_CvvImage() -> CvvImage"},
7637 { (char *)"delete_CvvImage", _wrap_delete_CvvImage, METH_VARARGS, (char *)"delete_CvvImage(CvvImage self)"},
7638 { (char *)"CvvImage_Create", _wrap_CvvImage_Create, METH_VARARGS, (char *)"\n"
7639 "Create(int width, int height, int bits_per_pixel, int image_origin=0) -> bool\n"
7640 "CvvImage_Create(CvvImage self, int width, int height, int bits_per_pixel) -> bool\n"
7642 { (char *)"CvvImage_Load", _wrap_CvvImage_Load, METH_VARARGS, (char *)"\n"
7643 "Load(char filename, int desired_color=1) -> bool\n"
7644 "CvvImage_Load(CvvImage self, char filename) -> bool\n"
7646 { (char *)"CvvImage_LoadRect", _wrap_CvvImage_LoadRect, METH_VARARGS, (char *)"CvvImage_LoadRect(CvvImage self, char filename, int desired_color, CvRect r) -> bool"},
7647 { (char *)"CvvImage_Save", _wrap_CvvImage_Save, METH_VARARGS, (char *)"CvvImage_Save(CvvImage self, char filename) -> bool"},
7648 { (char *)"CvvImage_CopyOf", _wrap_CvvImage_CopyOf, METH_VARARGS, (char *)"\n"
7649 "CopyOf(CvvImage image, int desired_color=-1)\n"
7650 "CopyOf(CvvImage image)\n"
7651 "CopyOf( img, int desired_color=-1)\n"
7652 "CvvImage_CopyOf(CvvImage self, img)\n"
7654 { (char *)"CvvImage_GetImage", _wrap_CvvImage_GetImage, METH_VARARGS, (char *)"CvvImage_GetImage(CvvImage self)"},
7655 { (char *)"CvvImage_Destroy", _wrap_CvvImage_Destroy, METH_VARARGS, (char *)"CvvImage_Destroy(CvvImage self)"},
7656 { (char *)"CvvImage_Width", _wrap_CvvImage_Width, METH_VARARGS, (char *)"CvvImage_Width(CvvImage self) -> int"},
7657 { (char *)"CvvImage_Height", _wrap_CvvImage_Height, METH_VARARGS, (char *)"CvvImage_Height(CvvImage self) -> int"},
7658 { (char *)"CvvImage_Bpp", _wrap_CvvImage_Bpp, METH_VARARGS, (char *)"CvvImage_Bpp(CvvImage self) -> int"},
7659 { (char *)"CvvImage_Fill", _wrap_CvvImage_Fill, METH_VARARGS, (char *)"CvvImage_Fill(CvvImage self, int color)"},
7660 { (char *)"CvvImage_Show", _wrap_CvvImage_Show, METH_VARARGS, (char *)"CvvImage_Show(CvvImage self, char window)"},
7661 { (char *)"CvvImage_swigregister", CvvImage_swigregister, METH_VARARGS, NULL},
7662 { NULL, NULL, 0, NULL }
7666 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
7668 static void *_p_CvTypedSeqT_CvTupleT_CvPoint_2_t_tTo_p_CvSeq(void *x, int *newmemory) {
7669 return (void *)((CvSeq *) ((CvTypedSeq< CvTuple< CvPoint,2 > > *) x));
7671 static void *_p_CvTypedSeqT_CvTupleT_float_2_t_tTo_p_CvSeq(void *x, int *newmemory) {
7672 return (void *)((CvSeq *) ((CvTypedSeq< CvTuple< float,2 > > *) x));
7674 static void *_p_CvTypedSeqT_CvConnectedComp_tTo_p_CvSeq(void *x, int *newmemory) {
7675 return (void *)((CvSeq *) ((CvTypedSeq< CvConnectedComp > *) x));
7677 static void *_p_CvTypedSeqT_CvRect_tTo_p_CvSeq(void *x, int *newmemory) {
7678 return (void *)((CvSeq *) ((CvTypedSeq< CvRect > *) x));
7680 static void *_p_CvTypedSeqT_CvPoint_tTo_p_CvSeq(void *x, int *newmemory) {
7681 return (void *)((CvSeq *) ((CvTypedSeq< CvPoint > *) x));
7683 static void *_p_CvTypedSeqT_CvTupleT_float_3_t_tTo_p_CvSeq(void *x, int *newmemory) {
7684 return (void *)((CvSeq *) ((CvTypedSeq< CvTuple< float,3 > > *) x));
7686 static void *_p_CvTypedSeqT_CvSeq_p_tTo_p_CvSeq(void *x, int *newmemory) {
7687 return (void *)((CvSeq *) ((CvTypedSeq< CvSeq * > *) x));
7689 static void *_p_CvTypedSeqT_CvQuadEdge2D_tTo_p_CvSeq(void *x, int *newmemory) {
7690 return (void *)((CvSeq *) ((CvTypedSeq< CvQuadEdge2D > *) x));
7692 static void *_p_CvTypedSeqT_CvPoint2D32f_tTo_p_CvSeq(void *x, int *newmemory) {
7693 return (void *)((CvSeq *) ((CvTypedSeq< CvPoint2D32f > *) x));
7695 static swig_type_info _swigt__p_Cv32suf = {"_p_Cv32suf", "Cv32suf *", 0, 0, (void*)0, 0};
7696 static swig_type_info _swigt__p_Cv64suf = {"_p_Cv64suf", "Cv64suf *", 0, 0, (void*)0, 0};
7697 static swig_type_info _swigt__p_CvAttrList = {"_p_CvAttrList", "CvAttrList *", 0, 0, (void*)0, 0};
7698 static swig_type_info _swigt__p_CvAvgComp = {"_p_CvAvgComp", "CvAvgComp *", 0, 0, (void*)0, 0};
7699 static swig_type_info _swigt__p_CvBox2D = {"_p_CvBox2D", "CvBox2D *", 0, 0, (void*)0, 0};
7700 static swig_type_info _swigt__p_CvCapture = {"_p_CvCapture", "CvCapture *", 0, 0, (void*)0, 0};
7701 static swig_type_info _swigt__p_CvChain = {"_p_CvChain", "CvChain *", 0, 0, (void*)0, 0};
7702 static swig_type_info _swigt__p_CvChainPtReader = {"_p_CvChainPtReader", "CvChainPtReader *", 0, 0, (void*)0, 0};
7703 static swig_type_info _swigt__p_CvConDensation = {"_p_CvConDensation", "CvConDensation *", 0, 0, (void*)0, 0};
7704 static swig_type_info _swigt__p_CvConnectedComp = {"_p_CvConnectedComp", "CvConnectedComp *", 0, 0, (void*)0, 0};
7705 static swig_type_info _swigt__p_CvContour = {"_p_CvContour", "CvPoint2DSeq *|CvContour *", 0, 0, (void*)0, 0};
7706 static swig_type_info _swigt__p_CvContourTree = {"_p_CvContourTree", "CvContourTree *", 0, 0, (void*)0, 0};
7707 static swig_type_info _swigt__p_CvConvexityDefect = {"_p_CvConvexityDefect", "CvConvexityDefect *", 0, 0, (void*)0, 0};
7708 static swig_type_info _swigt__p_CvFileNode = {"_p_CvFileNode", "CvFileNode *", 0, 0, (void*)0, 0};
7709 static swig_type_info _swigt__p_CvFileStorage = {"_p_CvFileStorage", "CvFileStorage *", 0, 0, (void*)0, 0};
7710 static swig_type_info _swigt__p_CvFilter = {"_p_CvFilter", "enum CvFilter *|CvFilter *", 0, 0, (void*)0, 0};
7711 static swig_type_info _swigt__p_CvFont = {"_p_CvFont", "CvFont *", 0, 0, (void*)0, 0};
7712 static swig_type_info _swigt__p_CvGenericHash = {"_p_CvGenericHash", "CvGenericHash *|CvFileNodeHash *", 0, 0, (void*)0, 0};
7713 static swig_type_info _swigt__p_CvGraph = {"_p_CvGraph", "CvGraph *", 0, 0, (void*)0, 0};
7714 static swig_type_info _swigt__p_CvGraphEdge = {"_p_CvGraphEdge", "CvGraphEdge *", 0, 0, (void*)0, 0};
7715 static swig_type_info _swigt__p_CvGraphScanner = {"_p_CvGraphScanner", "CvGraphScanner *", 0, 0, (void*)0, 0};
7716 static swig_type_info _swigt__p_CvGraphVtx = {"_p_CvGraphVtx", "CvGraphVtx *", 0, 0, (void*)0, 0};
7717 static swig_type_info _swigt__p_CvGraphVtx2D = {"_p_CvGraphVtx2D", "CvGraphVtx2D *", 0, 0, (void*)0, 0};
7718 static swig_type_info _swigt__p_CvHaarClassifier = {"_p_CvHaarClassifier", "CvHaarClassifier *", 0, 0, (void*)0, 0};
7719 static swig_type_info _swigt__p_CvHaarClassifierCascade = {"_p_CvHaarClassifierCascade", "CvHaarClassifierCascade *", 0, 0, (void*)0, 0};
7720 static swig_type_info _swigt__p_CvHaarFeature = {"_p_CvHaarFeature", "CvHaarFeature *", 0, 0, (void*)0, 0};
7721 static swig_type_info _swigt__p_CvHaarStageClassifier = {"_p_CvHaarStageClassifier", "CvHaarStageClassifier *", 0, 0, (void*)0, 0};
7722 static swig_type_info _swigt__p_CvHidHaarClassifierCascade = {"_p_CvHidHaarClassifierCascade", "CvHidHaarClassifierCascade *", 0, 0, (void*)0, 0};
7723 static swig_type_info _swigt__p_CvHistogram = {"_p_CvHistogram", "CvHistogram *", 0, 0, (void*)0, 0};
7724 static swig_type_info _swigt__p_CvHuMoments = {"_p_CvHuMoments", "CvHuMoments *", 0, 0, (void*)0, 0};
7725 static swig_type_info _swigt__p_CvKalman = {"_p_CvKalman", "CvKalman *", 0, 0, (void*)0, 0};
7726 static swig_type_info _swigt__p_CvLineIterator = {"_p_CvLineIterator", "CvLineIterator *", 0, 0, (void*)0, 0};
7727 static swig_type_info _swigt__p_CvMat = {"_p_CvMat", "CvMat *", 0, 0, (void*)0, 0};
7728 static swig_type_info _swigt__p_CvMatND = {"_p_CvMatND", "CvMatND *", 0, 0, (void*)0, 0};
7729 static swig_type_info _swigt__p_CvMatrix3 = {"_p_CvMatrix3", "CvMatrix3 *", 0, 0, (void*)0, 0};
7730 static swig_type_info _swigt__p_CvMemBlock = {"_p_CvMemBlock", "CvMemBlock *", 0, 0, (void*)0, 0};
7731 static swig_type_info _swigt__p_CvMemStorage = {"_p_CvMemStorage", "CvMemStorage *", 0, 0, (void*)0, 0};
7732 static swig_type_info _swigt__p_CvMemStoragePos = {"_p_CvMemStoragePos", "CvMemStoragePos *", 0, 0, (void*)0, 0};
7733 static swig_type_info _swigt__p_CvModuleInfo = {"_p_CvModuleInfo", "CvModuleInfo *", 0, 0, (void*)0, 0};
7734 static swig_type_info _swigt__p_CvMoments = {"_p_CvMoments", "CvMoments *", 0, 0, (void*)0, 0};
7735 static swig_type_info _swigt__p_CvNArrayIterator = {"_p_CvNArrayIterator", "CvNArrayIterator *", 0, 0, (void*)0, 0};
7736 static swig_type_info _swigt__p_CvNextEdgeType = {"_p_CvNextEdgeType", "enum CvNextEdgeType *|CvNextEdgeType *", 0, 0, (void*)0, 0};
7737 static swig_type_info _swigt__p_CvPOSITObject = {"_p_CvPOSITObject", "CvPOSITObject *", 0, 0, (void*)0, 0};
7738 static swig_type_info _swigt__p_CvPluginFuncInfo = {"_p_CvPluginFuncInfo", "CvPluginFuncInfo *", 0, 0, (void*)0, 0};
7739 static swig_type_info _swigt__p_CvPoint = {"_p_CvPoint", "CvPoint *", 0, 0, (void*)0, 0};
7740 static swig_type_info _swigt__p_CvPoint2D32f = {"_p_CvPoint2D32f", "CvPoint2D32f *", 0, 0, (void*)0, 0};
7741 static swig_type_info _swigt__p_CvPoint2D64f = {"_p_CvPoint2D64f", "CvPoint2D64f *", 0, 0, (void*)0, 0};
7742 static swig_type_info _swigt__p_CvPoint3D32f = {"_p_CvPoint3D32f", "CvPoint3D32f *", 0, 0, (void*)0, 0};
7743 static swig_type_info _swigt__p_CvPoint3D64f = {"_p_CvPoint3D64f", "CvPoint3D64f *", 0, 0, (void*)0, 0};
7744 static swig_type_info _swigt__p_CvQuadEdge2D = {"_p_CvQuadEdge2D", "CvQuadEdge2D *", 0, 0, (void*)0, 0};
7745 static swig_type_info _swigt__p_CvRNG_Wrapper = {"_p_CvRNG_Wrapper", "CvRNG_Wrapper *", 0, 0, (void*)0, 0};
7746 static swig_type_info _swigt__p_CvRect = {"_p_CvRect", "CvRect *", 0, 0, (void*)0, 0};
7747 static swig_type_info _swigt__p_CvScalar = {"_p_CvScalar", "CvScalar *", 0, 0, (void*)0, 0};
7748 static swig_type_info _swigt__p_CvSeq = {"_p_CvSeq", "CvSeq *", 0, 0, (void*)0, 0};
7749 static swig_type_info _swigt__p_CvTypedSeqT_CvTupleT_CvPoint_2_t_t = {"_p_CvTypedSeqT_CvTupleT_CvPoint_2_t_t", 0, 0, 0, 0, 0};
7750 static swig_type_info _swigt__p_CvTypedSeqT_CvTupleT_float_2_t_t = {"_p_CvTypedSeqT_CvTupleT_float_2_t_t", 0, 0, 0, 0, 0};
7751 static swig_type_info _swigt__p_CvTypedSeqT_CvRect_t = {"_p_CvTypedSeqT_CvRect_t", 0, 0, 0, 0, 0};
7752 static swig_type_info _swigt__p_CvTypedSeqT_CvPoint_t = {"_p_CvTypedSeqT_CvPoint_t", 0, 0, 0, 0, 0};
7753 static swig_type_info _swigt__p_CvTypedSeqT_CvQuadEdge2D_t = {"_p_CvTypedSeqT_CvQuadEdge2D_t", 0, 0, 0, 0, 0};
7754 static swig_type_info _swigt__p_CvTypedSeqT_CvSeq_p_t = {"_p_CvTypedSeqT_CvSeq_p_t", 0, 0, 0, 0, 0};
7755 static swig_type_info _swigt__p_CvTypedSeqT_CvPoint2D32f_t = {"_p_CvTypedSeqT_CvPoint2D32f_t", 0, 0, 0, 0, 0};
7756 static swig_type_info _swigt__p_CvTypedSeqT_CvTupleT_float_3_t_t = {"_p_CvTypedSeqT_CvTupleT_float_3_t_t", 0, 0, 0, 0, 0};
7757 static swig_type_info _swigt__p_CvTypedSeqT_CvConnectedComp_t = {"_p_CvTypedSeqT_CvConnectedComp_t", 0, 0, 0, 0, 0};
7758 static swig_type_info _swigt__p_CvSeqBlock = {"_p_CvSeqBlock", "CvSeqBlock *", 0, 0, (void*)0, 0};
7759 static swig_type_info _swigt__p_CvSeqReader = {"_p_CvSeqReader", "CvSeqReader *", 0, 0, (void*)0, 0};
7760 static swig_type_info _swigt__p_CvSeqWriter = {"_p_CvSeqWriter", "CvSeqWriter *", 0, 0, (void*)0, 0};
7761 static swig_type_info _swigt__p_CvSet = {"_p_CvSet", "CvSet *", 0, 0, (void*)0, 0};
7762 static swig_type_info _swigt__p_CvSetElem = {"_p_CvSetElem", "CvSetElem *", 0, 0, (void*)0, 0};
7763 static swig_type_info _swigt__p_CvSize = {"_p_CvSize", "CvSize *", 0, 0, (void*)0, 0};
7764 static swig_type_info _swigt__p_CvSize2D32f = {"_p_CvSize2D32f", "CvSize2D32f *", 0, 0, (void*)0, 0};
7765 static swig_type_info _swigt__p_CvSlice = {"_p_CvSlice", "CvSlice *", 0, 0, (void*)0, 0};
7766 static swig_type_info _swigt__p_CvSparseMat = {"_p_CvSparseMat", "CvSparseMat *", 0, 0, (void*)0, 0};
7767 static swig_type_info _swigt__p_CvSparseMatIterator = {"_p_CvSparseMatIterator", "CvSparseMatIterator *", 0, 0, (void*)0, 0};
7768 static swig_type_info _swigt__p_CvSparseNode = {"_p_CvSparseNode", "CvSparseNode *", 0, 0, (void*)0, 0};
7769 static swig_type_info _swigt__p_CvString = {"_p_CvString", "CvString *", 0, 0, (void*)0, 0};
7770 static swig_type_info _swigt__p_CvStringHashNode = {"_p_CvStringHashNode", "CvStringHashNode *", 0, 0, (void*)0, 0};
7771 static swig_type_info _swigt__p_CvSubdiv2D = {"_p_CvSubdiv2D", "CvSubdiv2D *", 0, 0, (void*)0, 0};
7772 static swig_type_info _swigt__p_CvSubdiv2DEdge_Wrapper = {"_p_CvSubdiv2DEdge_Wrapper", "CvSubdiv2DEdge_Wrapper *", 0, 0, (void*)0, 0};
7773 static swig_type_info _swigt__p_CvSubdiv2DPoint = {"_p_CvSubdiv2DPoint", "CvSubdiv2DPoint *", 0, 0, (void*)0, 0};
7774 static swig_type_info _swigt__p_CvSubdiv2DPointLocation = {"_p_CvSubdiv2DPointLocation", "enum CvSubdiv2DPointLocation *|CvSubdiv2DPointLocation *", 0, 0, (void*)0, 0};
7775 static swig_type_info _swigt__p_CvTermCriteria = {"_p_CvTermCriteria", "CvTermCriteria *", 0, 0, (void*)0, 0};
7776 static swig_type_info _swigt__p_CvTreeNodeIterator = {"_p_CvTreeNodeIterator", "CvTreeNodeIterator *", 0, 0, (void*)0, 0};
7777 static swig_type_info _swigt__p_CvTypeInfo = {"_p_CvTypeInfo", "CvTypeInfo *", 0, 0, (void*)0, 0};
7778 static swig_type_info _swigt__p_CvVideoWriter = {"_p_CvVideoWriter", "CvVideoWriter *", 0, 0, (void*)0, 0};
7779 static swig_type_info _swigt__p_CvvImage = {"_p_CvvImage", "CvvImage *", 0, 0, (void*)0, 0};
7780 static swig_type_info _swigt__p__IplConvKernel = {"_p__IplConvKernel", "_IplConvKernel *|IplConvKernel *", 0, 0, (void*)0, 0};
7781 static swig_type_info _swigt__p__IplConvKernelFP = {"_p__IplConvKernelFP", "_IplConvKernelFP *|IplConvKernelFP *", 0, 0, (void*)0, 0};
7782 static swig_type_info _swigt__p__IplImage = {"_p__IplImage", "_IplImage *|IplImage *", 0, 0, (void*)0, 0};
7783 static swig_type_info _swigt__p__IplROI = {"_p__IplROI", "_IplROI *|IplROI *", 0, 0, (void*)0, 0};
7784 static swig_type_info _swigt__p__IplTileInfo = {"_p__IplTileInfo", "_IplTileInfo *|IplTileInfo *", 0, 0, (void*)0, 0};
7785 static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0};
7786 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
7787 static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0};
7788 static swig_type_info _swigt__p_f_int__void = {"_p_f_int__void", "void (*)(int)|CvTrackbarCallback", 0, 0, (void*)0, 0};
7789 static swig_type_info _swigt__p_f_int_int_int_int_p_void__void = {"_p_f_int_int_int_int_p_void__void", "void (*)(int,int,int,int,void *)|CvMouseCallback", 0, 0, (void*)0, 0};
7790 static swig_type_info _swigt__p_int = {"_p_int", "CvHistType *|int *|CVStatus *", 0, 0, (void*)0, 0};
7791 static swig_type_info _swigt__p_long_long = {"_p_long_long", "int64 *|long long *", 0, 0, (void*)0, 0};
7792 static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
7793 static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "schar *|signed char *", 0, 0, (void*)0, 0};
7794 static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *|CvSubdiv2DEdge *", 0, 0, (void*)0, 0};
7795 static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0};
7796 static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "uchar *|unsigned char *", 0, 0, (void*)0, 0};
7797 static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "uint64 *|unsigned long long *|CvRNG *", 0, 0, (void*)0, 0};
7798 static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|ushort *", 0, 0, (void*)0, 0};
7799 static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0};
7800 static swig_type_info _swigt__p_void = {"_p_void", "CvArr *|void *", 0, 0, (void*)0, 0};
7802 static swig_type_info *swig_type_initial[] = {
7805 &_swigt__p_CvAttrList,
7806 &_swigt__p_CvAvgComp,
7808 &_swigt__p_CvCapture,
7810 &_swigt__p_CvChainPtReader,
7811 &_swigt__p_CvConDensation,
7812 &_swigt__p_CvConnectedComp,
7813 &_swigt__p_CvContour,
7814 &_swigt__p_CvContourTree,
7815 &_swigt__p_CvConvexityDefect,
7816 &_swigt__p_CvFileNode,
7817 &_swigt__p_CvFileStorage,
7818 &_swigt__p_CvFilter,
7820 &_swigt__p_CvGenericHash,
7822 &_swigt__p_CvGraphEdge,
7823 &_swigt__p_CvGraphScanner,
7824 &_swigt__p_CvGraphVtx,
7825 &_swigt__p_CvGraphVtx2D,
7826 &_swigt__p_CvHaarClassifier,
7827 &_swigt__p_CvHaarClassifierCascade,
7828 &_swigt__p_CvHaarFeature,
7829 &_swigt__p_CvHaarStageClassifier,
7830 &_swigt__p_CvHidHaarClassifierCascade,
7831 &_swigt__p_CvHistogram,
7832 &_swigt__p_CvHuMoments,
7833 &_swigt__p_CvKalman,
7834 &_swigt__p_CvLineIterator,
7837 &_swigt__p_CvMatrix3,
7838 &_swigt__p_CvMemBlock,
7839 &_swigt__p_CvMemStorage,
7840 &_swigt__p_CvMemStoragePos,
7841 &_swigt__p_CvModuleInfo,
7842 &_swigt__p_CvMoments,
7843 &_swigt__p_CvNArrayIterator,
7844 &_swigt__p_CvNextEdgeType,
7845 &_swigt__p_CvPOSITObject,
7846 &_swigt__p_CvPluginFuncInfo,
7848 &_swigt__p_CvPoint2D32f,
7849 &_swigt__p_CvPoint2D64f,
7850 &_swigt__p_CvPoint3D32f,
7851 &_swigt__p_CvPoint3D64f,
7852 &_swigt__p_CvQuadEdge2D,
7853 &_swigt__p_CvRNG_Wrapper,
7855 &_swigt__p_CvScalar,
7857 &_swigt__p_CvSeqBlock,
7858 &_swigt__p_CvSeqReader,
7859 &_swigt__p_CvSeqWriter,
7861 &_swigt__p_CvSetElem,
7863 &_swigt__p_CvSize2D32f,
7865 &_swigt__p_CvSparseMat,
7866 &_swigt__p_CvSparseMatIterator,
7867 &_swigt__p_CvSparseNode,
7868 &_swigt__p_CvString,
7869 &_swigt__p_CvStringHashNode,
7870 &_swigt__p_CvSubdiv2D,
7871 &_swigt__p_CvSubdiv2DEdge_Wrapper,
7872 &_swigt__p_CvSubdiv2DPoint,
7873 &_swigt__p_CvSubdiv2DPointLocation,
7874 &_swigt__p_CvTermCriteria,
7875 &_swigt__p_CvTreeNodeIterator,
7876 &_swigt__p_CvTypeInfo,
7877 &_swigt__p_CvTypedSeqT_CvConnectedComp_t,
7878 &_swigt__p_CvTypedSeqT_CvPoint2D32f_t,
7879 &_swigt__p_CvTypedSeqT_CvPoint_t,
7880 &_swigt__p_CvTypedSeqT_CvQuadEdge2D_t,
7881 &_swigt__p_CvTypedSeqT_CvRect_t,
7882 &_swigt__p_CvTypedSeqT_CvSeq_p_t,
7883 &_swigt__p_CvTypedSeqT_CvTupleT_CvPoint_2_t_t,
7884 &_swigt__p_CvTypedSeqT_CvTupleT_float_2_t_t,
7885 &_swigt__p_CvTypedSeqT_CvTupleT_float_3_t_t,
7886 &_swigt__p_CvVideoWriter,
7887 &_swigt__p_CvvImage,
7888 &_swigt__p__IplConvKernel,
7889 &_swigt__p__IplConvKernelFP,
7890 &_swigt__p__IplImage,
7892 &_swigt__p__IplTileInfo,
7893 &_swigt__p_allocator_type,
7895 &_swigt__p_difference_type,
7896 &_swigt__p_f_int__void,
7897 &_swigt__p_f_int_int_int_int_p_void__void,
7899 &_swigt__p_long_long,
7901 &_swigt__p_signed_char,
7903 &_swigt__p_size_type,
7904 &_swigt__p_unsigned_char,
7905 &_swigt__p_unsigned_long_long,
7906 &_swigt__p_unsigned_short,
7907 &_swigt__p_value_type,
7911 static swig_cast_info _swigc__p_Cv32suf[] = { {&_swigt__p_Cv32suf, 0, 0, 0},{0, 0, 0, 0}};
7912 static swig_cast_info _swigc__p_Cv64suf[] = { {&_swigt__p_Cv64suf, 0, 0, 0},{0, 0, 0, 0}};
7913 static swig_cast_info _swigc__p_CvAttrList[] = { {&_swigt__p_CvAttrList, 0, 0, 0},{0, 0, 0, 0}};
7914 static swig_cast_info _swigc__p_CvAvgComp[] = { {&_swigt__p_CvAvgComp, 0, 0, 0},{0, 0, 0, 0}};
7915 static swig_cast_info _swigc__p_CvBox2D[] = { {&_swigt__p_CvBox2D, 0, 0, 0},{0, 0, 0, 0}};
7916 static swig_cast_info _swigc__p_CvCapture[] = { {&_swigt__p_CvCapture, 0, 0, 0},{0, 0, 0, 0}};
7917 static swig_cast_info _swigc__p_CvChain[] = { {&_swigt__p_CvChain, 0, 0, 0},{0, 0, 0, 0}};
7918 static swig_cast_info _swigc__p_CvChainPtReader[] = { {&_swigt__p_CvChainPtReader, 0, 0, 0},{0, 0, 0, 0}};
7919 static swig_cast_info _swigc__p_CvConDensation[] = { {&_swigt__p_CvConDensation, 0, 0, 0},{0, 0, 0, 0}};
7920 static swig_cast_info _swigc__p_CvConnectedComp[] = { {&_swigt__p_CvConnectedComp, 0, 0, 0},{0, 0, 0, 0}};
7921 static swig_cast_info _swigc__p_CvContour[] = { {&_swigt__p_CvContour, 0, 0, 0},{0, 0, 0, 0}};
7922 static swig_cast_info _swigc__p_CvContourTree[] = { {&_swigt__p_CvContourTree, 0, 0, 0},{0, 0, 0, 0}};
7923 static swig_cast_info _swigc__p_CvConvexityDefect[] = { {&_swigt__p_CvConvexityDefect, 0, 0, 0},{0, 0, 0, 0}};
7924 static swig_cast_info _swigc__p_CvFileNode[] = { {&_swigt__p_CvFileNode, 0, 0, 0},{0, 0, 0, 0}};
7925 static swig_cast_info _swigc__p_CvFileStorage[] = { {&_swigt__p_CvFileStorage, 0, 0, 0},{0, 0, 0, 0}};
7926 static swig_cast_info _swigc__p_CvFilter[] = { {&_swigt__p_CvFilter, 0, 0, 0},{0, 0, 0, 0}};
7927 static swig_cast_info _swigc__p_CvFont[] = { {&_swigt__p_CvFont, 0, 0, 0},{0, 0, 0, 0}};
7928 static swig_cast_info _swigc__p_CvGenericHash[] = { {&_swigt__p_CvGenericHash, 0, 0, 0},{0, 0, 0, 0}};
7929 static swig_cast_info _swigc__p_CvGraph[] = { {&_swigt__p_CvGraph, 0, 0, 0},{0, 0, 0, 0}};
7930 static swig_cast_info _swigc__p_CvGraphEdge[] = { {&_swigt__p_CvGraphEdge, 0, 0, 0},{0, 0, 0, 0}};
7931 static swig_cast_info _swigc__p_CvGraphScanner[] = { {&_swigt__p_CvGraphScanner, 0, 0, 0},{0, 0, 0, 0}};
7932 static swig_cast_info _swigc__p_CvGraphVtx[] = { {&_swigt__p_CvGraphVtx, 0, 0, 0},{0, 0, 0, 0}};
7933 static swig_cast_info _swigc__p_CvGraphVtx2D[] = { {&_swigt__p_CvGraphVtx2D, 0, 0, 0},{0, 0, 0, 0}};
7934 static swig_cast_info _swigc__p_CvHaarClassifier[] = { {&_swigt__p_CvHaarClassifier, 0, 0, 0},{0, 0, 0, 0}};
7935 static swig_cast_info _swigc__p_CvHaarClassifierCascade[] = { {&_swigt__p_CvHaarClassifierCascade, 0, 0, 0},{0, 0, 0, 0}};
7936 static swig_cast_info _swigc__p_CvHaarFeature[] = { {&_swigt__p_CvHaarFeature, 0, 0, 0},{0, 0, 0, 0}};
7937 static swig_cast_info _swigc__p_CvHaarStageClassifier[] = { {&_swigt__p_CvHaarStageClassifier, 0, 0, 0},{0, 0, 0, 0}};
7938 static swig_cast_info _swigc__p_CvHidHaarClassifierCascade[] = { {&_swigt__p_CvHidHaarClassifierCascade, 0, 0, 0},{0, 0, 0, 0}};
7939 static swig_cast_info _swigc__p_CvHistogram[] = { {&_swigt__p_CvHistogram, 0, 0, 0},{0, 0, 0, 0}};
7940 static swig_cast_info _swigc__p_CvHuMoments[] = { {&_swigt__p_CvHuMoments, 0, 0, 0},{0, 0, 0, 0}};
7941 static swig_cast_info _swigc__p_CvKalman[] = { {&_swigt__p_CvKalman, 0, 0, 0},{0, 0, 0, 0}};
7942 static swig_cast_info _swigc__p_CvLineIterator[] = { {&_swigt__p_CvLineIterator, 0, 0, 0},{0, 0, 0, 0}};
7943 static swig_cast_info _swigc__p_CvMat[] = { {&_swigt__p_CvMat, 0, 0, 0},{0, 0, 0, 0}};
7944 static swig_cast_info _swigc__p_CvMatND[] = { {&_swigt__p_CvMatND, 0, 0, 0},{0, 0, 0, 0}};
7945 static swig_cast_info _swigc__p_CvMatrix3[] = { {&_swigt__p_CvMatrix3, 0, 0, 0},{0, 0, 0, 0}};
7946 static swig_cast_info _swigc__p_CvMemBlock[] = { {&_swigt__p_CvMemBlock, 0, 0, 0},{0, 0, 0, 0}};
7947 static swig_cast_info _swigc__p_CvMemStorage[] = { {&_swigt__p_CvMemStorage, 0, 0, 0},{0, 0, 0, 0}};
7948 static swig_cast_info _swigc__p_CvMemStoragePos[] = { {&_swigt__p_CvMemStoragePos, 0, 0, 0},{0, 0, 0, 0}};
7949 static swig_cast_info _swigc__p_CvModuleInfo[] = { {&_swigt__p_CvModuleInfo, 0, 0, 0},{0, 0, 0, 0}};
7950 static swig_cast_info _swigc__p_CvMoments[] = { {&_swigt__p_CvMoments, 0, 0, 0},{0, 0, 0, 0}};
7951 static swig_cast_info _swigc__p_CvNArrayIterator[] = { {&_swigt__p_CvNArrayIterator, 0, 0, 0},{0, 0, 0, 0}};
7952 static swig_cast_info _swigc__p_CvNextEdgeType[] = { {&_swigt__p_CvNextEdgeType, 0, 0, 0},{0, 0, 0, 0}};
7953 static swig_cast_info _swigc__p_CvPOSITObject[] = { {&_swigt__p_CvPOSITObject, 0, 0, 0},{0, 0, 0, 0}};
7954 static swig_cast_info _swigc__p_CvPluginFuncInfo[] = { {&_swigt__p_CvPluginFuncInfo, 0, 0, 0},{0, 0, 0, 0}};
7955 static swig_cast_info _swigc__p_CvPoint[] = { {&_swigt__p_CvPoint, 0, 0, 0},{0, 0, 0, 0}};
7956 static swig_cast_info _swigc__p_CvPoint2D32f[] = { {&_swigt__p_CvPoint2D32f, 0, 0, 0},{0, 0, 0, 0}};
7957 static swig_cast_info _swigc__p_CvPoint2D64f[] = { {&_swigt__p_CvPoint2D64f, 0, 0, 0},{0, 0, 0, 0}};
7958 static swig_cast_info _swigc__p_CvPoint3D32f[] = { {&_swigt__p_CvPoint3D32f, 0, 0, 0},{0, 0, 0, 0}};
7959 static swig_cast_info _swigc__p_CvPoint3D64f[] = { {&_swigt__p_CvPoint3D64f, 0, 0, 0},{0, 0, 0, 0}};
7960 static swig_cast_info _swigc__p_CvQuadEdge2D[] = { {&_swigt__p_CvQuadEdge2D, 0, 0, 0},{0, 0, 0, 0}};
7961 static swig_cast_info _swigc__p_CvRNG_Wrapper[] = { {&_swigt__p_CvRNG_Wrapper, 0, 0, 0},{0, 0, 0, 0}};
7962 static swig_cast_info _swigc__p_CvRect[] = { {&_swigt__p_CvRect, 0, 0, 0},{0, 0, 0, 0}};
7963 static swig_cast_info _swigc__p_CvScalar[] = { {&_swigt__p_CvScalar, 0, 0, 0},{0, 0, 0, 0}};
7964 static swig_cast_info _swigc__p_CvTypedSeqT_CvTupleT_CvPoint_2_t_t[] = {{&_swigt__p_CvTypedSeqT_CvTupleT_CvPoint_2_t_t, 0, 0, 0},{0, 0, 0, 0}};
7965 static swig_cast_info _swigc__p_CvTypedSeqT_CvTupleT_float_2_t_t[] = {{&_swigt__p_CvTypedSeqT_CvTupleT_float_2_t_t, 0, 0, 0},{0, 0, 0, 0}};
7966 static swig_cast_info _swigc__p_CvTypedSeqT_CvRect_t[] = {{&_swigt__p_CvTypedSeqT_CvRect_t, 0, 0, 0},{0, 0, 0, 0}};
7967 static swig_cast_info _swigc__p_CvTypedSeqT_CvPoint_t[] = {{&_swigt__p_CvTypedSeqT_CvPoint_t, 0, 0, 0},{0, 0, 0, 0}};
7968 static swig_cast_info _swigc__p_CvTypedSeqT_CvQuadEdge2D_t[] = {{&_swigt__p_CvTypedSeqT_CvQuadEdge2D_t, 0, 0, 0},{0, 0, 0, 0}};
7969 static swig_cast_info _swigc__p_CvTypedSeqT_CvSeq_p_t[] = {{&_swigt__p_CvTypedSeqT_CvSeq_p_t, 0, 0, 0},{0, 0, 0, 0}};
7970 static swig_cast_info _swigc__p_CvTypedSeqT_CvPoint2D32f_t[] = {{&_swigt__p_CvTypedSeqT_CvPoint2D32f_t, 0, 0, 0},{0, 0, 0, 0}};
7971 static swig_cast_info _swigc__p_CvTypedSeqT_CvTupleT_float_3_t_t[] = {{&_swigt__p_CvTypedSeqT_CvTupleT_float_3_t_t, 0, 0, 0},{0, 0, 0, 0}};
7972 static swig_cast_info _swigc__p_CvTypedSeqT_CvConnectedComp_t[] = {{&_swigt__p_CvTypedSeqT_CvConnectedComp_t, 0, 0, 0},{0, 0, 0, 0}};
7973 static swig_cast_info _swigc__p_CvSeq[] = { {&_swigt__p_CvTypedSeqT_CvTupleT_CvPoint_2_t_t, _p_CvTypedSeqT_CvTupleT_CvPoint_2_t_tTo_p_CvSeq, 0, 0}, {&_swigt__p_CvTypedSeqT_CvTupleT_float_2_t_t, _p_CvTypedSeqT_CvTupleT_float_2_t_tTo_p_CvSeq, 0, 0}, {&_swigt__p_CvTypedSeqT_CvRect_t, _p_CvTypedSeqT_CvRect_tTo_p_CvSeq, 0, 0}, {&_swigt__p_CvTypedSeqT_CvPoint_t, _p_CvTypedSeqT_CvPoint_tTo_p_CvSeq, 0, 0}, {&_swigt__p_CvTypedSeqT_CvQuadEdge2D_t, _p_CvTypedSeqT_CvQuadEdge2D_tTo_p_CvSeq, 0, 0}, {&_swigt__p_CvTypedSeqT_CvSeq_p_t, _p_CvTypedSeqT_CvSeq_p_tTo_p_CvSeq, 0, 0}, {&_swigt__p_CvTypedSeqT_CvPoint2D32f_t, _p_CvTypedSeqT_CvPoint2D32f_tTo_p_CvSeq, 0, 0}, {&_swigt__p_CvSeq, 0, 0, 0}, {&_swigt__p_CvTypedSeqT_CvTupleT_float_3_t_t, _p_CvTypedSeqT_CvTupleT_float_3_t_tTo_p_CvSeq, 0, 0}, {&_swigt__p_CvTypedSeqT_CvConnectedComp_t, _p_CvTypedSeqT_CvConnectedComp_tTo_p_CvSeq, 0, 0},{0, 0, 0, 0}};
7974 static swig_cast_info _swigc__p_CvSeqBlock[] = { {&_swigt__p_CvSeqBlock, 0, 0, 0},{0, 0, 0, 0}};
7975 static swig_cast_info _swigc__p_CvSeqReader[] = { {&_swigt__p_CvSeqReader, 0, 0, 0},{0, 0, 0, 0}};
7976 static swig_cast_info _swigc__p_CvSeqWriter[] = { {&_swigt__p_CvSeqWriter, 0, 0, 0},{0, 0, 0, 0}};
7977 static swig_cast_info _swigc__p_CvSet[] = { {&_swigt__p_CvSet, 0, 0, 0},{0, 0, 0, 0}};
7978 static swig_cast_info _swigc__p_CvSetElem[] = { {&_swigt__p_CvSetElem, 0, 0, 0},{0, 0, 0, 0}};
7979 static swig_cast_info _swigc__p_CvSize[] = { {&_swigt__p_CvSize, 0, 0, 0},{0, 0, 0, 0}};
7980 static swig_cast_info _swigc__p_CvSize2D32f[] = { {&_swigt__p_CvSize2D32f, 0, 0, 0},{0, 0, 0, 0}};
7981 static swig_cast_info _swigc__p_CvSlice[] = { {&_swigt__p_CvSlice, 0, 0, 0},{0, 0, 0, 0}};
7982 static swig_cast_info _swigc__p_CvSparseMat[] = { {&_swigt__p_CvSparseMat, 0, 0, 0},{0, 0, 0, 0}};
7983 static swig_cast_info _swigc__p_CvSparseMatIterator[] = { {&_swigt__p_CvSparseMatIterator, 0, 0, 0},{0, 0, 0, 0}};
7984 static swig_cast_info _swigc__p_CvSparseNode[] = { {&_swigt__p_CvSparseNode, 0, 0, 0},{0, 0, 0, 0}};
7985 static swig_cast_info _swigc__p_CvString[] = { {&_swigt__p_CvString, 0, 0, 0},{0, 0, 0, 0}};
7986 static swig_cast_info _swigc__p_CvStringHashNode[] = { {&_swigt__p_CvStringHashNode, 0, 0, 0},{0, 0, 0, 0}};
7987 static swig_cast_info _swigc__p_CvSubdiv2D[] = { {&_swigt__p_CvSubdiv2D, 0, 0, 0},{0, 0, 0, 0}};
7988 static swig_cast_info _swigc__p_CvSubdiv2DEdge_Wrapper[] = { {&_swigt__p_CvSubdiv2DEdge_Wrapper, 0, 0, 0},{0, 0, 0, 0}};
7989 static swig_cast_info _swigc__p_CvSubdiv2DPoint[] = { {&_swigt__p_CvSubdiv2DPoint, 0, 0, 0},{0, 0, 0, 0}};
7990 static swig_cast_info _swigc__p_CvSubdiv2DPointLocation[] = { {&_swigt__p_CvSubdiv2DPointLocation, 0, 0, 0},{0, 0, 0, 0}};
7991 static swig_cast_info _swigc__p_CvTermCriteria[] = { {&_swigt__p_CvTermCriteria, 0, 0, 0},{0, 0, 0, 0}};
7992 static swig_cast_info _swigc__p_CvTreeNodeIterator[] = { {&_swigt__p_CvTreeNodeIterator, 0, 0, 0},{0, 0, 0, 0}};
7993 static swig_cast_info _swigc__p_CvTypeInfo[] = { {&_swigt__p_CvTypeInfo, 0, 0, 0},{0, 0, 0, 0}};
7994 static swig_cast_info _swigc__p_CvVideoWriter[] = { {&_swigt__p_CvVideoWriter, 0, 0, 0},{0, 0, 0, 0}};
7995 static swig_cast_info _swigc__p_CvvImage[] = { {&_swigt__p_CvvImage, 0, 0, 0},{0, 0, 0, 0}};
7996 static swig_cast_info _swigc__p__IplConvKernel[] = { {&_swigt__p__IplConvKernel, 0, 0, 0},{0, 0, 0, 0}};
7997 static swig_cast_info _swigc__p__IplConvKernelFP[] = { {&_swigt__p__IplConvKernelFP, 0, 0, 0},{0, 0, 0, 0}};
7998 static swig_cast_info _swigc__p__IplImage[] = { {&_swigt__p__IplImage, 0, 0, 0},{0, 0, 0, 0}};
7999 static swig_cast_info _swigc__p__IplROI[] = { {&_swigt__p__IplROI, 0, 0, 0},{0, 0, 0, 0}};
8000 static swig_cast_info _swigc__p__IplTileInfo[] = { {&_swigt__p__IplTileInfo, 0, 0, 0},{0, 0, 0, 0}};
8001 static swig_cast_info _swigc__p_allocator_type[] = { {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}};
8002 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
8003 static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}};
8004 static swig_cast_info _swigc__p_f_int__void[] = { {&_swigt__p_f_int__void, 0, 0, 0},{0, 0, 0, 0}};
8005 static swig_cast_info _swigc__p_f_int_int_int_int_p_void__void[] = { {&_swigt__p_f_int_int_int_int_p_void__void, 0, 0, 0},{0, 0, 0, 0}};
8006 static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
8007 static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
8008 static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
8009 static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
8010 static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}};
8011 static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}};
8012 static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
8013 static swig_cast_info _swigc__p_unsigned_long_long[] = { {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}};
8014 static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
8015 static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}};
8016 static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
8018 static swig_cast_info *swig_cast_initial[] = {
8021 _swigc__p_CvAttrList,
8022 _swigc__p_CvAvgComp,
8024 _swigc__p_CvCapture,
8026 _swigc__p_CvChainPtReader,
8027 _swigc__p_CvConDensation,
8028 _swigc__p_CvConnectedComp,
8029 _swigc__p_CvContour,
8030 _swigc__p_CvContourTree,
8031 _swigc__p_CvConvexityDefect,
8032 _swigc__p_CvFileNode,
8033 _swigc__p_CvFileStorage,
8036 _swigc__p_CvGenericHash,
8038 _swigc__p_CvGraphEdge,
8039 _swigc__p_CvGraphScanner,
8040 _swigc__p_CvGraphVtx,
8041 _swigc__p_CvGraphVtx2D,
8042 _swigc__p_CvHaarClassifier,
8043 _swigc__p_CvHaarClassifierCascade,
8044 _swigc__p_CvHaarFeature,
8045 _swigc__p_CvHaarStageClassifier,
8046 _swigc__p_CvHidHaarClassifierCascade,
8047 _swigc__p_CvHistogram,
8048 _swigc__p_CvHuMoments,
8050 _swigc__p_CvLineIterator,
8053 _swigc__p_CvMatrix3,
8054 _swigc__p_CvMemBlock,
8055 _swigc__p_CvMemStorage,
8056 _swigc__p_CvMemStoragePos,
8057 _swigc__p_CvModuleInfo,
8058 _swigc__p_CvMoments,
8059 _swigc__p_CvNArrayIterator,
8060 _swigc__p_CvNextEdgeType,
8061 _swigc__p_CvPOSITObject,
8062 _swigc__p_CvPluginFuncInfo,
8064 _swigc__p_CvPoint2D32f,
8065 _swigc__p_CvPoint2D64f,
8066 _swigc__p_CvPoint3D32f,
8067 _swigc__p_CvPoint3D64f,
8068 _swigc__p_CvQuadEdge2D,
8069 _swigc__p_CvRNG_Wrapper,
8073 _swigc__p_CvSeqBlock,
8074 _swigc__p_CvSeqReader,
8075 _swigc__p_CvSeqWriter,
8077 _swigc__p_CvSetElem,
8079 _swigc__p_CvSize2D32f,
8081 _swigc__p_CvSparseMat,
8082 _swigc__p_CvSparseMatIterator,
8083 _swigc__p_CvSparseNode,
8085 _swigc__p_CvStringHashNode,
8086 _swigc__p_CvSubdiv2D,
8087 _swigc__p_CvSubdiv2DEdge_Wrapper,
8088 _swigc__p_CvSubdiv2DPoint,
8089 _swigc__p_CvSubdiv2DPointLocation,
8090 _swigc__p_CvTermCriteria,
8091 _swigc__p_CvTreeNodeIterator,
8092 _swigc__p_CvTypeInfo,
8093 _swigc__p_CvTypedSeqT_CvConnectedComp_t,
8094 _swigc__p_CvTypedSeqT_CvPoint2D32f_t,
8095 _swigc__p_CvTypedSeqT_CvPoint_t,
8096 _swigc__p_CvTypedSeqT_CvQuadEdge2D_t,
8097 _swigc__p_CvTypedSeqT_CvRect_t,
8098 _swigc__p_CvTypedSeqT_CvSeq_p_t,
8099 _swigc__p_CvTypedSeqT_CvTupleT_CvPoint_2_t_t,
8100 _swigc__p_CvTypedSeqT_CvTupleT_float_2_t_t,
8101 _swigc__p_CvTypedSeqT_CvTupleT_float_3_t_t,
8102 _swigc__p_CvVideoWriter,
8104 _swigc__p__IplConvKernel,
8105 _swigc__p__IplConvKernelFP,
8106 _swigc__p__IplImage,
8108 _swigc__p__IplTileInfo,
8109 _swigc__p_allocator_type,
8111 _swigc__p_difference_type,
8112 _swigc__p_f_int__void,
8113 _swigc__p_f_int_int_int_int_p_void__void,
8115 _swigc__p_long_long,
8117 _swigc__p_signed_char,
8119 _swigc__p_size_type,
8120 _swigc__p_unsigned_char,
8121 _swigc__p_unsigned_long_long,
8122 _swigc__p_unsigned_short,
8123 _swigc__p_value_type,
8128 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
8130 static swig_const_info swig_const_table[] = {
8131 {0, 0, 0, 0.0, 0, 0}};
8136 /* -----------------------------------------------------------------------------
8137 * Type initialization:
8138 * This problem is tough by the requirement that no dynamic
8139 * memory is used. Also, since swig_type_info structures store pointers to
8140 * swig_cast_info structures and swig_cast_info structures store pointers back
8141 * to swig_type_info structures, we need some lookup code at initialization.
8142 * The idea is that swig generates all the structures that are needed.
8143 * The runtime then collects these partially filled structures.
8144 * The SWIG_InitializeModule function takes these initial arrays out of
8145 * swig_module, and does all the lookup, filling in the swig_module.types
8146 * array with the correct data and linking the correct swig_cast_info
8147 * structures together.
8149 * The generated swig_type_info structures are assigned staticly to an initial
8150 * array. We just loop through that array, and handle each type individually.
8151 * First we lookup if this type has been already loaded, and if so, use the
8152 * loaded structure instead of the generated one. Then we have to fill in the
8153 * cast linked list. The cast data is initially stored in something like a
8154 * two-dimensional array. Each row corresponds to a type (there are the same
8155 * number of rows as there are in the swig_type_initial array). Each entry in
8156 * a column is one of the swig_cast_info structures for that type.
8157 * The cast_initial array is actually an array of arrays, because each row has
8158 * a variable number of columns. So to actually build the cast linked list,
8159 * we find the array of casts associated with the type, and loop through it
8160 * adding the casts to the list. The one last trick we need to do is making
8161 * sure the type pointer in the swig_cast_info struct is correct.
8163 * First off, we lookup the cast->type name to see if it is already loaded.
8164 * There are three cases to handle:
8165 * 1) If the cast->type has already been loaded AND the type we are adding
8166 * casting info to has not been loaded (it is in this module), THEN we
8167 * replace the cast->type pointer with the type pointer that has already
8169 * 2) If BOTH types (the one we are adding casting info to, and the
8170 * cast->type) are loaded, THEN the cast info has already been loaded by
8171 * the previous module so we just ignore it.
8172 * 3) Finally, if cast->type has not already been loaded, then we add that
8173 * swig_cast_info to the linked list (because the cast->type) pointer will
8175 * ----------------------------------------------------------------------------- */
8185 #define SWIGRUNTIME_DEBUG
8190 SWIG_InitializeModule(void *clientdata) {
8192 swig_module_info *module_head, *iter;
8195 clientdata = clientdata;
8197 /* check to see if the circular list has been setup, if not, set it up */
8198 if (swig_module.next==0) {
8199 /* Initialize the swig_module */
8200 swig_module.type_initial = swig_type_initial;
8201 swig_module.cast_initial = swig_cast_initial;
8202 swig_module.next = &swig_module;
8208 /* Try and load any already created modules */
8209 module_head = SWIG_GetModule(clientdata);
8211 /* This is the first module loaded for this interpreter */
8212 /* so set the swig module into the interpreter */
8213 SWIG_SetModule(clientdata, &swig_module);
8214 module_head = &swig_module;
8216 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
8220 if (iter==&swig_module) {
8225 } while (iter!= module_head);
8227 /* if the is found in the list, then all is done and we may leave */
8229 /* otherwise we must add out module into the list */
8230 swig_module.next = module_head->next;
8231 module_head->next = &swig_module;
8234 /* When multiple interpeters are used, a module could have already been initialized in
8235 a different interpreter, but not yet have a pointer in this interpreter.
8236 In this case, we do not want to continue adding types... everything should be
8238 if (init == 0) return;
8240 /* Now work on filling in swig_module.types */
8241 #ifdef SWIGRUNTIME_DEBUG
8242 printf("SWIG_InitializeModule: size %d\n", swig_module.size);
8244 for (i = 0; i < swig_module.size; ++i) {
8245 swig_type_info *type = 0;
8246 swig_type_info *ret;
8247 swig_cast_info *cast;
8249 #ifdef SWIGRUNTIME_DEBUG
8250 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
8253 /* if there is another module already loaded */
8254 if (swig_module.next != &swig_module) {
8255 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
8258 /* Overwrite clientdata field */
8259 #ifdef SWIGRUNTIME_DEBUG
8260 printf("SWIG_InitializeModule: found type %s\n", type->name);
8262 if (swig_module.type_initial[i]->clientdata) {
8263 type->clientdata = swig_module.type_initial[i]->clientdata;
8264 #ifdef SWIGRUNTIME_DEBUG
8265 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
8269 type = swig_module.type_initial[i];
8272 /* Insert casting types */
8273 cast = swig_module.cast_initial[i];
8274 while (cast->type) {
8275 /* Don't need to add information already in the list */
8277 #ifdef SWIGRUNTIME_DEBUG
8278 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
8280 if (swig_module.next != &swig_module) {
8281 ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
8282 #ifdef SWIGRUNTIME_DEBUG
8283 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
8287 if (type == swig_module.type_initial[i]) {
8288 #ifdef SWIGRUNTIME_DEBUG
8289 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
8294 /* Check for casting already in the list */
8295 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
8296 #ifdef SWIGRUNTIME_DEBUG
8297 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
8299 if (!ocast) ret = 0;
8304 #ifdef SWIGRUNTIME_DEBUG
8305 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
8308 type->cast->prev = cast;
8309 cast->next = type->cast;
8315 /* Set entry in modules->types array equal to the type */
8316 swig_module.types[i] = type;
8318 swig_module.types[i] = 0;
8320 #ifdef SWIGRUNTIME_DEBUG
8321 printf("**** SWIG_InitializeModule: Cast List ******\n");
8322 for (i = 0; i < swig_module.size; ++i) {
8324 swig_cast_info *cast = swig_module.cast_initial[i];
8325 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
8326 while (cast->type) {
8327 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
8331 printf("---- Total casts: %d\n",j);
8333 printf("**** SWIG_InitializeModule: Cast List ******\n");
8337 /* This function will propagate the clientdata field of type to
8338 * any new swig_type_info structures that have been added into the list
8339 * of equivalent types. It is like calling
8340 * SWIG_TypeClientData(type, clientdata) a second time.
8343 SWIG_PropagateClientData(void) {
8345 swig_cast_info *equiv;
8346 static int init_run = 0;
8348 if (init_run) return;
8351 for (i = 0; i < swig_module.size; i++) {
8352 if (swig_module.types[i]->clientdata) {
8353 equiv = swig_module.types[i]->cast;
8355 if (!equiv->converter) {
8356 if (equiv->type && !equiv->type->clientdata)
8357 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
8359 equiv = equiv->next;
8379 /* Python-specific SWIG API */
8380 #define SWIG_newvarlink() SWIG_Python_newvarlink()
8381 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
8382 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
8384 /* -----------------------------------------------------------------------------
8385 * global variable support code.
8386 * ----------------------------------------------------------------------------- */
8388 typedef struct swig_globalvar {
8389 char *name; /* Name of global variable */
8390 PyObject *(*get_attr)(void); /* Return the current value */
8391 int (*set_attr)(PyObject *); /* Set the value */
8392 struct swig_globalvar *next;
8395 typedef struct swig_varlinkobject {
8397 swig_globalvar *vars;
8398 } swig_varlinkobject;
8400 SWIGINTERN PyObject *
8401 swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
8402 return PyString_FromString("<Swig global variables>");
8405 SWIGINTERN PyObject *
8406 swig_varlink_str(swig_varlinkobject *v) {
8407 PyObject *str = PyString_FromString("(");
8408 swig_globalvar *var;
8409 for (var = v->vars; var; var=var->next) {
8410 PyString_ConcatAndDel(&str,PyString_FromString(var->name));
8411 if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
8413 PyString_ConcatAndDel(&str,PyString_FromString(")"));
8418 swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
8419 PyObject *str = swig_varlink_str(v);
8420 fprintf(fp,"Swig global variables ");
8421 fprintf(fp,"%s\n", PyString_AsString(str));
8427 swig_varlink_dealloc(swig_varlinkobject *v) {
8428 swig_globalvar *var = v->vars;
8430 swig_globalvar *n = var->next;
8437 SWIGINTERN PyObject *
8438 swig_varlink_getattr(swig_varlinkobject *v, char *n) {
8439 PyObject *res = NULL;
8440 swig_globalvar *var = v->vars;
8442 if (strcmp(var->name,n) == 0) {
8443 res = (*var->get_attr)();
8448 if (res == NULL && !PyErr_Occurred()) {
8449 PyErr_SetString(PyExc_NameError,"Unknown C global variable");
8455 swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
8457 swig_globalvar *var = v->vars;
8459 if (strcmp(var->name,n) == 0) {
8460 res = (*var->set_attr)(p);
8465 if (res == 1 && !PyErr_Occurred()) {
8466 PyErr_SetString(PyExc_NameError,"Unknown C global variable");
8471 SWIGINTERN PyTypeObject*
8472 swig_varlink_type(void) {
8473 static char varlink__doc__[] = "Swig var link object";
8474 static PyTypeObject varlink_type;
8475 static int type_init = 0;
8477 const PyTypeObject tmp
8479 PyObject_HEAD_INIT(NULL)
8480 0, /* Number of items in variable part (ob_size) */
8481 (char *)"swigvarlink", /* Type name (tp_name) */
8482 sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */
8483 0, /* Itemsize (tp_itemsize) */
8484 (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */
8485 (printfunc) swig_varlink_print, /* Print (tp_print) */
8486 (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
8487 (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
8489 (reprfunc) swig_varlink_repr, /* tp_repr */
8490 0, /* tp_as_number */
8491 0, /* tp_as_sequence */
8492 0, /* tp_as_mapping */
8495 (reprfunc)swig_varlink_str, /* tp_str */
8496 0, /* tp_getattro */
8497 0, /* tp_setattro */
8498 0, /* tp_as_buffer */
8500 varlink__doc__, /* tp_doc */
8501 0, /* tp_traverse */
8503 0, /* tp_richcompare */
8504 0, /* tp_weaklistoffset */
8505 #if PY_VERSION_HEX >= 0x02020000
8506 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
8508 #if PY_VERSION_HEX >= 0x02030000
8512 0,0,0,0 /* tp_alloc -> tp_next */
8516 varlink_type.ob_type = &PyType_Type;
8519 return &varlink_type;
8522 /* Create a variable linking object for use later */
8523 SWIGINTERN PyObject *
8524 SWIG_Python_newvarlink(void) {
8525 swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
8529 return ((PyObject*) result);
8533 SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
8534 swig_varlinkobject *v = (swig_varlinkobject *) p;
8535 swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
8537 size_t size = strlen(name)+1;
8538 gv->name = (char *)malloc(size);
8540 strncpy(gv->name,name,size);
8541 gv->get_attr = get_attr;
8542 gv->set_attr = set_attr;
8549 SWIGINTERN PyObject *
8550 SWIG_globals(void) {
8551 static PyObject *_SWIG_globals = 0;
8552 if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
8553 return _SWIG_globals;
8556 /* -----------------------------------------------------------------------------
8557 * constants/methods manipulation
8558 * ----------------------------------------------------------------------------- */
8560 /* Install Constants */
8562 SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
8565 for (i = 0; constants[i].type; ++i) {
8566 switch(constants[i].type) {
8567 case SWIG_PY_POINTER:
8568 obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
8570 case SWIG_PY_BINARY:
8571 obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
8578 PyDict_SetItemString(d, constants[i].name, obj);
8584 /* -----------------------------------------------------------------------------*/
8585 /* Fix SwigMethods to carry the callback ptrs when needed */
8586 /* -----------------------------------------------------------------------------*/
8589 SWIG_Python_FixMethods(PyMethodDef *methods,
8590 swig_const_info *const_table,
8591 swig_type_info **types,
8592 swig_type_info **types_initial) {
8594 for (i = 0; methods[i].ml_name; ++i) {
8595 const char *c = methods[i].ml_doc;
8596 if (c && (c = strstr(c, "swig_ptr: "))) {
8598 swig_const_info *ci = 0;
8599 const char *name = c + 10;
8600 for (j = 0; const_table[j].type; ++j) {
8601 if (strncmp(const_table[j].name, name,
8602 strlen(const_table[j].name)) == 0) {
8603 ci = &(const_table[j]);
8608 size_t shift = (ci->ptype) - types;
8609 swig_type_info *ty = types_initial[shift];
8610 size_t ldoc = (c - methods[i].ml_doc);
8611 size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
8612 char *ndoc = (char*)malloc(ldoc + lptr + 10);
8615 void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
8617 strncpy(buff, methods[i].ml_doc, ldoc);
8619 strncpy(buff, "swig_ptr: ", 10);
8621 SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
8622 methods[i].ml_doc = ndoc;
8634 /* -----------------------------------------------------------------------------*
8635 * Partial Init method
8636 * -----------------------------------------------------------------------------*/
8641 SWIGEXPORT void SWIG_init(void) {
8644 /* Fix SwigMethods to carry the callback ptrs when needed */
8645 SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
8647 m = Py_InitModule((char *) SWIG_name, SwigMethods);
8648 d = PyModule_GetDict(m);
8650 SWIG_InitializeModule(0);
8651 SWIG_InstallConstants(d,swig_const_table);
8655 PyEval_InitThreads();
8657 SWIG_Python_SetConstant(d, "CV_WINDOW_AUTOSIZE",SWIG_From_int(static_cast< int >(1)));
8658 SWIG_Python_SetConstant(d, "CV_EVENT_MOUSEMOVE",SWIG_From_int(static_cast< int >(0)));
8659 SWIG_Python_SetConstant(d, "CV_EVENT_LBUTTONDOWN",SWIG_From_int(static_cast< int >(1)));
8660 SWIG_Python_SetConstant(d, "CV_EVENT_RBUTTONDOWN",SWIG_From_int(static_cast< int >(2)));
8661 SWIG_Python_SetConstant(d, "CV_EVENT_MBUTTONDOWN",SWIG_From_int(static_cast< int >(3)));
8662 SWIG_Python_SetConstant(d, "CV_EVENT_LBUTTONUP",SWIG_From_int(static_cast< int >(4)));
8663 SWIG_Python_SetConstant(d, "CV_EVENT_RBUTTONUP",SWIG_From_int(static_cast< int >(5)));
8664 SWIG_Python_SetConstant(d, "CV_EVENT_MBUTTONUP",SWIG_From_int(static_cast< int >(6)));
8665 SWIG_Python_SetConstant(d, "CV_EVENT_LBUTTONDBLCLK",SWIG_From_int(static_cast< int >(7)));
8666 SWIG_Python_SetConstant(d, "CV_EVENT_RBUTTONDBLCLK",SWIG_From_int(static_cast< int >(8)));
8667 SWIG_Python_SetConstant(d, "CV_EVENT_MBUTTONDBLCLK",SWIG_From_int(static_cast< int >(9)));
8668 SWIG_Python_SetConstant(d, "CV_EVENT_FLAG_LBUTTON",SWIG_From_int(static_cast< int >(1)));
8669 SWIG_Python_SetConstant(d, "CV_EVENT_FLAG_RBUTTON",SWIG_From_int(static_cast< int >(2)));
8670 SWIG_Python_SetConstant(d, "CV_EVENT_FLAG_MBUTTON",SWIG_From_int(static_cast< int >(4)));
8671 SWIG_Python_SetConstant(d, "CV_EVENT_FLAG_CTRLKEY",SWIG_From_int(static_cast< int >(8)));
8672 SWIG_Python_SetConstant(d, "CV_EVENT_FLAG_SHIFTKEY",SWIG_From_int(static_cast< int >(16)));
8673 SWIG_Python_SetConstant(d, "CV_EVENT_FLAG_ALTKEY",SWIG_From_int(static_cast< int >(32)));
8674 SWIG_Python_SetConstant(d, "CV_LOAD_IMAGE_UNCHANGED",SWIG_From_int(static_cast< int >(-1)));
8675 SWIG_Python_SetConstant(d, "CV_LOAD_IMAGE_GRAYSCALE",SWIG_From_int(static_cast< int >(0)));
8676 SWIG_Python_SetConstant(d, "CV_LOAD_IMAGE_COLOR",SWIG_From_int(static_cast< int >(1)));
8677 SWIG_Python_SetConstant(d, "CV_LOAD_IMAGE_ANYDEPTH",SWIG_From_int(static_cast< int >(2)));
8678 SWIG_Python_SetConstant(d, "CV_LOAD_IMAGE_ANYCOLOR",SWIG_From_int(static_cast< int >(4)));
8679 SWIG_Python_SetConstant(d, "CV_CVTIMG_FLIP",SWIG_From_int(static_cast< int >(1)));
8680 SWIG_Python_SetConstant(d, "CV_CVTIMG_SWAP_RB",SWIG_From_int(static_cast< int >(2)));
8681 SWIG_Python_SetConstant(d, "CV_CAP_ANY",SWIG_From_int(static_cast< int >(0)));
8682 SWIG_Python_SetConstant(d, "CV_CAP_MIL",SWIG_From_int(static_cast< int >(100)));
8683 SWIG_Python_SetConstant(d, "CV_CAP_VFW",SWIG_From_int(static_cast< int >(200)));
8684 SWIG_Python_SetConstant(d, "CV_CAP_V4L",SWIG_From_int(static_cast< int >(200)));
8685 SWIG_Python_SetConstant(d, "CV_CAP_V4L2",SWIG_From_int(static_cast< int >(200)));
8686 SWIG_Python_SetConstant(d, "CV_CAP_FIREWARE",SWIG_From_int(static_cast< int >(300)));
8687 SWIG_Python_SetConstant(d, "CV_CAP_FIREWIRE",SWIG_From_int(static_cast< int >(300)));
8688 SWIG_Python_SetConstant(d, "CV_CAP_IEEE1394",SWIG_From_int(static_cast< int >(300)));
8689 SWIG_Python_SetConstant(d, "CV_CAP_DC1394",SWIG_From_int(static_cast< int >(300)));
8690 SWIG_Python_SetConstant(d, "CV_CAP_CMU1394",SWIG_From_int(static_cast< int >(300)));
8691 SWIG_Python_SetConstant(d, "CV_CAP_STEREO",SWIG_From_int(static_cast< int >(400)));
8692 SWIG_Python_SetConstant(d, "CV_CAP_TYZX",SWIG_From_int(static_cast< int >(400)));
8693 SWIG_Python_SetConstant(d, "CV_TYZX_LEFT",SWIG_From_int(static_cast< int >(400)));
8694 SWIG_Python_SetConstant(d, "CV_TYZX_RIGHT",SWIG_From_int(static_cast< int >(401)));
8695 SWIG_Python_SetConstant(d, "CV_TYZX_COLOR",SWIG_From_int(static_cast< int >(402)));
8696 SWIG_Python_SetConstant(d, "CV_TYZX_Z",SWIG_From_int(static_cast< int >(403)));
8697 SWIG_Python_SetConstant(d, "CV_CAP_QT",SWIG_From_int(static_cast< int >(500)));
8698 SWIG_Python_SetConstant(d, "CV_CAP_UNICAP",SWIG_From_int(static_cast< int >(600)));
8699 SWIG_Python_SetConstant(d, "CV_CAP_PROP_POS_MSEC",SWIG_From_int(static_cast< int >(0)));
8700 SWIG_Python_SetConstant(d, "CV_CAP_PROP_POS_FRAMES",SWIG_From_int(static_cast< int >(1)));
8701 SWIG_Python_SetConstant(d, "CV_CAP_PROP_POS_AVI_RATIO",SWIG_From_int(static_cast< int >(2)));
8702 SWIG_Python_SetConstant(d, "CV_CAP_PROP_FRAME_WIDTH",SWIG_From_int(static_cast< int >(3)));
8703 SWIG_Python_SetConstant(d, "CV_CAP_PROP_FRAME_HEIGHT",SWIG_From_int(static_cast< int >(4)));
8704 SWIG_Python_SetConstant(d, "CV_CAP_PROP_FPS",SWIG_From_int(static_cast< int >(5)));
8705 SWIG_Python_SetConstant(d, "CV_CAP_PROP_FOURCC",SWIG_From_int(static_cast< int >(6)));
8706 SWIG_Python_SetConstant(d, "CV_CAP_PROP_FRAME_COUNT",SWIG_From_int(static_cast< int >(7)));
8707 SWIG_Python_SetConstant(d, "CV_CAP_PROP_FORMAT",SWIG_From_int(static_cast< int >(8)));
8708 SWIG_Python_SetConstant(d, "CV_CAP_PROP_MODE",SWIG_From_int(static_cast< int >(9)));
8709 SWIG_Python_SetConstant(d, "CV_CAP_PROP_BRIGHTNESS",SWIG_From_int(static_cast< int >(10)));
8710 SWIG_Python_SetConstant(d, "CV_CAP_PROP_CONTRAST",SWIG_From_int(static_cast< int >(11)));
8711 SWIG_Python_SetConstant(d, "CV_CAP_PROP_SATURATION",SWIG_From_int(static_cast< int >(12)));
8712 SWIG_Python_SetConstant(d, "CV_CAP_PROP_HUE",SWIG_From_int(static_cast< int >(13)));
8713 SWIG_Python_SetConstant(d, "CV_CAP_PROP_GAIN",SWIG_From_int(static_cast< int >(14)));
8714 SWIG_Python_SetConstant(d, "CV_CAP_PROP_CONVERT_RGB",SWIG_From_int(static_cast< int >(15)));
8715 SWIG_Python_SetConstant(d, "CV_FOURCC_PROMPT",SWIG_From_int(static_cast< int >(-1)));
8716 SWIG_Python_SetConstant(d, "CV_FOURCC_DEFAULT",SWIG_From_int(static_cast< int >(-1)));
8717 SWIG_Python_SetConstant(d, "HG_AUTOSIZE",SWIG_From_int(static_cast< int >(1)));