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<class 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);
30 /* -----------------------------------------------------------------------------
31 * This section contains generic SWIG labels for method/variable
32 * declarations/attributes, and other compiler dependent labels.
33 * ----------------------------------------------------------------------------- */
35 /* template workaround for compilers that cannot correctly implement the C++ standard */
36 #ifndef SWIGTEMPLATEDISAMBIGUATOR
37 # if defined(__SUNPRO_CC)
38 # if (__SUNPRO_CC <= 0x560)
39 # define SWIGTEMPLATEDISAMBIGUATOR template
41 # define SWIGTEMPLATEDISAMBIGUATOR
44 # define SWIGTEMPLATEDISAMBIGUATOR
48 /* inline attribute */
50 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
51 # define SWIGINLINE inline
57 /* attribute recognised by some compilers to avoid 'unused' warnings */
59 # if defined(__GNUC__)
60 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
61 # define SWIGUNUSED __attribute__ ((__unused__))
66 # define SWIGUNUSED __attribute__ ((__unused__))
72 #ifndef SWIGUNUSEDPARM
74 # define SWIGUNUSEDPARM(p)
76 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
80 /* internal SWIG method */
82 # define SWIGINTERN static SWIGUNUSED
85 /* internal inline SWIG method */
86 #ifndef SWIGINTERNINLINE
87 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
90 /* exporting methods */
91 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
92 # ifndef GCC_HASCLASSVISIBILITY
93 # define GCC_HASCLASSVISIBILITY
98 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
99 # if defined(STATIC_LINKED)
102 # define SWIGEXPORT __declspec(dllexport)
105 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
106 # define SWIGEXPORT __attribute__ ((visibility("default")))
113 /* calling conventions for Windows */
115 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
116 # define SWIGSTDCALL __stdcall
122 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
123 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
124 # define _CRT_SECURE_NO_DEPRECATE
128 /* Python.h has to appear first */
131 /* -----------------------------------------------------------------------------
134 * This file contains generic CAPI SWIG runtime support for pointer
136 * ----------------------------------------------------------------------------- */
138 /* This should only be incremented when either the layout of swig_type_info changes,
139 or for whatever reason, the runtime changes incompatibly */
140 #define SWIG_RUNTIME_VERSION "3"
142 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
143 #ifdef SWIG_TYPE_TABLE
144 # define SWIG_QUOTE_STRING(x) #x
145 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
146 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
148 # define SWIG_TYPE_TABLE_NAME
152 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
153 creating a static or dynamic library from the swig runtime code.
154 In 99.9% of the cases, swig just needs to declare them as 'static'.
156 But only do this if is strictly necessary, ie, if you have problems
157 with your compiler or so.
161 # define SWIGRUNTIME SWIGINTERN
164 #ifndef SWIGRUNTIMEINLINE
165 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
168 /* Generic buffer size */
169 #ifndef SWIG_BUFFER_SIZE
170 # define SWIG_BUFFER_SIZE 1024
173 /* Flags for pointer conversions */
174 #define SWIG_POINTER_DISOWN 0x1
176 /* Flags for new pointer objects */
177 #define SWIG_POINTER_OWN 0x1
181 Flags/methods for returning states.
183 The swig conversion methods, as ConvertPtr, return and integer
184 that tells if the conversion was successful or not. And if not,
185 an error code can be returned (see swigerrors.swg for the codes).
187 Use the following macros/flags to set or process the returning
190 In old swig versions, you usually write code as:
192 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
198 Now you can be more explicit as:
200 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
201 if (SWIG_IsOK(res)) {
207 that seems to be the same, but now you can also do
210 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
211 if (SWIG_IsOK(res)) {
213 if (SWIG_IsNewObj(res) {
223 I.e., now SWIG_ConvertPtr can return new objects and you can
224 identify the case and take care of the deallocation. Of course that
225 requires also to SWIG_ConvertPtr to return new result values, as
227 int SWIG_ConvertPtr(obj, ptr,...) {
229 if (<need new object>) {
230 *ptr = <ptr to new allocated object>;
233 *ptr = <ptr to old object>;
241 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
242 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
245 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
246 allows to return the 'cast rank', for example, if you have this
253 food(1) // cast rank '1' (1 -> 1.0)
254 fooi(1) // cast rank '0'
256 just use the SWIG_AddCast()/SWIG_CheckState()
261 #define SWIG_ERROR (-1)
262 #define SWIG_IsOK(r) (r >= 0)
263 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
265 /* The CastRankLimit says how many bits are used for the cast rank */
266 #define SWIG_CASTRANKLIMIT (1 << 8)
267 /* The NewMask denotes the object was created (using new/malloc) */
268 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
269 /* The TmpMask is for in/out typemaps that use temporal objects */
270 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
271 /* Simple returning values */
272 #define SWIG_BADOBJ (SWIG_ERROR)
273 #define SWIG_OLDOBJ (SWIG_OK)
274 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
275 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
276 /* Check, add and del mask methods */
277 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
278 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
279 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
280 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
281 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
282 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
286 #if defined(SWIG_CASTRANK_MODE)
287 # ifndef SWIG_TypeRank
288 # define SWIG_TypeRank unsigned long
290 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
291 # define SWIG_MAXCASTRANK (2)
293 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
294 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
295 SWIGINTERNINLINE int SWIG_AddCast(int r) {
296 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
298 SWIGINTERNINLINE int SWIG_CheckState(int r) {
299 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
301 #else /* no cast-rank mode */
302 # define SWIG_AddCast
303 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
315 typedef void *(*swig_converter_func)(void *);
316 typedef struct swig_type_info *(*swig_dycast_func)(void **);
318 /* Structure to store inforomation on one type */
319 typedef struct swig_type_info {
320 const char *name; /* mangled name of this type */
321 const char *str; /* human readable name of this type */
322 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
323 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
324 void *clientdata; /* language specific type data */
325 int owndata; /* flag if the structure owns the clientdata */
328 /* Structure to store a type and conversion function used for casting */
329 typedef struct swig_cast_info {
330 swig_type_info *type; /* pointer to type that is equivalent to this type */
331 swig_converter_func converter; /* function to cast the void pointers */
332 struct swig_cast_info *next; /* pointer to next cast in linked list */
333 struct swig_cast_info *prev; /* pointer to the previous cast */
336 /* Structure used to store module information
337 * Each module generates one structure like this, and the runtime collects
338 * all of these structures and stores them in a circularly linked list.*/
339 typedef struct swig_module_info {
340 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
341 size_t size; /* Number of types in this module */
342 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
343 swig_type_info **type_initial; /* Array of initially generated type structures */
344 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
345 void *clientdata; /* Language specific module data */
349 Compare two type names skipping the space characters, therefore
350 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
352 Return 0 when the two name types are equivalent, as in
353 strncmp, but skipping ' '.
356 SWIG_TypeNameComp(const char *f1, const char *l1,
357 const char *f2, const char *l2) {
358 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
359 while ((*f1 == ' ') && (f1 != l1)) ++f1;
360 while ((*f2 == ' ') && (f2 != l2)) ++f2;
361 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
363 return (l1 - f1) - (l2 - f2);
367 Check type equivalence in a name list like <name1>|<name2>|...
368 Return 0 if not equal, 1 if equal
371 SWIG_TypeEquiv(const char *nb, const char *tb) {
373 const char* te = tb + strlen(tb);
375 while (!equiv && *ne) {
376 for (nb = ne; *ne; ++ne) {
377 if (*ne == '|') break;
379 equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
386 Check type equivalence in a name list like <name1>|<name2>|...
387 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
390 SWIG_TypeCompare(const char *nb, const char *tb) {
392 const char* te = tb + strlen(tb);
394 while (!equiv && *ne) {
395 for (nb = ne; *ne; ++ne) {
396 if (*ne == '|') break;
398 equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
405 /* think of this as a c++ template<> or a scheme macro */
406 #define SWIG_TypeCheck_Template(comparison, ty) \
408 swig_cast_info *iter = ty->cast; \
411 if (iter == ty->cast) return iter; \
412 /* Move iter to the top of the linked list */ \
413 iter->prev->next = iter->next; \
415 iter->next->prev = iter->prev; \
416 iter->next = ty->cast; \
418 if (ty->cast) ty->cast->prev = iter; \
430 SWIGRUNTIME swig_cast_info *
431 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
432 SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
435 /* Same as previous function, except strcmp is replaced with a pointer comparison */
436 SWIGRUNTIME swig_cast_info *
437 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
438 SWIG_TypeCheck_Template(iter->type == from, into);
442 Cast a pointer up an inheritance hierarchy
444 SWIGRUNTIMEINLINE void *
445 SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
446 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
450 Dynamic pointer casting. Down an inheritance hierarchy
452 SWIGRUNTIME swig_type_info *
453 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
454 swig_type_info *lastty = ty;
455 if (!ty || !ty->dcast) return ty;
456 while (ty && (ty->dcast)) {
457 ty = (*ty->dcast)(ptr);
464 Return the name associated with this type
466 SWIGRUNTIMEINLINE const char *
467 SWIG_TypeName(const swig_type_info *ty) {
472 Return the pretty name associated with this type,
473 that is an unmangled type name in a form presentable to the user.
475 SWIGRUNTIME const char *
476 SWIG_TypePrettyName(const swig_type_info *type) {
477 /* The "str" field contains the equivalent pretty names of the
478 type, separated by vertical-bar characters. We choose
479 to print the last name, as it is often (?) the most
481 if (!type) return NULL;
482 if (type->str != NULL) {
483 const char *last_name = type->str;
485 for (s = type->str; *s; s++)
486 if (*s == '|') last_name = s+1;
494 Set the clientdata field for a type
497 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
498 swig_cast_info *cast = ti->cast;
499 /* if (ti->clientdata == clientdata) return; */
500 ti->clientdata = clientdata;
503 if (!cast->converter) {
504 swig_type_info *tc = cast->type;
505 if (!tc->clientdata) {
506 SWIG_TypeClientData(tc, clientdata);
513 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
514 SWIG_TypeClientData(ti, clientdata);
519 Search for a swig_type_info structure only by mangled name
520 Search is a O(log #types)
522 We start searching at module start, and finish searching when start == end.
523 Note: if start == end at the beginning of the function, we go all the way around
526 SWIGRUNTIME swig_type_info *
527 SWIG_MangledTypeQueryModule(swig_module_info *start,
528 swig_module_info *end,
530 swig_module_info *iter = start;
533 register size_t l = 0;
534 register size_t r = iter->size - 1;
536 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
537 register size_t i = (l + r) >> 1;
538 const char *iname = iter->types[i]->name;
540 register int compare = strcmp(name, iname);
542 return iter->types[i];
543 } else if (compare < 0) {
549 } else if (compare > 0) {
553 break; /* should never happen */
558 } while (iter != end);
563 Search for a swig_type_info structure for either a mangled name or a human readable name.
564 It first searches the mangled names of the types, which is a O(log #types)
565 If a type is not found it then searches the human readable names, which is O(#types).
567 We start searching at module start, and finish searching when start == end.
568 Note: if start == end at the beginning of the function, we go all the way around
571 SWIGRUNTIME swig_type_info *
572 SWIG_TypeQueryModule(swig_module_info *start,
573 swig_module_info *end,
575 /* STEP 1: Search the name field using binary search */
576 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
580 /* STEP 2: If the type hasn't been found, do a complete search
581 of the str field (the human readable name) */
582 swig_module_info *iter = start;
584 register size_t i = 0;
585 for (; i < iter->size; ++i) {
586 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
587 return iter->types[i];
590 } while (iter != end);
593 /* neither found a match */
598 Pack binary data into a string
601 SWIG_PackData(char *c, void *ptr, size_t sz) {
602 static const char hex[17] = "0123456789abcdef";
603 register const unsigned char *u = (unsigned char *) ptr;
604 register const unsigned char *eu = u + sz;
605 for (; u != eu; ++u) {
606 register unsigned char uu = *u;
607 *(c++) = hex[(uu & 0xf0) >> 4];
608 *(c++) = hex[uu & 0xf];
614 Unpack binary data from a string
616 SWIGRUNTIME const char *
617 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
618 register unsigned char *u = (unsigned char *) ptr;
619 register const unsigned char *eu = u + sz;
620 for (; u != eu; ++u) {
621 register char d = *(c++);
622 register unsigned char uu;
623 if ((d >= '0') && (d <= '9'))
624 uu = ((d - '0') << 4);
625 else if ((d >= 'a') && (d <= 'f'))
626 uu = ((d - ('a'-10)) << 4);
630 if ((d >= '0') && (d <= '9'))
632 else if ((d >= 'a') && (d <= 'f'))
633 uu |= (d - ('a'-10));
642 Pack 'void *' into a string buffer.
645 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
647 if ((2*sizeof(void *) + 2) > bsz) return 0;
649 r = SWIG_PackData(r,&ptr,sizeof(void *));
650 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
655 SWIGRUNTIME const char *
656 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
658 if (strcmp(c,"NULL") == 0) {
665 return SWIG_UnpackData(++c,ptr,sizeof(void *));
669 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
671 size_t lname = (name ? strlen(name) : 0);
672 if ((2*sz + 2 + lname) > bsz) return 0;
674 r = SWIG_PackData(r,ptr,sz);
676 strncpy(r,name,lname+1);
683 SWIGRUNTIME const char *
684 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
686 if (strcmp(c,"NULL") == 0) {
693 return SWIG_UnpackData(++c,ptr,sz);
701 #define SWIG_UnknownError -1
702 #define SWIG_IOError -2
703 #define SWIG_RuntimeError -3
704 #define SWIG_IndexError -4
705 #define SWIG_TypeError -5
706 #define SWIG_DivisionByZero -6
707 #define SWIG_OverflowError -7
708 #define SWIG_SyntaxError -8
709 #define SWIG_ValueError -9
710 #define SWIG_SystemError -10
711 #define SWIG_AttributeError -11
712 #define SWIG_MemoryError -12
713 #define SWIG_NullReferenceError -13
718 /* Add PyOS_snprintf for old Pythons */
719 #if PY_VERSION_HEX < 0x02020000
720 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
721 # define PyOS_snprintf _snprintf
723 # define PyOS_snprintf snprintf
727 /* A crude PyString_FromFormat implementation for old Pythons */
728 #if PY_VERSION_HEX < 0x02020000
730 #ifndef SWIG_PYBUFFER_SIZE
731 # define SWIG_PYBUFFER_SIZE 1024
735 PyString_FromFormat(const char *fmt, ...) {
737 char buf[SWIG_PYBUFFER_SIZE * 2];
740 res = vsnprintf(buf, sizeof(buf), fmt, ap);
742 return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
746 /* Add PyObject_Del for old Pythons */
747 #if PY_VERSION_HEX < 0x01060000
748 # define PyObject_Del(op) PyMem_DEL((op))
751 # define PyObject_DEL PyObject_Del
754 /* A crude PyExc_StopIteration exception for old Pythons */
755 #if PY_VERSION_HEX < 0x02020000
756 # ifndef PyExc_StopIteration
757 # define PyExc_StopIteration PyExc_RuntimeError
759 # ifndef PyObject_GenericGetAttr
760 # define PyObject_GenericGetAttr 0
763 /* Py_NotImplemented is defined in 2.1 and up. */
764 #if PY_VERSION_HEX < 0x02010000
765 # ifndef Py_NotImplemented
766 # define Py_NotImplemented PyExc_RuntimeError
771 /* A crude PyString_AsStringAndSize implementation for old Pythons */
772 #if PY_VERSION_HEX < 0x02010000
773 # ifndef PyString_AsStringAndSize
774 # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
778 /* PySequence_Size for old Pythons */
779 #if PY_VERSION_HEX < 0x02000000
780 # ifndef PySequence_Size
781 # define PySequence_Size PySequence_Length
786 /* PyBool_FromLong for old Pythons */
787 #if PY_VERSION_HEX < 0x02030000
789 PyObject *PyBool_FromLong(long ok)
791 PyObject *result = ok ? Py_True : Py_False;
797 /* Py_ssize_t for old Pythons */
798 /* This code is as recommended by: */
799 /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
800 #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
801 typedef int Py_ssize_t;
802 # define PY_SSIZE_T_MAX INT_MAX
803 # define PY_SSIZE_T_MIN INT_MIN
806 /* -----------------------------------------------------------------------------
808 * ----------------------------------------------------------------------------- */
810 SWIGRUNTIME PyObject*
811 SWIG_Python_ErrorType(int code) {
814 case SWIG_MemoryError:
815 type = PyExc_MemoryError;
818 type = PyExc_IOError;
820 case SWIG_RuntimeError:
821 type = PyExc_RuntimeError;
823 case SWIG_IndexError:
824 type = PyExc_IndexError;
827 type = PyExc_TypeError;
829 case SWIG_DivisionByZero:
830 type = PyExc_ZeroDivisionError;
832 case SWIG_OverflowError:
833 type = PyExc_OverflowError;
835 case SWIG_SyntaxError:
836 type = PyExc_SyntaxError;
838 case SWIG_ValueError:
839 type = PyExc_ValueError;
841 case SWIG_SystemError:
842 type = PyExc_SystemError;
844 case SWIG_AttributeError:
845 type = PyExc_AttributeError;
848 type = PyExc_RuntimeError;
855 SWIG_Python_AddErrorMsg(const char* mesg)
859 PyObject *traceback = 0;
861 if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
863 PyObject *old_str = PyObject_Str(value);
866 PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
870 PyErr_Format(PyExc_RuntimeError, mesg);
876 #if defined(SWIG_PYTHON_NO_THREADS)
877 # if defined(SWIG_PYTHON_THREADS)
878 # undef SWIG_PYTHON_THREADS
881 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
882 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
883 # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
884 # define SWIG_PYTHON_USE_GIL
887 # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
888 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
889 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
891 # ifdef __cplusplus /* C++ code */
892 class SWIG_Python_Thread_Block {
894 PyGILState_STATE state;
896 void end() { if (status) { PyGILState_Release(state); status = false;} }
897 SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
898 ~SWIG_Python_Thread_Block() { end(); }
900 class SWIG_Python_Thread_Allow {
904 void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
905 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
906 ~SWIG_Python_Thread_Allow() { end(); }
908 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
909 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
910 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
911 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
913 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
914 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
915 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
916 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
918 # else /* Old thread way, not implemented, user must provide it */
919 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
920 # define SWIG_PYTHON_INITIALIZE_THREADS
922 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
923 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
925 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
926 # define SWIG_PYTHON_THREAD_END_BLOCK
928 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
929 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
931 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
932 # define SWIG_PYTHON_THREAD_END_ALLOW
935 #else /* No thread support */
936 # define SWIG_PYTHON_INITIALIZE_THREADS
937 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
938 # define SWIG_PYTHON_THREAD_END_BLOCK
939 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
940 # define SWIG_PYTHON_THREAD_END_ALLOW
943 /* -----------------------------------------------------------------------------
944 * Python API portion that goes into the runtime
945 * ----------------------------------------------------------------------------- */
954 /* -----------------------------------------------------------------------------
955 * Constant declarations
956 * ----------------------------------------------------------------------------- */
959 #define SWIG_PY_POINTER 4
960 #define SWIG_PY_BINARY 5
962 /* Constant information structure */
963 typedef struct swig_const_info {
969 swig_type_info **ptype;
980 /* -----------------------------------------------------------------------------
981 * See the LICENSE file for information on copyright, usage and redistribution
982 * of SWIG, and the README file for authors - http://www.swig.org/release.html.
986 * This file contains the runtime support for Python modules
987 * and includes code for managing global variables and pointer
990 * ----------------------------------------------------------------------------- */
992 /* Common SWIG API */
994 /* for raw pointers */
995 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
996 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
997 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
998 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags)
999 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1000 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1001 #define swig_owntype int
1003 /* for raw packed data */
1004 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1005 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1007 /* for class or struct pointers */
1008 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1009 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1011 /* for C or C++ function pointers */
1012 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1013 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0)
1015 /* for C++ member pointers, ie, member methods */
1016 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1017 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1022 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule()
1023 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1024 #define SWIG_NewClientData(obj) PySwigClientData_New(obj)
1026 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1027 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1028 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1029 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1030 #define SWIG_fail goto fail
1033 /* Runtime API implementation */
1035 /* Error manipulation */
1038 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1039 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1040 PyErr_SetObject(errtype, obj);
1042 SWIG_PYTHON_THREAD_END_BLOCK;
1046 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1047 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1048 PyErr_SetString(errtype, (char *) msg);
1049 SWIG_PYTHON_THREAD_END_BLOCK;
1052 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1054 /* Set a constant value */
1057 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1058 PyDict_SetItemString(d, (char*) name, obj);
1062 /* Append a value to the result obj */
1064 SWIGINTERN PyObject*
1065 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1066 #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1069 } else if (result == Py_None) {
1073 if (!PyList_Check(result)) {
1074 PyObject *o2 = result;
1075 result = PyList_New(1);
1076 PyList_SetItem(result, 0, o2);
1078 PyList_Append(result,obj);
1087 } else if (result == Py_None) {
1091 if (!PyTuple_Check(result)) {
1093 result = PyTuple_New(1);
1094 PyTuple_SET_ITEM(result, 0, o2);
1096 o3 = PyTuple_New(1);
1097 PyTuple_SET_ITEM(o3, 0, obj);
1099 result = PySequence_Concat(o2, o3);
1107 /* Unpack the argument tuple */
1110 SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyObject **objs)
1116 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1117 name, (min == max ? "" : "at least "), min);
1121 if (!PyTuple_Check(args)) {
1122 PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1125 register int l = PyTuple_GET_SIZE(args);
1127 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1128 name, (min == max ? "" : "at least "), min, l);
1130 } else if (l > max) {
1131 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1132 name, (min == max ? "" : "at most "), max, l);
1136 for (i = 0; i < l; ++i) {
1137 objs[i] = PyTuple_GET_ITEM(args, i);
1139 for (; l < max; ++l) {
1147 /* A functor is a function object with one single object argument */
1148 #if PY_VERSION_HEX >= 0x02020000
1149 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1151 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
1155 Helper for static pointer initialization for both C and C++ code, for example
1156 static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1159 #define SWIG_STATIC_POINTER(var) var
1161 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1164 /* -----------------------------------------------------------------------------
1165 * Pointer declarations
1166 * ----------------------------------------------------------------------------- */
1168 /* Flags for new pointer objects */
1169 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1170 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1172 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1181 /* How to access Py_None */
1182 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
1183 # ifndef SWIG_PYTHON_NO_BUILD_NONE
1184 # ifndef SWIG_PYTHON_BUILD_NONE
1185 # define SWIG_PYTHON_BUILD_NONE
1190 #ifdef SWIG_PYTHON_BUILD_NONE
1193 # define Py_None SWIG_Py_None()
1195 SWIGRUNTIMEINLINE PyObject *
1198 PyObject *none = Py_BuildValue((char*)"");
1202 SWIGRUNTIME PyObject *
1205 static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
1210 /* The python void return value */
1212 SWIGRUNTIMEINLINE PyObject *
1215 PyObject *none = Py_None;
1220 /* PySwigClientData */
1231 SWIGRUNTIMEINLINE int
1232 SWIG_Python_CheckImplicit(swig_type_info *ty)
1234 PySwigClientData *data = (PySwigClientData *)ty->clientdata;
1235 return data ? data->implicitconv : 0;
1238 SWIGRUNTIMEINLINE PyObject *
1239 SWIG_Python_ExceptionType(swig_type_info *desc) {
1240 PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0;
1241 PyObject *klass = data ? data->klass : 0;
1242 return (klass ? klass : PyExc_RuntimeError);
1246 SWIGRUNTIME PySwigClientData *
1247 PySwigClientData_New(PyObject* obj)
1252 PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData));
1253 /* the klass element */
1255 Py_INCREF(data->klass);
1256 /* the newraw method and newargs arguments used to create a new raw instance */
1257 if (PyClass_Check(obj)) {
1259 data->newargs = obj;
1262 #if (PY_VERSION_HEX < 0x02020000)
1265 data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
1268 Py_INCREF(data->newraw);
1269 data->newargs = PyTuple_New(1);
1270 PyTuple_SetItem(data->newargs, 0, obj);
1272 data->newargs = obj;
1274 Py_INCREF(data->newargs);
1276 /* the destroy method, aka as the C++ delete method */
1277 data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
1278 if (PyErr_Occurred()) {
1282 if (data->destroy) {
1284 Py_INCREF(data->destroy);
1285 flags = PyCFunction_GET_FLAGS(data->destroy);
1287 data->delargs = !(flags & (METH_O));
1294 data->implicitconv = 0;
1300 PySwigClientData_Del(PySwigClientData* data)
1302 Py_XDECREF(data->newraw);
1303 Py_XDECREF(data->newargs);
1304 Py_XDECREF(data->destroy);
1307 /* =============== PySwigObject =====================*/
1317 SWIGRUNTIME PyObject *
1318 PySwigObject_long(PySwigObject *v)
1320 return PyLong_FromVoidPtr(v->ptr);
1323 SWIGRUNTIME PyObject *
1324 PySwigObject_format(const char* fmt, PySwigObject *v)
1326 PyObject *res = NULL;
1327 PyObject *args = PyTuple_New(1);
1329 if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) {
1330 PyObject *ofmt = PyString_FromString(fmt);
1332 res = PyString_Format(ofmt,args);
1341 SWIGRUNTIME PyObject *
1342 PySwigObject_oct(PySwigObject *v)
1344 return PySwigObject_format("%o",v);
1347 SWIGRUNTIME PyObject *
1348 PySwigObject_hex(PySwigObject *v)
1350 return PySwigObject_format("%x",v);
1353 SWIGRUNTIME PyObject *
1355 PySwigObject_repr(PySwigObject *v)
1357 PySwigObject_repr(PySwigObject *v, PyObject *args)
1360 const char *name = SWIG_TypePrettyName(v->ty);
1361 PyObject *hex = PySwigObject_hex(v);
1362 PyObject *repr = PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString_AsString(hex));
1366 PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next);
1368 PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args);
1370 PyString_ConcatAndDel(&repr,nrep);
1376 PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
1379 PyObject *repr = PySwigObject_repr(v);
1381 PyObject *repr = PySwigObject_repr(v, NULL);
1384 fputs(PyString_AsString(repr), fp);
1392 SWIGRUNTIME PyObject *
1393 PySwigObject_str(PySwigObject *v)
1395 char result[SWIG_BUFFER_SIZE];
1396 return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
1397 PyString_FromString(result) : 0;
1401 PySwigObject_compare(PySwigObject *v, PySwigObject *w)
1405 return (i < j) ? -1 : ((i > j) ? 1 : 0);
1408 SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
1410 SWIGRUNTIME PyTypeObject*
1411 PySwigObject_type(void) {
1412 static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
1416 SWIGRUNTIMEINLINE int
1417 PySwigObject_Check(PyObject *op) {
1418 return ((op)->ob_type == PySwigObject_type())
1419 || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0);
1422 SWIGRUNTIME PyObject *
1423 PySwigObject_New(void *ptr, swig_type_info *ty, int own);
1426 PySwigObject_dealloc(PyObject *v)
1428 PySwigObject *sobj = (PySwigObject *) v;
1429 PyObject *next = sobj->next;
1431 swig_type_info *ty = sobj->ty;
1432 PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
1433 PyObject *destroy = data ? data->destroy : 0;
1435 /* destroy is always a VARARGS method */
1437 if (data->delargs) {
1438 /* we need to create a temporal object to carry the destroy operation */
1439 PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0);
1440 res = SWIG_Python_CallFunctor(destroy, tmp);
1443 PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1444 PyObject *mself = PyCFunction_GET_SELF(destroy);
1445 res = ((*meth)(mself, v));
1449 const char *name = SWIG_TypePrettyName(ty);
1450 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1451 printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name);
1459 SWIGRUNTIME PyObject*
1460 PySwigObject_append(PyObject* v, PyObject* next)
1462 PySwigObject *sobj = (PySwigObject *) v;
1465 if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
1468 if (!PySwigObject_Check(next)) {
1473 return SWIG_Py_Void();
1476 SWIGRUNTIME PyObject*
1478 PySwigObject_next(PyObject* v)
1480 PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1483 PySwigObject *sobj = (PySwigObject *) v;
1485 Py_INCREF(sobj->next);
1488 return SWIG_Py_Void();
1492 SWIGINTERN PyObject*
1494 PySwigObject_disown(PyObject *v)
1496 PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1499 PySwigObject *sobj = (PySwigObject *)v;
1501 return SWIG_Py_Void();
1504 SWIGINTERN PyObject*
1506 PySwigObject_acquire(PyObject *v)
1508 PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1511 PySwigObject *sobj = (PySwigObject *)v;
1512 sobj->own = SWIG_POINTER_OWN;
1513 return SWIG_Py_Void();
1516 SWIGINTERN PyObject*
1517 PySwigObject_own(PyObject *v, PyObject *args)
1520 #if (PY_VERSION_HEX < 0x02020000)
1521 if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
1523 if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
1530 PySwigObject *sobj = (PySwigObject *)v;
1531 PyObject *obj = PyBool_FromLong(sobj->own);
1534 if (PyObject_IsTrue(val)) {
1535 PySwigObject_acquire(v);
1537 PySwigObject_disown(v);
1540 if (PyObject_IsTrue(val)) {
1541 PySwigObject_acquire(v,args);
1543 PySwigObject_disown(v,args);
1553 swigobject_methods[] = {
1554 {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
1555 {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"},
1556 {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1557 {(char *)"append", (PyCFunction)PySwigObject_append, METH_O, (char *)"appends another 'this' object"},
1558 {(char *)"next", (PyCFunction)PySwigObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
1559 {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_NOARGS, (char *)"returns object representation"},
1564 swigobject_methods[] = {
1565 {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
1566 {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
1567 {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1568 {(char *)"append", (PyCFunction)PySwigObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
1569 {(char *)"next", (PyCFunction)PySwigObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
1570 {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_VARARGS, (char *)"returns object representation"},
1575 #if PY_VERSION_HEX < 0x02020000
1576 SWIGINTERN PyObject *
1577 PySwigObject_getattr(PySwigObject *sobj,char *name)
1579 return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
1583 SWIGRUNTIME PyTypeObject*
1584 _PySwigObject_type(void) {
1585 static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1587 static PyNumberMethods PySwigObject_as_number = {
1588 (binaryfunc)0, /*nb_add*/
1589 (binaryfunc)0, /*nb_subtract*/
1590 (binaryfunc)0, /*nb_multiply*/
1591 (binaryfunc)0, /*nb_divide*/
1592 (binaryfunc)0, /*nb_remainder*/
1593 (binaryfunc)0, /*nb_divmod*/
1594 (ternaryfunc)0,/*nb_power*/
1595 (unaryfunc)0, /*nb_negative*/
1596 (unaryfunc)0, /*nb_positive*/
1597 (unaryfunc)0, /*nb_absolute*/
1598 (inquiry)0, /*nb_nonzero*/
1605 (coercion)0, /*nb_coerce*/
1606 (unaryfunc)PySwigObject_long, /*nb_int*/
1607 (unaryfunc)PySwigObject_long, /*nb_long*/
1608 (unaryfunc)0, /*nb_float*/
1609 (unaryfunc)PySwigObject_oct, /*nb_oct*/
1610 (unaryfunc)PySwigObject_hex, /*nb_hex*/
1611 #if PY_VERSION_HEX >= 0x02020000
1612 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
1613 #elif PY_VERSION_HEX >= 0x02000000
1614 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
1618 static PyTypeObject pyswigobject_type;
1619 static int type_init = 0;
1621 const PyTypeObject tmp
1623 PyObject_HEAD_INIT(NULL)
1625 (char *)"PySwigObject", /* tp_name */
1626 sizeof(PySwigObject), /* tp_basicsize */
1627 0, /* tp_itemsize */
1628 (destructor)PySwigObject_dealloc, /* tp_dealloc */
1629 (printfunc)PySwigObject_print, /* tp_print */
1630 #if PY_VERSION_HEX < 0x02020000
1631 (getattrfunc)PySwigObject_getattr, /* tp_getattr */
1633 (getattrfunc)0, /* tp_getattr */
1635 (setattrfunc)0, /* tp_setattr */
1636 (cmpfunc)PySwigObject_compare, /* tp_compare */
1637 (reprfunc)PySwigObject_repr, /* tp_repr */
1638 &PySwigObject_as_number, /* tp_as_number */
1639 0, /* tp_as_sequence */
1640 0, /* tp_as_mapping */
1641 (hashfunc)0, /* tp_hash */
1642 (ternaryfunc)0, /* tp_call */
1643 (reprfunc)PySwigObject_str, /* tp_str */
1644 PyObject_GenericGetAttr, /* tp_getattro */
1645 0, /* tp_setattro */
1646 0, /* tp_as_buffer */
1647 Py_TPFLAGS_DEFAULT, /* tp_flags */
1648 swigobject_doc, /* tp_doc */
1649 0, /* tp_traverse */
1651 0, /* tp_richcompare */
1652 0, /* tp_weaklistoffset */
1653 #if PY_VERSION_HEX >= 0x02020000
1655 0, /* tp_iternext */
1656 swigobject_methods, /* tp_methods */
1661 0, /* tp_descr_get */
1662 0, /* tp_descr_set */
1663 0, /* tp_dictoffset */
1672 0, /* tp_subclasses */
1673 0, /* tp_weaklist */
1675 #if PY_VERSION_HEX >= 0x02030000
1679 0,0,0,0 /* tp_alloc -> tp_next */
1682 pyswigobject_type = tmp;
1683 pyswigobject_type.ob_type = &PyType_Type;
1686 return &pyswigobject_type;
1689 SWIGRUNTIME PyObject *
1690 PySwigObject_New(void *ptr, swig_type_info *ty, int own)
1692 PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type());
1699 return (PyObject *)sobj;
1702 /* -----------------------------------------------------------------------------
1703 * Implements a simple Swig Packed type, and use it instead of string
1704 * ----------------------------------------------------------------------------- */
1714 PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
1716 char result[SWIG_BUFFER_SIZE];
1717 fputs("<Swig Packed ", fp);
1718 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1722 fputs(v->ty->name,fp);
1727 SWIGRUNTIME PyObject *
1728 PySwigPacked_repr(PySwigPacked *v)
1730 char result[SWIG_BUFFER_SIZE];
1731 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1732 return PyString_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
1734 return PyString_FromFormat("<Swig Packed %s>", v->ty->name);
1738 SWIGRUNTIME PyObject *
1739 PySwigPacked_str(PySwigPacked *v)
1741 char result[SWIG_BUFFER_SIZE];
1742 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
1743 return PyString_FromFormat("%s%s", result, v->ty->name);
1745 return PyString_FromString(v->ty->name);
1750 PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w)
1754 int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
1755 return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
1758 SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
1760 SWIGRUNTIME PyTypeObject*
1761 PySwigPacked_type(void) {
1762 static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
1766 SWIGRUNTIMEINLINE int
1767 PySwigPacked_Check(PyObject *op) {
1768 return ((op)->ob_type == _PySwigPacked_type())
1769 || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0);
1773 PySwigPacked_dealloc(PyObject *v)
1775 if (PySwigPacked_Check(v)) {
1776 PySwigPacked *sobj = (PySwigPacked *) v;
1782 SWIGRUNTIME PyTypeObject*
1783 _PySwigPacked_type(void) {
1784 static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
1785 static PyTypeObject pyswigpacked_type;
1786 static int type_init = 0;
1788 const PyTypeObject tmp
1790 PyObject_HEAD_INIT(NULL)
1792 (char *)"PySwigPacked", /* tp_name */
1793 sizeof(PySwigPacked), /* tp_basicsize */
1794 0, /* tp_itemsize */
1795 (destructor)PySwigPacked_dealloc, /* tp_dealloc */
1796 (printfunc)PySwigPacked_print, /* tp_print */
1797 (getattrfunc)0, /* tp_getattr */
1798 (setattrfunc)0, /* tp_setattr */
1799 (cmpfunc)PySwigPacked_compare, /* tp_compare */
1800 (reprfunc)PySwigPacked_repr, /* tp_repr */
1801 0, /* tp_as_number */
1802 0, /* tp_as_sequence */
1803 0, /* tp_as_mapping */
1804 (hashfunc)0, /* tp_hash */
1805 (ternaryfunc)0, /* tp_call */
1806 (reprfunc)PySwigPacked_str, /* tp_str */
1807 PyObject_GenericGetAttr, /* tp_getattro */
1808 0, /* tp_setattro */
1809 0, /* tp_as_buffer */
1810 Py_TPFLAGS_DEFAULT, /* tp_flags */
1811 swigpacked_doc, /* tp_doc */
1812 0, /* tp_traverse */
1814 0, /* tp_richcompare */
1815 0, /* tp_weaklistoffset */
1816 #if PY_VERSION_HEX >= 0x02020000
1818 0, /* tp_iternext */
1824 0, /* tp_descr_get */
1825 0, /* tp_descr_set */
1826 0, /* tp_dictoffset */
1835 0, /* tp_subclasses */
1836 0, /* tp_weaklist */
1838 #if PY_VERSION_HEX >= 0x02030000
1842 0,0,0,0 /* tp_alloc -> tp_next */
1845 pyswigpacked_type = tmp;
1846 pyswigpacked_type.ob_type = &PyType_Type;
1849 return &pyswigpacked_type;
1852 SWIGRUNTIME PyObject *
1853 PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty)
1855 PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type());
1857 void *pack = malloc(size);
1859 memcpy(pack, ptr, size);
1864 PyObject_DEL((PyObject *) sobj);
1868 return (PyObject *) sobj;
1871 SWIGRUNTIME swig_type_info *
1872 PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
1874 if (PySwigPacked_Check(obj)) {
1875 PySwigPacked *sobj = (PySwigPacked *)obj;
1876 if (sobj->size != size) return 0;
1877 memcpy(ptr, sobj->pack, size);
1884 /* -----------------------------------------------------------------------------
1885 * pointers/data manipulation
1886 * ----------------------------------------------------------------------------- */
1888 SWIGRUNTIMEINLINE PyObject *
1891 return PyString_FromString("this");
1894 SWIGRUNTIME PyObject *
1897 static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
1901 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
1903 SWIGRUNTIME PySwigObject *
1904 SWIG_Python_GetSwigThis(PyObject *pyobj)
1906 if (PySwigObject_Check(pyobj)) {
1907 return (PySwigObject *) pyobj;
1910 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
1911 if (PyInstance_Check(pyobj)) {
1912 obj = _PyInstance_Lookup(pyobj, SWIG_This());
1914 PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
1915 if (dictptr != NULL) {
1916 PyObject *dict = *dictptr;
1917 obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
1919 #ifdef PyWeakref_CheckProxy
1920 if (PyWeakref_CheckProxy(pyobj)) {
1921 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
1922 return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
1925 obj = PyObject_GetAttr(pyobj,SWIG_This());
1929 if (PyErr_Occurred()) PyErr_Clear();
1935 obj = PyObject_GetAttr(pyobj,SWIG_This());
1939 if (PyErr_Occurred()) PyErr_Clear();
1943 if (obj && !PySwigObject_Check(obj)) {
1944 /* a PyObject is called 'this', try to get the 'real this'
1945 PySwigObject from it */
1946 return SWIG_Python_GetSwigThis(obj);
1948 return (PySwigObject *)obj;
1952 /* Acquire a pointer value */
1955 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
1957 PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
1959 int oldown = sobj->own;
1967 /* Convert a pointer value */
1970 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
1971 if (!obj) return SWIG_ERROR;
1972 if (obj == Py_None) {
1976 PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
1978 void *vptr = sobj->ptr;
1980 swig_type_info *to = sobj->ty;
1982 /* no type cast needed */
1983 if (ptr) *ptr = vptr;
1986 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
1988 sobj = (PySwigObject *)sobj->next;
1990 if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
1995 if (ptr) *ptr = vptr;
2000 if (own) *own = sobj->own;
2001 if (flags & SWIG_POINTER_DISOWN) {
2006 int res = SWIG_ERROR;
2007 if (flags & SWIG_POINTER_IMPLICIT_CONV) {
2008 PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
2009 if (data && !data->implicitconv) {
2010 PyObject *klass = data->klass;
2013 data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2014 impconv = SWIG_Python_CallFunctor(klass, obj);
2015 data->implicitconv = 0;
2016 if (PyErr_Occurred()) {
2021 PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv);
2024 res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2025 if (SWIG_IsOK(res)) {
2028 /* transfer the ownership to 'ptr' */
2030 res = SWIG_AddCast(res);
2031 res = SWIG_AddNewMask(res);
2033 res = SWIG_AddCast(res);
2047 /* Convert a function ptr value */
2050 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2051 if (!PyCFunction_Check(obj)) {
2052 return SWIG_ConvertPtr(obj, ptr, ty, 0);
2056 /* here we get the method pointer for callbacks */
2057 const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2058 const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2060 desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2061 if (!desc) return SWIG_ERROR;
2064 swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
2065 if (!tc) return SWIG_ERROR;
2066 *ptr = SWIG_TypeCast(tc,vptr);
2074 /* Convert a packed value value */
2077 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2078 swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz);
2079 if (!to) return SWIG_ERROR;
2082 /* check type cast? */
2083 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2084 if (!tc) return SWIG_ERROR;
2090 /* -----------------------------------------------------------------------------
2091 * Create a new pointer object
2092 * ----------------------------------------------------------------------------- */
2095 Create a new instance object, whitout calling __init__, and set the
2099 SWIGRUNTIME PyObject*
2100 SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this)
2102 #if (PY_VERSION_HEX >= 0x02020000)
2104 PyObject *newraw = data->newraw;
2106 inst = PyObject_Call(newraw, data->newargs, NULL);
2108 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2109 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2110 if (dictptr != NULL) {
2111 PyObject *dict = *dictptr;
2113 dict = PyDict_New();
2115 PyDict_SetItem(dict, SWIG_This(), swig_this);
2119 PyObject *key = SWIG_This();
2120 PyObject_SetAttr(inst, key, swig_this);
2124 PyObject *dict = PyDict_New();
2125 PyDict_SetItem(dict, SWIG_This(), swig_this);
2126 inst = PyInstance_NewRaw(data->newargs, dict);
2131 #if (PY_VERSION_HEX >= 0x02010000)
2133 PyObject *dict = PyDict_New();
2134 PyDict_SetItem(dict, SWIG_This(), swig_this);
2135 inst = PyInstance_NewRaw(data->newargs, dict);
2137 return (PyObject *) inst;
2139 PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
2143 inst->in_class = (PyClassObject *)data->newargs;
2144 Py_INCREF(inst->in_class);
2145 inst->in_dict = PyDict_New();
2146 if (inst->in_dict == NULL) {
2150 #ifdef Py_TPFLAGS_HAVE_WEAKREFS
2151 inst->in_weakreflist = NULL;
2153 #ifdef Py_TPFLAGS_GC
2154 PyObject_GC_Init(inst);
2156 PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
2157 return (PyObject *) inst;
2163 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2166 #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2167 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2168 if (dictptr != NULL) {
2171 dict = PyDict_New();
2174 PyDict_SetItem(dict, SWIG_This(), swig_this);
2178 dict = PyObject_GetAttrString(inst, (char*)"__dict__");
2179 PyDict_SetItem(dict, SWIG_This(), swig_this);
2184 SWIGINTERN PyObject *
2185 SWIG_Python_InitShadowInstance(PyObject *args) {
2187 if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
2190 PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2192 PySwigObject_append((PyObject*) sthis, obj[1]);
2194 SWIG_Python_SetSwigThis(obj[0], obj[1]);
2196 return SWIG_Py_Void();
2200 /* Create a new pointer object */
2202 SWIGRUNTIME PyObject *
2203 SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
2205 return SWIG_Py_Void();
2207 int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2208 PyObject *robj = PySwigObject_New(ptr, type, own);
2209 PySwigClientData *clientdata = type ? (PySwigClientData *)(type->clientdata) : 0;
2210 if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2211 PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2221 /* Create a new packed object */
2223 SWIGRUNTIMEINLINE PyObject *
2224 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2225 return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2228 /* -----------------------------------------------------------------------------*
2230 * -----------------------------------------------------------------------------*/
2232 #ifdef SWIG_LINK_RUNTIME
2233 void *SWIG_ReturnGlobalTypeList(void *);
2236 SWIGRUNTIME swig_module_info *
2237 SWIG_Python_GetModule(void) {
2238 static void *type_pointer = (void *)0;
2239 /* first check if module already created */
2240 if (!type_pointer) {
2241 #ifdef SWIG_LINK_RUNTIME
2242 type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2244 type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2245 (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
2246 if (PyErr_Occurred()) {
2248 type_pointer = (void *)0;
2252 return (swig_module_info *) type_pointer;
2255 #if PY_MAJOR_VERSION < 2
2256 /* PyModule_AddObject function was introduced in Python 2.0. The following function
2257 is copied out of Python/modsupport.c in python version 2.3.4 */
2259 PyModule_AddObject(PyObject *m, char *name, PyObject *o)
2262 if (!PyModule_Check(m)) {
2263 PyErr_SetString(PyExc_TypeError,
2264 "PyModule_AddObject() needs module as first arg");
2268 PyErr_SetString(PyExc_TypeError,
2269 "PyModule_AddObject() needs non-NULL value");
2273 dict = PyModule_GetDict(m);
2275 /* Internal error -- modules must have a dict! */
2276 PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
2277 PyModule_GetName(m));
2280 if (PyDict_SetItemString(dict, name, o))
2288 SWIG_Python_DestroyModule(void *vptr)
2290 swig_module_info *swig_module = (swig_module_info *) vptr;
2291 swig_type_info **types = swig_module->types;
2293 for (i =0; i < swig_module->size; ++i) {
2294 swig_type_info *ty = types[i];
2296 PySwigClientData *data = (PySwigClientData *) ty->clientdata;
2297 if (data) PySwigClientData_Del(data);
2300 Py_DECREF(SWIG_This());
2304 SWIG_Python_SetModule(swig_module_info *swig_module) {
2305 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
2307 PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2308 swig_empty_runtime_method_table);
2309 PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
2310 if (pointer && module) {
2311 PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
2313 Py_XDECREF(pointer);
2317 /* The python cached type query */
2318 SWIGRUNTIME PyObject *
2319 SWIG_Python_TypeCache(void) {
2320 static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2324 SWIGRUNTIME swig_type_info *
2325 SWIG_Python_TypeQuery(const char *type)
2327 PyObject *cache = SWIG_Python_TypeCache();
2328 PyObject *key = PyString_FromString(type);
2329 PyObject *obj = PyDict_GetItem(cache, key);
2330 swig_type_info *descriptor;
2332 descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
2334 swig_module_info *swig_module = SWIG_Python_GetModule();
2335 descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2337 obj = PyCObject_FromVoidPtr(descriptor, NULL);
2338 PyDict_SetItem(cache, key, obj);
2347 For backward compatibility only
2349 #define SWIG_POINTER_EXCEPTION 0
2350 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2351 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2354 SWIG_Python_AddErrMesg(const char* mesg, int infront)
2356 if (PyErr_Occurred()) {
2358 PyObject *value = 0;
2359 PyObject *traceback = 0;
2360 PyErr_Fetch(&type, &value, &traceback);
2362 PyObject *old_str = PyObject_Str(value);
2366 PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str));
2368 PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
2379 SWIG_Python_ArgFail(int argnum)
2381 if (PyErr_Occurred()) {
2382 /* add information about failing argument */
2384 PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2385 return SWIG_Python_AddErrMesg(mesg, 1);
2391 SWIGRUNTIMEINLINE const char *
2392 PySwigObject_GetDesc(PyObject *self)
2394 PySwigObject *v = (PySwigObject *)self;
2395 swig_type_info *ty = v ? v->ty : 0;
2396 return ty ? ty->str : (char*)"";
2400 SWIG_Python_TypeError(const char *type, PyObject *obj)
2403 #if defined(SWIG_COBJECT_TYPES)
2404 if (obj && PySwigObject_Check(obj)) {
2405 const char *otype = (const char *) PySwigObject_GetDesc(obj);
2407 PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received",
2414 const char *otype = (obj ? obj->ob_type->tp_name : 0);
2416 PyObject *str = PyObject_Str(obj);
2417 const char *cstr = str ? PyString_AsString(str) : 0;
2419 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2422 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2429 PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2431 PyErr_Format(PyExc_TypeError, "unexpected type is received");
2436 /* Convert a pointer value, signal an exception on a type mismatch */
2438 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
2440 if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2442 if (flags & SWIG_POINTER_EXCEPTION) {
2443 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2444 SWIG_Python_ArgFail(argnum);
2460 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2462 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2466 /* define the PyAPI_FUNC macro if it doesn't exist, for example with Python
2467 version below 2.3... But not really tested... */
2469 # define PyAPI_FUNC(RTYPE) RTYPE
2472 /* remove the PyInt_AS_LONG if defined, as this cause problems on RedHat */
2473 #ifdef PyInt_AS_LONG
2474 #undef PyInt_AS_LONG
2477 /* wrapper to the better function PyInt_AsLong, removing problems
2478 with RedHat (I hope) */
2479 static PyAPI_FUNC(long) PyInt_AS_LONG (PyObject *obj) {
2480 return PyInt_AsLong (obj);
2483 /* remove the PyFloat_AS_DOUBLE if defined, to prevent errors */
2484 #ifdef PyFloat_AS_DOUBLE
2485 #undef PyFloat_AS_DOUBLE
2488 /* wrapper to the better function PyFloat_AS_DOUBLE, to prevent errors */
2489 static PyAPI_FUNC(double) PyFloat_AS_DOUBLE (PyObject *obj) {
2490 return PyFloat_AsDouble (obj);
2494 #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
2497 /* -------- TYPES TABLE (BEGIN) -------- */
2499 #define SWIGTYPE_p_Cv32suf swig_types[0]
2500 #define SWIGTYPE_p_Cv64suf swig_types[1]
2501 #define SWIGTYPE_p_CvAttrList swig_types[2]
2502 #define SWIGTYPE_p_CvAvgComp swig_types[3]
2503 #define SWIGTYPE_p_CvBox2D swig_types[4]
2504 #define SWIGTYPE_p_CvCapture swig_types[5]
2505 #define SWIGTYPE_p_CvChain swig_types[6]
2506 #define SWIGTYPE_p_CvChainPtReader swig_types[7]
2507 #define SWIGTYPE_p_CvConDensation swig_types[8]
2508 #define SWIGTYPE_p_CvConnectedComp swig_types[9]
2509 #define SWIGTYPE_p_CvContour swig_types[10]
2510 #define SWIGTYPE_p_CvContourTree swig_types[11]
2511 #define SWIGTYPE_p_CvConvexityDefect swig_types[12]
2512 #define SWIGTYPE_p_CvFileNode swig_types[13]
2513 #define SWIGTYPE_p_CvFileStorage swig_types[14]
2514 #define SWIGTYPE_p_CvFilter swig_types[15]
2515 #define SWIGTYPE_p_CvFont swig_types[16]
2516 #define SWIGTYPE_p_CvGenericHash swig_types[17]
2517 #define SWIGTYPE_p_CvGraph swig_types[18]
2518 #define SWIGTYPE_p_CvGraphEdge swig_types[19]
2519 #define SWIGTYPE_p_CvGraphScanner swig_types[20]
2520 #define SWIGTYPE_p_CvGraphVtx swig_types[21]
2521 #define SWIGTYPE_p_CvGraphVtx2D swig_types[22]
2522 #define SWIGTYPE_p_CvHaarClassifier swig_types[23]
2523 #define SWIGTYPE_p_CvHaarClassifierCascade swig_types[24]
2524 #define SWIGTYPE_p_CvHaarFeature swig_types[25]
2525 #define SWIGTYPE_p_CvHaarStageClassifier swig_types[26]
2526 #define SWIGTYPE_p_CvHidHaarClassifierCascade swig_types[27]
2527 #define SWIGTYPE_p_CvHistogram swig_types[28]
2528 #define SWIGTYPE_p_CvHuMoments swig_types[29]
2529 #define SWIGTYPE_p_CvKalman swig_types[30]
2530 #define SWIGTYPE_p_CvLineIterator swig_types[31]
2531 #define SWIGTYPE_p_CvMat swig_types[32]
2532 #define SWIGTYPE_p_CvMatND swig_types[33]
2533 #define SWIGTYPE_p_CvMatrix3 swig_types[34]
2534 #define SWIGTYPE_p_CvMemBlock swig_types[35]
2535 #define SWIGTYPE_p_CvMemStorage swig_types[36]
2536 #define SWIGTYPE_p_CvMemStoragePos swig_types[37]
2537 #define SWIGTYPE_p_CvModuleInfo swig_types[38]
2538 #define SWIGTYPE_p_CvMoments swig_types[39]
2539 #define SWIGTYPE_p_CvNArrayIterator swig_types[40]
2540 #define SWIGTYPE_p_CvNextEdgeType swig_types[41]
2541 #define SWIGTYPE_p_CvPOSITObject swig_types[42]
2542 #define SWIGTYPE_p_CvPluginFuncInfo swig_types[43]
2543 #define SWIGTYPE_p_CvPoint swig_types[44]
2544 #define SWIGTYPE_p_CvPoint2D32f swig_types[45]
2545 #define SWIGTYPE_p_CvPoint2D64f swig_types[46]
2546 #define SWIGTYPE_p_CvPoint3D32f swig_types[47]
2547 #define SWIGTYPE_p_CvPoint3D64f swig_types[48]
2548 #define SWIGTYPE_p_CvQuadEdge2D swig_types[49]
2549 #define SWIGTYPE_p_CvRNG_Wrapper swig_types[50]
2550 #define SWIGTYPE_p_CvRect swig_types[51]
2551 #define SWIGTYPE_p_CvScalar swig_types[52]
2552 #define SWIGTYPE_p_CvSeq swig_types[53]
2553 #define SWIGTYPE_p_CvSeqBlock swig_types[54]
2554 #define SWIGTYPE_p_CvSeqReader swig_types[55]
2555 #define SWIGTYPE_p_CvSeqWriter swig_types[56]
2556 #define SWIGTYPE_p_CvSet swig_types[57]
2557 #define SWIGTYPE_p_CvSetElem swig_types[58]
2558 #define SWIGTYPE_p_CvSize swig_types[59]
2559 #define SWIGTYPE_p_CvSize2D32f swig_types[60]
2560 #define SWIGTYPE_p_CvSlice swig_types[61]
2561 #define SWIGTYPE_p_CvSparseMat swig_types[62]
2562 #define SWIGTYPE_p_CvSparseMatIterator swig_types[63]
2563 #define SWIGTYPE_p_CvSparseNode swig_types[64]
2564 #define SWIGTYPE_p_CvString swig_types[65]
2565 #define SWIGTYPE_p_CvStringHashNode swig_types[66]
2566 #define SWIGTYPE_p_CvSubdiv2D swig_types[67]
2567 #define SWIGTYPE_p_CvSubdiv2DEdge_Wrapper swig_types[68]
2568 #define SWIGTYPE_p_CvSubdiv2DPoint swig_types[69]
2569 #define SWIGTYPE_p_CvSubdiv2DPointLocation swig_types[70]
2570 #define SWIGTYPE_p_CvTermCriteria swig_types[71]
2571 #define SWIGTYPE_p_CvTreeNodeIterator swig_types[72]
2572 #define SWIGTYPE_p_CvTypeInfo swig_types[73]
2573 #define SWIGTYPE_p_CvTypedSeqTCvConnectedComp_t swig_types[74]
2574 #define SWIGTYPE_p_CvTypedSeqTCvPoint2D32f_t swig_types[75]
2575 #define SWIGTYPE_p_CvTypedSeqTCvPoint_t swig_types[76]
2576 #define SWIGTYPE_p_CvTypedSeqTCvQuadEdge2D_t swig_types[77]
2577 #define SWIGTYPE_p_CvTypedSeqTCvRect_t swig_types[78]
2578 #define SWIGTYPE_p_CvTypedSeqTCvSeq_p_t swig_types[79]
2579 #define SWIGTYPE_p_CvTypedSeqTCvTupleTCvPoint_2_t_t swig_types[80]
2580 #define SWIGTYPE_p_CvTypedSeqTCvTupleTfloat_2_t_t swig_types[81]
2581 #define SWIGTYPE_p_CvTypedSeqTCvTupleTfloat_3_t_t swig_types[82]
2582 #define SWIGTYPE_p_CvVideoWriter swig_types[83]
2583 #define SWIGTYPE_p_CvvImage swig_types[84]
2584 #define SWIGTYPE_p__IplConvKernel swig_types[85]
2585 #define SWIGTYPE_p__IplConvKernelFP swig_types[86]
2586 #define SWIGTYPE_p__IplImage swig_types[87]
2587 #define SWIGTYPE_p__IplROI swig_types[88]
2588 #define SWIGTYPE_p__IplTileInfo swig_types[89]
2589 #define SWIGTYPE_p_allocator_type swig_types[90]
2590 #define SWIGTYPE_p_char swig_types[91]
2591 #define SWIGTYPE_p_difference_type swig_types[92]
2592 #define SWIGTYPE_p_f_int__void swig_types[93]
2593 #define SWIGTYPE_p_f_int_int_int_int_p_void__void swig_types[94]
2594 #define SWIGTYPE_p_int swig_types[95]
2595 #define SWIGTYPE_p_long_long swig_types[96]
2596 #define SWIGTYPE_p_p_char swig_types[97]
2597 #define SWIGTYPE_p_size_t swig_types[98]
2598 #define SWIGTYPE_p_size_type swig_types[99]
2599 #define SWIGTYPE_p_unsigned_char swig_types[100]
2600 #define SWIGTYPE_p_unsigned_long_long swig_types[101]
2601 #define SWIGTYPE_p_unsigned_short swig_types[102]
2602 #define SWIGTYPE_p_value_type swig_types[103]
2603 #define SWIGTYPE_p_void swig_types[104]
2604 static swig_type_info *swig_types[106];
2605 static swig_module_info swig_module = {swig_types, 105, 0, 0, 0, 0};
2606 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2607 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2609 /* -------- TYPES TABLE (END) -------- */
2611 #if (PY_VERSION_HEX <= 0x02000000)
2612 # if !defined(SWIG_PYTHON_CLASSIC)
2613 # error "This python version requires swig to be run with the '-classic' option"
2617 /*-----------------------------------------------
2618 @(target):= _highgui.so
2619 ------------------------------------------------*/
2620 #define SWIG_init init_highgui
2622 #define SWIG_name "_highgui"
2624 #define SWIGVERSION 0x010331
2625 #define SWIG_VERSION SWIGVERSION
2628 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
2629 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
2632 #include <stdexcept>
2636 class PyObject_ptr {
2641 PyObject_ptr() :_obj(0)
2645 PyObject_ptr(const PyObject_ptr& item) : _obj(item._obj)
2650 PyObject_ptr(PyObject *obj, bool initial_ref = true) :_obj(obj)
2652 if (initial_ref) Py_XINCREF(_obj);
2655 PyObject_ptr & operator=(const PyObject_ptr& item)
2657 Py_XINCREF(item._obj);
2668 operator PyObject *() const
2673 PyObject *operator->() const
2682 struct PyObject_var : PyObject_ptr {
2683 PyObject_var(PyObject* obj = 0) : PyObject_ptr(obj, false) { }
2685 PyObject_var & operator = (PyObject* obj)
2695 #include <cxtypes.h>
2697 #include <highgui.h>
2698 #include "pyhelpers.h"
2699 #include "pycvseq.hpp"
2703 static CvArr * PyObject_to_CvArr(PyObject * obj, bool * freearg);
2704 static CvArr * PySequence_to_CvArr( PyObject * obj );
2706 // convert a python sequence/array/list object into a c-array
2707 #define PyObject_AsArrayImpl(func, ctype, ptype) \
2708 int func(PyObject * obj, ctype * array, int len){ \
2709 void * mat_vptr=NULL; \
2710 void * im_vptr=NULL; \
2711 if(PyNumber_Check(obj)){ \
2712 memset( array, 0, sizeof(ctype)*len ); \
2713 array[0] = PyObject_As##ptype( obj ); \
2715 else if(PyList_Check(obj) || PyTuple_Check(obj)){ \
2716 int seqsize = PySequence_Size(obj); \
2717 for(int i=0; i<len && i<seqsize; i++){ \
2719 array[i] = PyObject_As##ptype( PySequence_GetItem(obj, i) ); \
2726 else if( SWIG_ConvertPtr(obj, &mat_vptr, SWIGTYPE_p_CvMat, 0)!=-1 || \
2727 SWIG_ConvertPtr(obj, &im_vptr, SWIGTYPE_p__IplImage, 0)!=-1) \
2729 CvMat * mat = (CvMat *) mat_vptr; \
2731 if(im_vptr) mat = cvGetMat(im_vptr, &stub); \
2732 if( mat->rows!=1 && mat->cols!=1 ){ \
2733 PyErr_SetString( PyExc_TypeError, \
2734 "PyObject_As*Array: CvArr must be row or column vector" ); \
2737 if( mat->rows==1 && mat->cols==1 ){ \
2739 if( len!=CV_MAT_CN(mat->type) ){ \
2740 PyErr_SetString( PyExc_TypeError, \
2741 "PyObject_As*Array: CvArr channels != length" ); \
2744 val = cvGet1D(mat, 0); \
2745 for(int i=0; i<len; i++){ \
2746 array[i] = (ctype) val.val[i]; \
2750 mat = cvReshape(mat, &stub, -1, mat->rows*mat->cols); \
2751 if( mat->rows != len ){ \
2752 PyErr_SetString( PyExc_TypeError, \
2753 "PyObject_As*Array: CvArr rows or cols must equal length" ); \
2756 for(int i=0; i<len; i++){ \
2757 CvScalar val = cvGet1D(mat, i); \
2758 array[i] = (ctype) val.val[0]; \
2763 PyErr_SetString( PyExc_TypeError, \
2764 "PyObject_As*Array: Expected a number, sequence or CvArr" ); \
2770 PyObject_AsArrayImpl( PyObject_AsFloatArray, float, Double );
2771 PyObject_AsArrayImpl( PyObject_AsDoubleArray, double, Double );
2772 PyObject_AsArrayImpl( PyObject_AsLongArray, int, Long );
2774 static CvPoint PyObject_to_CvPoint(PyObject * obj){
2777 CvPoint2D32f * ptr2D32f;
2780 if( SWIG_ConvertPtr(obj, (void**)&ptr, SWIGTYPE_p_CvPoint, 0) != -1) {
2783 if( SWIG_ConvertPtr(obj, (void**)&ptr2D32f, SWIGTYPE_p_CvPoint2D32f, 0) != -1) {
2784 return cvPointFrom32f( *ptr2D32f );
2786 if( SWIG_ConvertPtr(obj, (void**)&scalar, SWIGTYPE_p_CvScalar, 0) != -1) {
2787 return cvPointFrom32f(cvPoint2D32f( scalar->val[0], scalar->val[1] ));
2789 if(PyObject_AsLongArray(obj, (int *) &val, 2) != -1){
2793 PyErr_SetString( PyExc_TypeError, "could not convert to CvPoint");
2794 return cvPoint(0,0);
2797 static CvPoint2D32f PyObject_to_CvPoint2D32f(PyObject * obj){
2799 CvPoint2D32f *ptr2D32f;
2802 if( SWIG_ConvertPtr(obj, (void**)&ptr2D32f, SWIGTYPE_p_CvPoint2D32f, 0) != -1) {
2805 if( SWIG_ConvertPtr(obj, (void**)&ptr, SWIGTYPE_p_CvPoint, 0) != -1) {
2806 return cvPointTo32f(*ptr);
2808 if( SWIG_ConvertPtr(obj, (void**)&scalar, SWIGTYPE_p_CvScalar, 0) != -1) {
2809 return cvPoint2D32f( scalar->val[0], scalar->val[1] );
2811 if(PyObject_AsFloatArray(obj, (float *) &val, 2) != -1){
2814 PyErr_SetString(PyExc_TypeError, "could not convert to CvPoint2D32f");
2815 return cvPoint2D32f(0,0);
2818 static CvScalar PyObject_to_CvScalar(PyObject * obj){
2821 CvPoint2D32f *ptr2D32f;
2824 if( SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvScalar, 0 ) != -1)
2826 ptr = (CvScalar *) vptr;
2829 if( SWIG_ConvertPtr(obj, (void**)&ptr2D32f, SWIGTYPE_p_CvPoint2D32f, 0) != -1) {
2830 return cvScalar(ptr2D32f->x, ptr2D32f->y);
2832 if( SWIG_ConvertPtr(obj, (void**)&pt_ptr, SWIGTYPE_p_CvPoint, 0) != -1) {
2833 return cvScalar(pt_ptr->x, pt_ptr->y);
2835 if(PyObject_AsDoubleArray(obj, val.val, 4)!=-1){
2838 return cvScalar(-1,-1,-1,-1);
2841 /* if python sequence type, convert to CvMat or CvMatND */
2842 static CvArr * PyObject_to_CvArr(PyObject * obj, bool * freearg){
2846 // check if OpenCV type
2847 if( PySwigObject_Check(obj) ){
2848 SWIG_ConvertPtr(obj, &cvarr, 0, SWIG_POINTER_EXCEPTION);
2850 else if(PyList_Check(obj) || PyTuple_Check(obj)){
2851 cvarr = PySequence_to_CvArr( obj );
2852 *freearg = (cvarr != NULL);
2854 else if(PyLong_Check(obj) && PyLong_AsLong(obj)==0){
2858 SWIG_ConvertPtr(obj, (void**)&cvarr, 0, SWIG_POINTER_EXCEPTION);
2863 static int PyObject_GetElemType(PyObject * obj){
2865 if(SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvPoint, 0) != -1) return CV_32SC2;
2866 if(SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvSize, 0) != -1) return CV_32SC2;
2867 if(SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvRect, 0) != -1) return CV_32SC4;
2868 if(SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvSize2D32f, 0) != -1) return CV_32FC2;
2869 if(SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvPoint2D32f, 0) != -1) return CV_32FC2;
2870 if(SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvPoint3D32f, 0) != -1) return CV_32FC3;
2871 if(SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvPoint2D64f, 0) != -1) return CV_64FC2;
2872 if(SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvPoint3D64f, 0) != -1) return CV_64FC3;
2873 if(SWIG_ConvertPtr(obj, &vptr, SWIGTYPE_p_CvScalar, 0) != -1) return CV_64FC4;
2874 if(PyTuple_Check(obj) || PyList_Check(obj)) return CV_MAKE_TYPE(CV_32F, PySequence_Size( obj ));
2875 if(PyLong_Check(obj)) return CV_32S;
2879 // Would like this to convert Python lists to CvMat
2880 // Also lists of CvPoints, CvScalars, CvMats? etc
2881 static CvArr * PySequence_to_CvArr( PyObject * obj ){
2882 int dims[CV_MAX_DIM] = {1,1,1};
2887 // figure out dimensions
2889 (PyTuple_Check(item) || PyList_Check(item));
2890 item = PySequence_GetItem(item, 0))
2892 dims[ndim] = PySequence_Size( item );
2898 PyErr_SetString(PyExc_TypeError, "Cannot convert an empty python object to a CvArr");
2902 cvtype = PyObject_GetElemType(item);
2903 // collapse last dim into NCH if we found a single channel, but the last dim is <=3
2904 if(CV_MAT_CN(cvtype)==1 && dims[ndim-1]>1 && dims[ndim-1]<4){
2905 cvtype=CV_MAKE_TYPE(cvtype, dims[ndim-1]);
2911 PyErr_SetString(PyExc_TypeError, "Could not determine OpenCV element type of Python sequence");
2917 CvMat *m = cvCreateMat(dims[0], dims[1], cvtype);
2918 for(int i=0; i<dims[0]; i++){
2919 PyObject * rowobj = PySequence_GetItem(obj, i);
2921 // double check size
2922 assert((PyTuple_Check(rowobj) || PyList_Check(rowobj)) &&
2923 PySequence_Size(rowobj) == dims[1]);
2925 for(int j=0; j<dims[1]; j++){
2926 PyObject * colobj = PySequence_GetItem(rowobj, j);
2927 cvSet2D( m, i, j, PyObject_to_CvScalar( colobj ) );
2931 cvSet1D(m, i, PyObject_to_CvScalar( rowobj ) );
2938 PyErr_SetString(PyExc_TypeError, "Cannot convert Python Object to CvArr -- ndim > 3");
2945 class CvRNG_Wrapper {
2949 CvRNG_Wrapper( const CvRNG & val ) :
2953 CvRNG * ptr() { return &m_val; }
2954 CvRNG & ref() { return m_val; }
2955 bool operator==(const CvRNG_Wrapper & x){
2956 return m_val==x.m_val;
2958 bool operator!=(const CvRNG_Wrapper & x){
2959 return m_val!=x.m_val;
2965 SWIG_AsVal_double (PyObject *obj, double *val)
2967 int res = SWIG_TypeError;
2968 if (PyFloat_Check(obj)) {
2969 if (val) *val = PyFloat_AsDouble(obj);
2971 } else if (PyInt_Check(obj)) {
2972 if (val) *val = PyInt_AsLong(obj);
2974 } else if (PyLong_Check(obj)) {
2975 double v = PyLong_AsDouble(obj);
2976 if (!PyErr_Occurred()) {
2983 #ifdef SWIG_PYTHON_CAST_MODE
2986 double d = PyFloat_AsDouble(obj);
2987 if (!PyErr_Occurred()) {
2989 return SWIG_AddCast(SWIG_OK);
2994 long v = PyLong_AsLong(obj);
2995 if (!PyErr_Occurred()) {
2997 return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3014 SWIGINTERNINLINE int
3015 SWIG_CanCastAsInteger(double *d, double min, double max) {
3017 if ((min <= x && x <= max)) {
3018 double fx = floor(x);
3019 double cx = ceil(x);
3020 double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3021 if ((errno == EDOM) || (errno == ERANGE)) {
3024 double summ, reps, diff;
3027 } else if (rd > x) {
3034 if (reps < 8*DBL_EPSILON) {
3045 SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
3047 if (PyInt_Check(obj)) {
3048 long v = PyInt_AsLong(obj);
3053 return SWIG_OverflowError;
3055 } else if (PyLong_Check(obj)) {
3056 unsigned long v = PyLong_AsUnsignedLong(obj);
3057 if (!PyErr_Occurred()) {
3064 #ifdef SWIG_PYTHON_CAST_MODE
3067 unsigned long v = PyLong_AsUnsignedLong(obj);
3068 if (!PyErr_Occurred()) {
3070 return SWIG_AddCast(SWIG_OK);
3076 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3077 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
3078 if (val) *val = (unsigned long)(d);
3084 return SWIG_TypeError;
3090 # define LLONG_MIN LONG_LONG_MIN
3093 # define LLONG_MAX LONG_LONG_MAX
3096 # define ULLONG_MAX ULONG_LONG_MAX
3101 SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val)
3103 int res = SWIG_TypeError;
3104 if (PyLong_Check(obj)) {
3105 unsigned long long v = PyLong_AsUnsignedLongLong(obj);
3106 if (!PyErr_Occurred()) {
3114 res = SWIG_AsVal_unsigned_SS_long (obj,&v);
3115 if (SWIG_IsOK(res)) {
3120 #ifdef SWIG_PYTHON_CAST_MODE
3122 const double mant_max = 1LL << DBL_MANT_DIG;
3124 res = SWIG_AsVal_double (obj,&d);
3125 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
3126 if (val) *val = (unsigned long long)(d);
3127 return SWIG_AddCast(res);
3129 res = SWIG_TypeError;
3136 SWIGINTERNINLINE PyObject*
3137 SWIG_From_bool (bool value)
3139 return PyBool_FromLong(value ? 1 : 0);
3144 class CvSubdiv2DEdge_Wrapper {
3146 CvSubdiv2DEdge m_val;
3148 CvSubdiv2DEdge_Wrapper( const CvSubdiv2DEdge & val ) :
3152 CvSubdiv2DEdge * ptr() { return &m_val; }
3153 CvSubdiv2DEdge & ref() { return m_val; }
3154 bool operator==(const CvSubdiv2DEdge_Wrapper & x){
3155 return m_val==x.m_val;
3157 bool operator!=(const CvSubdiv2DEdge_Wrapper & x){
3158 return m_val!=x.m_val;
3163 SWIGINTERNINLINE int
3164 SWIG_AsVal_size_t (PyObject * obj, size_t *val)
3167 int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
3168 if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
3173 /* This encapsulates the python callback and user_data for mouse callback */
3174 struct PyCvMouseCBData {
3178 /* This encapsulates the python callback and user_data for mouse callback */
3179 /* C helper function which is responsible for calling
3180 the Python real trackbar callback function */
3181 static void icvPyOnMouse (int event, int x, int y,
3182 int flags, PyCvMouseCBData * param) {
3184 /* Must ensure this thread has a lock on the interpreter */
3185 PyGILState_STATE state = PyGILState_Ensure();
3189 /* the argument of the callback ready to be passed to Python code */
3190 PyObject *arg1 = PyInt_FromLong (event);
3191 PyObject *arg2 = PyInt_FromLong (x);
3192 PyObject *arg3 = PyInt_FromLong (y);
3193 PyObject *arg4 = PyInt_FromLong (flags);
3194 PyObject *arg5 = (PyObject *)param->user_data; // assume this is already a PyObject
3196 /* build the tuple for calling the Python callback */
3197 PyObject *arglist = Py_BuildValue ("(OOOOO)",
3198 arg1, arg2, arg3, arg4, arg5);
3200 /* call the Python callback */
3201 result = PyEval_CallObject (param->py_func, arglist);
3203 /* Errors in Python callback get swallowed, so report them here */
3206 cvError( CV_StsInternal, "icvPyOnMouse", "", __FILE__, __LINE__);
3210 Py_XDECREF (result);
3212 /* Release Interpreter lock */
3213 PyGILState_Release(state);
3217 void cvSetMouseCallbackPy( const char* window_name, PyObject * on_mouse, void* param=NULL ){
3218 // TODO potential memory leak if mouse callback is redefined
3219 PyCvMouseCBData * py_callback = new PyCvMouseCBData;
3220 py_callback->py_func = on_mouse;
3221 py_callback->user_data = param ? param : Py_None;
3222 cvSetMouseCallback( window_name, (CvMouseCallback) icvPyOnMouse, (void *) py_callback );
3226 SWIGINTERN swig_type_info*
3227 SWIG_pchar_descriptor(void)
3229 static int init = 0;
3230 static swig_type_info* info = 0;
3232 info = SWIG_TypeQuery("_p_char");
3240 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
3242 if (PyString_Check(obj)) {
3243 char *cstr; Py_ssize_t len;
3244 PyString_AsStringAndSize(obj, &cstr, &len);
3248 In python the user should not be able to modify the inner
3249 string representation. To warranty that, if you define
3250 SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
3251 buffer is always returned.
3253 The default behavior is just to return the pointer value,
3256 #if defined(SWIG_PYTHON_SAFE_CSTRINGS)
3257 if (*alloc != SWIG_OLDOBJ)
3259 if (*alloc == SWIG_NEWOBJ)
3262 *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
3263 *alloc = SWIG_NEWOBJ;
3267 *alloc = SWIG_OLDOBJ;
3270 *cptr = PyString_AsString(obj);
3273 if (psize) *psize = len + 1;
3276 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3277 if (pchar_descriptor) {
3279 if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3280 if (cptr) *cptr = (char *) vptr;
3281 if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3282 if (alloc) *alloc = SWIG_OLDOBJ;
3287 return SWIG_TypeError;
3294 PyObject * cvWaitKeyPy(int delay=0){
3295 // In order for the event processing thread to run a python callback
3296 // it must acquire the global interpreter lock, but cvWaitKey blocks, so
3297 // this thread can never release the lock. So release it here.
3298 PyThreadState * thread_state = PyEval_SaveThread();
3299 int res = cvWaitKey(delay);
3300 PyEval_RestoreThread( thread_state );
3302 char str[2]={(char)res,0};
3304 return PyLong_FromLong(-1);
3306 return PyString_FromString(str);
3311 SWIG_AsVal_long (PyObject *obj, long* val)
3313 if (PyInt_Check(obj)) {
3314 if (val) *val = PyInt_AsLong(obj);
3316 } else if (PyLong_Check(obj)) {
3317 long v = PyLong_AsLong(obj);
3318 if (!PyErr_Occurred()) {
3325 #ifdef SWIG_PYTHON_CAST_MODE
3328 long v = PyInt_AsLong(obj);
3329 if (!PyErr_Occurred()) {
3331 return SWIG_AddCast(SWIG_OK);
3337 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3338 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3339 if (val) *val = (long)(d);
3345 return SWIG_TypeError;
3350 SWIG_AsVal_int (PyObject * obj, int *val)
3353 int res = SWIG_AsVal_long (obj, &v);
3354 if (SWIG_IsOK(res)) {
3355 if ((v < INT_MIN || v > INT_MAX)) {
3356 return SWIG_OverflowError;
3358 if (val) *val = static_cast< int >(v);
3365 #include "highgui.h"
3369 struct stop_iteration {
3372 struct PySwigIterator {
3377 PySwigIterator(PyObject *seq) : _seq(seq)
3382 virtual ~PySwigIterator() {}
3384 // Access iterator method, required by Python
3385 virtual PyObject *value() const = 0;
3387 // Forward iterator method, required by Python
3388 virtual PySwigIterator *incr(size_t n = 1) = 0;
3390 // Backward iterator method, very common in C++, but not required in Python
3391 virtual PySwigIterator *decr(size_t n = 1)
3393 throw stop_iteration();
3396 // Random access iterator methods, but not required in Python
3397 virtual ptrdiff_t distance(const PySwigIterator &x) const
3399 throw std::invalid_argument("operation not supported");
3402 virtual bool equal (const PySwigIterator &x) const
3404 throw std::invalid_argument("operation not supported");
3407 // C++ common/needed methods
3408 virtual PySwigIterator *copy() const = 0;
3412 PyObject *obj = value();
3417 PyObject *previous()
3423 PySwigIterator *advance(ptrdiff_t n)
3425 return (n > 0) ? incr(n) : decr(-n);
3428 bool operator == (const PySwigIterator& x) const
3433 bool operator != (const PySwigIterator& x) const
3435 return ! operator==(x);
3438 PySwigIterator& operator += (ptrdiff_t n)
3443 PySwigIterator& operator -= (ptrdiff_t n)
3445 return *advance(-n);
3448 PySwigIterator* operator + (ptrdiff_t n) const
3450 return copy()->advance(n);
3453 PySwigIterator* operator - (ptrdiff_t n) const
3455 return copy()->advance(-n);
3458 ptrdiff_t operator - (const PySwigIterator& x) const
3460 return x.distance(*this);
3463 static swig_type_info* descriptor() {
3464 static int init = 0;
3465 static swig_type_info* desc = 0;
3467 desc = SWIG_TypeQuery("swig::PySwigIterator *");
3477 template <class Type>
3478 struct noconst_traits {
3479 typedef Type noconst_type;
3482 template <class Type>
3483 struct noconst_traits<const Type> {
3484 typedef Type noconst_type;
3490 struct pointer_category { };
3491 struct value_category { };
3494 General traits that provides type_name and type_info
3496 template <class Type> struct traits { };
3498 template <class Type>
3499 inline const char* type_name() {
3500 return traits<typename noconst_traits<Type >::noconst_type >::type_name();
3503 template <class Type>
3504 struct traits_info {
3505 static swig_type_info *type_query(std::string name) {
3507 return SWIG_TypeQuery(name.c_str());
3509 static swig_type_info *type_info() {
3510 static swig_type_info *info = type_query(type_name<Type>());
3515 template <class Type>
3516 inline swig_type_info *type_info() {
3517 return traits_info<Type>::type_info();
3521 Partial specialization for pointers
3523 template <class Type> struct traits <Type *> {
3524 typedef pointer_category category;
3525 static std::string make_ptr_name(const char* name) {
3526 std::string ptrname = name;
3530 static const char* type_name() {
3531 static std::string name = make_ptr_name(swig::type_name<Type>());
3532 return name.c_str();
3536 template <class Type, class Category>
3537 struct traits_as { };
3539 template <class Type, class Category>
3540 struct traits_check { };
3547 Traits that provides the from method
3549 template <class Type> struct traits_from_ptr {
3550 static PyObject *from(Type *val, int owner = 0) {
3551 return SWIG_NewPointerObj(val, type_info<Type>(), owner);
3555 template <class Type> struct traits_from {
3556 static PyObject *from(const Type& val) {
3557 return traits_from_ptr<Type>::from(new Type(val), 1);
3561 template <class Type> struct traits_from<Type *> {
3562 static PyObject *from(Type* val) {
3563 return traits_from_ptr<Type>::from(val, 0);
3567 template <class Type> struct traits_from<const Type *> {
3568 static PyObject *from(const Type* val) {
3569 return traits_from_ptr<Type>::from(const_cast<Type*>(val), 0);
3574 template <class Type>
3575 inline PyObject *from(const Type& val) {
3576 return traits_from<Type>::from(val);
3579 template <class Type>
3580 inline PyObject *from_ptr(Type* val, int owner) {
3581 return traits_from_ptr<Type>::from(val, owner);
3585 Traits that provides the asval/as/check method
3587 template <class Type>
3588 struct traits_asptr {
3589 static int asptr(PyObject *obj, Type **val) {
3591 int res = (SWIG_ConvertPtr(obj, (void**)&p, type_info<Type>(), 0) == SWIG_OK) ? SWIG_OLDOBJ : 0;
3592 if (SWIG_IsOK(res)) {
3599 template <class Type>
3600 inline int asptr(PyObject *obj, Type **vptr) {
3601 return traits_asptr<Type>::asptr(obj, vptr);
3604 template <class Type>
3605 struct traits_asval {
3606 static int asval(PyObject *obj, Type *val) {
3609 int res = traits_asptr<Type>::asptr(obj, &p);
3610 if (!SWIG_IsOK(res)) return res;
3612 typedef typename noconst_traits<Type>::noconst_type noconst_type;
3613 *(const_cast<noconst_type*>(val)) = *p;
3614 if (SWIG_IsNewObj(res)){
3616 res = SWIG_DelNewMask(res);
3623 return traits_asptr<Type>::asptr(obj, (Type **)(0));
3628 template <class Type> struct traits_asval<Type*> {
3629 static int asval(PyObject *obj, Type **val) {
3631 typedef typename noconst_traits<Type>::noconst_type noconst_type;
3632 noconst_type *p = 0;
3633 int res = traits_asptr<noconst_type>::asptr(obj, &p);
3634 if (SWIG_IsOK(res)) {
3635 *(const_cast<noconst_type**>(val)) = p;
3639 return traits_asptr<Type>::asptr(obj, (Type **)(0));
3644 template <class Type>
3645 inline int asval(PyObject *obj, Type *val) {
3646 return traits_asval<Type>::asval(obj, val);
3649 template <class Type>
3650 struct traits_as<Type, value_category> {
3651 static Type as(PyObject *obj, bool throw_error) {
3653 int res = asval(obj, &v);
3654 if (!obj || !SWIG_IsOK(res)) {
3655 if (!PyErr_Occurred()) {
3656 SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
3658 if (throw_error) throw std::invalid_argument("bad type");
3664 template <class Type>
3665 struct traits_as<Type, pointer_category> {
3666 static Type as(PyObject *obj, bool throw_error) {
3668 int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
3669 if (SWIG_IsOK(res) && v) {
3670 if (SWIG_IsNewObj(res)) {
3678 // Uninitialized return value, no Type() constructor required.
3679 static Type *v_def = (Type*) malloc(sizeof(Type));
3680 if (!PyErr_Occurred()) {
3681 SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
3683 if (throw_error) throw std::invalid_argument("bad type");
3684 memset(v_def,0,sizeof(Type));
3690 template <class Type>
3691 struct traits_as<Type*, pointer_category> {
3692 static Type* as(PyObject *obj, bool throw_error) {
3694 int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
3695 if (SWIG_IsOK(res)) {
3698 if (!PyErr_Occurred()) {
3699 SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
3701 if (throw_error) throw std::invalid_argument("bad type");
3707 template <class Type>
3708 inline Type as(PyObject *obj, bool te = false) {
3709 return traits_as<Type, typename traits<Type>::category>::as(obj, te);
3712 template <class Type>
3713 struct traits_check<Type, value_category> {
3714 static bool check(PyObject *obj) {
3715 int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR;
3716 return SWIG_IsOK(res) ? true : false;
3720 template <class Type>
3721 struct traits_check<Type, pointer_category> {
3722 static bool check(PyObject *obj) {
3723 int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR;
3724 return SWIG_IsOK(res) ? true : false;
3728 template <class Type>
3729 inline bool check(PyObject *obj) {
3730 return traits_check<Type, typename traits<Type>::category>::check(obj);
3735 #include <functional>
3739 struct less <PyObject *>: public binary_function<PyObject *, PyObject *, bool>
3742 operator()(PyObject * v, PyObject *w) const
3745 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3746 res = PyObject_Compare(v, w) < 0;
3747 SWIG_PYTHON_THREAD_END_BLOCK;
3753 struct less <swig::PyObject_ptr>: public binary_function<swig::PyObject_ptr, swig::PyObject_ptr, bool>
3756 operator()(const swig::PyObject_ptr& v, const swig::PyObject_ptr& w) const
3758 return std::less<PyObject *>()(v, w);
3763 struct less <swig::PyObject_var>: public binary_function<swig::PyObject_var, swig::PyObject_var, bool>
3766 operator()(const swig::PyObject_var& v, const swig::PyObject_var& w) const
3768 return std::less<PyObject *>()(v, w);
3775 template <> struct traits<PyObject *> {
3776 typedef value_category category;
3777 static const char* type_name() { return "PyObject *"; }
3780 template <> struct traits_asval<PyObject * > {
3781 typedef PyObject * value_type;
3782 static int asval(PyObject *obj, value_type *val) {
3783 if (val) *val = obj;
3789 struct traits_check<PyObject *, value_category> {
3790 static bool check(PyObject *) {
3795 template <> struct traits_from<PyObject *> {
3796 typedef PyObject * value_type;
3797 static PyObject *from(const value_type& val) {
3807 check_index(ptrdiff_t i, size_t size, bool insert = false) {
3809 if ((size_t) (-i) <= size)
3810 return (size_t) (i + size);
3811 } else if ( (size_t) i < size ) {
3813 } else if (insert && ((size_t) i == size)) {
3817 throw std::out_of_range("index out of range");
3821 slice_index(ptrdiff_t i, size_t size) {
3823 if ((size_t) (-i) <= size) {
3824 return (size_t) (i + size);
3826 throw std::out_of_range("index out of range");
3829 return ( (size_t) i < size ) ? ((size_t) i) : size;
3833 template <class Sequence, class Difference>
3834 inline typename Sequence::iterator
3835 getpos(Sequence* self, Difference i) {
3836 typename Sequence::iterator pos = self->begin();
3837 std::advance(pos, check_index(i,self->size()));
3841 template <class Sequence, class Difference>
3842 inline typename Sequence::const_iterator
3843 cgetpos(const Sequence* self, Difference i) {
3844 typename Sequence::const_iterator pos = self->begin();
3845 std::advance(pos, check_index(i,self->size()));
3849 template <class Sequence, class Difference>
3851 getslice(const Sequence* self, Difference i, Difference j) {
3852 typename Sequence::size_type size = self->size();
3853 typename Sequence::size_type ii = swig::check_index(i, size);
3854 typename Sequence::size_type jj = swig::slice_index(j, size);
3857 typename Sequence::const_iterator vb = self->begin();
3858 typename Sequence::const_iterator ve = self->begin();
3859 std::advance(vb,ii);
3860 std::advance(ve,jj);
3861 return new Sequence(vb, ve);
3863 return new Sequence();
3867 template <class Sequence, class Difference, class InputSeq>
3869 setslice(Sequence* self, Difference i, Difference j, const InputSeq& v) {
3870 typename Sequence::size_type size = self->size();
3871 typename Sequence::size_type ii = swig::check_index(i, size, true);
3872 typename Sequence::size_type jj = swig::slice_index(j, size);
3873 if (jj < ii) jj = ii;
3874 size_t ssize = jj - ii;
3875 if (ssize <= v.size()) {
3876 typename Sequence::iterator sb = self->begin();
3877 typename InputSeq::const_iterator vmid = v.begin();
3878 std::advance(sb,ii);
3879 std::advance(vmid, jj - ii);
3880 self->insert(std::copy(v.begin(), vmid, sb), vmid, v.end());
3882 typename Sequence::iterator sb = self->begin();
3883 typename Sequence::iterator se = self->begin();
3884 std::advance(sb,ii);
3885 std::advance(se,jj);
3887 self->insert(sb, v.begin(), v.end());
3891 template <class Sequence, class Difference>
3893 delslice(Sequence* self, Difference i, Difference j) {
3894 typename Sequence::size_type size = self->size();
3895 typename Sequence::size_type ii = swig::check_index(i, size, true);
3896 typename Sequence::size_type jj = swig::slice_index(j, size);
3898 typename Sequence::iterator sb = self->begin();
3899 typename Sequence::iterator se = self->begin();
3900 std::advance(sb,ii);
3901 std::advance(se,jj);
3908 #if !defined(SWIG_STD_NOITERATOR_TRAITS_STL)
3912 template <class Iterator>
3913 struct iterator_traits {
3914 typedef ptrdiff_t difference_type;
3915 typedef typename Iterator::value_type value_type;
3918 #if defined(__SUNPRO_CC) && defined(_RWSTD_VER)
3919 template <class Iterator, class Category,class T, class Reference, class Pointer, class Distance>
3920 struct iterator_traits<__reverse_bi_iterator<Iterator,Category,T,Reference,Pointer,Distance> > {
3921 typedef Distance difference_type;
3922 typedef T value_type;
3927 struct iterator_traits<T*> {
3928 typedef T value_type;
3929 typedef ptrdiff_t difference_type;
3932 template<typename _InputIterator>
3933 inline typename iterator_traits<_InputIterator>::difference_type
3934 distance(_InputIterator __first, _InputIterator __last)
3936 typename iterator_traits<_InputIterator>::difference_type __n = 0;
3937 while (__first != __last) {
3948 template<typename OutIterator>
3949 class PySwigIterator_T : public PySwigIterator
3952 typedef OutIterator out_iterator;
3953 typedef typename std::iterator_traits<out_iterator>::value_type value_type;
3954 typedef PySwigIterator_T<out_iterator> self_type;
3956 PySwigIterator_T(out_iterator curr, PyObject *seq)
3957 : PySwigIterator(seq), current(curr)
3961 const out_iterator& get_current() const
3967 bool equal (const PySwigIterator &iter) const
3969 const self_type *iters = dynamic_cast<const self_type *>(&iter);
3971 return (current == iters->get_current());
3973 throw std::invalid_argument("bad iterator type");
3977 ptrdiff_t distance(const PySwigIterator &iter) const
3979 const self_type *iters = dynamic_cast<const self_type *>(&iter);
3981 return std::distance(current, iters->get_current());
3983 throw std::invalid_argument("bad iterator type");
3988 out_iterator current;
3991 template <class ValueType>
3994 typedef const ValueType& argument_type;
3995 typedef PyObject *result_type;
3996 result_type operator()(argument_type v) const
3998 return swig::from(v);
4002 template<typename OutIterator,
4003 typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
4004 typename FromOper = from_oper<ValueType> >
4005 class PySwigIteratorOpen_T : public PySwigIterator_T<OutIterator>
4009 typedef OutIterator out_iterator;
4010 typedef ValueType value_type;
4011 typedef PySwigIterator_T<out_iterator> base;
4012 typedef PySwigIteratorOpen_T<OutIterator, ValueType, FromOper> self_type;
4014 PySwigIteratorOpen_T(out_iterator curr, PyObject *seq)
4015 : PySwigIterator_T<OutIterator>(curr, seq)
4019 PyObject *value() const {
4020 return from(static_cast<const value_type&>(*(base::current)));
4023 PySwigIterator *copy() const
4025 return new self_type(*this);
4028 PySwigIterator *incr(size_t n = 1)
4036 PySwigIterator *decr(size_t n = 1)
4045 template<typename OutIterator,
4046 typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
4047 typename FromOper = from_oper<ValueType> >
4048 class PySwigIteratorClosed_T : public PySwigIterator_T<OutIterator>
4052 typedef OutIterator out_iterator;
4053 typedef ValueType value_type;
4054 typedef PySwigIterator_T<out_iterator> base;
4055 typedef PySwigIteratorClosed_T<OutIterator, ValueType, FromOper> self_type;
4057 PySwigIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq)
4058 : PySwigIterator_T<OutIterator>(curr, seq), begin(first), end(last)
4062 PyObject *value() const {
4063 if (base::current == end) {
4064 throw stop_iteration();
4066 return from(static_cast<const value_type&>(*(base::current)));
4070 PySwigIterator *copy() const
4072 return new self_type(*this);
4075 PySwigIterator *incr(size_t n = 1)
4078 if (base::current == end) {
4079 throw stop_iteration();
4087 PySwigIterator *decr(size_t n = 1)
4090 if (base::current == begin) {
4091 throw stop_iteration();
4104 template<typename OutIter>
4105 inline PySwigIterator*
4106 make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0)
4108 return new PySwigIteratorClosed_T<OutIter>(current, begin, end, seq);
4111 template<typename OutIter>
4112 inline PySwigIterator*
4113 make_output_iterator(const OutIter& current, PyObject *seq = 0)
4115 return new PySwigIteratorOpen_T<OutIter>(current, seq);
4123 struct PySequence_Ref
4125 PySequence_Ref(PyObject* seq, int index)
4126 : _seq(seq), _index(index)
4132 swig::PyObject_var item = PySequence_GetItem(_seq, _index);
4134 return swig::as<T>(item, true);
4135 } catch (std::exception& e) {
4137 sprintf(msg, "in sequence element %d ", _index);
4138 if (!PyErr_Occurred()) {
4139 SWIG_Error(SWIG_TypeError, swig::type_name<T>());
4141 SWIG_Python_AddErrorMsg(msg);
4142 SWIG_Python_AddErrorMsg(e.what());
4147 PySequence_Ref& operator=(const T& v)
4149 PySequence_SetItem(_seq, _index, swig::from<T>(v));
4159 struct PySequence_ArrowProxy
4161 PySequence_ArrowProxy(const T& x): m_value(x) {}
4162 const T* operator->() const { return &m_value; }
4163 operator const T*() const { return &m_value; }
4167 template <class T, class Reference >
4168 struct PySequence_InputIterator
4170 typedef PySequence_InputIterator<T, Reference > self;
4172 typedef std::random_access_iterator_tag iterator_category;
4173 typedef Reference reference;
4174 typedef T value_type;
4176 typedef int difference_type;
4178 PySequence_InputIterator()
4182 PySequence_InputIterator(PyObject* seq, int index)
4183 : _seq(seq), _index(index)
4187 reference operator*() const
4189 return reference(_seq, _index);
4192 PySequence_ArrowProxy<T>
4193 operator->() const {
4194 return PySequence_ArrowProxy<T>(operator*());
4197 bool operator==(const self& ri) const
4199 return (_index == ri._index) && (_seq == ri._seq);
4202 bool operator!=(const self& ri) const
4204 return !(operator==(ri));
4207 self& operator ++ ()
4213 self& operator -- ()
4219 self& operator += (difference_type n)
4225 self operator +(difference_type n) const
4227 return self(_seq, _index + n);
4230 self& operator -= (difference_type n)
4236 self operator -(difference_type n) const
4238 return self(_seq, _index - n);
4241 difference_type operator - (const self& ri) const
4243 return _index - ri._index;
4246 bool operator < (const self& ri) const
4248 return _index < ri._index;
4252 operator[](difference_type n) const
4254 return reference(_seq, _index + n);
4259 difference_type _index;
4263 struct PySequence_Cont
4265 typedef PySequence_Ref<T> reference;
4266 typedef const PySequence_Ref<T> const_reference;
4267 typedef T value_type;
4269 typedef int difference_type;
4270 typedef int size_type;
4271 typedef const pointer const_pointer;
4272 typedef PySequence_InputIterator<T, reference> iterator;
4273 typedef PySequence_InputIterator<T, const_reference> const_iterator;
4275 PySequence_Cont(PyObject* seq) : _seq(0)
4277 if (!PySequence_Check(seq)) {
4278 throw std::invalid_argument("a sequence is expected");
4286 if (_seq) Py_DECREF(_seq);
4289 size_type size() const
4291 return PySequence_Size(_seq);
4301 return iterator(_seq, 0);
4304 const_iterator begin() const
4306 return const_iterator(_seq, 0);
4311 return iterator(_seq, size());
4314 const_iterator end() const
4316 return const_iterator(_seq, size());
4319 reference operator[](difference_type n)
4321 return reference(_seq, n);
4324 const_reference operator[](difference_type n) const
4326 return const_reference(_seq, n);
4329 bool check(bool set_err = true) const
4332 for (int i = 0; i < s; ++i) {
4333 swig::PyObject_var item = PySequence_GetItem(_seq, i);
4334 if (!swig::check<value_type>(item)) {
4337 sprintf(msg, "in sequence element %d", i);
4338 SWIG_Error(SWIG_RuntimeError, msg);
4353 CvMat * cvLoadImageMat(const char* filename, int iscolor=CV_LOAD_IMAGE_COLOR ){
4354 return cvLoadImageM(filename, iscolor);
4358 CvMat * cvRetrieveFrame__CvMat( CvCapture* capture ){
4359 IplImage * im = cvRetrieveFrame(capture);
4361 CvMat * mat = (CvMat *)cvAlloc(sizeof(CvMat));
4362 mat = cvGetMat(im, mat);
4369 CvMat * cvQueryFrame__CvMat( CvCapture * capture ){
4370 IplImage * im = cvQueryFrame(capture);
4372 CvMat * mat = (CvMat *)cvAlloc(sizeof(CvMat));
4373 mat = cvGetMat(im, mat);
4381 SWIG_AsCharArray(PyObject * obj, char *val, size_t size)
4383 char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ;
4384 int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc);
4385 if (SWIG_IsOK(res)) {
4386 if ((csize == size + 1) && cptr && !(cptr[csize-1])) --csize;
4387 if (csize <= size) {
4389 if (csize) memcpy(val, cptr, csize*sizeof(char));
4390 if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char));
4392 if (alloc == SWIG_NEWOBJ) {
4394 res = SWIG_DelNewMask(res);
4398 if (alloc == SWIG_NEWOBJ) delete[] cptr;
4400 return SWIG_TypeError;
4405 SWIG_AsVal_char (PyObject * obj, char *val)
4407 int res = SWIG_AsCharArray(obj, val, 1);
4408 if (!SWIG_IsOK(res)) {
4410 res = SWIG_AddCast(SWIG_AsVal_long (obj, &v));
4411 if (SWIG_IsOK(res)) {
4412 if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) {
4413 if (val) *val = static_cast< char >(v);
4415 res = SWIG_OverflowError;
4423 #define SWIG_From_long PyInt_FromLong
4426 SWIGINTERNINLINE PyObject *
4427 SWIG_From_int (int value)
4429 return SWIG_From_long (value);
4433 SWIGINTERNINLINE PyObject *
4434 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
4437 if (size > INT_MAX) {
4438 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
4439 return pchar_descriptor ?
4440 SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
4442 return PyString_FromStringAndSize(carray, static_cast< int >(size));
4445 return SWIG_Py_Void();
4450 SWIGINTERNINLINE PyObject *
4451 SWIG_FromCharPtr(const char *cptr)
4453 return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
4457 #define SWIG_From_double PyFloat_FromDouble
4462 SWIGINTERN PyObject *_wrap_new_CvRNG_Wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4463 PyObject *resultobj = 0;
4465 CvRNG_Wrapper *result = 0 ;
4467 unsigned long long val1 ;
4469 PyObject * obj0 = 0 ;
4471 if (!PyArg_ParseTuple(args,(char *)"O:new_CvRNG_Wrapper",&obj0)) SWIG_fail;
4472 ecode1 = SWIG_AsVal_unsigned_SS_long_SS_long(obj0, &val1);
4473 if (!SWIG_IsOK(ecode1)) {
4474 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CvRNG_Wrapper" "', argument " "1"" of type '" "CvRNG""'");
4476 temp1 = static_cast< CvRNG >(val1);
4478 result = (CvRNG_Wrapper *)new CvRNG_Wrapper((CvRNG const &)*arg1);
4479 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvRNG_Wrapper, SWIG_POINTER_NEW | 0 );
4486 SWIGINTERN PyObject *_wrap_CvRNG_Wrapper_ptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4487 PyObject *resultobj = 0;
4488 CvRNG_Wrapper *arg1 = (CvRNG_Wrapper *) 0 ;
4492 PyObject * obj0 = 0 ;
4494 if (!PyArg_ParseTuple(args,(char *)"O:CvRNG_Wrapper_ptr",&obj0)) SWIG_fail;
4495 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvRNG_Wrapper, 0 | 0 );
4496 if (!SWIG_IsOK(res1)) {
4497 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvRNG_Wrapper_ptr" "', argument " "1"" of type '" "CvRNG_Wrapper *""'");
4499 arg1 = reinterpret_cast< CvRNG_Wrapper * >(argp1);
4500 result = (CvRNG *)(arg1)->ptr();
4501 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_long_long, 0 | 0 );
4508 SWIGINTERN PyObject *_wrap_CvRNG_Wrapper_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4509 PyObject *resultobj = 0;
4510 CvRNG_Wrapper *arg1 = (CvRNG_Wrapper *) 0 ;
4514 PyObject * obj0 = 0 ;
4516 if (!PyArg_ParseTuple(args,(char *)"O:CvRNG_Wrapper_ref",&obj0)) SWIG_fail;
4517 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvRNG_Wrapper, 0 | 0 );
4518 if (!SWIG_IsOK(res1)) {
4519 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvRNG_Wrapper_ref" "', argument " "1"" of type '" "CvRNG_Wrapper *""'");
4521 arg1 = reinterpret_cast< CvRNG_Wrapper * >(argp1);
4523 CvRNG &_result_ref = (arg1)->ref();
4524 result = (CvRNG *) &_result_ref;
4526 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_long_long, 0 | 0 );
4533 SWIGINTERN PyObject *_wrap_CvRNG_Wrapper___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4534 PyObject *resultobj = 0;
4535 CvRNG_Wrapper *arg1 = (CvRNG_Wrapper *) 0 ;
4536 CvRNG_Wrapper *arg2 = 0 ;
4542 PyObject * obj0 = 0 ;
4543 PyObject * obj1 = 0 ;
4545 if (!PyArg_ParseTuple(args,(char *)"OO:CvRNG_Wrapper___eq__",&obj0,&obj1)) SWIG_fail;
4546 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvRNG_Wrapper, 0 | 0 );
4547 if (!SWIG_IsOK(res1)) {
4548 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvRNG_Wrapper___eq__" "', argument " "1"" of type '" "CvRNG_Wrapper *""'");
4550 arg1 = reinterpret_cast< CvRNG_Wrapper * >(argp1);
4551 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_CvRNG_Wrapper, 0 | 0);
4552 if (!SWIG_IsOK(res2)) {
4553 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvRNG_Wrapper___eq__" "', argument " "2"" of type '" "CvRNG_Wrapper const &""'");
4556 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CvRNG_Wrapper___eq__" "', argument " "2"" of type '" "CvRNG_Wrapper const &""'");
4558 arg2 = reinterpret_cast< CvRNG_Wrapper * >(argp2);
4559 result = (bool)(arg1)->operator ==((CvRNG_Wrapper const &)*arg2);
4560 resultobj = SWIG_From_bool(static_cast< bool >(result));
4567 SWIGINTERN PyObject *_wrap_CvRNG_Wrapper___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4568 PyObject *resultobj = 0;
4569 CvRNG_Wrapper *arg1 = (CvRNG_Wrapper *) 0 ;
4570 CvRNG_Wrapper *arg2 = 0 ;
4576 PyObject * obj0 = 0 ;
4577 PyObject * obj1 = 0 ;
4579 if (!PyArg_ParseTuple(args,(char *)"OO:CvRNG_Wrapper___ne__",&obj0,&obj1)) SWIG_fail;
4580 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvRNG_Wrapper, 0 | 0 );
4581 if (!SWIG_IsOK(res1)) {
4582 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvRNG_Wrapper___ne__" "', argument " "1"" of type '" "CvRNG_Wrapper *""'");
4584 arg1 = reinterpret_cast< CvRNG_Wrapper * >(argp1);
4585 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_CvRNG_Wrapper, 0 | 0);
4586 if (!SWIG_IsOK(res2)) {
4587 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvRNG_Wrapper___ne__" "', argument " "2"" of type '" "CvRNG_Wrapper const &""'");
4590 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CvRNG_Wrapper___ne__" "', argument " "2"" of type '" "CvRNG_Wrapper const &""'");
4592 arg2 = reinterpret_cast< CvRNG_Wrapper * >(argp2);
4593 result = (bool)(arg1)->operator !=((CvRNG_Wrapper const &)*arg2);
4594 resultobj = SWIG_From_bool(static_cast< bool >(result));
4601 SWIGINTERN PyObject *_wrap_delete_CvRNG_Wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4602 PyObject *resultobj = 0;
4603 CvRNG_Wrapper *arg1 = (CvRNG_Wrapper *) 0 ;
4606 PyObject * obj0 = 0 ;
4608 if (!PyArg_ParseTuple(args,(char *)"O:delete_CvRNG_Wrapper",&obj0)) SWIG_fail;
4609 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvRNG_Wrapper, SWIG_POINTER_DISOWN | 0 );
4610 if (!SWIG_IsOK(res1)) {
4611 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CvRNG_Wrapper" "', argument " "1"" of type '" "CvRNG_Wrapper *""'");
4613 arg1 = reinterpret_cast< CvRNG_Wrapper * >(argp1);
4623 resultobj = SWIG_Py_Void();
4630 SWIGINTERN PyObject *CvRNG_Wrapper_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4632 if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
4633 SWIG_TypeNewClientData(SWIGTYPE_p_CvRNG_Wrapper, SWIG_NewClientData(obj));
4634 return SWIG_Py_Void();
4637 SWIGINTERN PyObject *_wrap_new_CvSubdiv2DEdge_Wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4638 PyObject *resultobj = 0;
4639 CvSubdiv2DEdge *arg1 = 0 ;
4640 CvSubdiv2DEdge_Wrapper *result = 0 ;
4641 CvSubdiv2DEdge temp1 ;
4644 PyObject * obj0 = 0 ;
4646 if (!PyArg_ParseTuple(args,(char *)"O:new_CvSubdiv2DEdge_Wrapper",&obj0)) SWIG_fail;
4647 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
4648 if (!SWIG_IsOK(ecode1)) {
4649 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CvSubdiv2DEdge_Wrapper" "', argument " "1"" of type '" "CvSubdiv2DEdge""'");
4651 temp1 = static_cast< CvSubdiv2DEdge >(val1);
4653 result = (CvSubdiv2DEdge_Wrapper *)new CvSubdiv2DEdge_Wrapper((CvSubdiv2DEdge const &)*arg1);
4654 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvSubdiv2DEdge_Wrapper, SWIG_POINTER_NEW | 0 );
4661 SWIGINTERN PyObject *_wrap_CvSubdiv2DEdge_Wrapper_ptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4662 PyObject *resultobj = 0;
4663 CvSubdiv2DEdge_Wrapper *arg1 = (CvSubdiv2DEdge_Wrapper *) 0 ;
4664 CvSubdiv2DEdge *result = 0 ;
4667 PyObject * obj0 = 0 ;
4669 if (!PyArg_ParseTuple(args,(char *)"O:CvSubdiv2DEdge_Wrapper_ptr",&obj0)) SWIG_fail;
4670 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvSubdiv2DEdge_Wrapper, 0 | 0 );
4671 if (!SWIG_IsOK(res1)) {
4672 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvSubdiv2DEdge_Wrapper_ptr" "', argument " "1"" of type '" "CvSubdiv2DEdge_Wrapper *""'");
4674 arg1 = reinterpret_cast< CvSubdiv2DEdge_Wrapper * >(argp1);
4675 result = (CvSubdiv2DEdge *)(arg1)->ptr();
4676 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_size_t, 0 | 0 );
4683 SWIGINTERN PyObject *_wrap_CvSubdiv2DEdge_Wrapper_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4684 PyObject *resultobj = 0;
4685 CvSubdiv2DEdge_Wrapper *arg1 = (CvSubdiv2DEdge_Wrapper *) 0 ;
4686 CvSubdiv2DEdge *result = 0 ;
4689 PyObject * obj0 = 0 ;
4691 if (!PyArg_ParseTuple(args,(char *)"O:CvSubdiv2DEdge_Wrapper_ref",&obj0)) SWIG_fail;
4692 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvSubdiv2DEdge_Wrapper, 0 | 0 );
4693 if (!SWIG_IsOK(res1)) {
4694 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvSubdiv2DEdge_Wrapper_ref" "', argument " "1"" of type '" "CvSubdiv2DEdge_Wrapper *""'");
4696 arg1 = reinterpret_cast< CvSubdiv2DEdge_Wrapper * >(argp1);
4698 CvSubdiv2DEdge &_result_ref = (arg1)->ref();
4699 result = (CvSubdiv2DEdge *) &_result_ref;
4701 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_size_t, 0 | 0 );
4708 SWIGINTERN PyObject *_wrap_CvSubdiv2DEdge_Wrapper___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4709 PyObject *resultobj = 0;
4710 CvSubdiv2DEdge_Wrapper *arg1 = (CvSubdiv2DEdge_Wrapper *) 0 ;
4711 CvSubdiv2DEdge_Wrapper *arg2 = 0 ;
4717 PyObject * obj0 = 0 ;
4718 PyObject * obj1 = 0 ;
4720 if (!PyArg_ParseTuple(args,(char *)"OO:CvSubdiv2DEdge_Wrapper___eq__",&obj0,&obj1)) SWIG_fail;
4721 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvSubdiv2DEdge_Wrapper, 0 | 0 );
4722 if (!SWIG_IsOK(res1)) {
4723 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvSubdiv2DEdge_Wrapper___eq__" "', argument " "1"" of type '" "CvSubdiv2DEdge_Wrapper *""'");
4725 arg1 = reinterpret_cast< CvSubdiv2DEdge_Wrapper * >(argp1);
4726 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_CvSubdiv2DEdge_Wrapper, 0 | 0);
4727 if (!SWIG_IsOK(res2)) {
4728 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvSubdiv2DEdge_Wrapper___eq__" "', argument " "2"" of type '" "CvSubdiv2DEdge_Wrapper const &""'");
4731 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CvSubdiv2DEdge_Wrapper___eq__" "', argument " "2"" of type '" "CvSubdiv2DEdge_Wrapper const &""'");
4733 arg2 = reinterpret_cast< CvSubdiv2DEdge_Wrapper * >(argp2);
4734 result = (bool)(arg1)->operator ==((CvSubdiv2DEdge_Wrapper const &)*arg2);
4735 resultobj = SWIG_From_bool(static_cast< bool >(result));
4742 SWIGINTERN PyObject *_wrap_CvSubdiv2DEdge_Wrapper___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4743 PyObject *resultobj = 0;
4744 CvSubdiv2DEdge_Wrapper *arg1 = (CvSubdiv2DEdge_Wrapper *) 0 ;
4745 CvSubdiv2DEdge_Wrapper *arg2 = 0 ;
4751 PyObject * obj0 = 0 ;
4752 PyObject * obj1 = 0 ;
4754 if (!PyArg_ParseTuple(args,(char *)"OO:CvSubdiv2DEdge_Wrapper___ne__",&obj0,&obj1)) SWIG_fail;
4755 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvSubdiv2DEdge_Wrapper, 0 | 0 );
4756 if (!SWIG_IsOK(res1)) {
4757 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvSubdiv2DEdge_Wrapper___ne__" "', argument " "1"" of type '" "CvSubdiv2DEdge_Wrapper *""'");
4759 arg1 = reinterpret_cast< CvSubdiv2DEdge_Wrapper * >(argp1);
4760 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_CvSubdiv2DEdge_Wrapper, 0 | 0);
4761 if (!SWIG_IsOK(res2)) {
4762 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvSubdiv2DEdge_Wrapper___ne__" "', argument " "2"" of type '" "CvSubdiv2DEdge_Wrapper const &""'");
4765 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CvSubdiv2DEdge_Wrapper___ne__" "', argument " "2"" of type '" "CvSubdiv2DEdge_Wrapper const &""'");
4767 arg2 = reinterpret_cast< CvSubdiv2DEdge_Wrapper * >(argp2);
4768 result = (bool)(arg1)->operator !=((CvSubdiv2DEdge_Wrapper const &)*arg2);
4769 resultobj = SWIG_From_bool(static_cast< bool >(result));
4776 SWIGINTERN PyObject *_wrap_delete_CvSubdiv2DEdge_Wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4777 PyObject *resultobj = 0;
4778 CvSubdiv2DEdge_Wrapper *arg1 = (CvSubdiv2DEdge_Wrapper *) 0 ;
4781 PyObject * obj0 = 0 ;
4783 if (!PyArg_ParseTuple(args,(char *)"O:delete_CvSubdiv2DEdge_Wrapper",&obj0)) SWIG_fail;
4784 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvSubdiv2DEdge_Wrapper, SWIG_POINTER_DISOWN | 0 );
4785 if (!SWIG_IsOK(res1)) {
4786 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CvSubdiv2DEdge_Wrapper" "', argument " "1"" of type '" "CvSubdiv2DEdge_Wrapper *""'");
4788 arg1 = reinterpret_cast< CvSubdiv2DEdge_Wrapper * >(argp1);
4798 resultobj = SWIG_Py_Void();
4805 SWIGINTERN PyObject *CvSubdiv2DEdge_Wrapper_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4807 if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
4808 SWIG_TypeNewClientData(SWIGTYPE_p_CvSubdiv2DEdge_Wrapper, SWIG_NewClientData(obj));
4809 return SWIG_Py_Void();
4812 SWIGINTERN PyObject *_wrap_cvSetMouseCallback__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4813 PyObject *resultobj = 0;
4814 char *arg1 = (char *) 0 ;
4815 PyObject *arg2 = (PyObject *) 0 ;
4816 void *arg3 = (void *) 0 ;
4821 PyObject * obj0 = 0 ;
4822 PyObject * obj1 = 0 ;
4823 PyObject * obj2 = 0 ;
4825 if (!PyArg_ParseTuple(args,(char *)"OOO:cvSetMouseCallback",&obj0,&obj1,&obj2)) SWIG_fail;
4826 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
4827 if (!SWIG_IsOK(res1)) {
4828 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvSetMouseCallback" "', argument " "1"" of type '" "char const *""'");
4830 arg1 = reinterpret_cast< char * >(buf1);
4832 res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
4833 if (!SWIG_IsOK(res3)) {
4834 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cvSetMouseCallback" "', argument " "3"" of type '" "void *""'");
4836 cvSetMouseCallbackPy((char const *)arg1,arg2,arg3);
4837 resultobj = SWIG_Py_Void();
4838 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4841 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4846 SWIGINTERN PyObject *_wrap_cvSetMouseCallback__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4847 PyObject *resultobj = 0;
4848 char *arg1 = (char *) 0 ;
4849 PyObject *arg2 = (PyObject *) 0 ;
4853 PyObject * obj0 = 0 ;
4854 PyObject * obj1 = 0 ;
4856 if (!PyArg_ParseTuple(args,(char *)"OO:cvSetMouseCallback",&obj0,&obj1)) SWIG_fail;
4857 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
4858 if (!SWIG_IsOK(res1)) {
4859 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvSetMouseCallback" "', argument " "1"" of type '" "char const *""'");
4861 arg1 = reinterpret_cast< char * >(buf1);
4863 cvSetMouseCallbackPy((char const *)arg1,arg2);
4864 resultobj = SWIG_Py_Void();
4865 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4868 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4873 SWIGINTERN PyObject *_wrap_cvSetMouseCallback(PyObject *self, PyObject *args) {
4878 if (!PyTuple_Check(args)) SWIG_fail;
4879 argc = PyObject_Length(args);
4880 for (ii = 0; (ii < argc) && (ii < 3); ii++) {
4881 argv[ii] = PyTuple_GET_ITEM(args,ii);
4885 int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
4886 _v = SWIG_CheckState(res);
4888 _v = (argv[1] != 0);
4890 return _wrap_cvSetMouseCallback__SWIG_1(self, args);
4896 int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
4897 _v = SWIG_CheckState(res);
4899 _v = (argv[1] != 0);
4902 int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
4903 _v = SWIG_CheckState(res);
4905 return _wrap_cvSetMouseCallback__SWIG_0(self, args);
4912 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cvSetMouseCallback'.\n Possible C/C++ prototypes are:\n cvSetMouseCallbackPy(char const *,PyObject *,void *)\n cvSetMouseCallbackPy(char const *,PyObject *)\n");
4918 /* C helper function which is responsible for calling
4919 the Python real trackbar callback function */
4920 static void icvPyOnTrackbar( PyObject * py_cb_func, int pos) {
4922 /* Must ensure this thread has a lock on the interpreter */
4923 PyGILState_STATE state = PyGILState_Ensure();
4927 /* the argument of the callback ready to be passed to Python code */
4928 PyObject *arg1 = PyInt_FromLong (pos);
4930 /* build the tuple for calling the Python callback */
4931 PyObject *arglist = Py_BuildValue ("(O)", arg1);
4933 /* call the Python callback */
4934 result = PyEval_CallObject (py_cb_func, arglist);
4936 /* Errors in Python callback get swallowed, so report them here */
4939 cvError( CV_StsInternal, "icvPyOnTrackbar", "", __FILE__, __LINE__);
4944 Py_XDECREF (result);
4946 /* Release Interpreter lock */
4947 PyGILState_Release(state);
4950 #define ICV_PY_MAX_CB 10
4952 struct PyCvTrackbar {
4953 CvTrackbarCallback cv_func;
4958 static int my_trackbar_cb_size=0;
4959 extern PyCvTrackbar my_trackbar_cb_funcs[ICV_PY_MAX_CB];
4962 static void icvPyTrackbarCB0(int pos){
4963 if(!my_trackbar_cb_funcs[0].py_func) return;
4964 icvPyOnTrackbar( my_trackbar_cb_funcs[0].py_func, pos );
4968 static void icvPyTrackbarCB1(int pos){
4969 if(!my_trackbar_cb_funcs[1].py_func) return;
4970 icvPyOnTrackbar( my_trackbar_cb_funcs[1].py_func, pos );
4974 static void icvPyTrackbarCB2(int pos){
4975 if(!my_trackbar_cb_funcs[2].py_func) return;
4976 icvPyOnTrackbar( my_trackbar_cb_funcs[2].py_func, pos );
4980 static void icvPyTrackbarCB3(int pos){
4981 if(!my_trackbar_cb_funcs[3].py_func) return;
4982 icvPyOnTrackbar( my_trackbar_cb_funcs[3].py_func, pos );
4986 static void icvPyTrackbarCB4(int pos){
4987 if(!my_trackbar_cb_funcs[4].py_func) return;
4988 icvPyOnTrackbar( my_trackbar_cb_funcs[4].py_func, pos );
4992 static void icvPyTrackbarCB5(int pos){
4993 if(!my_trackbar_cb_funcs[5].py_func) return;
4994 icvPyOnTrackbar( my_trackbar_cb_funcs[5].py_func, pos );
4998 static void icvPyTrackbarCB6(int pos){
4999 if(!my_trackbar_cb_funcs[6].py_func) return;
5000 icvPyOnTrackbar( my_trackbar_cb_funcs[6].py_func, pos );
5004 static void icvPyTrackbarCB7(int pos){
5005 if(!my_trackbar_cb_funcs[7].py_func) return;
5006 icvPyOnTrackbar( my_trackbar_cb_funcs[7].py_func, pos );
5010 static void icvPyTrackbarCB8(int pos){
5011 if(!my_trackbar_cb_funcs[8].py_func) return;
5012 icvPyOnTrackbar( my_trackbar_cb_funcs[8].py_func, pos );
5016 static void icvPyTrackbarCB9(int pos){
5017 if(!my_trackbar_cb_funcs[9].py_func) return;
5018 icvPyOnTrackbar( my_trackbar_cb_funcs[9].py_func, pos );
5022 PyCvTrackbar my_trackbar_cb_funcs[ICV_PY_MAX_CB] = {
5023 /*@SWIG:%ICV_PY_CB_TAB_ENTRY@*/
5024 {(CvTrackbarCallback) icvPyTrackbarCB0, NULL, NULL }
5026 /*@SWIG:%ICV_PY_CB_TAB_ENTRY@*/
5027 {(CvTrackbarCallback) icvPyTrackbarCB1, NULL, NULL }
5029 /*@SWIG:%ICV_PY_CB_TAB_ENTRY@*/
5030 {(CvTrackbarCallback) icvPyTrackbarCB2, NULL, NULL }
5032 /*@SWIG:%ICV_PY_CB_TAB_ENTRY@*/
5033 {(CvTrackbarCallback) icvPyTrackbarCB3, NULL, NULL }
5035 /*@SWIG:%ICV_PY_CB_TAB_ENTRY@*/
5036 {(CvTrackbarCallback) icvPyTrackbarCB4, NULL, NULL }
5038 /*@SWIG:%ICV_PY_CB_TAB_ENTRY@*/
5039 {(CvTrackbarCallback) icvPyTrackbarCB5, NULL, NULL }
5041 /*@SWIG:%ICV_PY_CB_TAB_ENTRY@*/
5042 {(CvTrackbarCallback) icvPyTrackbarCB6, NULL, NULL }
5044 /*@SWIG:%ICV_PY_CB_TAB_ENTRY@*/
5045 {(CvTrackbarCallback) icvPyTrackbarCB7, NULL, NULL }
5047 /*@SWIG:%ICV_PY_CB_TAB_ENTRY@*/
5048 {(CvTrackbarCallback) icvPyTrackbarCB8, NULL, NULL }
5050 /*@SWIG:%ICV_PY_CB_TAB_ENTRY@*/
5051 {(CvTrackbarCallback) icvPyTrackbarCB9, NULL, NULL }
5055 SWIGINTERN PyObject *_wrap_cvWaitKey__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5056 PyObject *resultobj = 0;
5058 PyObject *result = 0 ;
5061 PyObject * obj0 = 0 ;
5063 if (!PyArg_ParseTuple(args,(char *)"O:cvWaitKey",&obj0)) SWIG_fail;
5064 ecode1 = SWIG_AsVal_int(obj0, &val1);
5065 if (!SWIG_IsOK(ecode1)) {
5066 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cvWaitKey" "', argument " "1"" of type '" "int""'");
5068 arg1 = static_cast< int >(val1);
5069 result = (PyObject *)cvWaitKeyPy(arg1);
5077 SWIGINTERN PyObject *_wrap_cvWaitKey__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5078 PyObject *resultobj = 0;
5079 PyObject *result = 0 ;
5081 if (!PyArg_ParseTuple(args,(char *)":cvWaitKey")) SWIG_fail;
5082 result = (PyObject *)cvWaitKeyPy();
5090 SWIGINTERN PyObject *_wrap_cvWaitKey(PyObject *self, PyObject *args) {
5095 if (!PyTuple_Check(args)) SWIG_fail;
5096 argc = PyObject_Length(args);
5097 for (ii = 0; (ii < argc) && (ii < 1); ii++) {
5098 argv[ii] = PyTuple_GET_ITEM(args,ii);
5101 return _wrap_cvWaitKey__SWIG_1(self, args);
5106 int res = SWIG_AsVal_int(argv[0], NULL);
5107 _v = SWIG_CheckState(res);
5110 return _wrap_cvWaitKey__SWIG_0(self, args);
5115 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cvWaitKey'.\n Possible C/C++ prototypes are:\n cvWaitKeyPy(int)\n cvWaitKeyPy()\n");
5120 SWIGINTERN PyObject *_wrap_cvLoadImage__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5121 PyObject *resultobj = 0;
5122 char *arg1 = (char *) 0 ;
5130 PyObject * obj0 = 0 ;
5131 PyObject * obj1 = 0 ;
5133 if (!PyArg_ParseTuple(args,(char *)"OO:cvLoadImage",&obj0,&obj1)) SWIG_fail;
5134 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5135 if (!SWIG_IsOK(res1)) {
5136 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvLoadImage" "', argument " "1"" of type '" "char const *""'");
5138 arg1 = reinterpret_cast< char * >(buf1);
5139 ecode2 = SWIG_AsVal_int(obj1, &val2);
5140 if (!SWIG_IsOK(ecode2)) {
5141 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cvLoadImage" "', argument " "2"" of type '" "int""'");
5143 arg2 = static_cast< int >(val2);
5146 result = (CvMat *)cvLoadImageMat((char const *)arg1,arg2);
5153 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvMat, SWIG_POINTER_OWN | 0 );
5154 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5157 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5162 SWIGINTERN PyObject *_wrap_cvLoadImage__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5163 PyObject *resultobj = 0;
5164 char *arg1 = (char *) 0 ;
5169 PyObject * obj0 = 0 ;
5171 if (!PyArg_ParseTuple(args,(char *)"O:cvLoadImage",&obj0)) SWIG_fail;
5172 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5173 if (!SWIG_IsOK(res1)) {
5174 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvLoadImage" "', argument " "1"" of type '" "char const *""'");
5176 arg1 = reinterpret_cast< char * >(buf1);
5179 result = (CvMat *)cvLoadImageMat((char const *)arg1);
5186 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvMat, SWIG_POINTER_OWN | 0 );
5187 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5190 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5195 SWIGINTERN PyObject *_wrap_cvLoadImage(PyObject *self, PyObject *args) {
5200 if (!PyTuple_Check(args)) SWIG_fail;
5201 argc = PyObject_Length(args);
5202 for (ii = 0; (ii < argc) && (ii < 2); ii++) {
5203 argv[ii] = PyTuple_GET_ITEM(args,ii);
5207 int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
5208 _v = SWIG_CheckState(res);
5210 return _wrap_cvLoadImage__SWIG_1(self, args);
5215 int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
5216 _v = SWIG_CheckState(res);
5219 int res = SWIG_AsVal_int(argv[1], NULL);
5220 _v = SWIG_CheckState(res);
5223 return _wrap_cvLoadImage__SWIG_0(self, args);
5229 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'cvLoadImage'.\n Possible C/C++ prototypes are:\n cvLoadImageMat(char const *,int)\n cvLoadImageMat(char const *)\n");
5234 SWIGINTERN PyObject *_wrap_cvRetrieveFrame(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5235 PyObject *resultobj = 0;
5236 CvCapture *arg1 = (CvCapture *) 0 ;
5240 PyObject * obj0 = 0 ;
5242 if (!PyArg_ParseTuple(args,(char *)"O:cvRetrieveFrame",&obj0)) SWIG_fail;
5243 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvCapture, 0 | 0 );
5244 if (!SWIG_IsOK(res1)) {
5245 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvRetrieveFrame" "', argument " "1"" of type '" "CvCapture *""'");
5247 arg1 = reinterpret_cast< CvCapture * >(argp1);
5250 result = (CvMat *)cvRetrieveFrame__CvMat(arg1);
5257 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvMat, 0 | 0 );
5264 SWIGINTERN PyObject *_wrap_cvQueryFrame(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5265 PyObject *resultobj = 0;
5266 CvCapture *arg1 = (CvCapture *) 0 ;
5270 PyObject * obj0 = 0 ;
5272 if (!PyArg_ParseTuple(args,(char *)"O:cvQueryFrame",&obj0)) SWIG_fail;
5273 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvCapture, 0 | 0 );
5274 if (!SWIG_IsOK(res1)) {
5275 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvQueryFrame" "', argument " "1"" of type '" "CvCapture *""'");
5277 arg1 = reinterpret_cast< CvCapture * >(argp1);
5280 result = (CvMat *)cvQueryFrame__CvMat(arg1);
5287 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvMat, 0 | 0 );
5294 SWIGINTERN PyObject *_wrap_CV_FOURCC(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5295 PyObject *resultobj = 0;
5309 PyObject * obj0 = 0 ;
5310 PyObject * obj1 = 0 ;
5311 PyObject * obj2 = 0 ;
5312 PyObject * obj3 = 0 ;
5314 if (!PyArg_ParseTuple(args,(char *)"OOOO:CV_FOURCC",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
5315 ecode1 = SWIG_AsVal_char(obj0, &val1);
5316 if (!SWIG_IsOK(ecode1)) {
5317 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "CV_FOURCC" "', argument " "1"" of type '" "char""'");
5319 arg1 = static_cast< char >(val1);
5320 ecode2 = SWIG_AsVal_char(obj1, &val2);
5321 if (!SWIG_IsOK(ecode2)) {
5322 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CV_FOURCC" "', argument " "2"" of type '" "char""'");
5324 arg2 = static_cast< char >(val2);
5325 ecode3 = SWIG_AsVal_char(obj2, &val3);
5326 if (!SWIG_IsOK(ecode3)) {
5327 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CV_FOURCC" "', argument " "3"" of type '" "char""'");
5329 arg3 = static_cast< char >(val3);
5330 ecode4 = SWIG_AsVal_char(obj3, &val4);
5331 if (!SWIG_IsOK(ecode4)) {
5332 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CV_FOURCC" "', argument " "4"" of type '" "char""'");
5334 arg4 = static_cast< char >(val4);
5337 result = (int)CV_FOURCC(arg1,arg2,arg3,arg4);
5344 resultobj = SWIG_From_int(static_cast< int >(result));
5351 SWIGINTERN PyObject *_wrap_cvInitSystem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5352 PyObject *resultobj = 0;
5354 char **arg2 = (char **) 0 ;
5360 PyObject * obj0 = 0 ;
5361 PyObject * obj1 = 0 ;
5363 if (!PyArg_ParseTuple(args,(char *)"OO:cvInitSystem",&obj0,&obj1)) SWIG_fail;
5364 ecode1 = SWIG_AsVal_int(obj0, &val1);
5365 if (!SWIG_IsOK(ecode1)) {
5366 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cvInitSystem" "', argument " "1"" of type '" "int""'");
5368 arg1 = static_cast< int >(val1);
5370 if ((SWIG_ConvertPtr(obj1, &vptr2, SWIGTYPE_p_char, 1)) == -1){
5373 buffer2 = (char *) vptr2;
5378 result = (int)cvInitSystem(arg1,arg2);
5385 resultobj = SWIG_From_int(static_cast< int >(result));
5392 SWIGINTERN PyObject *_wrap_cvStartWindowThread(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5393 PyObject *resultobj = 0;
5396 if (!PyArg_ParseTuple(args,(char *)":cvStartWindowThread")) SWIG_fail;
5399 result = (int)cvStartWindowThread();
5406 resultobj = SWIG_From_int(static_cast< int >(result));
5413 SWIGINTERN PyObject *_wrap_cvNamedWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5414 PyObject *resultobj = 0;
5415 char *arg1 = (char *) 0 ;
5416 int arg2 = (int) 1 ;
5423 PyObject * obj0 = 0 ;
5424 PyObject * obj1 = 0 ;
5426 if (!PyArg_ParseTuple(args,(char *)"O|O:cvNamedWindow",&obj0,&obj1)) SWIG_fail;
5427 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5428 if (!SWIG_IsOK(res1)) {
5429 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvNamedWindow" "', argument " "1"" of type '" "char const *""'");
5431 arg1 = reinterpret_cast< char * >(buf1);
5433 ecode2 = SWIG_AsVal_int(obj1, &val2);
5434 if (!SWIG_IsOK(ecode2)) {
5435 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cvNamedWindow" "', argument " "2"" of type '" "int""'");
5437 arg2 = static_cast< int >(val2);
5441 result = (int)cvNamedWindow((char const *)arg1,arg2);
5448 resultobj = SWIG_From_int(static_cast< int >(result));
5449 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5452 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5457 SWIGINTERN PyObject *_wrap_cvShowImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5458 PyObject *resultobj = 0;
5459 char *arg1 = (char *) 0 ;
5460 CvArr *arg2 = (CvArr *) 0 ;
5464 bool freearg2 = false ;
5465 PyObject * obj0 = 0 ;
5466 PyObject * obj1 = 0 ;
5468 if (!PyArg_ParseTuple(args,(char *)"OO:cvShowImage",&obj0,&obj1)) SWIG_fail;
5469 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5470 if (!SWIG_IsOK(res1)) {
5471 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvShowImage" "', argument " "1"" of type '" "char const *""'");
5473 arg1 = reinterpret_cast< char * >(buf1);
5475 arg2 = PyObject_to_CvArr(obj1, &freearg2);
5479 cvShowImage((char const *)arg1,(void const *)arg2);
5486 resultobj = SWIG_Py_Void();
5487 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5489 if(arg2!=NULL && freearg2){
5490 cvReleaseData( arg2 );
5496 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5498 if(arg2!=NULL && freearg2){
5499 cvReleaseData( arg2 );
5507 SWIGINTERN PyObject *_wrap_cvResizeWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5508 PyObject *resultobj = 0;
5509 char *arg1 = (char *) 0 ;
5519 PyObject * obj0 = 0 ;
5520 PyObject * obj1 = 0 ;
5521 PyObject * obj2 = 0 ;
5523 if (!PyArg_ParseTuple(args,(char *)"OOO:cvResizeWindow",&obj0,&obj1,&obj2)) SWIG_fail;
5524 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5525 if (!SWIG_IsOK(res1)) {
5526 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvResizeWindow" "', argument " "1"" of type '" "char const *""'");
5528 arg1 = reinterpret_cast< char * >(buf1);
5529 ecode2 = SWIG_AsVal_int(obj1, &val2);
5530 if (!SWIG_IsOK(ecode2)) {
5531 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cvResizeWindow" "', argument " "2"" of type '" "int""'");
5533 arg2 = static_cast< int >(val2);
5534 ecode3 = SWIG_AsVal_int(obj2, &val3);
5535 if (!SWIG_IsOK(ecode3)) {
5536 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cvResizeWindow" "', argument " "3"" of type '" "int""'");
5538 arg3 = static_cast< int >(val3);
5541 cvResizeWindow((char const *)arg1,arg2,arg3);
5548 resultobj = SWIG_Py_Void();
5549 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5552 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5557 SWIGINTERN PyObject *_wrap_cvMoveWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5558 PyObject *resultobj = 0;
5559 char *arg1 = (char *) 0 ;
5569 PyObject * obj0 = 0 ;
5570 PyObject * obj1 = 0 ;
5571 PyObject * obj2 = 0 ;
5573 if (!PyArg_ParseTuple(args,(char *)"OOO:cvMoveWindow",&obj0,&obj1,&obj2)) SWIG_fail;
5574 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5575 if (!SWIG_IsOK(res1)) {
5576 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvMoveWindow" "', argument " "1"" of type '" "char const *""'");
5578 arg1 = reinterpret_cast< char * >(buf1);
5579 ecode2 = SWIG_AsVal_int(obj1, &val2);
5580 if (!SWIG_IsOK(ecode2)) {
5581 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cvMoveWindow" "', argument " "2"" of type '" "int""'");
5583 arg2 = static_cast< int >(val2);
5584 ecode3 = SWIG_AsVal_int(obj2, &val3);
5585 if (!SWIG_IsOK(ecode3)) {
5586 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cvMoveWindow" "', argument " "3"" of type '" "int""'");
5588 arg3 = static_cast< int >(val3);
5591 cvMoveWindow((char const *)arg1,arg2,arg3);
5598 resultobj = SWIG_Py_Void();
5599 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5602 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5607 SWIGINTERN PyObject *_wrap_cvDestroyWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5608 PyObject *resultobj = 0;
5609 char *arg1 = (char *) 0 ;
5613 PyObject * obj0 = 0 ;
5615 if (!PyArg_ParseTuple(args,(char *)"O:cvDestroyWindow",&obj0)) SWIG_fail;
5616 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5617 if (!SWIG_IsOK(res1)) {
5618 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvDestroyWindow" "', argument " "1"" of type '" "char const *""'");
5620 arg1 = reinterpret_cast< char * >(buf1);
5623 cvDestroyWindow((char const *)arg1);
5630 resultobj = SWIG_Py_Void();
5631 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5634 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5639 SWIGINTERN PyObject *_wrap_cvDestroyAllWindows(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5640 PyObject *resultobj = 0;
5642 if (!PyArg_ParseTuple(args,(char *)":cvDestroyAllWindows")) SWIG_fail;
5645 cvDestroyAllWindows();
5652 resultobj = SWIG_Py_Void();
5659 SWIGINTERN PyObject *_wrap_cvGetWindowHandle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5660 PyObject *resultobj = 0;
5661 char *arg1 = (char *) 0 ;
5666 PyObject * obj0 = 0 ;
5668 if (!PyArg_ParseTuple(args,(char *)"O:cvGetWindowHandle",&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 '" "cvGetWindowHandle" "', argument " "1"" of type '" "char const *""'");
5673 arg1 = reinterpret_cast< char * >(buf1);
5676 result = (void *)cvGetWindowHandle((char const *)arg1);
5683 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 );
5684 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5687 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5692 SWIGINTERN PyObject *_wrap_cvGetWindowName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5693 PyObject *resultobj = 0;
5694 void *arg1 = (void *) 0 ;
5697 PyObject * obj0 = 0 ;
5699 if (!PyArg_ParseTuple(args,(char *)"O:cvGetWindowName",&obj0)) SWIG_fail;
5700 res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
5701 if (!SWIG_IsOK(res1)) {
5702 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvGetWindowName" "', argument " "1"" of type '" "void *""'");
5706 result = (char *)cvGetWindowName(arg1);
5713 resultobj = SWIG_FromCharPtr((const char *)result);
5720 SWIGINTERN PyObject *_wrap_cvCreateTrackbar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5721 PyObject *resultobj = 0;
5722 char *arg1 = (char *) 0 ;
5723 char *arg2 = (char *) 0 ;
5724 int *arg3 = (int *) 0 ;
5726 CvTrackbarCallback arg5 = (CvTrackbarCallback) 0 ;
5736 PyObject * obj0 = 0 ;
5737 PyObject * obj1 = 0 ;
5738 PyObject * obj2 = 0 ;
5739 PyObject * obj3 = 0 ;
5740 PyObject * obj4 = 0 ;
5742 if (!PyArg_ParseTuple(args,(char *)"OOOOO:cvCreateTrackbar",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
5743 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5744 if (!SWIG_IsOK(res1)) {
5745 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvCreateTrackbar" "', argument " "1"" of type '" "char const *""'");
5747 arg1 = reinterpret_cast< char * >(buf1);
5748 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5749 if (!SWIG_IsOK(res2)) {
5750 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cvCreateTrackbar" "', argument " "2"" of type '" "char const *""'");
5752 arg2 = reinterpret_cast< char * >(buf2);
5754 arg3 = (int *)malloc (sizeof (int));
5755 *arg3 = PyInt_AsLong (obj2);
5757 ecode4 = SWIG_AsVal_int(obj3, &val4);
5758 if (!SWIG_IsOK(ecode4)) {
5759 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cvCreateTrackbar" "', argument " "4"" of type '" "int""'");
5761 arg4 = static_cast< int >(val4);
5763 if(my_trackbar_cb_size == ICV_PY_MAX_CB){
5764 SWIG_exception(SWIG_IndexError, "Exceeded maximum number of trackbars");
5767 my_trackbar_cb_size++;
5769 /* memorize the Python address of the callback function */
5770 my_trackbar_cb_funcs[my_trackbar_cb_size-1].py_func = (PyObject *) obj4;
5772 /* prepare to call the C function who will register the callback */
5773 arg5 = my_trackbar_cb_funcs[ my_trackbar_cb_size-1 ].cv_func;
5777 result = (int)cvCreateTrackbar((char const *)arg1,(char const *)arg2,arg3,arg4,arg5);
5784 resultobj = SWIG_From_int(static_cast< int >(result));
5785 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5786 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5789 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5790 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5795 SWIGINTERN PyObject *_wrap_cvGetTrackbarPos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5796 PyObject *resultobj = 0;
5797 char *arg1 = (char *) 0 ;
5798 char *arg2 = (char *) 0 ;
5806 PyObject * obj0 = 0 ;
5807 PyObject * obj1 = 0 ;
5809 if (!PyArg_ParseTuple(args,(char *)"OO:cvGetTrackbarPos",&obj0,&obj1)) SWIG_fail;
5810 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5811 if (!SWIG_IsOK(res1)) {
5812 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvGetTrackbarPos" "', argument " "1"" of type '" "char const *""'");
5814 arg1 = reinterpret_cast< char * >(buf1);
5815 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5816 if (!SWIG_IsOK(res2)) {
5817 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cvGetTrackbarPos" "', argument " "2"" of type '" "char const *""'");
5819 arg2 = reinterpret_cast< char * >(buf2);
5822 result = (int)cvGetTrackbarPos((char const *)arg1,(char const *)arg2);
5829 resultobj = SWIG_From_int(static_cast< int >(result));
5830 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5831 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5834 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5835 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5840 SWIGINTERN PyObject *_wrap_cvSetTrackbarPos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5841 PyObject *resultobj = 0;
5842 char *arg1 = (char *) 0 ;
5843 char *arg2 = (char *) 0 ;
5853 PyObject * obj0 = 0 ;
5854 PyObject * obj1 = 0 ;
5855 PyObject * obj2 = 0 ;
5857 if (!PyArg_ParseTuple(args,(char *)"OOO:cvSetTrackbarPos",&obj0,&obj1,&obj2)) SWIG_fail;
5858 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5859 if (!SWIG_IsOK(res1)) {
5860 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvSetTrackbarPos" "', argument " "1"" of type '" "char const *""'");
5862 arg1 = reinterpret_cast< char * >(buf1);
5863 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5864 if (!SWIG_IsOK(res2)) {
5865 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cvSetTrackbarPos" "', argument " "2"" of type '" "char const *""'");
5867 arg2 = reinterpret_cast< char * >(buf2);
5868 ecode3 = SWIG_AsVal_int(obj2, &val3);
5869 if (!SWIG_IsOK(ecode3)) {
5870 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cvSetTrackbarPos" "', argument " "3"" of type '" "int""'");
5872 arg3 = static_cast< int >(val3);
5875 cvSetTrackbarPos((char const *)arg1,(char const *)arg2,arg3);
5882 resultobj = SWIG_Py_Void();
5883 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5884 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5887 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5888 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5893 SWIGINTERN PyObject *_wrap_cvSetMouseCallbackOld(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5894 PyObject *resultobj = 0;
5895 char *arg1 = (char *) 0 ;
5896 CvMouseCallback arg2 = (CvMouseCallback) 0 ;
5897 void *arg3 = (void *) NULL ;
5902 PyObject * obj0 = 0 ;
5903 PyObject * obj1 = 0 ;
5904 PyObject * obj2 = 0 ;
5906 if (!PyArg_ParseTuple(args,(char *)"OO|O:cvSetMouseCallbackOld",&obj0,&obj1,&obj2)) SWIG_fail;
5907 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5908 if (!SWIG_IsOK(res1)) {
5909 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvSetMouseCallbackOld" "', argument " "1"" of type '" "char const *""'");
5911 arg1 = reinterpret_cast< char * >(buf1);
5913 int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_int_int_int_int_p_void__void);
5914 if (!SWIG_IsOK(res)) {
5915 SWIG_exception_fail(SWIG_ArgError(res), "in method '" "cvSetMouseCallbackOld" "', argument " "2"" of type '" "CvMouseCallback""'");
5919 res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
5920 if (!SWIG_IsOK(res3)) {
5921 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "cvSetMouseCallbackOld" "', argument " "3"" of type '" "void *""'");
5926 cvSetMouseCallback((char const *)arg1,arg2,arg3);
5933 resultobj = SWIG_Py_Void();
5934 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5937 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5942 SWIGINTERN PyObject *_wrap_cvLoadImageM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5943 PyObject *resultobj = 0;
5944 char *arg1 = (char *) 0 ;
5945 int arg2 = (int) 1 ;
5952 PyObject * obj0 = 0 ;
5953 PyObject * obj1 = 0 ;
5955 if (!PyArg_ParseTuple(args,(char *)"O|O:cvLoadImageM",&obj0,&obj1)) SWIG_fail;
5956 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5957 if (!SWIG_IsOK(res1)) {
5958 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvLoadImageM" "', argument " "1"" of type '" "char const *""'");
5960 arg1 = reinterpret_cast< char * >(buf1);
5962 ecode2 = SWIG_AsVal_int(obj1, &val2);
5963 if (!SWIG_IsOK(ecode2)) {
5964 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cvLoadImageM" "', argument " "2"" of type '" "int""'");
5966 arg2 = static_cast< int >(val2);
5970 result = (CvMat *)cvLoadImageM((char const *)arg1,arg2);
5977 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvMat, SWIG_POINTER_OWN | 0 );
5978 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5981 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5986 SWIGINTERN PyObject *_wrap_cvSaveImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5987 PyObject *resultobj = 0;
5988 char *arg1 = (char *) 0 ;
5989 CvArr *arg2 = (CvArr *) 0 ;
5994 bool freearg2 = false ;
5995 PyObject * obj0 = 0 ;
5996 PyObject * obj1 = 0 ;
5998 if (!PyArg_ParseTuple(args,(char *)"OO:cvSaveImage",&obj0,&obj1)) SWIG_fail;
5999 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
6000 if (!SWIG_IsOK(res1)) {
6001 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvSaveImage" "', argument " "1"" of type '" "char const *""'");
6003 arg1 = reinterpret_cast< char * >(buf1);
6005 arg2 = PyObject_to_CvArr(obj1, &freearg2);
6009 result = (int)cvSaveImage((char const *)arg1,(void const *)arg2);
6016 resultobj = SWIG_From_int(static_cast< int >(result));
6017 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
6019 if(arg2!=NULL && freearg2){
6020 cvReleaseData( arg2 );
6026 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
6028 if(arg2!=NULL && freearg2){
6029 cvReleaseData( arg2 );
6037 SWIGINTERN PyObject *_wrap_cvConvertImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6038 PyObject *resultobj = 0;
6039 CvArr *arg1 = (CvArr *) 0 ;
6040 CvArr *arg2 = (CvArr *) 0 ;
6041 int arg3 = (int) 0 ;
6042 bool freearg1 = false ;
6043 bool freearg2 = false ;
6046 PyObject * obj0 = 0 ;
6047 PyObject * obj1 = 0 ;
6048 PyObject * obj2 = 0 ;
6050 if (!PyArg_ParseTuple(args,(char *)"OO|O:cvConvertImage",&obj0,&obj1,&obj2)) SWIG_fail;
6052 arg1 = PyObject_to_CvArr(obj0, &freearg1);
6055 arg2 = PyObject_to_CvArr(obj1, &freearg2);
6058 ecode3 = SWIG_AsVal_int(obj2, &val3);
6059 if (!SWIG_IsOK(ecode3)) {
6060 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cvConvertImage" "', argument " "3"" of type '" "int""'");
6062 arg3 = static_cast< int >(val3);
6066 cvConvertImage((void const *)arg1,arg2,arg3);
6073 resultobj = SWIG_Py_Void();
6075 if(arg1!=NULL && freearg1){
6076 cvReleaseData( arg1 );
6081 if(arg2!=NULL && freearg2){
6082 cvReleaseData( arg2 );
6089 if(arg1!=NULL && freearg1){
6090 cvReleaseData( arg1 );
6095 if(arg2!=NULL && freearg2){
6096 cvReleaseData( arg2 );
6104 SWIGINTERN PyObject *_wrap_cvWaitKeyC(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6105 PyObject *resultobj = 0;
6106 int arg1 = (int) 0 ;
6110 PyObject * obj0 = 0 ;
6112 if (!PyArg_ParseTuple(args,(char *)"|O:cvWaitKeyC",&obj0)) SWIG_fail;
6114 ecode1 = SWIG_AsVal_int(obj0, &val1);
6115 if (!SWIG_IsOK(ecode1)) {
6116 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cvWaitKeyC" "', argument " "1"" of type '" "int""'");
6118 arg1 = static_cast< int >(val1);
6122 result = (int)cvWaitKey(arg1);
6129 resultobj = SWIG_From_int(static_cast< int >(result));
6136 SWIGINTERN PyObject *_wrap_cvCreateFileCapture(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6137 PyObject *resultobj = 0;
6138 char *arg1 = (char *) 0 ;
6139 CvCapture *result = 0 ;
6143 PyObject * obj0 = 0 ;
6145 if (!PyArg_ParseTuple(args,(char *)"O:cvCreateFileCapture",&obj0)) SWIG_fail;
6146 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
6147 if (!SWIG_IsOK(res1)) {
6148 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvCreateFileCapture" "', argument " "1"" of type '" "char const *""'");
6150 arg1 = reinterpret_cast< char * >(buf1);
6153 result = (CvCapture *)cvCreateFileCapture((char const *)arg1);
6160 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvCapture, 0 | 0 );
6161 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
6164 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
6169 SWIGINTERN PyObject *_wrap_cvCreateCameraCapture(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6170 PyObject *resultobj = 0;
6172 CvCapture *result = 0 ;
6175 PyObject * obj0 = 0 ;
6177 if (!PyArg_ParseTuple(args,(char *)"O:cvCreateCameraCapture",&obj0)) SWIG_fail;
6178 ecode1 = SWIG_AsVal_int(obj0, &val1);
6179 if (!SWIG_IsOK(ecode1)) {
6180 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cvCreateCameraCapture" "', argument " "1"" of type '" "int""'");
6182 arg1 = static_cast< int >(val1);
6185 result = (CvCapture *)cvCreateCameraCapture(arg1);
6192 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvCapture, 0 | 0 );
6199 SWIGINTERN PyObject *_wrap_cvGrabFrame(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6200 PyObject *resultobj = 0;
6201 CvCapture *arg1 = (CvCapture *) 0 ;
6205 PyObject * obj0 = 0 ;
6207 if (!PyArg_ParseTuple(args,(char *)"O:cvGrabFrame",&obj0)) SWIG_fail;
6208 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvCapture, 0 | 0 );
6209 if (!SWIG_IsOK(res1)) {
6210 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvGrabFrame" "', argument " "1"" of type '" "CvCapture *""'");
6212 arg1 = reinterpret_cast< CvCapture * >(argp1);
6215 result = (int)cvGrabFrame(arg1);
6222 resultobj = SWIG_From_int(static_cast< int >(result));
6229 SWIGINTERN PyObject *_wrap_cvRetrieveFrame__Deprecated(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6230 PyObject *resultobj = 0;
6231 CvCapture *arg1 = (CvCapture *) 0 ;
6232 IplImage *result = 0 ;
6235 PyObject * obj0 = 0 ;
6237 if (!PyArg_ParseTuple(args,(char *)"O:cvRetrieveFrame__Deprecated",&obj0)) SWIG_fail;
6238 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvCapture, 0 | 0 );
6239 if (!SWIG_IsOK(res1)) {
6240 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvRetrieveFrame__Deprecated" "', argument " "1"" of type '" "CvCapture *""'");
6242 arg1 = reinterpret_cast< CvCapture * >(argp1);
6245 result = (IplImage *)cvRetrieveFrame(arg1);
6253 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.");
6262 SWIGINTERN PyObject *_wrap_cvQueryFrame__Deprecated(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6263 PyObject *resultobj = 0;
6264 CvCapture *arg1 = (CvCapture *) 0 ;
6265 IplImage *result = 0 ;
6268 PyObject * obj0 = 0 ;
6270 if (!PyArg_ParseTuple(args,(char *)"O:cvQueryFrame__Deprecated",&obj0)) SWIG_fail;
6271 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvCapture, 0 | 0 );
6272 if (!SWIG_IsOK(res1)) {
6273 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvQueryFrame__Deprecated" "', argument " "1"" of type '" "CvCapture *""'");
6275 arg1 = reinterpret_cast< CvCapture * >(argp1);
6278 result = (IplImage *)cvQueryFrame(arg1);
6286 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.");
6295 SWIGINTERN PyObject *_wrap_cvGetCaptureProperty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6296 PyObject *resultobj = 0;
6297 CvCapture *arg1 = (CvCapture *) 0 ;
6304 PyObject * obj0 = 0 ;
6305 PyObject * obj1 = 0 ;
6307 if (!PyArg_ParseTuple(args,(char *)"OO:cvGetCaptureProperty",&obj0,&obj1)) SWIG_fail;
6308 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvCapture, 0 | 0 );
6309 if (!SWIG_IsOK(res1)) {
6310 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvGetCaptureProperty" "', argument " "1"" of type '" "CvCapture *""'");
6312 arg1 = reinterpret_cast< CvCapture * >(argp1);
6313 ecode2 = SWIG_AsVal_int(obj1, &val2);
6314 if (!SWIG_IsOK(ecode2)) {
6315 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cvGetCaptureProperty" "', argument " "2"" of type '" "int""'");
6317 arg2 = static_cast< int >(val2);
6320 result = (double)cvGetCaptureProperty(arg1,arg2);
6327 resultobj = SWIG_From_double(static_cast< double >(result));
6334 SWIGINTERN PyObject *_wrap_cvSetCaptureProperty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6335 PyObject *resultobj = 0;
6336 CvCapture *arg1 = (CvCapture *) 0 ;
6346 PyObject * obj0 = 0 ;
6347 PyObject * obj1 = 0 ;
6348 PyObject * obj2 = 0 ;
6350 if (!PyArg_ParseTuple(args,(char *)"OOO:cvSetCaptureProperty",&obj0,&obj1,&obj2)) SWIG_fail;
6351 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvCapture, 0 | 0 );
6352 if (!SWIG_IsOK(res1)) {
6353 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvSetCaptureProperty" "', argument " "1"" of type '" "CvCapture *""'");
6355 arg1 = reinterpret_cast< CvCapture * >(argp1);
6356 ecode2 = SWIG_AsVal_int(obj1, &val2);
6357 if (!SWIG_IsOK(ecode2)) {
6358 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cvSetCaptureProperty" "', argument " "2"" of type '" "int""'");
6360 arg2 = static_cast< int >(val2);
6361 ecode3 = SWIG_AsVal_double(obj2, &val3);
6362 if (!SWIG_IsOK(ecode3)) {
6363 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cvSetCaptureProperty" "', argument " "3"" of type '" "double""'");
6365 arg3 = static_cast< double >(val3);
6368 result = (int)cvSetCaptureProperty(arg1,arg2,arg3);
6375 resultobj = SWIG_From_int(static_cast< int >(result));
6382 SWIGINTERN PyObject *_wrap_cvCreateVideoWriter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6383 PyObject *resultobj = 0;
6384 char *arg1 = (char *) 0 ;
6388 int arg5 = (int) 1 ;
6389 CvVideoWriter *result = 0 ;
6401 PyObject * obj0 = 0 ;
6402 PyObject * obj1 = 0 ;
6403 PyObject * obj2 = 0 ;
6404 PyObject * obj3 = 0 ;
6405 PyObject * obj4 = 0 ;
6407 if (!PyArg_ParseTuple(args,(char *)"OOOO|O:cvCreateVideoWriter",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
6408 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
6409 if (!SWIG_IsOK(res1)) {
6410 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvCreateVideoWriter" "', argument " "1"" of type '" "char const *""'");
6412 arg1 = reinterpret_cast< char * >(buf1);
6413 ecode2 = SWIG_AsVal_int(obj1, &val2);
6414 if (!SWIG_IsOK(ecode2)) {
6415 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cvCreateVideoWriter" "', argument " "2"" of type '" "int""'");
6417 arg2 = static_cast< int >(val2);
6418 ecode3 = SWIG_AsVal_double(obj2, &val3);
6419 if (!SWIG_IsOK(ecode3)) {
6420 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cvCreateVideoWriter" "', argument " "3"" of type '" "double""'");
6422 arg3 = static_cast< double >(val3);
6424 res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_CvSize, 0 | 0);
6425 if (!SWIG_IsOK(res4)) {
6426 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cvCreateVideoWriter" "', argument " "4"" of type '" "CvSize""'");
6429 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cvCreateVideoWriter" "', argument " "4"" of type '" "CvSize""'");
6431 CvSize * temp = reinterpret_cast< CvSize * >(argp4);
6433 if (SWIG_IsNewObj(res4)) delete temp;
6437 ecode5 = SWIG_AsVal_int(obj4, &val5);
6438 if (!SWIG_IsOK(ecode5)) {
6439 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cvCreateVideoWriter" "', argument " "5"" of type '" "int""'");
6441 arg5 = static_cast< int >(val5);
6445 result = (CvVideoWriter *)cvCreateVideoWriter((char const *)arg1,arg2,arg3,arg4,arg5);
6452 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvVideoWriter, SWIG_POINTER_OWN | 0 );
6453 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
6456 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
6461 SWIGINTERN PyObject *_wrap_cvWriteFrame(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6462 PyObject *resultobj = 0;
6463 CvVideoWriter *arg1 = (CvVideoWriter *) 0 ;
6464 IplImage *arg2 = (IplImage *) 0 ;
6469 PyObject * obj0 = 0 ;
6470 PyObject * obj1 = 0 ;
6472 if (!PyArg_ParseTuple(args,(char *)"OO:cvWriteFrame",&obj0,&obj1)) SWIG_fail;
6473 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvVideoWriter, 0 | 0 );
6474 if (!SWIG_IsOK(res1)) {
6475 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cvWriteFrame" "', argument " "1"" of type '" "CvVideoWriter *""'");
6477 arg1 = reinterpret_cast< CvVideoWriter * >(argp1);
6480 int res = SWIG_ConvertPtr(obj1, (&vptr), SWIGTYPE_p_CvMat, 0);
6482 SWIG_exception( SWIG_TypeError, "%%typemap(in) IplImage * : could not convert to CvMat");
6485 arg2 = cvGetImage((CvMat *)vptr, &header2);
6489 result = (int)cvWriteFrame(arg1,(_IplImage const *)arg2);
6496 resultobj = SWIG_From_int(static_cast< int >(result));
6503 SWIGINTERN PyObject *_wrap_new_CvvImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6504 PyObject *resultobj = 0;
6505 CvvImage *result = 0 ;
6507 if (!PyArg_ParseTuple(args,(char *)":new_CvvImage")) SWIG_fail;
6510 result = (CvvImage *)new CvvImage();
6517 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CvvImage, SWIG_POINTER_NEW | 0 );
6524 SWIGINTERN PyObject *_wrap_delete_CvvImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6525 PyObject *resultobj = 0;
6526 CvvImage *arg1 = (CvvImage *) 0 ;
6529 PyObject * obj0 = 0 ;
6531 if (!PyArg_ParseTuple(args,(char *)"O:delete_CvvImage",&obj0)) SWIG_fail;
6532 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, SWIG_POINTER_DISOWN | 0 );
6533 if (!SWIG_IsOK(res1)) {
6534 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CvvImage" "', argument " "1"" of type '" "CvvImage *""'");
6536 arg1 = reinterpret_cast< CvvImage * >(argp1);
6546 resultobj = SWIG_Py_Void();
6553 SWIGINTERN PyObject *_wrap_CvvImage_Create__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6554 PyObject *resultobj = 0;
6555 CvvImage *arg1 = (CvvImage *) 0 ;
6571 PyObject * obj0 = 0 ;
6572 PyObject * obj1 = 0 ;
6573 PyObject * obj2 = 0 ;
6574 PyObject * obj3 = 0 ;
6575 PyObject * obj4 = 0 ;
6577 if (!PyArg_ParseTuple(args,(char *)"OOOOO:CvvImage_Create",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
6578 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
6579 if (!SWIG_IsOK(res1)) {
6580 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Create" "', argument " "1"" of type '" "CvvImage *""'");
6582 arg1 = reinterpret_cast< CvvImage * >(argp1);
6583 ecode2 = SWIG_AsVal_int(obj1, &val2);
6584 if (!SWIG_IsOK(ecode2)) {
6585 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CvvImage_Create" "', argument " "2"" of type '" "int""'");
6587 arg2 = static_cast< int >(val2);
6588 ecode3 = SWIG_AsVal_int(obj2, &val3);
6589 if (!SWIG_IsOK(ecode3)) {
6590 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CvvImage_Create" "', argument " "3"" of type '" "int""'");
6592 arg3 = static_cast< int >(val3);
6593 ecode4 = SWIG_AsVal_int(obj3, &val4);
6594 if (!SWIG_IsOK(ecode4)) {
6595 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CvvImage_Create" "', argument " "4"" of type '" "int""'");
6597 arg4 = static_cast< int >(val4);
6598 ecode5 = SWIG_AsVal_int(obj4, &val5);
6599 if (!SWIG_IsOK(ecode5)) {
6600 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CvvImage_Create" "', argument " "5"" of type '" "int""'");
6602 arg5 = static_cast< int >(val5);
6605 result = (bool)(arg1)->Create(arg2,arg3,arg4,arg5);
6612 resultobj = SWIG_From_bool(static_cast< bool >(result));
6619 SWIGINTERN PyObject *_wrap_CvvImage_Create__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6620 PyObject *resultobj = 0;
6621 CvvImage *arg1 = (CvvImage *) 0 ;
6634 PyObject * obj0 = 0 ;
6635 PyObject * obj1 = 0 ;
6636 PyObject * obj2 = 0 ;
6637 PyObject * obj3 = 0 ;
6639 if (!PyArg_ParseTuple(args,(char *)"OOOO:CvvImage_Create",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
6640 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
6641 if (!SWIG_IsOK(res1)) {
6642 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Create" "', argument " "1"" of type '" "CvvImage *""'");
6644 arg1 = reinterpret_cast< CvvImage * >(argp1);
6645 ecode2 = SWIG_AsVal_int(obj1, &val2);
6646 if (!SWIG_IsOK(ecode2)) {
6647 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CvvImage_Create" "', argument " "2"" of type '" "int""'");
6649 arg2 = static_cast< int >(val2);
6650 ecode3 = SWIG_AsVal_int(obj2, &val3);
6651 if (!SWIG_IsOK(ecode3)) {
6652 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CvvImage_Create" "', argument " "3"" of type '" "int""'");
6654 arg3 = static_cast< int >(val3);
6655 ecode4 = SWIG_AsVal_int(obj3, &val4);
6656 if (!SWIG_IsOK(ecode4)) {
6657 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CvvImage_Create" "', argument " "4"" of type '" "int""'");
6659 arg4 = static_cast< int >(val4);
6662 result = (bool)(arg1)->Create(arg2,arg3,arg4);
6669 resultobj = SWIG_From_bool(static_cast< bool >(result));
6676 SWIGINTERN PyObject *_wrap_CvvImage_Create(PyObject *self, PyObject *args) {
6681 if (!PyTuple_Check(args)) SWIG_fail;
6682 argc = PyObject_Length(args);
6683 for (ii = 0; (ii < argc) && (ii < 5); ii++) {
6684 argv[ii] = PyTuple_GET_ITEM(args,ii);
6689 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CvvImage, 0);
6690 _v = SWIG_CheckState(res);
6693 int res = SWIG_AsVal_int(argv[1], NULL);
6694 _v = SWIG_CheckState(res);
6698 int res = SWIG_AsVal_int(argv[2], NULL);
6699 _v = SWIG_CheckState(res);
6703 int res = SWIG_AsVal_int(argv[3], NULL);
6704 _v = SWIG_CheckState(res);
6707 return _wrap_CvvImage_Create__SWIG_1(self, args);
6716 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CvvImage, 0);
6717 _v = SWIG_CheckState(res);
6720 int res = SWIG_AsVal_int(argv[1], NULL);
6721 _v = SWIG_CheckState(res);
6725 int res = SWIG_AsVal_int(argv[2], NULL);
6726 _v = SWIG_CheckState(res);
6730 int res = SWIG_AsVal_int(argv[3], NULL);
6731 _v = SWIG_CheckState(res);
6735 int res = SWIG_AsVal_int(argv[4], NULL);
6736 _v = SWIG_CheckState(res);
6739 return _wrap_CvvImage_Create__SWIG_0(self, args);
6748 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvvImage_Create'.\n Possible C/C++ prototypes are:\n Create(int,int,int,int)\n Create(int,int,int)\n");
6753 SWIGINTERN PyObject *_wrap_CvvImage_Load__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6754 PyObject *resultobj = 0;
6755 CvvImage *arg1 = (CvvImage *) 0 ;
6756 char *arg2 = (char *) 0 ;
6766 PyObject * obj0 = 0 ;
6767 PyObject * obj1 = 0 ;
6768 PyObject * obj2 = 0 ;
6770 if (!PyArg_ParseTuple(args,(char *)"OOO:CvvImage_Load",&obj0,&obj1,&obj2)) SWIG_fail;
6771 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
6772 if (!SWIG_IsOK(res1)) {
6773 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Load" "', argument " "1"" of type '" "CvvImage *""'");
6775 arg1 = reinterpret_cast< CvvImage * >(argp1);
6776 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
6777 if (!SWIG_IsOK(res2)) {
6778 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvvImage_Load" "', argument " "2"" of type '" "char const *""'");
6780 arg2 = reinterpret_cast< char * >(buf2);
6781 ecode3 = SWIG_AsVal_int(obj2, &val3);
6782 if (!SWIG_IsOK(ecode3)) {
6783 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CvvImage_Load" "', argument " "3"" of type '" "int""'");
6785 arg3 = static_cast< int >(val3);
6788 result = (bool)(arg1)->Load((char const *)arg2,arg3);
6795 resultobj = SWIG_From_bool(static_cast< bool >(result));
6796 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6799 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6804 SWIGINTERN PyObject *_wrap_CvvImage_Load__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6805 PyObject *resultobj = 0;
6806 CvvImage *arg1 = (CvvImage *) 0 ;
6807 char *arg2 = (char *) 0 ;
6814 PyObject * obj0 = 0 ;
6815 PyObject * obj1 = 0 ;
6817 if (!PyArg_ParseTuple(args,(char *)"OO:CvvImage_Load",&obj0,&obj1)) SWIG_fail;
6818 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
6819 if (!SWIG_IsOK(res1)) {
6820 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Load" "', argument " "1"" of type '" "CvvImage *""'");
6822 arg1 = reinterpret_cast< CvvImage * >(argp1);
6823 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
6824 if (!SWIG_IsOK(res2)) {
6825 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvvImage_Load" "', argument " "2"" of type '" "char const *""'");
6827 arg2 = reinterpret_cast< char * >(buf2);
6830 result = (bool)(arg1)->Load((char const *)arg2);
6837 resultobj = SWIG_From_bool(static_cast< bool >(result));
6838 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6841 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6846 SWIGINTERN PyObject *_wrap_CvvImage_Load(PyObject *self, PyObject *args) {
6851 if (!PyTuple_Check(args)) SWIG_fail;
6852 argc = PyObject_Length(args);
6853 for (ii = 0; (ii < argc) && (ii < 3); ii++) {
6854 argv[ii] = PyTuple_GET_ITEM(args,ii);
6859 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CvvImage, 0);
6860 _v = SWIG_CheckState(res);
6862 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
6863 _v = SWIG_CheckState(res);
6865 return _wrap_CvvImage_Load__SWIG_1(self, args);
6872 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CvvImage, 0);
6873 _v = SWIG_CheckState(res);
6875 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
6876 _v = SWIG_CheckState(res);
6879 int res = SWIG_AsVal_int(argv[2], NULL);
6880 _v = SWIG_CheckState(res);
6883 return _wrap_CvvImage_Load__SWIG_0(self, args);
6890 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvvImage_Load'.\n Possible C/C++ prototypes are:\n Load(char const *,int)\n Load(char const *)\n");
6895 SWIGINTERN PyObject *_wrap_CvvImage_LoadRect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6896 PyObject *resultobj = 0;
6897 CvvImage *arg1 = (CvvImage *) 0 ;
6898 char *arg2 = (char *) 0 ;
6911 PyObject * obj0 = 0 ;
6912 PyObject * obj1 = 0 ;
6913 PyObject * obj2 = 0 ;
6914 PyObject * obj3 = 0 ;
6916 if (!PyArg_ParseTuple(args,(char *)"OOOO:CvvImage_LoadRect",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
6917 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
6918 if (!SWIG_IsOK(res1)) {
6919 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_LoadRect" "', argument " "1"" of type '" "CvvImage *""'");
6921 arg1 = reinterpret_cast< CvvImage * >(argp1);
6922 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
6923 if (!SWIG_IsOK(res2)) {
6924 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvvImage_LoadRect" "', argument " "2"" of type '" "char const *""'");
6926 arg2 = reinterpret_cast< char * >(buf2);
6927 ecode3 = SWIG_AsVal_int(obj2, &val3);
6928 if (!SWIG_IsOK(ecode3)) {
6929 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CvvImage_LoadRect" "', argument " "3"" of type '" "int""'");
6931 arg3 = static_cast< int >(val3);
6933 res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_CvRect, 0 | 0);
6934 if (!SWIG_IsOK(res4)) {
6935 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CvvImage_LoadRect" "', argument " "4"" of type '" "CvRect""'");
6938 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CvvImage_LoadRect" "', argument " "4"" of type '" "CvRect""'");
6940 CvRect * temp = reinterpret_cast< CvRect * >(argp4);
6942 if (SWIG_IsNewObj(res4)) delete temp;
6947 result = (bool)(arg1)->LoadRect((char const *)arg2,arg3,arg4);
6954 resultobj = SWIG_From_bool(static_cast< bool >(result));
6955 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6958 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6963 SWIGINTERN PyObject *_wrap_CvvImage_Save(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6964 PyObject *resultobj = 0;
6965 CvvImage *arg1 = (CvvImage *) 0 ;
6966 char *arg2 = (char *) 0 ;
6973 PyObject * obj0 = 0 ;
6974 PyObject * obj1 = 0 ;
6976 if (!PyArg_ParseTuple(args,(char *)"OO:CvvImage_Save",&obj0,&obj1)) SWIG_fail;
6977 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
6978 if (!SWIG_IsOK(res1)) {
6979 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Save" "', argument " "1"" of type '" "CvvImage *""'");
6981 arg1 = reinterpret_cast< CvvImage * >(argp1);
6982 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
6983 if (!SWIG_IsOK(res2)) {
6984 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvvImage_Save" "', argument " "2"" of type '" "char const *""'");
6986 arg2 = reinterpret_cast< char * >(buf2);
6989 result = (bool)(arg1)->Save((char const *)arg2);
6996 resultobj = SWIG_From_bool(static_cast< bool >(result));
6997 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7000 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7005 SWIGINTERN PyObject *_wrap_CvvImage_CopyOf__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7006 PyObject *resultobj = 0;
7007 CvvImage *arg1 = (CvvImage *) 0 ;
7008 CvvImage *arg2 = 0 ;
7016 PyObject * obj0 = 0 ;
7017 PyObject * obj1 = 0 ;
7018 PyObject * obj2 = 0 ;
7020 if (!PyArg_ParseTuple(args,(char *)"OOO:CvvImage_CopyOf",&obj0,&obj1,&obj2)) SWIG_fail;
7021 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7022 if (!SWIG_IsOK(res1)) {
7023 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_CopyOf" "', argument " "1"" of type '" "CvvImage *""'");
7025 arg1 = reinterpret_cast< CvvImage * >(argp1);
7026 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_CvvImage, 0 );
7027 if (!SWIG_IsOK(res2)) {
7028 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvvImage_CopyOf" "', argument " "2"" of type '" "CvvImage &""'");
7031 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CvvImage_CopyOf" "', argument " "2"" of type '" "CvvImage &""'");
7033 arg2 = reinterpret_cast< CvvImage * >(argp2);
7034 ecode3 = SWIG_AsVal_int(obj2, &val3);
7035 if (!SWIG_IsOK(ecode3)) {
7036 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CvvImage_CopyOf" "', argument " "3"" of type '" "int""'");
7038 arg3 = static_cast< int >(val3);
7041 (arg1)->CopyOf(*arg2,arg3);
7048 resultobj = SWIG_Py_Void();
7055 SWIGINTERN PyObject *_wrap_CvvImage_CopyOf__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7056 PyObject *resultobj = 0;
7057 CvvImage *arg1 = (CvvImage *) 0 ;
7058 CvvImage *arg2 = 0 ;
7063 PyObject * obj0 = 0 ;
7064 PyObject * obj1 = 0 ;
7066 if (!PyArg_ParseTuple(args,(char *)"OO:CvvImage_CopyOf",&obj0,&obj1)) SWIG_fail;
7067 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7068 if (!SWIG_IsOK(res1)) {
7069 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_CopyOf" "', argument " "1"" of type '" "CvvImage *""'");
7071 arg1 = reinterpret_cast< CvvImage * >(argp1);
7072 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_CvvImage, 0 );
7073 if (!SWIG_IsOK(res2)) {
7074 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvvImage_CopyOf" "', argument " "2"" of type '" "CvvImage &""'");
7077 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CvvImage_CopyOf" "', argument " "2"" of type '" "CvvImage &""'");
7079 arg2 = reinterpret_cast< CvvImage * >(argp2);
7082 (arg1)->CopyOf(*arg2);
7089 resultobj = SWIG_Py_Void();
7096 SWIGINTERN PyObject *_wrap_CvvImage_CopyOf__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7097 PyObject *resultobj = 0;
7098 CvvImage *arg1 = (CvvImage *) 0 ;
7099 IplImage *arg2 = (IplImage *) 0 ;
7106 PyObject * obj0 = 0 ;
7107 PyObject * obj1 = 0 ;
7108 PyObject * obj2 = 0 ;
7110 if (!PyArg_ParseTuple(args,(char *)"OOO:CvvImage_CopyOf",&obj0,&obj1,&obj2)) SWIG_fail;
7111 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7112 if (!SWIG_IsOK(res1)) {
7113 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_CopyOf" "', argument " "1"" of type '" "CvvImage *""'");
7115 arg1 = reinterpret_cast< CvvImage * >(argp1);
7118 int res = SWIG_ConvertPtr(obj1, (&vptr), SWIGTYPE_p_CvMat, 0);
7120 SWIG_exception( SWIG_TypeError, "%%typemap(in) IplImage * : could not convert to CvMat");
7123 arg2 = cvGetImage((CvMat *)vptr, &header2);
7125 ecode3 = SWIG_AsVal_int(obj2, &val3);
7126 if (!SWIG_IsOK(ecode3)) {
7127 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CvvImage_CopyOf" "', argument " "3"" of type '" "int""'");
7129 arg3 = static_cast< int >(val3);
7132 (arg1)->CopyOf(arg2,arg3);
7139 resultobj = SWIG_Py_Void();
7146 SWIGINTERN PyObject *_wrap_CvvImage_CopyOf__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7147 PyObject *resultobj = 0;
7148 CvvImage *arg1 = (CvvImage *) 0 ;
7149 IplImage *arg2 = (IplImage *) 0 ;
7153 PyObject * obj0 = 0 ;
7154 PyObject * obj1 = 0 ;
7156 if (!PyArg_ParseTuple(args,(char *)"OO:CvvImage_CopyOf",&obj0,&obj1)) SWIG_fail;
7157 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7158 if (!SWIG_IsOK(res1)) {
7159 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_CopyOf" "', argument " "1"" of type '" "CvvImage *""'");
7161 arg1 = reinterpret_cast< CvvImage * >(argp1);
7164 int res = SWIG_ConvertPtr(obj1, (&vptr), SWIGTYPE_p_CvMat, 0);
7166 SWIG_exception( SWIG_TypeError, "%%typemap(in) IplImage * : could not convert to CvMat");
7169 arg2 = cvGetImage((CvMat *)vptr, &header2);
7173 (arg1)->CopyOf(arg2);
7180 resultobj = SWIG_Py_Void();
7187 SWIGINTERN PyObject *_wrap_CvvImage_CopyOf(PyObject *self, PyObject *args) {
7192 if (!PyTuple_Check(args)) SWIG_fail;
7193 argc = PyObject_Length(args);
7194 for (ii = 0; (ii < argc) && (ii < 3); ii++) {
7195 argv[ii] = PyTuple_GET_ITEM(args,ii);
7200 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CvvImage, 0);
7201 _v = SWIG_CheckState(res);
7204 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_CvvImage, 0);
7205 _v = SWIG_CheckState(res);
7207 return _wrap_CvvImage_CopyOf__SWIG_1(self, args);
7214 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CvvImage, 0);
7215 _v = SWIG_CheckState(res);
7218 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p__IplImage, 0);
7219 _v = SWIG_CheckState(res);
7221 return _wrap_CvvImage_CopyOf__SWIG_3(self, args);
7228 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CvvImage, 0);
7229 _v = SWIG_CheckState(res);
7232 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p__IplImage, 0);
7233 _v = SWIG_CheckState(res);
7236 int res = SWIG_AsVal_int(argv[2], NULL);
7237 _v = SWIG_CheckState(res);
7240 return _wrap_CvvImage_CopyOf__SWIG_2(self, args);
7248 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CvvImage, 0);
7249 _v = SWIG_CheckState(res);
7252 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_CvvImage, 0);
7253 _v = SWIG_CheckState(res);
7256 int res = SWIG_AsVal_int(argv[2], NULL);
7257 _v = SWIG_CheckState(res);
7260 return _wrap_CvvImage_CopyOf__SWIG_0(self, args);
7267 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CvvImage_CopyOf'.\n Possible C/C++ prototypes are:\n CopyOf(CvvImage &,int)\n CopyOf(CvvImage &)\n CopyOf(IplImage *,int)\n CopyOf(IplImage *)\n");
7272 SWIGINTERN PyObject *_wrap_CvvImage_GetImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7273 PyObject *resultobj = 0;
7274 CvvImage *arg1 = (CvvImage *) 0 ;
7275 IplImage *result = 0 ;
7278 PyObject * obj0 = 0 ;
7280 if (!PyArg_ParseTuple(args,(char *)"O:CvvImage_GetImage",&obj0)) SWIG_fail;
7281 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7282 if (!SWIG_IsOK(res1)) {
7283 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_GetImage" "', argument " "1"" of type '" "CvvImage *""'");
7285 arg1 = reinterpret_cast< CvvImage * >(argp1);
7288 result = (IplImage *)(arg1)->GetImage();
7296 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.");
7305 SWIGINTERN PyObject *_wrap_CvvImage_Destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7306 PyObject *resultobj = 0;
7307 CvvImage *arg1 = (CvvImage *) 0 ;
7310 PyObject * obj0 = 0 ;
7312 if (!PyArg_ParseTuple(args,(char *)"O:CvvImage_Destroy",&obj0)) SWIG_fail;
7313 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7314 if (!SWIG_IsOK(res1)) {
7315 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Destroy" "', argument " "1"" of type '" "CvvImage *""'");
7317 arg1 = reinterpret_cast< CvvImage * >(argp1);
7327 resultobj = SWIG_Py_Void();
7334 SWIGINTERN PyObject *_wrap_CvvImage_Width(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7335 PyObject *resultobj = 0;
7336 CvvImage *arg1 = (CvvImage *) 0 ;
7340 PyObject * obj0 = 0 ;
7342 if (!PyArg_ParseTuple(args,(char *)"O:CvvImage_Width",&obj0)) SWIG_fail;
7343 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7344 if (!SWIG_IsOK(res1)) {
7345 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Width" "', argument " "1"" of type '" "CvvImage *""'");
7347 arg1 = reinterpret_cast< CvvImage * >(argp1);
7350 result = (int)(arg1)->Width();
7357 resultobj = SWIG_From_int(static_cast< int >(result));
7364 SWIGINTERN PyObject *_wrap_CvvImage_Height(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7365 PyObject *resultobj = 0;
7366 CvvImage *arg1 = (CvvImage *) 0 ;
7370 PyObject * obj0 = 0 ;
7372 if (!PyArg_ParseTuple(args,(char *)"O:CvvImage_Height",&obj0)) SWIG_fail;
7373 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7374 if (!SWIG_IsOK(res1)) {
7375 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Height" "', argument " "1"" of type '" "CvvImage *""'");
7377 arg1 = reinterpret_cast< CvvImage * >(argp1);
7380 result = (int)(arg1)->Height();
7387 resultobj = SWIG_From_int(static_cast< int >(result));
7394 SWIGINTERN PyObject *_wrap_CvvImage_Bpp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7395 PyObject *resultobj = 0;
7396 CvvImage *arg1 = (CvvImage *) 0 ;
7400 PyObject * obj0 = 0 ;
7402 if (!PyArg_ParseTuple(args,(char *)"O:CvvImage_Bpp",&obj0)) SWIG_fail;
7403 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7404 if (!SWIG_IsOK(res1)) {
7405 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Bpp" "', argument " "1"" of type '" "CvvImage *""'");
7407 arg1 = reinterpret_cast< CvvImage * >(argp1);
7410 result = (int)(arg1)->Bpp();
7417 resultobj = SWIG_From_int(static_cast< int >(result));
7424 SWIGINTERN PyObject *_wrap_CvvImage_Fill(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7425 PyObject *resultobj = 0;
7426 CvvImage *arg1 = (CvvImage *) 0 ;
7432 PyObject * obj0 = 0 ;
7433 PyObject * obj1 = 0 ;
7435 if (!PyArg_ParseTuple(args,(char *)"OO:CvvImage_Fill",&obj0,&obj1)) SWIG_fail;
7436 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7437 if (!SWIG_IsOK(res1)) {
7438 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Fill" "', argument " "1"" of type '" "CvvImage *""'");
7440 arg1 = reinterpret_cast< CvvImage * >(argp1);
7441 ecode2 = SWIG_AsVal_int(obj1, &val2);
7442 if (!SWIG_IsOK(ecode2)) {
7443 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CvvImage_Fill" "', argument " "2"" of type '" "int""'");
7445 arg2 = static_cast< int >(val2);
7455 resultobj = SWIG_Py_Void();
7462 SWIGINTERN PyObject *_wrap_CvvImage_Show(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7463 PyObject *resultobj = 0;
7464 CvvImage *arg1 = (CvvImage *) 0 ;
7465 char *arg2 = (char *) 0 ;
7471 PyObject * obj0 = 0 ;
7472 PyObject * obj1 = 0 ;
7474 if (!PyArg_ParseTuple(args,(char *)"OO:CvvImage_Show",&obj0,&obj1)) SWIG_fail;
7475 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CvvImage, 0 | 0 );
7476 if (!SWIG_IsOK(res1)) {
7477 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CvvImage_Show" "', argument " "1"" of type '" "CvvImage *""'");
7479 arg1 = reinterpret_cast< CvvImage * >(argp1);
7480 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
7481 if (!SWIG_IsOK(res2)) {
7482 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CvvImage_Show" "', argument " "2"" of type '" "char const *""'");
7484 arg2 = reinterpret_cast< char * >(buf2);
7487 (arg1)->Show((char const *)arg2);
7494 resultobj = SWIG_Py_Void();
7495 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7498 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7503 SWIGINTERN PyObject *CvvImage_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7505 if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
7506 SWIG_TypeNewClientData(SWIGTYPE_p_CvvImage, SWIG_NewClientData(obj));
7507 return SWIG_Py_Void();
7510 static PyMethodDef SwigMethods[] = {
7511 { (char *)"new_CvRNG_Wrapper", _wrap_new_CvRNG_Wrapper, METH_VARARGS, NULL},
7512 { (char *)"CvRNG_Wrapper_ptr", _wrap_CvRNG_Wrapper_ptr, METH_VARARGS, NULL},
7513 { (char *)"CvRNG_Wrapper_ref", _wrap_CvRNG_Wrapper_ref, METH_VARARGS, NULL},
7514 { (char *)"CvRNG_Wrapper___eq__", _wrap_CvRNG_Wrapper___eq__, METH_VARARGS, NULL},
7515 { (char *)"CvRNG_Wrapper___ne__", _wrap_CvRNG_Wrapper___ne__, METH_VARARGS, NULL},
7516 { (char *)"delete_CvRNG_Wrapper", _wrap_delete_CvRNG_Wrapper, METH_VARARGS, NULL},
7517 { (char *)"CvRNG_Wrapper_swigregister", CvRNG_Wrapper_swigregister, METH_VARARGS, NULL},
7518 { (char *)"new_CvSubdiv2DEdge_Wrapper", _wrap_new_CvSubdiv2DEdge_Wrapper, METH_VARARGS, NULL},
7519 { (char *)"CvSubdiv2DEdge_Wrapper_ptr", _wrap_CvSubdiv2DEdge_Wrapper_ptr, METH_VARARGS, NULL},
7520 { (char *)"CvSubdiv2DEdge_Wrapper_ref", _wrap_CvSubdiv2DEdge_Wrapper_ref, METH_VARARGS, NULL},
7521 { (char *)"CvSubdiv2DEdge_Wrapper___eq__", _wrap_CvSubdiv2DEdge_Wrapper___eq__, METH_VARARGS, NULL},
7522 { (char *)"CvSubdiv2DEdge_Wrapper___ne__", _wrap_CvSubdiv2DEdge_Wrapper___ne__, METH_VARARGS, NULL},
7523 { (char *)"delete_CvSubdiv2DEdge_Wrapper", _wrap_delete_CvSubdiv2DEdge_Wrapper, METH_VARARGS, NULL},
7524 { (char *)"CvSubdiv2DEdge_Wrapper_swigregister", CvSubdiv2DEdge_Wrapper_swigregister, METH_VARARGS, NULL},
7525 { (char *)"cvSetMouseCallback", _wrap_cvSetMouseCallback, METH_VARARGS, NULL},
7526 { (char *)"cvWaitKey", _wrap_cvWaitKey, METH_VARARGS, NULL},
7527 { (char *)"cvLoadImage", _wrap_cvLoadImage, METH_VARARGS, NULL},
7528 { (char *)"cvRetrieveFrame", _wrap_cvRetrieveFrame, METH_VARARGS, NULL},
7529 { (char *)"cvQueryFrame", _wrap_cvQueryFrame, METH_VARARGS, NULL},
7530 { (char *)"CV_FOURCC", _wrap_CV_FOURCC, METH_VARARGS, NULL},
7531 { (char *)"cvInitSystem", _wrap_cvInitSystem, METH_VARARGS, NULL},
7532 { (char *)"cvStartWindowThread", _wrap_cvStartWindowThread, METH_VARARGS, NULL},
7533 { (char *)"cvNamedWindow", _wrap_cvNamedWindow, METH_VARARGS, NULL},
7534 { (char *)"cvShowImage", _wrap_cvShowImage, METH_VARARGS, NULL},
7535 { (char *)"cvResizeWindow", _wrap_cvResizeWindow, METH_VARARGS, NULL},
7536 { (char *)"cvMoveWindow", _wrap_cvMoveWindow, METH_VARARGS, NULL},
7537 { (char *)"cvDestroyWindow", _wrap_cvDestroyWindow, METH_VARARGS, NULL},
7538 { (char *)"cvDestroyAllWindows", _wrap_cvDestroyAllWindows, METH_VARARGS, NULL},
7539 { (char *)"cvGetWindowHandle", _wrap_cvGetWindowHandle, METH_VARARGS, NULL},
7540 { (char *)"cvGetWindowName", _wrap_cvGetWindowName, METH_VARARGS, NULL},
7541 { (char *)"cvCreateTrackbar", _wrap_cvCreateTrackbar, METH_VARARGS, NULL},
7542 { (char *)"cvGetTrackbarPos", _wrap_cvGetTrackbarPos, METH_VARARGS, NULL},
7543 { (char *)"cvSetTrackbarPos", _wrap_cvSetTrackbarPos, METH_VARARGS, NULL},
7544 { (char *)"cvSetMouseCallbackOld", _wrap_cvSetMouseCallbackOld, METH_VARARGS, NULL},
7545 { (char *)"cvLoadImageM", _wrap_cvLoadImageM, METH_VARARGS, NULL},
7546 { (char *)"cvSaveImage", _wrap_cvSaveImage, METH_VARARGS, NULL},
7547 { (char *)"cvConvertImage", _wrap_cvConvertImage, METH_VARARGS, NULL},
7548 { (char *)"cvWaitKeyC", _wrap_cvWaitKeyC, METH_VARARGS, NULL},
7549 { (char *)"cvCreateFileCapture", _wrap_cvCreateFileCapture, METH_VARARGS, NULL},
7550 { (char *)"cvCreateCameraCapture", _wrap_cvCreateCameraCapture, METH_VARARGS, NULL},
7551 { (char *)"cvGrabFrame", _wrap_cvGrabFrame, METH_VARARGS, NULL},
7552 { (char *)"cvRetrieveFrame__Deprecated", _wrap_cvRetrieveFrame__Deprecated, METH_VARARGS, NULL},
7553 { (char *)"cvQueryFrame__Deprecated", _wrap_cvQueryFrame__Deprecated, METH_VARARGS, NULL},
7554 { (char *)"cvGetCaptureProperty", _wrap_cvGetCaptureProperty, METH_VARARGS, NULL},
7555 { (char *)"cvSetCaptureProperty", _wrap_cvSetCaptureProperty, METH_VARARGS, NULL},
7556 { (char *)"cvCreateVideoWriter", _wrap_cvCreateVideoWriter, METH_VARARGS, NULL},
7557 { (char *)"cvWriteFrame", _wrap_cvWriteFrame, METH_VARARGS, NULL},
7558 { (char *)"new_CvvImage", _wrap_new_CvvImage, METH_VARARGS, NULL},
7559 { (char *)"delete_CvvImage", _wrap_delete_CvvImage, METH_VARARGS, NULL},
7560 { (char *)"CvvImage_Create", _wrap_CvvImage_Create, METH_VARARGS, NULL},
7561 { (char *)"CvvImage_Load", _wrap_CvvImage_Load, METH_VARARGS, NULL},
7562 { (char *)"CvvImage_LoadRect", _wrap_CvvImage_LoadRect, METH_VARARGS, NULL},
7563 { (char *)"CvvImage_Save", _wrap_CvvImage_Save, METH_VARARGS, NULL},
7564 { (char *)"CvvImage_CopyOf", _wrap_CvvImage_CopyOf, METH_VARARGS, NULL},
7565 { (char *)"CvvImage_GetImage", _wrap_CvvImage_GetImage, METH_VARARGS, NULL},
7566 { (char *)"CvvImage_Destroy", _wrap_CvvImage_Destroy, METH_VARARGS, NULL},
7567 { (char *)"CvvImage_Width", _wrap_CvvImage_Width, METH_VARARGS, NULL},
7568 { (char *)"CvvImage_Height", _wrap_CvvImage_Height, METH_VARARGS, NULL},
7569 { (char *)"CvvImage_Bpp", _wrap_CvvImage_Bpp, METH_VARARGS, NULL},
7570 { (char *)"CvvImage_Fill", _wrap_CvvImage_Fill, METH_VARARGS, NULL},
7571 { (char *)"CvvImage_Show", _wrap_CvvImage_Show, METH_VARARGS, NULL},
7572 { (char *)"CvvImage_swigregister", CvvImage_swigregister, METH_VARARGS, NULL},
7573 { NULL, NULL, 0, NULL }
7577 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
7579 static void *_p_CvTypedSeqTCvTupleTCvPoint_2_t_tTo_p_CvSeq(void *x) {
7580 return (void *)((CvSeq *) ((CvTypedSeq<CvTuple<CvPoint,2 > > *) x));
7582 static void *_p_CvTypedSeqTCvTupleTfloat_2_t_tTo_p_CvSeq(void *x) {
7583 return (void *)((CvSeq *) ((CvTypedSeq<CvTuple<float,2 > > *) x));
7585 static void *_p_CvTypedSeqTCvConnectedComp_tTo_p_CvSeq(void *x) {
7586 return (void *)((CvSeq *) ((CvTypedSeq<CvConnectedComp > *) x));
7588 static void *_p_CvTypedSeqTCvRect_tTo_p_CvSeq(void *x) {
7589 return (void *)((CvSeq *) ((CvTypedSeq<CvRect > *) x));
7591 static void *_p_CvTypedSeqTCvPoint_tTo_p_CvSeq(void *x) {
7592 return (void *)((CvSeq *) ((CvTypedSeq<CvPoint > *) x));
7594 static void *_p_CvTypedSeqTCvTupleTfloat_3_t_tTo_p_CvSeq(void *x) {
7595 return (void *)((CvSeq *) ((CvTypedSeq<CvTuple<float,3 > > *) x));
7597 static void *_p_CvTypedSeqTCvSeq_p_tTo_p_CvSeq(void *x) {
7598 return (void *)((CvSeq *) ((CvTypedSeq<CvSeq * > *) x));
7600 static void *_p_CvTypedSeqTCvQuadEdge2D_tTo_p_CvSeq(void *x) {
7601 return (void *)((CvSeq *) ((CvTypedSeq<CvQuadEdge2D > *) x));
7603 static void *_p_CvTypedSeqTCvPoint2D32f_tTo_p_CvSeq(void *x) {
7604 return (void *)((CvSeq *) ((CvTypedSeq<CvPoint2D32f > *) x));
7606 static swig_type_info _swigt__p_Cv32suf = {"_p_Cv32suf", "Cv32suf *", 0, 0, (void*)0, 0};
7607 static swig_type_info _swigt__p_Cv64suf = {"_p_Cv64suf", "Cv64suf *", 0, 0, (void*)0, 0};
7608 static swig_type_info _swigt__p_CvAttrList = {"_p_CvAttrList", "CvAttrList *", 0, 0, (void*)0, 0};
7609 static swig_type_info _swigt__p_CvAvgComp = {"_p_CvAvgComp", "CvAvgComp *", 0, 0, (void*)0, 0};
7610 static swig_type_info _swigt__p_CvBox2D = {"_p_CvBox2D", "CvBox2D *", 0, 0, (void*)0, 0};
7611 static swig_type_info _swigt__p_CvCapture = {"_p_CvCapture", "CvCapture *", 0, 0, (void*)0, 0};
7612 static swig_type_info _swigt__p_CvChain = {"_p_CvChain", "CvChain *", 0, 0, (void*)0, 0};
7613 static swig_type_info _swigt__p_CvChainPtReader = {"_p_CvChainPtReader", "CvChainPtReader *", 0, 0, (void*)0, 0};
7614 static swig_type_info _swigt__p_CvConDensation = {"_p_CvConDensation", "CvConDensation *", 0, 0, (void*)0, 0};
7615 static swig_type_info _swigt__p_CvConnectedComp = {"_p_CvConnectedComp", "CvConnectedComp *", 0, 0, (void*)0, 0};
7616 static swig_type_info _swigt__p_CvContour = {"_p_CvContour", "CvContour *|CvPoint2DSeq *", 0, 0, (void*)0, 0};
7617 static swig_type_info _swigt__p_CvContourTree = {"_p_CvContourTree", "CvContourTree *", 0, 0, (void*)0, 0};
7618 static swig_type_info _swigt__p_CvConvexityDefect = {"_p_CvConvexityDefect", "CvConvexityDefect *", 0, 0, (void*)0, 0};
7619 static swig_type_info _swigt__p_CvFileNode = {"_p_CvFileNode", "CvFileNode *", 0, 0, (void*)0, 0};
7620 static swig_type_info _swigt__p_CvFileStorage = {"_p_CvFileStorage", "CvFileStorage *", 0, 0, (void*)0, 0};
7621 static swig_type_info _swigt__p_CvFilter = {"_p_CvFilter", "enum CvFilter *|CvFilter *", 0, 0, (void*)0, 0};
7622 static swig_type_info _swigt__p_CvFont = {"_p_CvFont", "CvFont *", 0, 0, (void*)0, 0};
7623 static swig_type_info _swigt__p_CvGenericHash = {"_p_CvGenericHash", "CvGenericHash *|CvFileNodeHash *", 0, 0, (void*)0, 0};
7624 static swig_type_info _swigt__p_CvGraph = {"_p_CvGraph", "CvGraph *", 0, 0, (void*)0, 0};
7625 static swig_type_info _swigt__p_CvGraphEdge = {"_p_CvGraphEdge", "CvGraphEdge *", 0, 0, (void*)0, 0};
7626 static swig_type_info _swigt__p_CvGraphScanner = {"_p_CvGraphScanner", "CvGraphScanner *", 0, 0, (void*)0, 0};
7627 static swig_type_info _swigt__p_CvGraphVtx = {"_p_CvGraphVtx", "CvGraphVtx *", 0, 0, (void*)0, 0};
7628 static swig_type_info _swigt__p_CvGraphVtx2D = {"_p_CvGraphVtx2D", "CvGraphVtx2D *", 0, 0, (void*)0, 0};
7629 static swig_type_info _swigt__p_CvHaarClassifier = {"_p_CvHaarClassifier", "CvHaarClassifier *", 0, 0, (void*)0, 0};
7630 static swig_type_info _swigt__p_CvHaarClassifierCascade = {"_p_CvHaarClassifierCascade", "CvHaarClassifierCascade *", 0, 0, (void*)0, 0};
7631 static swig_type_info _swigt__p_CvHaarFeature = {"_p_CvHaarFeature", "CvHaarFeature *", 0, 0, (void*)0, 0};
7632 static swig_type_info _swigt__p_CvHaarStageClassifier = {"_p_CvHaarStageClassifier", "CvHaarStageClassifier *", 0, 0, (void*)0, 0};
7633 static swig_type_info _swigt__p_CvHidHaarClassifierCascade = {"_p_CvHidHaarClassifierCascade", "CvHidHaarClassifierCascade *", 0, 0, (void*)0, 0};
7634 static swig_type_info _swigt__p_CvHistogram = {"_p_CvHistogram", "CvHistogram *", 0, 0, (void*)0, 0};
7635 static swig_type_info _swigt__p_CvHuMoments = {"_p_CvHuMoments", "CvHuMoments *", 0, 0, (void*)0, 0};
7636 static swig_type_info _swigt__p_CvKalman = {"_p_CvKalman", "CvKalman *", 0, 0, (void*)0, 0};
7637 static swig_type_info _swigt__p_CvLineIterator = {"_p_CvLineIterator", "CvLineIterator *", 0, 0, (void*)0, 0};
7638 static swig_type_info _swigt__p_CvMat = {"_p_CvMat", "CvMat *", 0, 0, (void*)0, 0};
7639 static swig_type_info _swigt__p_CvMatND = {"_p_CvMatND", "CvMatND *", 0, 0, (void*)0, 0};
7640 static swig_type_info _swigt__p_CvMatrix3 = {"_p_CvMatrix3", "CvMatrix3 *", 0, 0, (void*)0, 0};
7641 static swig_type_info _swigt__p_CvMemBlock = {"_p_CvMemBlock", "CvMemBlock *", 0, 0, (void*)0, 0};
7642 static swig_type_info _swigt__p_CvMemStorage = {"_p_CvMemStorage", "CvMemStorage *", 0, 0, (void*)0, 0};
7643 static swig_type_info _swigt__p_CvMemStoragePos = {"_p_CvMemStoragePos", "CvMemStoragePos *", 0, 0, (void*)0, 0};
7644 static swig_type_info _swigt__p_CvModuleInfo = {"_p_CvModuleInfo", "CvModuleInfo *", 0, 0, (void*)0, 0};
7645 static swig_type_info _swigt__p_CvMoments = {"_p_CvMoments", "CvMoments *", 0, 0, (void*)0, 0};
7646 static swig_type_info _swigt__p_CvNArrayIterator = {"_p_CvNArrayIterator", "CvNArrayIterator *", 0, 0, (void*)0, 0};
7647 static swig_type_info _swigt__p_CvNextEdgeType = {"_p_CvNextEdgeType", "enum CvNextEdgeType *|CvNextEdgeType *", 0, 0, (void*)0, 0};
7648 static swig_type_info _swigt__p_CvPOSITObject = {"_p_CvPOSITObject", "CvPOSITObject *", 0, 0, (void*)0, 0};
7649 static swig_type_info _swigt__p_CvPluginFuncInfo = {"_p_CvPluginFuncInfo", "CvPluginFuncInfo *", 0, 0, (void*)0, 0};
7650 static swig_type_info _swigt__p_CvPoint = {"_p_CvPoint", "CvPoint *", 0, 0, (void*)0, 0};
7651 static swig_type_info _swigt__p_CvPoint2D32f = {"_p_CvPoint2D32f", "CvPoint2D32f *", 0, 0, (void*)0, 0};
7652 static swig_type_info _swigt__p_CvPoint2D64f = {"_p_CvPoint2D64f", "CvPoint2D64f *", 0, 0, (void*)0, 0};
7653 static swig_type_info _swigt__p_CvPoint3D32f = {"_p_CvPoint3D32f", "CvPoint3D32f *", 0, 0, (void*)0, 0};
7654 static swig_type_info _swigt__p_CvPoint3D64f = {"_p_CvPoint3D64f", "CvPoint3D64f *", 0, 0, (void*)0, 0};
7655 static swig_type_info _swigt__p_CvQuadEdge2D = {"_p_CvQuadEdge2D", "CvQuadEdge2D *", 0, 0, (void*)0, 0};
7656 static swig_type_info _swigt__p_CvRNG_Wrapper = {"_p_CvRNG_Wrapper", "CvRNG_Wrapper *", 0, 0, (void*)0, 0};
7657 static swig_type_info _swigt__p_CvRect = {"_p_CvRect", "CvRect *", 0, 0, (void*)0, 0};
7658 static swig_type_info _swigt__p_CvScalar = {"_p_CvScalar", "CvScalar *", 0, 0, (void*)0, 0};
7659 static swig_type_info _swigt__p_CvSeq = {"_p_CvSeq", "CvSeq *", 0, 0, (void*)0, 0};
7660 static swig_type_info _swigt__p_CvTypedSeqTCvTupleTCvPoint_2_t_t = {"_p_CvTypedSeqTCvTupleTCvPoint_2_t_t", 0, 0, 0, 0, 0};
7661 static swig_type_info _swigt__p_CvTypedSeqTCvTupleTfloat_2_t_t = {"_p_CvTypedSeqTCvTupleTfloat_2_t_t", 0, 0, 0, 0, 0};
7662 static swig_type_info _swigt__p_CvTypedSeqTCvRect_t = {"_p_CvTypedSeqTCvRect_t", 0, 0, 0, 0, 0};
7663 static swig_type_info _swigt__p_CvTypedSeqTCvPoint_t = {"_p_CvTypedSeqTCvPoint_t", 0, 0, 0, 0, 0};
7664 static swig_type_info _swigt__p_CvTypedSeqTCvQuadEdge2D_t = {"_p_CvTypedSeqTCvQuadEdge2D_t", 0, 0, 0, 0, 0};
7665 static swig_type_info _swigt__p_CvTypedSeqTCvSeq_p_t = {"_p_CvTypedSeqTCvSeq_p_t", 0, 0, 0, 0, 0};
7666 static swig_type_info _swigt__p_CvTypedSeqTCvPoint2D32f_t = {"_p_CvTypedSeqTCvPoint2D32f_t", 0, 0, 0, 0, 0};
7667 static swig_type_info _swigt__p_CvTypedSeqTCvTupleTfloat_3_t_t = {"_p_CvTypedSeqTCvTupleTfloat_3_t_t", 0, 0, 0, 0, 0};
7668 static swig_type_info _swigt__p_CvTypedSeqTCvConnectedComp_t = {"_p_CvTypedSeqTCvConnectedComp_t", 0, 0, 0, 0, 0};
7669 static swig_type_info _swigt__p_CvSeqBlock = {"_p_CvSeqBlock", "CvSeqBlock *", 0, 0, (void*)0, 0};
7670 static swig_type_info _swigt__p_CvSeqReader = {"_p_CvSeqReader", "CvSeqReader *", 0, 0, (void*)0, 0};
7671 static swig_type_info _swigt__p_CvSeqWriter = {"_p_CvSeqWriter", "CvSeqWriter *", 0, 0, (void*)0, 0};
7672 static swig_type_info _swigt__p_CvSet = {"_p_CvSet", "CvSet *", 0, 0, (void*)0, 0};
7673 static swig_type_info _swigt__p_CvSetElem = {"_p_CvSetElem", "CvSetElem *", 0, 0, (void*)0, 0};
7674 static swig_type_info _swigt__p_CvSize = {"_p_CvSize", "CvSize *", 0, 0, (void*)0, 0};
7675 static swig_type_info _swigt__p_CvSize2D32f = {"_p_CvSize2D32f", "CvSize2D32f *", 0, 0, (void*)0, 0};
7676 static swig_type_info _swigt__p_CvSlice = {"_p_CvSlice", "CvSlice *", 0, 0, (void*)0, 0};
7677 static swig_type_info _swigt__p_CvSparseMat = {"_p_CvSparseMat", "CvSparseMat *", 0, 0, (void*)0, 0};
7678 static swig_type_info _swigt__p_CvSparseMatIterator = {"_p_CvSparseMatIterator", "CvSparseMatIterator *", 0, 0, (void*)0, 0};
7679 static swig_type_info _swigt__p_CvSparseNode = {"_p_CvSparseNode", "CvSparseNode *", 0, 0, (void*)0, 0};
7680 static swig_type_info _swigt__p_CvString = {"_p_CvString", "CvString *", 0, 0, (void*)0, 0};
7681 static swig_type_info _swigt__p_CvStringHashNode = {"_p_CvStringHashNode", "CvStringHashNode *", 0, 0, (void*)0, 0};
7682 static swig_type_info _swigt__p_CvSubdiv2D = {"_p_CvSubdiv2D", "CvSubdiv2D *", 0, 0, (void*)0, 0};
7683 static swig_type_info _swigt__p_CvSubdiv2DEdge_Wrapper = {"_p_CvSubdiv2DEdge_Wrapper", "CvSubdiv2DEdge_Wrapper *", 0, 0, (void*)0, 0};
7684 static swig_type_info _swigt__p_CvSubdiv2DPoint = {"_p_CvSubdiv2DPoint", "CvSubdiv2DPoint *", 0, 0, (void*)0, 0};
7685 static swig_type_info _swigt__p_CvSubdiv2DPointLocation = {"_p_CvSubdiv2DPointLocation", "enum CvSubdiv2DPointLocation *|CvSubdiv2DPointLocation *", 0, 0, (void*)0, 0};
7686 static swig_type_info _swigt__p_CvTermCriteria = {"_p_CvTermCriteria", "CvTermCriteria *", 0, 0, (void*)0, 0};
7687 static swig_type_info _swigt__p_CvTreeNodeIterator = {"_p_CvTreeNodeIterator", "CvTreeNodeIterator *", 0, 0, (void*)0, 0};
7688 static swig_type_info _swigt__p_CvTypeInfo = {"_p_CvTypeInfo", "CvTypeInfo *", 0, 0, (void*)0, 0};
7689 static swig_type_info _swigt__p_CvVideoWriter = {"_p_CvVideoWriter", "CvVideoWriter *", 0, 0, (void*)0, 0};
7690 static swig_type_info _swigt__p_CvvImage = {"_p_CvvImage", "CvvImage *", 0, 0, (void*)0, 0};
7691 static swig_type_info _swigt__p__IplConvKernel = {"_p__IplConvKernel", "_IplConvKernel *|IplConvKernel *", 0, 0, (void*)0, 0};
7692 static swig_type_info _swigt__p__IplConvKernelFP = {"_p__IplConvKernelFP", "_IplConvKernelFP *|IplConvKernelFP *", 0, 0, (void*)0, 0};
7693 static swig_type_info _swigt__p__IplImage = {"_p__IplImage", "_IplImage *|IplImage *", 0, 0, (void*)0, 0};
7694 static swig_type_info _swigt__p__IplROI = {"_p__IplROI", "_IplROI *|IplROI *", 0, 0, (void*)0, 0};
7695 static swig_type_info _swigt__p__IplTileInfo = {"_p__IplTileInfo", "_IplTileInfo *|IplTileInfo *", 0, 0, (void*)0, 0};
7696 static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0};
7697 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
7698 static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0};
7699 static swig_type_info _swigt__p_f_int__void = {"_p_f_int__void", "void (*)(int)|CvTrackbarCallback", 0, 0, (void*)0, 0};
7700 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};
7701 static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0};
7702 static swig_type_info _swigt__p_long_long = {"_p_long_long", "long long *|int64 *", 0, 0, (void*)0, 0};
7703 static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
7704 static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *|CvSubdiv2DEdge *", 0, 0, (void*)0, 0};
7705 static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0};
7706 static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uchar *", 0, 0, (void*)0, 0};
7707 static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "unsigned long long *|CvRNG *", 0, 0, (void*)0, 0};
7708 static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|ushort *", 0, 0, (void*)0, 0};
7709 static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0};
7710 static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
7712 static swig_type_info *swig_type_initial[] = {
7715 &_swigt__p_CvAttrList,
7716 &_swigt__p_CvAvgComp,
7718 &_swigt__p_CvCapture,
7720 &_swigt__p_CvChainPtReader,
7721 &_swigt__p_CvConDensation,
7722 &_swigt__p_CvConnectedComp,
7723 &_swigt__p_CvContour,
7724 &_swigt__p_CvContourTree,
7725 &_swigt__p_CvConvexityDefect,
7726 &_swigt__p_CvFileNode,
7727 &_swigt__p_CvFileStorage,
7728 &_swigt__p_CvFilter,
7730 &_swigt__p_CvGenericHash,
7732 &_swigt__p_CvGraphEdge,
7733 &_swigt__p_CvGraphScanner,
7734 &_swigt__p_CvGraphVtx,
7735 &_swigt__p_CvGraphVtx2D,
7736 &_swigt__p_CvHaarClassifier,
7737 &_swigt__p_CvHaarClassifierCascade,
7738 &_swigt__p_CvHaarFeature,
7739 &_swigt__p_CvHaarStageClassifier,
7740 &_swigt__p_CvHidHaarClassifierCascade,
7741 &_swigt__p_CvHistogram,
7742 &_swigt__p_CvHuMoments,
7743 &_swigt__p_CvKalman,
7744 &_swigt__p_CvLineIterator,
7747 &_swigt__p_CvMatrix3,
7748 &_swigt__p_CvMemBlock,
7749 &_swigt__p_CvMemStorage,
7750 &_swigt__p_CvMemStoragePos,
7751 &_swigt__p_CvModuleInfo,
7752 &_swigt__p_CvMoments,
7753 &_swigt__p_CvNArrayIterator,
7754 &_swigt__p_CvNextEdgeType,
7755 &_swigt__p_CvPOSITObject,
7756 &_swigt__p_CvPluginFuncInfo,
7758 &_swigt__p_CvPoint2D32f,
7759 &_swigt__p_CvPoint2D64f,
7760 &_swigt__p_CvPoint3D32f,
7761 &_swigt__p_CvPoint3D64f,
7762 &_swigt__p_CvQuadEdge2D,
7763 &_swigt__p_CvRNG_Wrapper,
7765 &_swigt__p_CvScalar,
7767 &_swigt__p_CvSeqBlock,
7768 &_swigt__p_CvSeqReader,
7769 &_swigt__p_CvSeqWriter,
7771 &_swigt__p_CvSetElem,
7773 &_swigt__p_CvSize2D32f,
7775 &_swigt__p_CvSparseMat,
7776 &_swigt__p_CvSparseMatIterator,
7777 &_swigt__p_CvSparseNode,
7778 &_swigt__p_CvString,
7779 &_swigt__p_CvStringHashNode,
7780 &_swigt__p_CvSubdiv2D,
7781 &_swigt__p_CvSubdiv2DEdge_Wrapper,
7782 &_swigt__p_CvSubdiv2DPoint,
7783 &_swigt__p_CvSubdiv2DPointLocation,
7784 &_swigt__p_CvTermCriteria,
7785 &_swigt__p_CvTreeNodeIterator,
7786 &_swigt__p_CvTypeInfo,
7787 &_swigt__p_CvTypedSeqTCvConnectedComp_t,
7788 &_swigt__p_CvTypedSeqTCvPoint2D32f_t,
7789 &_swigt__p_CvTypedSeqTCvPoint_t,
7790 &_swigt__p_CvTypedSeqTCvQuadEdge2D_t,
7791 &_swigt__p_CvTypedSeqTCvRect_t,
7792 &_swigt__p_CvTypedSeqTCvSeq_p_t,
7793 &_swigt__p_CvTypedSeqTCvTupleTCvPoint_2_t_t,
7794 &_swigt__p_CvTypedSeqTCvTupleTfloat_2_t_t,
7795 &_swigt__p_CvTypedSeqTCvTupleTfloat_3_t_t,
7796 &_swigt__p_CvVideoWriter,
7797 &_swigt__p_CvvImage,
7798 &_swigt__p__IplConvKernel,
7799 &_swigt__p__IplConvKernelFP,
7800 &_swigt__p__IplImage,
7802 &_swigt__p__IplTileInfo,
7803 &_swigt__p_allocator_type,
7805 &_swigt__p_difference_type,
7806 &_swigt__p_f_int__void,
7807 &_swigt__p_f_int_int_int_int_p_void__void,
7809 &_swigt__p_long_long,
7812 &_swigt__p_size_type,
7813 &_swigt__p_unsigned_char,
7814 &_swigt__p_unsigned_long_long,
7815 &_swigt__p_unsigned_short,
7816 &_swigt__p_value_type,
7820 static swig_cast_info _swigc__p_Cv32suf[] = { {&_swigt__p_Cv32suf, 0, 0, 0},{0, 0, 0, 0}};
7821 static swig_cast_info _swigc__p_Cv64suf[] = { {&_swigt__p_Cv64suf, 0, 0, 0},{0, 0, 0, 0}};
7822 static swig_cast_info _swigc__p_CvAttrList[] = { {&_swigt__p_CvAttrList, 0, 0, 0},{0, 0, 0, 0}};
7823 static swig_cast_info _swigc__p_CvAvgComp[] = { {&_swigt__p_CvAvgComp, 0, 0, 0},{0, 0, 0, 0}};
7824 static swig_cast_info _swigc__p_CvBox2D[] = { {&_swigt__p_CvBox2D, 0, 0, 0},{0, 0, 0, 0}};
7825 static swig_cast_info _swigc__p_CvCapture[] = { {&_swigt__p_CvCapture, 0, 0, 0},{0, 0, 0, 0}};
7826 static swig_cast_info _swigc__p_CvChain[] = { {&_swigt__p_CvChain, 0, 0, 0},{0, 0, 0, 0}};
7827 static swig_cast_info _swigc__p_CvChainPtReader[] = { {&_swigt__p_CvChainPtReader, 0, 0, 0},{0, 0, 0, 0}};
7828 static swig_cast_info _swigc__p_CvConDensation[] = { {&_swigt__p_CvConDensation, 0, 0, 0},{0, 0, 0, 0}};
7829 static swig_cast_info _swigc__p_CvConnectedComp[] = { {&_swigt__p_CvConnectedComp, 0, 0, 0},{0, 0, 0, 0}};
7830 static swig_cast_info _swigc__p_CvContour[] = { {&_swigt__p_CvContour, 0, 0, 0},{0, 0, 0, 0}};
7831 static swig_cast_info _swigc__p_CvContourTree[] = { {&_swigt__p_CvContourTree, 0, 0, 0},{0, 0, 0, 0}};
7832 static swig_cast_info _swigc__p_CvConvexityDefect[] = { {&_swigt__p_CvConvexityDefect, 0, 0, 0},{0, 0, 0, 0}};
7833 static swig_cast_info _swigc__p_CvFileNode[] = { {&_swigt__p_CvFileNode, 0, 0, 0},{0, 0, 0, 0}};
7834 static swig_cast_info _swigc__p_CvFileStorage[] = { {&_swigt__p_CvFileStorage, 0, 0, 0},{0, 0, 0, 0}};
7835 static swig_cast_info _swigc__p_CvFilter[] = { {&_swigt__p_CvFilter, 0, 0, 0},{0, 0, 0, 0}};
7836 static swig_cast_info _swigc__p_CvFont[] = { {&_swigt__p_CvFont, 0, 0, 0},{0, 0, 0, 0}};
7837 static swig_cast_info _swigc__p_CvGenericHash[] = { {&_swigt__p_CvGenericHash, 0, 0, 0},{0, 0, 0, 0}};
7838 static swig_cast_info _swigc__p_CvGraph[] = { {&_swigt__p_CvGraph, 0, 0, 0},{0, 0, 0, 0}};
7839 static swig_cast_info _swigc__p_CvGraphEdge[] = { {&_swigt__p_CvGraphEdge, 0, 0, 0},{0, 0, 0, 0}};
7840 static swig_cast_info _swigc__p_CvGraphScanner[] = { {&_swigt__p_CvGraphScanner, 0, 0, 0},{0, 0, 0, 0}};
7841 static swig_cast_info _swigc__p_CvGraphVtx[] = { {&_swigt__p_CvGraphVtx, 0, 0, 0},{0, 0, 0, 0}};
7842 static swig_cast_info _swigc__p_CvGraphVtx2D[] = { {&_swigt__p_CvGraphVtx2D, 0, 0, 0},{0, 0, 0, 0}};
7843 static swig_cast_info _swigc__p_CvHaarClassifier[] = { {&_swigt__p_CvHaarClassifier, 0, 0, 0},{0, 0, 0, 0}};
7844 static swig_cast_info _swigc__p_CvHaarClassifierCascade[] = { {&_swigt__p_CvHaarClassifierCascade, 0, 0, 0},{0, 0, 0, 0}};
7845 static swig_cast_info _swigc__p_CvHaarFeature[] = { {&_swigt__p_CvHaarFeature, 0, 0, 0},{0, 0, 0, 0}};
7846 static swig_cast_info _swigc__p_CvHaarStageClassifier[] = { {&_swigt__p_CvHaarStageClassifier, 0, 0, 0},{0, 0, 0, 0}};
7847 static swig_cast_info _swigc__p_CvHidHaarClassifierCascade[] = { {&_swigt__p_CvHidHaarClassifierCascade, 0, 0, 0},{0, 0, 0, 0}};
7848 static swig_cast_info _swigc__p_CvHistogram[] = { {&_swigt__p_CvHistogram, 0, 0, 0},{0, 0, 0, 0}};
7849 static swig_cast_info _swigc__p_CvHuMoments[] = { {&_swigt__p_CvHuMoments, 0, 0, 0},{0, 0, 0, 0}};
7850 static swig_cast_info _swigc__p_CvKalman[] = { {&_swigt__p_CvKalman, 0, 0, 0},{0, 0, 0, 0}};
7851 static swig_cast_info _swigc__p_CvLineIterator[] = { {&_swigt__p_CvLineIterator, 0, 0, 0},{0, 0, 0, 0}};
7852 static swig_cast_info _swigc__p_CvMat[] = { {&_swigt__p_CvMat, 0, 0, 0},{0, 0, 0, 0}};
7853 static swig_cast_info _swigc__p_CvMatND[] = { {&_swigt__p_CvMatND, 0, 0, 0},{0, 0, 0, 0}};
7854 static swig_cast_info _swigc__p_CvMatrix3[] = { {&_swigt__p_CvMatrix3, 0, 0, 0},{0, 0, 0, 0}};
7855 static swig_cast_info _swigc__p_CvMemBlock[] = { {&_swigt__p_CvMemBlock, 0, 0, 0},{0, 0, 0, 0}};
7856 static swig_cast_info _swigc__p_CvMemStorage[] = { {&_swigt__p_CvMemStorage, 0, 0, 0},{0, 0, 0, 0}};
7857 static swig_cast_info _swigc__p_CvMemStoragePos[] = { {&_swigt__p_CvMemStoragePos, 0, 0, 0},{0, 0, 0, 0}};
7858 static swig_cast_info _swigc__p_CvModuleInfo[] = { {&_swigt__p_CvModuleInfo, 0, 0, 0},{0, 0, 0, 0}};
7859 static swig_cast_info _swigc__p_CvMoments[] = { {&_swigt__p_CvMoments, 0, 0, 0},{0, 0, 0, 0}};
7860 static swig_cast_info _swigc__p_CvNArrayIterator[] = { {&_swigt__p_CvNArrayIterator, 0, 0, 0},{0, 0, 0, 0}};
7861 static swig_cast_info _swigc__p_CvNextEdgeType[] = { {&_swigt__p_CvNextEdgeType, 0, 0, 0},{0, 0, 0, 0}};
7862 static swig_cast_info _swigc__p_CvPOSITObject[] = { {&_swigt__p_CvPOSITObject, 0, 0, 0},{0, 0, 0, 0}};
7863 static swig_cast_info _swigc__p_CvPluginFuncInfo[] = { {&_swigt__p_CvPluginFuncInfo, 0, 0, 0},{0, 0, 0, 0}};
7864 static swig_cast_info _swigc__p_CvPoint[] = { {&_swigt__p_CvPoint, 0, 0, 0},{0, 0, 0, 0}};
7865 static swig_cast_info _swigc__p_CvPoint2D32f[] = { {&_swigt__p_CvPoint2D32f, 0, 0, 0},{0, 0, 0, 0}};
7866 static swig_cast_info _swigc__p_CvPoint2D64f[] = { {&_swigt__p_CvPoint2D64f, 0, 0, 0},{0, 0, 0, 0}};
7867 static swig_cast_info _swigc__p_CvPoint3D32f[] = { {&_swigt__p_CvPoint3D32f, 0, 0, 0},{0, 0, 0, 0}};
7868 static swig_cast_info _swigc__p_CvPoint3D64f[] = { {&_swigt__p_CvPoint3D64f, 0, 0, 0},{0, 0, 0, 0}};
7869 static swig_cast_info _swigc__p_CvQuadEdge2D[] = { {&_swigt__p_CvQuadEdge2D, 0, 0, 0},{0, 0, 0, 0}};
7870 static swig_cast_info _swigc__p_CvRNG_Wrapper[] = { {&_swigt__p_CvRNG_Wrapper, 0, 0, 0},{0, 0, 0, 0}};
7871 static swig_cast_info _swigc__p_CvRect[] = { {&_swigt__p_CvRect, 0, 0, 0},{0, 0, 0, 0}};
7872 static swig_cast_info _swigc__p_CvScalar[] = { {&_swigt__p_CvScalar, 0, 0, 0},{0, 0, 0, 0}};
7873 static swig_cast_info _swigc__p_CvTypedSeqTCvTupleTCvPoint_2_t_t[] = {{&_swigt__p_CvTypedSeqTCvTupleTCvPoint_2_t_t, 0, 0, 0},{0, 0, 0, 0}};
7874 static swig_cast_info _swigc__p_CvTypedSeqTCvTupleTfloat_2_t_t[] = {{&_swigt__p_CvTypedSeqTCvTupleTfloat_2_t_t, 0, 0, 0},{0, 0, 0, 0}};
7875 static swig_cast_info _swigc__p_CvTypedSeqTCvRect_t[] = {{&_swigt__p_CvTypedSeqTCvRect_t, 0, 0, 0},{0, 0, 0, 0}};
7876 static swig_cast_info _swigc__p_CvTypedSeqTCvPoint_t[] = {{&_swigt__p_CvTypedSeqTCvPoint_t, 0, 0, 0},{0, 0, 0, 0}};
7877 static swig_cast_info _swigc__p_CvTypedSeqTCvQuadEdge2D_t[] = {{&_swigt__p_CvTypedSeqTCvQuadEdge2D_t, 0, 0, 0},{0, 0, 0, 0}};
7878 static swig_cast_info _swigc__p_CvTypedSeqTCvSeq_p_t[] = {{&_swigt__p_CvTypedSeqTCvSeq_p_t, 0, 0, 0},{0, 0, 0, 0}};
7879 static swig_cast_info _swigc__p_CvTypedSeqTCvPoint2D32f_t[] = {{&_swigt__p_CvTypedSeqTCvPoint2D32f_t, 0, 0, 0},{0, 0, 0, 0}};
7880 static swig_cast_info _swigc__p_CvTypedSeqTCvTupleTfloat_3_t_t[] = {{&_swigt__p_CvTypedSeqTCvTupleTfloat_3_t_t, 0, 0, 0},{0, 0, 0, 0}};
7881 static swig_cast_info _swigc__p_CvTypedSeqTCvConnectedComp_t[] = {{&_swigt__p_CvTypedSeqTCvConnectedComp_t, 0, 0, 0},{0, 0, 0, 0}};
7882 static swig_cast_info _swigc__p_CvSeq[] = { {&_swigt__p_CvTypedSeqTCvTupleTCvPoint_2_t_t, _p_CvTypedSeqTCvTupleTCvPoint_2_t_tTo_p_CvSeq, 0, 0}, {&_swigt__p_CvTypedSeqTCvTupleTfloat_2_t_t, _p_CvTypedSeqTCvTupleTfloat_2_t_tTo_p_CvSeq, 0, 0}, {&_swigt__p_CvTypedSeqTCvRect_t, _p_CvTypedSeqTCvRect_tTo_p_CvSeq, 0, 0}, {&_swigt__p_CvTypedSeqTCvPoint_t, _p_CvTypedSeqTCvPoint_tTo_p_CvSeq, 0, 0}, {&_swigt__p_CvTypedSeqTCvQuadEdge2D_t, _p_CvTypedSeqTCvQuadEdge2D_tTo_p_CvSeq, 0, 0}, {&_swigt__p_CvTypedSeqTCvSeq_p_t, _p_CvTypedSeqTCvSeq_p_tTo_p_CvSeq, 0, 0}, {&_swigt__p_CvTypedSeqTCvPoint2D32f_t, _p_CvTypedSeqTCvPoint2D32f_tTo_p_CvSeq, 0, 0}, {&_swigt__p_CvSeq, 0, 0, 0}, {&_swigt__p_CvTypedSeqTCvTupleTfloat_3_t_t, _p_CvTypedSeqTCvTupleTfloat_3_t_tTo_p_CvSeq, 0, 0}, {&_swigt__p_CvTypedSeqTCvConnectedComp_t, _p_CvTypedSeqTCvConnectedComp_tTo_p_CvSeq, 0, 0},{0, 0, 0, 0}};
7883 static swig_cast_info _swigc__p_CvSeqBlock[] = { {&_swigt__p_CvSeqBlock, 0, 0, 0},{0, 0, 0, 0}};
7884 static swig_cast_info _swigc__p_CvSeqReader[] = { {&_swigt__p_CvSeqReader, 0, 0, 0},{0, 0, 0, 0}};
7885 static swig_cast_info _swigc__p_CvSeqWriter[] = { {&_swigt__p_CvSeqWriter, 0, 0, 0},{0, 0, 0, 0}};
7886 static swig_cast_info _swigc__p_CvSet[] = { {&_swigt__p_CvSet, 0, 0, 0},{0, 0, 0, 0}};
7887 static swig_cast_info _swigc__p_CvSetElem[] = { {&_swigt__p_CvSetElem, 0, 0, 0},{0, 0, 0, 0}};
7888 static swig_cast_info _swigc__p_CvSize[] = { {&_swigt__p_CvSize, 0, 0, 0},{0, 0, 0, 0}};
7889 static swig_cast_info _swigc__p_CvSize2D32f[] = { {&_swigt__p_CvSize2D32f, 0, 0, 0},{0, 0, 0, 0}};
7890 static swig_cast_info _swigc__p_CvSlice[] = { {&_swigt__p_CvSlice, 0, 0, 0},{0, 0, 0, 0}};
7891 static swig_cast_info _swigc__p_CvSparseMat[] = { {&_swigt__p_CvSparseMat, 0, 0, 0},{0, 0, 0, 0}};
7892 static swig_cast_info _swigc__p_CvSparseMatIterator[] = { {&_swigt__p_CvSparseMatIterator, 0, 0, 0},{0, 0, 0, 0}};
7893 static swig_cast_info _swigc__p_CvSparseNode[] = { {&_swigt__p_CvSparseNode, 0, 0, 0},{0, 0, 0, 0}};
7894 static swig_cast_info _swigc__p_CvString[] = { {&_swigt__p_CvString, 0, 0, 0},{0, 0, 0, 0}};
7895 static swig_cast_info _swigc__p_CvStringHashNode[] = { {&_swigt__p_CvStringHashNode, 0, 0, 0},{0, 0, 0, 0}};
7896 static swig_cast_info _swigc__p_CvSubdiv2D[] = { {&_swigt__p_CvSubdiv2D, 0, 0, 0},{0, 0, 0, 0}};
7897 static swig_cast_info _swigc__p_CvSubdiv2DEdge_Wrapper[] = { {&_swigt__p_CvSubdiv2DEdge_Wrapper, 0, 0, 0},{0, 0, 0, 0}};
7898 static swig_cast_info _swigc__p_CvSubdiv2DPoint[] = { {&_swigt__p_CvSubdiv2DPoint, 0, 0, 0},{0, 0, 0, 0}};
7899 static swig_cast_info _swigc__p_CvSubdiv2DPointLocation[] = { {&_swigt__p_CvSubdiv2DPointLocation, 0, 0, 0},{0, 0, 0, 0}};
7900 static swig_cast_info _swigc__p_CvTermCriteria[] = { {&_swigt__p_CvTermCriteria, 0, 0, 0},{0, 0, 0, 0}};
7901 static swig_cast_info _swigc__p_CvTreeNodeIterator[] = { {&_swigt__p_CvTreeNodeIterator, 0, 0, 0},{0, 0, 0, 0}};
7902 static swig_cast_info _swigc__p_CvTypeInfo[] = { {&_swigt__p_CvTypeInfo, 0, 0, 0},{0, 0, 0, 0}};
7903 static swig_cast_info _swigc__p_CvVideoWriter[] = { {&_swigt__p_CvVideoWriter, 0, 0, 0},{0, 0, 0, 0}};
7904 static swig_cast_info _swigc__p_CvvImage[] = { {&_swigt__p_CvvImage, 0, 0, 0},{0, 0, 0, 0}};
7905 static swig_cast_info _swigc__p__IplConvKernel[] = { {&_swigt__p__IplConvKernel, 0, 0, 0},{0, 0, 0, 0}};
7906 static swig_cast_info _swigc__p__IplConvKernelFP[] = { {&_swigt__p__IplConvKernelFP, 0, 0, 0},{0, 0, 0, 0}};
7907 static swig_cast_info _swigc__p__IplImage[] = { {&_swigt__p__IplImage, 0, 0, 0},{0, 0, 0, 0}};
7908 static swig_cast_info _swigc__p__IplROI[] = { {&_swigt__p__IplROI, 0, 0, 0},{0, 0, 0, 0}};
7909 static swig_cast_info _swigc__p__IplTileInfo[] = { {&_swigt__p__IplTileInfo, 0, 0, 0},{0, 0, 0, 0}};
7910 static swig_cast_info _swigc__p_allocator_type[] = { {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}};
7911 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
7912 static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}};
7913 static swig_cast_info _swigc__p_f_int__void[] = { {&_swigt__p_f_int__void, 0, 0, 0},{0, 0, 0, 0}};
7914 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}};
7915 static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
7916 static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
7917 static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
7918 static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}};
7919 static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}};
7920 static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
7921 static swig_cast_info _swigc__p_unsigned_long_long[] = { {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}};
7922 static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
7923 static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}};
7924 static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
7926 static swig_cast_info *swig_cast_initial[] = {
7929 _swigc__p_CvAttrList,
7930 _swigc__p_CvAvgComp,
7932 _swigc__p_CvCapture,
7934 _swigc__p_CvChainPtReader,
7935 _swigc__p_CvConDensation,
7936 _swigc__p_CvConnectedComp,
7937 _swigc__p_CvContour,
7938 _swigc__p_CvContourTree,
7939 _swigc__p_CvConvexityDefect,
7940 _swigc__p_CvFileNode,
7941 _swigc__p_CvFileStorage,
7944 _swigc__p_CvGenericHash,
7946 _swigc__p_CvGraphEdge,
7947 _swigc__p_CvGraphScanner,
7948 _swigc__p_CvGraphVtx,
7949 _swigc__p_CvGraphVtx2D,
7950 _swigc__p_CvHaarClassifier,
7951 _swigc__p_CvHaarClassifierCascade,
7952 _swigc__p_CvHaarFeature,
7953 _swigc__p_CvHaarStageClassifier,
7954 _swigc__p_CvHidHaarClassifierCascade,
7955 _swigc__p_CvHistogram,
7956 _swigc__p_CvHuMoments,
7958 _swigc__p_CvLineIterator,
7961 _swigc__p_CvMatrix3,
7962 _swigc__p_CvMemBlock,
7963 _swigc__p_CvMemStorage,
7964 _swigc__p_CvMemStoragePos,
7965 _swigc__p_CvModuleInfo,
7966 _swigc__p_CvMoments,
7967 _swigc__p_CvNArrayIterator,
7968 _swigc__p_CvNextEdgeType,
7969 _swigc__p_CvPOSITObject,
7970 _swigc__p_CvPluginFuncInfo,
7972 _swigc__p_CvPoint2D32f,
7973 _swigc__p_CvPoint2D64f,
7974 _swigc__p_CvPoint3D32f,
7975 _swigc__p_CvPoint3D64f,
7976 _swigc__p_CvQuadEdge2D,
7977 _swigc__p_CvRNG_Wrapper,
7981 _swigc__p_CvSeqBlock,
7982 _swigc__p_CvSeqReader,
7983 _swigc__p_CvSeqWriter,
7985 _swigc__p_CvSetElem,
7987 _swigc__p_CvSize2D32f,
7989 _swigc__p_CvSparseMat,
7990 _swigc__p_CvSparseMatIterator,
7991 _swigc__p_CvSparseNode,
7993 _swigc__p_CvStringHashNode,
7994 _swigc__p_CvSubdiv2D,
7995 _swigc__p_CvSubdiv2DEdge_Wrapper,
7996 _swigc__p_CvSubdiv2DPoint,
7997 _swigc__p_CvSubdiv2DPointLocation,
7998 _swigc__p_CvTermCriteria,
7999 _swigc__p_CvTreeNodeIterator,
8000 _swigc__p_CvTypeInfo,
8001 _swigc__p_CvTypedSeqTCvConnectedComp_t,
8002 _swigc__p_CvTypedSeqTCvPoint2D32f_t,
8003 _swigc__p_CvTypedSeqTCvPoint_t,
8004 _swigc__p_CvTypedSeqTCvQuadEdge2D_t,
8005 _swigc__p_CvTypedSeqTCvRect_t,
8006 _swigc__p_CvTypedSeqTCvSeq_p_t,
8007 _swigc__p_CvTypedSeqTCvTupleTCvPoint_2_t_t,
8008 _swigc__p_CvTypedSeqTCvTupleTfloat_2_t_t,
8009 _swigc__p_CvTypedSeqTCvTupleTfloat_3_t_t,
8010 _swigc__p_CvVideoWriter,
8012 _swigc__p__IplConvKernel,
8013 _swigc__p__IplConvKernelFP,
8014 _swigc__p__IplImage,
8016 _swigc__p__IplTileInfo,
8017 _swigc__p_allocator_type,
8019 _swigc__p_difference_type,
8020 _swigc__p_f_int__void,
8021 _swigc__p_f_int_int_int_int_p_void__void,
8023 _swigc__p_long_long,
8026 _swigc__p_size_type,
8027 _swigc__p_unsigned_char,
8028 _swigc__p_unsigned_long_long,
8029 _swigc__p_unsigned_short,
8030 _swigc__p_value_type,
8035 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
8037 static swig_const_info swig_const_table[] = {
8038 {0, 0, 0, 0.0, 0, 0}};
8043 /* -----------------------------------------------------------------------------
8044 * Type initialization:
8045 * This problem is tough by the requirement that no dynamic
8046 * memory is used. Also, since swig_type_info structures store pointers to
8047 * swig_cast_info structures and swig_cast_info structures store pointers back
8048 * to swig_type_info structures, we need some lookup code at initialization.
8049 * The idea is that swig generates all the structures that are needed.
8050 * The runtime then collects these partially filled structures.
8051 * The SWIG_InitializeModule function takes these initial arrays out of
8052 * swig_module, and does all the lookup, filling in the swig_module.types
8053 * array with the correct data and linking the correct swig_cast_info
8054 * structures together.
8056 * The generated swig_type_info structures are assigned staticly to an initial
8057 * array. We just loop through that array, and handle each type individually.
8058 * First we lookup if this type has been already loaded, and if so, use the
8059 * loaded structure instead of the generated one. Then we have to fill in the
8060 * cast linked list. The cast data is initially stored in something like a
8061 * two-dimensional array. Each row corresponds to a type (there are the same
8062 * number of rows as there are in the swig_type_initial array). Each entry in
8063 * a column is one of the swig_cast_info structures for that type.
8064 * The cast_initial array is actually an array of arrays, because each row has
8065 * a variable number of columns. So to actually build the cast linked list,
8066 * we find the array of casts associated with the type, and loop through it
8067 * adding the casts to the list. The one last trick we need to do is making
8068 * sure the type pointer in the swig_cast_info struct is correct.
8070 * First off, we lookup the cast->type name to see if it is already loaded.
8071 * There are three cases to handle:
8072 * 1) If the cast->type has already been loaded AND the type we are adding
8073 * casting info to has not been loaded (it is in this module), THEN we
8074 * replace the cast->type pointer with the type pointer that has already
8076 * 2) If BOTH types (the one we are adding casting info to, and the
8077 * cast->type) are loaded, THEN the cast info has already been loaded by
8078 * the previous module so we just ignore it.
8079 * 3) Finally, if cast->type has not already been loaded, then we add that
8080 * swig_cast_info to the linked list (because the cast->type) pointer will
8082 * ----------------------------------------------------------------------------- */
8092 #define SWIGRUNTIME_DEBUG
8097 SWIG_InitializeModule(void *clientdata) {
8099 swig_module_info *module_head, *iter;
8102 clientdata = clientdata;
8104 /* check to see if the circular list has been setup, if not, set it up */
8105 if (swig_module.next==0) {
8106 /* Initialize the swig_module */
8107 swig_module.type_initial = swig_type_initial;
8108 swig_module.cast_initial = swig_cast_initial;
8109 swig_module.next = &swig_module;
8112 /* Try and load any already created modules */
8113 module_head = SWIG_GetModule(clientdata);
8115 /* This is the first module loaded for this interpreter */
8116 /* so set the swig module into the interpreter */
8117 SWIG_SetModule(clientdata, &swig_module);
8118 module_head = &swig_module;
8120 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
8124 if (iter==&swig_module) {
8129 } while (iter!= module_head);
8131 /* if the is found in the list, then all is done and we may leave */
8133 /* otherwise we must add out module into the list */
8134 swig_module.next = module_head->next;
8135 module_head->next = &swig_module;
8138 /* Now work on filling in swig_module.types */
8139 #ifdef SWIGRUNTIME_DEBUG
8140 printf("SWIG_InitializeModule: size %d\n", swig_module.size);
8142 for (i = 0; i < swig_module.size; ++i) {
8143 swig_type_info *type = 0;
8144 swig_type_info *ret;
8145 swig_cast_info *cast;
8147 #ifdef SWIGRUNTIME_DEBUG
8148 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
8151 /* if there is another module already loaded */
8152 if (swig_module.next != &swig_module) {
8153 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
8156 /* Overwrite clientdata field */
8157 #ifdef SWIGRUNTIME_DEBUG
8158 printf("SWIG_InitializeModule: found type %s\n", type->name);
8160 if (swig_module.type_initial[i]->clientdata) {
8161 type->clientdata = swig_module.type_initial[i]->clientdata;
8162 #ifdef SWIGRUNTIME_DEBUG
8163 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
8167 type = swig_module.type_initial[i];
8170 /* Insert casting types */
8171 cast = swig_module.cast_initial[i];
8172 while (cast->type) {
8173 /* Don't need to add information already in the list */
8175 #ifdef SWIGRUNTIME_DEBUG
8176 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
8178 if (swig_module.next != &swig_module) {
8179 ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
8180 #ifdef SWIGRUNTIME_DEBUG
8181 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
8185 if (type == swig_module.type_initial[i]) {
8186 #ifdef SWIGRUNTIME_DEBUG
8187 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
8192 /* Check for casting already in the list */
8193 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
8194 #ifdef SWIGRUNTIME_DEBUG
8195 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
8197 if (!ocast) ret = 0;
8202 #ifdef SWIGRUNTIME_DEBUG
8203 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
8206 type->cast->prev = cast;
8207 cast->next = type->cast;
8213 /* Set entry in modules->types array equal to the type */
8214 swig_module.types[i] = type;
8216 swig_module.types[i] = 0;
8218 #ifdef SWIGRUNTIME_DEBUG
8219 printf("**** SWIG_InitializeModule: Cast List ******\n");
8220 for (i = 0; i < swig_module.size; ++i) {
8222 swig_cast_info *cast = swig_module.cast_initial[i];
8223 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
8224 while (cast->type) {
8225 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
8229 printf("---- Total casts: %d\n",j);
8231 printf("**** SWIG_InitializeModule: Cast List ******\n");
8235 /* This function will propagate the clientdata field of type to
8236 * any new swig_type_info structures that have been added into the list
8237 * of equivalent types. It is like calling
8238 * SWIG_TypeClientData(type, clientdata) a second time.
8241 SWIG_PropagateClientData(void) {
8243 swig_cast_info *equiv;
8244 static int init_run = 0;
8246 if (init_run) return;
8249 for (i = 0; i < swig_module.size; i++) {
8250 if (swig_module.types[i]->clientdata) {
8251 equiv = swig_module.types[i]->cast;
8253 if (!equiv->converter) {
8254 if (equiv->type && !equiv->type->clientdata)
8255 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
8257 equiv = equiv->next;
8277 /* Python-specific SWIG API */
8278 #define SWIG_newvarlink() SWIG_Python_newvarlink()
8279 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
8280 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
8282 /* -----------------------------------------------------------------------------
8283 * global variable support code.
8284 * ----------------------------------------------------------------------------- */
8286 typedef struct swig_globalvar {
8287 char *name; /* Name of global variable */
8288 PyObject *(*get_attr)(void); /* Return the current value */
8289 int (*set_attr)(PyObject *); /* Set the value */
8290 struct swig_globalvar *next;
8293 typedef struct swig_varlinkobject {
8295 swig_globalvar *vars;
8296 } swig_varlinkobject;
8298 SWIGINTERN PyObject *
8299 swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
8300 return PyString_FromString("<Swig global variables>");
8303 SWIGINTERN PyObject *
8304 swig_varlink_str(swig_varlinkobject *v) {
8305 PyObject *str = PyString_FromString("(");
8306 swig_globalvar *var;
8307 for (var = v->vars; var; var=var->next) {
8308 PyString_ConcatAndDel(&str,PyString_FromString(var->name));
8309 if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
8311 PyString_ConcatAndDel(&str,PyString_FromString(")"));
8316 swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
8317 PyObject *str = swig_varlink_str(v);
8318 fprintf(fp,"Swig global variables ");
8319 fprintf(fp,"%s\n", PyString_AsString(str));
8325 swig_varlink_dealloc(swig_varlinkobject *v) {
8326 swig_globalvar *var = v->vars;
8328 swig_globalvar *n = var->next;
8335 SWIGINTERN PyObject *
8336 swig_varlink_getattr(swig_varlinkobject *v, char *n) {
8337 PyObject *res = NULL;
8338 swig_globalvar *var = v->vars;
8340 if (strcmp(var->name,n) == 0) {
8341 res = (*var->get_attr)();
8346 if (res == NULL && !PyErr_Occurred()) {
8347 PyErr_SetString(PyExc_NameError,"Unknown C global variable");
8353 swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
8355 swig_globalvar *var = v->vars;
8357 if (strcmp(var->name,n) == 0) {
8358 res = (*var->set_attr)(p);
8363 if (res == 1 && !PyErr_Occurred()) {
8364 PyErr_SetString(PyExc_NameError,"Unknown C global variable");
8369 SWIGINTERN PyTypeObject*
8370 swig_varlink_type(void) {
8371 static char varlink__doc__[] = "Swig var link object";
8372 static PyTypeObject varlink_type;
8373 static int type_init = 0;
8375 const PyTypeObject tmp
8377 PyObject_HEAD_INIT(NULL)
8378 0, /* Number of items in variable part (ob_size) */
8379 (char *)"swigvarlink", /* Type name (tp_name) */
8380 sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */
8381 0, /* Itemsize (tp_itemsize) */
8382 (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */
8383 (printfunc) swig_varlink_print, /* Print (tp_print) */
8384 (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
8385 (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
8387 (reprfunc) swig_varlink_repr, /* tp_repr */
8388 0, /* tp_as_number */
8389 0, /* tp_as_sequence */
8390 0, /* tp_as_mapping */
8393 (reprfunc)swig_varlink_str, /* tp_str */
8394 0, /* tp_getattro */
8395 0, /* tp_setattro */
8396 0, /* tp_as_buffer */
8398 varlink__doc__, /* tp_doc */
8399 0, /* tp_traverse */
8401 0, /* tp_richcompare */
8402 0, /* tp_weaklistoffset */
8403 #if PY_VERSION_HEX >= 0x02020000
8404 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
8406 #if PY_VERSION_HEX >= 0x02030000
8410 0,0,0,0 /* tp_alloc -> tp_next */
8414 varlink_type.ob_type = &PyType_Type;
8417 return &varlink_type;
8420 /* Create a variable linking object for use later */
8421 SWIGINTERN PyObject *
8422 SWIG_Python_newvarlink(void) {
8423 swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
8427 return ((PyObject*) result);
8431 SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
8432 swig_varlinkobject *v = (swig_varlinkobject *) p;
8433 swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
8435 size_t size = strlen(name)+1;
8436 gv->name = (char *)malloc(size);
8438 strncpy(gv->name,name,size);
8439 gv->get_attr = get_attr;
8440 gv->set_attr = set_attr;
8447 SWIGINTERN PyObject *
8448 SWIG_globals(void) {
8449 static PyObject *_SWIG_globals = 0;
8450 if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
8451 return _SWIG_globals;
8454 /* -----------------------------------------------------------------------------
8455 * constants/methods manipulation
8456 * ----------------------------------------------------------------------------- */
8458 /* Install Constants */
8460 SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
8463 for (i = 0; constants[i].type; ++i) {
8464 switch(constants[i].type) {
8465 case SWIG_PY_POINTER:
8466 obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
8468 case SWIG_PY_BINARY:
8469 obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
8476 PyDict_SetItemString(d, constants[i].name, obj);
8482 /* -----------------------------------------------------------------------------*/
8483 /* Fix SwigMethods to carry the callback ptrs when needed */
8484 /* -----------------------------------------------------------------------------*/
8487 SWIG_Python_FixMethods(PyMethodDef *methods,
8488 swig_const_info *const_table,
8489 swig_type_info **types,
8490 swig_type_info **types_initial) {
8492 for (i = 0; methods[i].ml_name; ++i) {
8493 const char *c = methods[i].ml_doc;
8494 if (c && (c = strstr(c, "swig_ptr: "))) {
8496 swig_const_info *ci = 0;
8497 const char *name = c + 10;
8498 for (j = 0; const_table[j].type; ++j) {
8499 if (strncmp(const_table[j].name, name,
8500 strlen(const_table[j].name)) == 0) {
8501 ci = &(const_table[j]);
8506 size_t shift = (ci->ptype) - types;
8507 swig_type_info *ty = types_initial[shift];
8508 size_t ldoc = (c - methods[i].ml_doc);
8509 size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
8510 char *ndoc = (char*)malloc(ldoc + lptr + 10);
8513 void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
8515 strncpy(buff, methods[i].ml_doc, ldoc);
8517 strncpy(buff, "swig_ptr: ", 10);
8519 SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
8520 methods[i].ml_doc = ndoc;
8532 /* -----------------------------------------------------------------------------*
8533 * Partial Init method
8534 * -----------------------------------------------------------------------------*/
8539 SWIGEXPORT void SWIG_init(void) {
8542 /* Fix SwigMethods to carry the callback ptrs when needed */
8543 SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
8545 m = Py_InitModule((char *) SWIG_name, SwigMethods);
8546 d = PyModule_GetDict(m);
8548 SWIG_InitializeModule(0);
8549 SWIG_InstallConstants(d,swig_const_table);
8553 PyEval_InitThreads();
8555 SWIG_Python_SetConstant(d, "CV_WINDOW_AUTOSIZE",SWIG_From_int(static_cast< int >(1)));
8556 SWIG_Python_SetConstant(d, "CV_EVENT_MOUSEMOVE",SWIG_From_int(static_cast< int >(0)));
8557 SWIG_Python_SetConstant(d, "CV_EVENT_LBUTTONDOWN",SWIG_From_int(static_cast< int >(1)));
8558 SWIG_Python_SetConstant(d, "CV_EVENT_RBUTTONDOWN",SWIG_From_int(static_cast< int >(2)));
8559 SWIG_Python_SetConstant(d, "CV_EVENT_MBUTTONDOWN",SWIG_From_int(static_cast< int >(3)));
8560 SWIG_Python_SetConstant(d, "CV_EVENT_LBUTTONUP",SWIG_From_int(static_cast< int >(4)));
8561 SWIG_Python_SetConstant(d, "CV_EVENT_RBUTTONUP",SWIG_From_int(static_cast< int >(5)));
8562 SWIG_Python_SetConstant(d, "CV_EVENT_MBUTTONUP",SWIG_From_int(static_cast< int >(6)));
8563 SWIG_Python_SetConstant(d, "CV_EVENT_LBUTTONDBLCLK",SWIG_From_int(static_cast< int >(7)));
8564 SWIG_Python_SetConstant(d, "CV_EVENT_RBUTTONDBLCLK",SWIG_From_int(static_cast< int >(8)));
8565 SWIG_Python_SetConstant(d, "CV_EVENT_MBUTTONDBLCLK",SWIG_From_int(static_cast< int >(9)));
8566 SWIG_Python_SetConstant(d, "CV_EVENT_FLAG_LBUTTON",SWIG_From_int(static_cast< int >(1)));
8567 SWIG_Python_SetConstant(d, "CV_EVENT_FLAG_RBUTTON",SWIG_From_int(static_cast< int >(2)));
8568 SWIG_Python_SetConstant(d, "CV_EVENT_FLAG_MBUTTON",SWIG_From_int(static_cast< int >(4)));
8569 SWIG_Python_SetConstant(d, "CV_EVENT_FLAG_CTRLKEY",SWIG_From_int(static_cast< int >(8)));
8570 SWIG_Python_SetConstant(d, "CV_EVENT_FLAG_SHIFTKEY",SWIG_From_int(static_cast< int >(16)));
8571 SWIG_Python_SetConstant(d, "CV_EVENT_FLAG_ALTKEY",SWIG_From_int(static_cast< int >(32)));
8572 SWIG_Python_SetConstant(d, "CV_LOAD_IMAGE_UNCHANGED",SWIG_From_int(static_cast< int >(-1)));
8573 SWIG_Python_SetConstant(d, "CV_LOAD_IMAGE_GRAYSCALE",SWIG_From_int(static_cast< int >(0)));
8574 SWIG_Python_SetConstant(d, "CV_LOAD_IMAGE_COLOR",SWIG_From_int(static_cast< int >(1)));
8575 SWIG_Python_SetConstant(d, "CV_LOAD_IMAGE_ANYDEPTH",SWIG_From_int(static_cast< int >(2)));
8576 SWIG_Python_SetConstant(d, "CV_LOAD_IMAGE_ANYCOLOR",SWIG_From_int(static_cast< int >(4)));
8577 SWIG_Python_SetConstant(d, "CV_CVTIMG_FLIP",SWIG_From_int(static_cast< int >(1)));
8578 SWIG_Python_SetConstant(d, "CV_CVTIMG_SWAP_RB",SWIG_From_int(static_cast< int >(2)));
8579 SWIG_Python_SetConstant(d, "CV_CAP_ANY",SWIG_From_int(static_cast< int >(0)));
8580 SWIG_Python_SetConstant(d, "CV_CAP_MIL",SWIG_From_int(static_cast< int >(100)));
8581 SWIG_Python_SetConstant(d, "CV_CAP_VFW",SWIG_From_int(static_cast< int >(200)));
8582 SWIG_Python_SetConstant(d, "CV_CAP_V4L",SWIG_From_int(static_cast< int >(200)));
8583 SWIG_Python_SetConstant(d, "CV_CAP_V4L2",SWIG_From_int(static_cast< int >(200)));
8584 SWIG_Python_SetConstant(d, "CV_CAP_FIREWARE",SWIG_From_int(static_cast< int >(300)));
8585 SWIG_Python_SetConstant(d, "CV_CAP_IEEE1394",SWIG_From_int(static_cast< int >(300)));
8586 SWIG_Python_SetConstant(d, "CV_CAP_DC1394",SWIG_From_int(static_cast< int >(300)));
8587 SWIG_Python_SetConstant(d, "CV_CAP_CMU1394",SWIG_From_int(static_cast< int >(300)));
8588 SWIG_Python_SetConstant(d, "CV_CAP_STEREO",SWIG_From_int(static_cast< int >(400)));
8589 SWIG_Python_SetConstant(d, "CV_CAP_TYZX",SWIG_From_int(static_cast< int >(400)));
8590 SWIG_Python_SetConstant(d, "CV_TYZX_LEFT",SWIG_From_int(static_cast< int >(400)));
8591 SWIG_Python_SetConstant(d, "CV_TYZX_RIGHT",SWIG_From_int(static_cast< int >(401)));
8592 SWIG_Python_SetConstant(d, "CV_TYZX_COLOR",SWIG_From_int(static_cast< int >(402)));
8593 SWIG_Python_SetConstant(d, "CV_TYZX_Z",SWIG_From_int(static_cast< int >(403)));
8594 SWIG_Python_SetConstant(d, "CV_CAP_QT",SWIG_From_int(static_cast< int >(500)));
8595 SWIG_Python_SetConstant(d, "CV_CAP_PROP_POS_MSEC",SWIG_From_int(static_cast< int >(0)));
8596 SWIG_Python_SetConstant(d, "CV_CAP_PROP_POS_FRAMES",SWIG_From_int(static_cast< int >(1)));
8597 SWIG_Python_SetConstant(d, "CV_CAP_PROP_POS_AVI_RATIO",SWIG_From_int(static_cast< int >(2)));
8598 SWIG_Python_SetConstant(d, "CV_CAP_PROP_FRAME_WIDTH",SWIG_From_int(static_cast< int >(3)));
8599 SWIG_Python_SetConstant(d, "CV_CAP_PROP_FRAME_HEIGHT",SWIG_From_int(static_cast< int >(4)));
8600 SWIG_Python_SetConstant(d, "CV_CAP_PROP_FPS",SWIG_From_int(static_cast< int >(5)));
8601 SWIG_Python_SetConstant(d, "CV_CAP_PROP_FOURCC",SWIG_From_int(static_cast< int >(6)));
8602 SWIG_Python_SetConstant(d, "CV_CAP_PROP_FRAME_COUNT",SWIG_From_int(static_cast< int >(7)));
8603 SWIG_Python_SetConstant(d, "CV_CAP_PROP_FORMAT",SWIG_From_int(static_cast< int >(8)));
8604 SWIG_Python_SetConstant(d, "CV_CAP_PROP_MODE",SWIG_From_int(static_cast< int >(9)));
8605 SWIG_Python_SetConstant(d, "CV_CAP_PROP_BRIGHTNESS",SWIG_From_int(static_cast< int >(10)));
8606 SWIG_Python_SetConstant(d, "CV_CAP_PROP_CONTRAST",SWIG_From_int(static_cast< int >(11)));
8607 SWIG_Python_SetConstant(d, "CV_CAP_PROP_SATURATION",SWIG_From_int(static_cast< int >(12)));
8608 SWIG_Python_SetConstant(d, "CV_CAP_PROP_HUE",SWIG_From_int(static_cast< int >(13)));
8609 SWIG_Python_SetConstant(d, "CV_CAP_PROP_GAIN",SWIG_From_int(static_cast< int >(14)));
8610 SWIG_Python_SetConstant(d, "CV_CAP_PROP_CONVERT_RGB",SWIG_From_int(static_cast< int >(15)));
8611 SWIG_Python_SetConstant(d, "CV_FOURCC_PROMPT",SWIG_From_int(static_cast< int >(-1)));
8612 SWIG_Python_SetConstant(d, "CV_FOURCC_DEFAULT",SWIG_From_int(static_cast< int >(-1)));
8613 SWIG_Python_SetConstant(d, "HG_AUTOSIZE",SWIG_From_int(static_cast< int >(1)));