mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-01 12:50:48 +08:00
20833 lines
1.1 MiB
Plaintext
20833 lines
1.1 MiB
Plaintext
/* Generated by Cython 0.11.3 on Sat Oct 31 23:23:14 2009 */
|
|
|
|
#define PY_SSIZE_T_CLEAN
|
|
#include "Python.h"
|
|
#include "structmember.h"
|
|
#ifndef Py_PYTHON_H
|
|
#error Python headers needed to compile C extensions, please install development version of Python.
|
|
#else
|
|
#ifndef PY_LONG_LONG
|
|
#define PY_LONG_LONG LONG_LONG
|
|
#endif
|
|
#ifndef DL_EXPORT
|
|
#define DL_EXPORT(t) t
|
|
#endif
|
|
#if PY_VERSION_HEX < 0x02040000
|
|
#define METH_COEXIST 0
|
|
#define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
|
|
#define PyDict_Contains(d,o) PySequence_Contains(d,o)
|
|
#endif
|
|
#if PY_VERSION_HEX < 0x02050000
|
|
typedef int Py_ssize_t;
|
|
#define PY_SSIZE_T_MAX INT_MAX
|
|
#define PY_SSIZE_T_MIN INT_MIN
|
|
#define PY_FORMAT_SIZE_T ""
|
|
#define PyInt_FromSsize_t(z) PyInt_FromLong(z)
|
|
#define PyInt_AsSsize_t(o) PyInt_AsLong(o)
|
|
#define PyNumber_Index(o) PyNumber_Int(o)
|
|
#define PyIndex_Check(o) PyNumber_Check(o)
|
|
#endif
|
|
#if PY_VERSION_HEX < 0x02060000
|
|
#define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
|
|
#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
|
|
#define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size)
|
|
#define PyVarObject_HEAD_INIT(type, size) \
|
|
PyObject_HEAD_INIT(type) size,
|
|
#define PyType_Modified(t)
|
|
#define PyBytes_CheckExact PyString_CheckExact
|
|
|
|
typedef struct {
|
|
void *buf;
|
|
PyObject *obj;
|
|
Py_ssize_t len;
|
|
Py_ssize_t itemsize;
|
|
int readonly;
|
|
int ndim;
|
|
char *format;
|
|
Py_ssize_t *shape;
|
|
Py_ssize_t *strides;
|
|
Py_ssize_t *suboffsets;
|
|
void *internal;
|
|
} Py_buffer;
|
|
|
|
#define PyBUF_SIMPLE 0
|
|
#define PyBUF_WRITABLE 0x0001
|
|
#define PyBUF_FORMAT 0x0004
|
|
#define PyBUF_ND 0x0008
|
|
#define PyBUF_STRIDES (0x0010 | PyBUF_ND)
|
|
#define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
|
|
#define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
|
|
#define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
|
|
#define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
|
|
|
|
#endif
|
|
#if PY_MAJOR_VERSION < 3
|
|
#define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
|
|
#else
|
|
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
#define Py_TPFLAGS_CHECKTYPES 0
|
|
#define Py_TPFLAGS_HAVE_INDEX 0
|
|
#endif
|
|
#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
|
|
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
#define PyBaseString_Type PyUnicode_Type
|
|
#define PyString_Type PyUnicode_Type
|
|
#define PyString_CheckExact PyUnicode_CheckExact
|
|
#define PyInt_Type PyLong_Type
|
|
#define PyInt_Check(op) PyLong_Check(op)
|
|
#define PyInt_CheckExact(op) PyLong_CheckExact(op)
|
|
#define PyInt_FromString PyLong_FromString
|
|
#define PyInt_FromUnicode PyLong_FromUnicode
|
|
#define PyInt_FromLong PyLong_FromLong
|
|
#define PyInt_FromSize_t PyLong_FromSize_t
|
|
#define PyInt_FromSsize_t PyLong_FromSsize_t
|
|
#define PyInt_AsLong PyLong_AsLong
|
|
#define PyInt_AS_LONG PyLong_AS_LONG
|
|
#define PyInt_AsSsize_t PyLong_AsSsize_t
|
|
#define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
|
|
#define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
|
|
#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
|
|
#else
|
|
#define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
|
|
#define PyBytes_Type PyString_Type
|
|
#endif
|
|
#if PY_MAJOR_VERSION >= 3
|
|
#define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)
|
|
#endif
|
|
#if !defined(WIN32) && !defined(MS_WINDOWS)
|
|
#ifndef __stdcall
|
|
#define __stdcall
|
|
#endif
|
|
#ifndef __cdecl
|
|
#define __cdecl
|
|
#endif
|
|
#ifndef __fastcall
|
|
#define __fastcall
|
|
#endif
|
|
#else
|
|
#define _USE_MATH_DEFINES
|
|
#endif
|
|
#if PY_VERSION_HEX < 0x02050000
|
|
#define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n)))
|
|
#define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
|
|
#define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n)))
|
|
#else
|
|
#define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n))
|
|
#define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
|
|
#define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n))
|
|
#endif
|
|
#if PY_VERSION_HEX < 0x02050000
|
|
#define __Pyx_NAMESTR(n) ((char *)(n))
|
|
#define __Pyx_DOCSTR(n) ((char *)(n))
|
|
#else
|
|
#define __Pyx_NAMESTR(n) (n)
|
|
#define __Pyx_DOCSTR(n) (n)
|
|
#endif
|
|
#ifdef __cplusplus
|
|
#define __PYX_EXTERN_C extern "C"
|
|
#else
|
|
#define __PYX_EXTERN_C extern
|
|
#endif
|
|
#include <math.h>
|
|
#define __PYX_HAVE_API__scikits__image__opencv__opencv_cv
|
|
#include "stdlib.h"
|
|
#include "stdio.h"
|
|
#include "numpy/arrayobject.h"
|
|
#include "numpy/ufuncobject.h"
|
|
|
|
#ifdef __GNUC__
|
|
#define INLINE __inline__
|
|
#elif _WIN32
|
|
#define INLINE __inline
|
|
#else
|
|
#define INLINE
|
|
#endif
|
|
|
|
typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
|
|
|
|
|
|
/* Type Conversion Predeclarations */
|
|
|
|
#if PY_MAJOR_VERSION < 3
|
|
#define __Pyx_PyBytes_FromString PyString_FromString
|
|
#define __Pyx_PyBytes_FromStringAndSize PyString_FromStringAndSize
|
|
#define __Pyx_PyBytes_AsString PyString_AsString
|
|
#else
|
|
#define __Pyx_PyBytes_FromString PyBytes_FromString
|
|
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
|
|
#define __Pyx_PyBytes_AsString PyBytes_AsString
|
|
#endif
|
|
|
|
#define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s)
|
|
#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) __Pyx_PyBytes_AsString(s))
|
|
|
|
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
|
|
static INLINE int __Pyx_PyObject_IsTrue(PyObject*);
|
|
static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
|
|
|
|
#if !defined(T_PYSSIZET)
|
|
#if PY_VERSION_HEX < 0x02050000
|
|
#define T_PYSSIZET T_INT
|
|
#elif !defined(T_LONGLONG)
|
|
#define T_PYSSIZET \
|
|
((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT : \
|
|
((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : -1))
|
|
#else
|
|
#define T_PYSSIZET \
|
|
((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT : \
|
|
((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : \
|
|
((sizeof(Py_ssize_t) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))
|
|
#endif
|
|
#endif
|
|
|
|
|
|
#if !defined(T_ULONGLONG)
|
|
#define __Pyx_T_UNSIGNED_INT(x) \
|
|
((sizeof(x) == sizeof(unsigned char)) ? T_UBYTE : \
|
|
((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \
|
|
((sizeof(x) == sizeof(unsigned int)) ? T_UINT : \
|
|
((sizeof(x) == sizeof(unsigned long)) ? T_ULONG : -1))))
|
|
#else
|
|
#define __Pyx_T_UNSIGNED_INT(x) \
|
|
((sizeof(x) == sizeof(unsigned char)) ? T_UBYTE : \
|
|
((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \
|
|
((sizeof(x) == sizeof(unsigned int)) ? T_UINT : \
|
|
((sizeof(x) == sizeof(unsigned long)) ? T_ULONG : \
|
|
((sizeof(x) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))))
|
|
#endif
|
|
#if !defined(T_LONGLONG)
|
|
#define __Pyx_T_SIGNED_INT(x) \
|
|
((sizeof(x) == sizeof(char)) ? T_BYTE : \
|
|
((sizeof(x) == sizeof(short)) ? T_SHORT : \
|
|
((sizeof(x) == sizeof(int)) ? T_INT : \
|
|
((sizeof(x) == sizeof(long)) ? T_LONG : -1))))
|
|
#else
|
|
#define __Pyx_T_SIGNED_INT(x) \
|
|
((sizeof(x) == sizeof(char)) ? T_BYTE : \
|
|
((sizeof(x) == sizeof(short)) ? T_SHORT : \
|
|
((sizeof(x) == sizeof(int)) ? T_INT : \
|
|
((sizeof(x) == sizeof(long)) ? T_LONG : \
|
|
((sizeof(x) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))))
|
|
#endif
|
|
|
|
#define __Pyx_T_FLOATING(x) \
|
|
((sizeof(x) == sizeof(float)) ? T_FLOAT : \
|
|
((sizeof(x) == sizeof(double)) ? T_DOUBLE : -1))
|
|
|
|
#if !defined(T_SIZET)
|
|
#if !defined(T_ULONGLONG)
|
|
#define T_SIZET \
|
|
((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT : \
|
|
((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : -1))
|
|
#else
|
|
#define T_SIZET \
|
|
((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT : \
|
|
((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : \
|
|
((sizeof(size_t) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))
|
|
#endif
|
|
#endif
|
|
|
|
static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
|
|
static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
|
|
static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
|
|
|
|
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
|
|
|
|
|
|
#ifdef __GNUC__
|
|
/* Test for GCC > 2.95 */
|
|
#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
|
|
#define likely(x) __builtin_expect(!!(x), 1)
|
|
#define unlikely(x) __builtin_expect(!!(x), 0)
|
|
#else /* __GNUC__ > 2 ... */
|
|
#define likely(x) (x)
|
|
#define unlikely(x) (x)
|
|
#endif /* __GNUC__ > 2 ... */
|
|
#else /* __GNUC__ */
|
|
#define likely(x) (x)
|
|
#define unlikely(x) (x)
|
|
#endif /* __GNUC__ */
|
|
|
|
static PyObject *__pyx_m;
|
|
static PyObject *__pyx_b;
|
|
static PyObject *__pyx_empty_tuple;
|
|
static PyObject *__pyx_empty_bytes;
|
|
static int __pyx_lineno;
|
|
static int __pyx_clineno = 0;
|
|
static const char * __pyx_cfilenm= __FILE__;
|
|
static const char *__pyx_filename;
|
|
static const char **__pyx_f;
|
|
|
|
|
|
#if !defined(CYTHON_CCOMPLEX)
|
|
#if defined(__cplusplus)
|
|
#define CYTHON_CCOMPLEX 1
|
|
#elif defined(_Complex_I)
|
|
#define CYTHON_CCOMPLEX 1
|
|
#else
|
|
#define CYTHON_CCOMPLEX 0
|
|
#endif
|
|
#endif
|
|
|
|
#if CYTHON_CCOMPLEX
|
|
#ifdef __cplusplus
|
|
#include <complex>
|
|
#else
|
|
#include <complex.h>
|
|
#endif
|
|
#endif
|
|
|
|
#if CYTHON_CCOMPLEX
|
|
#ifdef __cplusplus
|
|
typedef ::std::complex< float > __pyx_t_float_complex;
|
|
#else
|
|
typedef float _Complex __pyx_t_float_complex;
|
|
#endif
|
|
#else
|
|
typedef struct { float real, imag; } __pyx_t_float_complex;
|
|
#endif
|
|
|
|
#if CYTHON_CCOMPLEX
|
|
#ifdef __cplusplus
|
|
static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
|
|
#else
|
|
static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
|
|
#endif
|
|
#else
|
|
static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
|
|
#endif
|
|
|
|
#if CYTHON_CCOMPLEX
|
|
#ifdef __cplusplus
|
|
typedef ::std::complex< double > __pyx_t_double_complex;
|
|
#else
|
|
typedef double _Complex __pyx_t_double_complex;
|
|
#endif
|
|
#else
|
|
typedef struct { double real, imag; } __pyx_t_double_complex;
|
|
#endif
|
|
|
|
#if CYTHON_CCOMPLEX
|
|
#ifdef __cplusplus
|
|
static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
|
|
#else
|
|
static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
|
|
#endif
|
|
#else
|
|
static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
|
|
#endif
|
|
|
|
#if CYTHON_CCOMPLEX
|
|
#ifdef __cplusplus
|
|
typedef ::std::complex< long double > __pyx_t_long_double_complex;
|
|
#else
|
|
typedef long double _Complex __pyx_t_long_double_complex;
|
|
#endif
|
|
#else
|
|
typedef struct { long double real, imag; } __pyx_t_long_double_complex;
|
|
#endif
|
|
|
|
#if CYTHON_CCOMPLEX
|
|
#ifdef __cplusplus
|
|
static INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double, long double);
|
|
#else
|
|
static INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double, long double);
|
|
#endif
|
|
#else
|
|
static INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double, long double);
|
|
#endif
|
|
|
|
/* Type declarations */
|
|
|
|
typedef npy_int8 __pyx_t_5numpy_int8_t;
|
|
|
|
typedef npy_int16 __pyx_t_5numpy_int16_t;
|
|
|
|
typedef npy_int32 __pyx_t_5numpy_int32_t;
|
|
|
|
typedef npy_int64 __pyx_t_5numpy_int64_t;
|
|
|
|
typedef npy_uint8 __pyx_t_5numpy_uint8_t;
|
|
|
|
typedef npy_uint16 __pyx_t_5numpy_uint16_t;
|
|
|
|
typedef npy_uint32 __pyx_t_5numpy_uint32_t;
|
|
|
|
typedef npy_uint64 __pyx_t_5numpy_uint64_t;
|
|
|
|
typedef npy_float32 __pyx_t_5numpy_float32_t;
|
|
|
|
typedef npy_float64 __pyx_t_5numpy_float64_t;
|
|
|
|
typedef __pyx_t_float_complex __pyx_t_5numpy_complex64_t;
|
|
|
|
typedef __pyx_t_double_complex __pyx_t_5numpy_complex128_t;
|
|
|
|
typedef npy_long __pyx_t_5numpy_int_t;
|
|
|
|
typedef npy_longlong __pyx_t_5numpy_long_t;
|
|
|
|
typedef npy_ulong __pyx_t_5numpy_uint_t;
|
|
|
|
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
|
|
|
|
typedef npy_double __pyx_t_5numpy_float_t;
|
|
|
|
typedef npy_double __pyx_t_5numpy_double_t;
|
|
|
|
typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
|
|
|
|
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
|
|
|
|
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
|
|
|
|
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
|
|
|
|
typedef npy_cdouble __pyx_t_5numpy_complex_t;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_type.pxd":5
|
|
* # available at build time.
|
|
*
|
|
* cdef struct _IplImage: # <<<<<<<<<<<<<<
|
|
* int nSize # sizeof(_IplImage)
|
|
* int ID # must be 0
|
|
*/
|
|
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type__IplImage {
|
|
int nSize;
|
|
int ID;
|
|
int nChannels;
|
|
int alphaChannel;
|
|
int depth;
|
|
char colorModel[4];
|
|
char channelSeq[4];
|
|
int dataOrder;
|
|
int origin;
|
|
int align;
|
|
int width;
|
|
int height;
|
|
void *roi;
|
|
void *maskROI;
|
|
void *imageId;
|
|
void *tileInfo;
|
|
int imageSize;
|
|
char *imageData;
|
|
int widthStep;
|
|
int BorderMode[4];
|
|
int BorderConst[4];
|
|
char *imageDataOrigin;
|
|
};
|
|
|
|
typedef struct __pyx_t_7scikits_5image_6opencv_11opencv_type__IplImage __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_type.pxd":38
|
|
*
|
|
* # you will never directly populate a CvMat.
|
|
* cdef union CvMat_uProxy: # <<<<<<<<<<<<<<
|
|
* unsigned char* ptr
|
|
* short* s
|
|
*/
|
|
|
|
union __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat_uProxy {
|
|
unsigned char *ptr;
|
|
short *s;
|
|
int *i;
|
|
float *fl;
|
|
double *db;
|
|
};
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_type.pxd":45
|
|
* double* db
|
|
*
|
|
* cdef struct CvMat: # <<<<<<<<<<<<<<
|
|
* int type
|
|
* int step
|
|
*/
|
|
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat {
|
|
int type;
|
|
int step;
|
|
int *refcount;
|
|
int hdr_refcount;
|
|
union __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat_uProxy data;
|
|
int rows;
|
|
int cols;
|
|
};
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_type.pxd":54
|
|
* int cols
|
|
*
|
|
* cdef struct CvPoint: # <<<<<<<<<<<<<<
|
|
* int x
|
|
* int y
|
|
*/
|
|
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvPoint {
|
|
int x;
|
|
int y;
|
|
};
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_type.pxd":58
|
|
* int y
|
|
*
|
|
* cdef struct CvPoint2D32f: # <<<<<<<<<<<<<<
|
|
* float x
|
|
* float y
|
|
*/
|
|
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvPoint2D32f {
|
|
float x;
|
|
float y;
|
|
};
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_type.pxd":62
|
|
* float y
|
|
*
|
|
* cdef struct CvSize: # <<<<<<<<<<<<<<
|
|
* int width
|
|
* int height
|
|
*/
|
|
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvSize {
|
|
int width;
|
|
int height;
|
|
};
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_type.pxd":66
|
|
* int height
|
|
*
|
|
* cdef struct CvTermCriteria: # <<<<<<<<<<<<<<
|
|
* int type
|
|
* int max_iter
|
|
*/
|
|
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvTermCriteria {
|
|
int type;
|
|
int max_iter;
|
|
double epsilon;
|
|
};
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_type.pxd":71
|
|
* double epsilon
|
|
*
|
|
* cdef struct CvScalar: # <<<<<<<<<<<<<<
|
|
* double val[4]
|
|
*
|
|
*/
|
|
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvScalar {
|
|
double val[4];
|
|
};
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_type.pxd":74
|
|
* double val[4]
|
|
*
|
|
* cdef struct _IplConvKernel: # <<<<<<<<<<<<<<
|
|
* int nCols
|
|
* int nRows
|
|
*/
|
|
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type__IplConvKernel {
|
|
int nCols;
|
|
int nRows;
|
|
int anchorX;
|
|
int anchorY;
|
|
int *values;
|
|
int nShiftR;
|
|
};
|
|
|
|
typedef struct __pyx_t_7scikits_5image_6opencv_11opencv_type__IplConvKernel __pyx_t_7scikits_5image_6opencv_11opencv_type_IplConvKernel;
|
|
|
|
typedef __pyx_t_5numpy_uint8_t __pyx_t_7scikits_5image_6opencv_14opencv_backend_UINT8_t;
|
|
|
|
typedef __pyx_t_5numpy_int8_t __pyx_t_7scikits_5image_6opencv_14opencv_backend_INT8_t;
|
|
|
|
typedef __pyx_t_5numpy_int16_t __pyx_t_7scikits_5image_6opencv_14opencv_backend_INT16_t;
|
|
|
|
typedef __pyx_t_5numpy_int32_t __pyx_t_7scikits_5image_6opencv_14opencv_backend_INT32_t;
|
|
|
|
typedef __pyx_t_5numpy_float32_t __pyx_t_7scikits_5image_6opencv_14opencv_backend_FLOAT32_t;
|
|
|
|
typedef __pyx_t_5numpy_float64_t __pyx_t_7scikits_5image_6opencv_14opencv_backend_FLOAT64_t;
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvSobelPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, int, int, int);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvLaplacePtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, int);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvCannyPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, double, double, int);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvPreCorneDetectPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, int);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvCornerEigenValsAndVecsPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, int, int);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvCornerMinEigenValPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, int, int);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvCornerHarrisPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, int, int, double);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvFindCornerSubPixPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvPoint2D32f *, int, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvSize, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvSize, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvTermCriteria);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvGoodFeaturesToTrackPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvPoint2D32f *, int *, double, double, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, int, int, double);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvGetRectSubPixPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvPoint2D32f);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvGetQuadrangleSubPixPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvResizePtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, int);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvWarpAffinePtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *, int, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvScalar);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvWarpPerspectivePtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *, int, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvScalar);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvLogPolarPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvPoint2D32f, double, int);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvErodePtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplConvKernel *, int);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvDilatePtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplConvKernel *, int);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvMorphologyExPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplConvKernel *, int, int);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvSmoothPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, int, int, int, double, double);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvFilter2DPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvPoint);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvIntegralPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvCvtColorPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, int);
|
|
|
|
typedef double (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvThresholdPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, double, double, int);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvAdaptiveThresholdPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, double, int, int, int, double);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvPyrDownPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, int);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvPyrUpPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, int);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvCalibrateCamera2Ptr)(struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvSize, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *, int);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvFindChessboardCornersPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvSize, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvPoint2D32f *, int *, int);
|
|
|
|
typedef void (*__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvDrawChessboardCornersPtr)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvSize, struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvPoint2D32f *, int, int);
|
|
|
|
#ifdef CYTHON_REFNANNY
|
|
typedef struct {
|
|
void (*INCREF)(void*, PyObject*, int);
|
|
void (*DECREF)(void*, PyObject*, int);
|
|
void (*GOTREF)(void*, PyObject*, int);
|
|
void (*GIVEREF)(void*, PyObject*, int);
|
|
void* (*NewContext)(const char*, int, const char*);
|
|
void (*FinishContext)(void**);
|
|
} __Pyx_RefnannyAPIStruct;
|
|
static __Pyx_RefnannyAPIStruct *__Pyx_Refnanny = NULL;
|
|
#define __Pyx_ImportRefcountAPI(name) (__Pyx_RefnannyAPIStruct *) PyCObject_Import((char *)name, (char *)"RefnannyAPI")
|
|
#define __Pyx_INCREF(r) __Pyx_Refnanny->INCREF(__pyx_refchk, (PyObject *)(r), __LINE__)
|
|
#define __Pyx_DECREF(r) __Pyx_Refnanny->DECREF(__pyx_refchk, (PyObject *)(r), __LINE__)
|
|
#define __Pyx_GOTREF(r) __Pyx_Refnanny->GOTREF(__pyx_refchk, (PyObject *)(r), __LINE__)
|
|
#define __Pyx_GIVEREF(r) __Pyx_Refnanny->GIVEREF(__pyx_refchk, (PyObject *)(r), __LINE__)
|
|
#define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0)
|
|
#define __Pyx_SetupRefcountContext(name) void* __pyx_refchk = __Pyx_Refnanny->NewContext((name), __LINE__, __FILE__)
|
|
#define __Pyx_FinishRefcountContext() __Pyx_Refnanny->FinishContext(&__pyx_refchk)
|
|
#else
|
|
#define __Pyx_INCREF(r) Py_INCREF(r)
|
|
#define __Pyx_DECREF(r) Py_DECREF(r)
|
|
#define __Pyx_GOTREF(r)
|
|
#define __Pyx_GIVEREF(r)
|
|
#define __Pyx_XDECREF(r) Py_XDECREF(r)
|
|
#define __Pyx_SetupRefcountContext(name)
|
|
#define __Pyx_FinishRefcountContext()
|
|
#endif /* CYTHON_REFNANNY */
|
|
#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0)
|
|
#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0)
|
|
|
|
static void __Pyx_RaiseDoubleKeywordsError(
|
|
const char* func_name, PyObject* kw_name); /*proto*/
|
|
|
|
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
|
|
Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
|
|
|
|
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name); /*proto*/
|
|
|
|
|
|
static INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
|
|
PyObject *r;
|
|
if (!j) return NULL;
|
|
r = PyObject_GetItem(o, j);
|
|
Py_DECREF(j);
|
|
return r;
|
|
}
|
|
|
|
|
|
#define __Pyx_GetItemInt_List(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
|
|
__Pyx_GetItemInt_List_Fast(o, i, size <= sizeof(long)) : \
|
|
__Pyx_GetItemInt_Generic(o, to_py_func(i)))
|
|
|
|
static INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
|
|
if (likely(o != Py_None)) {
|
|
if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
|
|
PyObject *r = PyList_GET_ITEM(o, i);
|
|
Py_INCREF(r);
|
|
return r;
|
|
}
|
|
else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
|
|
PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
|
|
Py_INCREF(r);
|
|
return r;
|
|
}
|
|
}
|
|
return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
|
|
}
|
|
|
|
#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
|
|
__Pyx_GetItemInt_Tuple_Fast(o, i, size <= sizeof(long)) : \
|
|
__Pyx_GetItemInt_Generic(o, to_py_func(i)))
|
|
|
|
static INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
|
|
if (likely(o != Py_None)) {
|
|
if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
|
|
PyObject *r = PyTuple_GET_ITEM(o, i);
|
|
Py_INCREF(r);
|
|
return r;
|
|
}
|
|
else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
|
|
PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
|
|
Py_INCREF(r);
|
|
return r;
|
|
}
|
|
}
|
|
return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
|
|
}
|
|
|
|
|
|
#define __Pyx_GetItemInt(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
|
|
__Pyx_GetItemInt_Fast(o, i, size <= sizeof(long)) : \
|
|
__Pyx_GetItemInt_Generic(o, to_py_func(i)))
|
|
|
|
static INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
|
|
PyObject *r;
|
|
if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
|
|
r = PyList_GET_ITEM(o, i);
|
|
Py_INCREF(r);
|
|
}
|
|
else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
|
|
r = PyTuple_GET_ITEM(o, i);
|
|
Py_INCREF(r);
|
|
}
|
|
else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) {
|
|
r = PySequence_GetItem(o, i);
|
|
}
|
|
else {
|
|
r = __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
|
|
}
|
|
return r;
|
|
}
|
|
|
|
static INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
|
|
if (likely(PyList_CheckExact(L))) {
|
|
if (PyList_Append(L, x) < 0) return NULL;
|
|
Py_INCREF(Py_None);
|
|
return Py_None; /* this is just to have an accurate signature */
|
|
}
|
|
else {
|
|
PyObject *r, *m;
|
|
m = __Pyx_GetAttrString(L, "append");
|
|
if (!m) return NULL;
|
|
r = PyObject_CallFunctionObjArgs(m, x, NULL);
|
|
Py_DECREF(m);
|
|
return r;
|
|
}
|
|
}
|
|
|
|
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
|
|
|
|
static INLINE long __Pyx_mod_long(long, long); /* proto */
|
|
|
|
static INLINE long __Pyx_div_long(long, long); /* proto */
|
|
|
|
static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
|
|
|
|
static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
|
|
|
|
static INLINE void __Pyx_RaiseTooManyValuesError(void);
|
|
|
|
static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
|
|
static int __Pyx_EndUnpack(PyObject *); /*proto*/
|
|
|
|
static INLINE void __Pyx_RaiseNoneNotIterableError(void);
|
|
|
|
static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/
|
|
|
|
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
|
|
const char *name, int exact); /*proto*/
|
|
|
|
static INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
|
|
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
|
|
|
|
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
|
|
|
|
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
|
|
|
|
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
|
|
|
|
static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
|
|
static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
|
|
|
|
static INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp);
|
|
|
|
static INLINE npy_intp __Pyx_PyInt_from_py_npy_intp(PyObject *);
|
|
|
|
static int __Pyx_Print(PyObject *, int); /*proto*/
|
|
#if PY_MAJOR_VERSION >= 3
|
|
static PyObject* __pyx_print = 0;
|
|
static PyObject* __pyx_print_kwargs = 0;
|
|
#endif
|
|
|
|
static int __Pyx_PrintOne(PyObject *o); /*proto*/
|
|
|
|
#if CYTHON_CCOMPLEX
|
|
#ifdef __cplusplus
|
|
#define __Pyx_CREAL(z) ((z).real())
|
|
#define __Pyx_CIMAG(z) ((z).imag())
|
|
#else
|
|
#define __Pyx_CREAL(z) (__real__(z))
|
|
#define __Pyx_CIMAG(z) (__imag__(z))
|
|
#endif
|
|
#else
|
|
#define __Pyx_CREAL(z) ((z).real)
|
|
#define __Pyx_CIMAG(z) ((z).imag)
|
|
#endif
|
|
|
|
#if CYTHON_CCOMPLEX
|
|
#define __Pyx_c_eqf(a, b) ((a)==(b))
|
|
#define __Pyx_c_sumf(a, b) ((a)+(b))
|
|
#define __Pyx_c_difff(a, b) ((a)-(b))
|
|
#define __Pyx_c_prodf(a, b) ((a)*(b))
|
|
#define __Pyx_c_quotf(a, b) ((a)/(b))
|
|
#define __Pyx_c_negf(a) (-(a))
|
|
#ifdef __cplusplus
|
|
#define __Pyx_c_is_zerof(z) ((z)==0.0)
|
|
#define __Pyx_c_conjf(z) (::std::conj(z))
|
|
/*#define __Pyx_c_absf(z) (::std::abs(z))*/
|
|
#else
|
|
#define __Pyx_c_is_zerof(z) ((z)==0)
|
|
#define __Pyx_c_conjf(z) (conjf(z))
|
|
/*#define __Pyx_c_absf(z) (cabsf(z))*/
|
|
#endif
|
|
#else
|
|
static INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex);
|
|
static INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex);
|
|
static INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex);
|
|
static INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex);
|
|
static INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex);
|
|
static INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex);
|
|
static INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex);
|
|
static INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex);
|
|
/*static INLINE float __Pyx_c_absf(__pyx_t_float_complex);*/
|
|
#endif
|
|
|
|
#if CYTHON_CCOMPLEX
|
|
#define __Pyx_c_eq(a, b) ((a)==(b))
|
|
#define __Pyx_c_sum(a, b) ((a)+(b))
|
|
#define __Pyx_c_diff(a, b) ((a)-(b))
|
|
#define __Pyx_c_prod(a, b) ((a)*(b))
|
|
#define __Pyx_c_quot(a, b) ((a)/(b))
|
|
#define __Pyx_c_neg(a) (-(a))
|
|
#ifdef __cplusplus
|
|
#define __Pyx_c_is_zero(z) ((z)==0.0)
|
|
#define __Pyx_c_conj(z) (::std::conj(z))
|
|
/*#define __Pyx_c_abs(z) (::std::abs(z))*/
|
|
#else
|
|
#define __Pyx_c_is_zero(z) ((z)==0)
|
|
#define __Pyx_c_conj(z) (conj(z))
|
|
/*#define __Pyx_c_abs(z) (cabs(z))*/
|
|
#endif
|
|
#else
|
|
static INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex);
|
|
static INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex);
|
|
static INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex);
|
|
static INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex);
|
|
static INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex);
|
|
static INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex);
|
|
static INLINE int __Pyx_c_is_zero(__pyx_t_double_complex);
|
|
static INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex);
|
|
/*static INLINE double __Pyx_c_abs(__pyx_t_double_complex);*/
|
|
#endif
|
|
|
|
#if CYTHON_CCOMPLEX
|
|
#define __Pyx_c_eql(a, b) ((a)==(b))
|
|
#define __Pyx_c_suml(a, b) ((a)+(b))
|
|
#define __Pyx_c_diffl(a, b) ((a)-(b))
|
|
#define __Pyx_c_prodl(a, b) ((a)*(b))
|
|
#define __Pyx_c_quotl(a, b) ((a)/(b))
|
|
#define __Pyx_c_negl(a) (-(a))
|
|
#ifdef __cplusplus
|
|
#define __Pyx_c_is_zerol(z) ((z)==0.0)
|
|
#define __Pyx_c_conjl(z) (::std::conj(z))
|
|
/*#define __Pyx_c_absl(z) (::std::abs(z))*/
|
|
#else
|
|
#define __Pyx_c_is_zerol(z) ((z)==0)
|
|
#define __Pyx_c_conjl(z) (conjl(z))
|
|
/*#define __Pyx_c_absl(z) (cabsl(z))*/
|
|
#endif
|
|
#else
|
|
static INLINE int __Pyx_c_eql(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
|
|
static INLINE __pyx_t_long_double_complex __Pyx_c_suml(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
|
|
static INLINE __pyx_t_long_double_complex __Pyx_c_diffl(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
|
|
static INLINE __pyx_t_long_double_complex __Pyx_c_prodl(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
|
|
static INLINE __pyx_t_long_double_complex __Pyx_c_quotl(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
|
|
static INLINE __pyx_t_long_double_complex __Pyx_c_negl(__pyx_t_long_double_complex);
|
|
static INLINE int __Pyx_c_is_zerol(__pyx_t_long_double_complex);
|
|
static INLINE __pyx_t_long_double_complex __Pyx_c_conjl(__pyx_t_long_double_complex);
|
|
/*static INLINE long double __Pyx_c_absl(__pyx_t_long_double_complex);*/
|
|
#endif
|
|
|
|
static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
|
|
|
|
static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
|
|
|
|
static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
|
|
|
|
static INLINE char __Pyx_PyInt_AsChar(PyObject *);
|
|
|
|
static INLINE short __Pyx_PyInt_AsShort(PyObject *);
|
|
|
|
static INLINE int __Pyx_PyInt_AsInt(PyObject *);
|
|
|
|
static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
|
|
|
|
static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
|
|
|
|
static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
|
|
|
|
static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
|
|
|
|
static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
|
|
|
|
static INLINE long __Pyx_PyInt_AsLong(PyObject *);
|
|
|
|
static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
|
|
|
|
static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
|
|
|
|
static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
|
|
|
|
static INLINE int __Pyx_StrEq(const char *, const char *); /*proto*/
|
|
|
|
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size); /*proto*/
|
|
|
|
static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
|
|
|
|
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /*proto*/
|
|
|
|
static void __Pyx_AddTraceback(const char *funcname); /*proto*/
|
|
|
|
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
|
|
/* Module declarations from python_buffer */
|
|
|
|
/* Module declarations from python_object */
|
|
|
|
/* Module declarations from stdlib */
|
|
|
|
/* Module declarations from stdio */
|
|
|
|
/* Module declarations from numpy */
|
|
|
|
/* Module declarations from numpy */
|
|
|
|
static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
|
|
static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
|
|
static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
|
|
static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
|
|
static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
|
|
static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *); /*proto*/
|
|
static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *, PyObject *); /*proto*/
|
|
static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *, PyObject *, PyObject *); /*proto*/
|
|
static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
|
|
static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *, PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
|
|
static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
|
|
/* Module declarations from python_version */
|
|
|
|
/* Module declarations from python_ref */
|
|
|
|
/* Module declarations from python_exc */
|
|
|
|
/* Module declarations from python_module */
|
|
|
|
/* Module declarations from python_mem */
|
|
|
|
/* Module declarations from python_tuple */
|
|
|
|
/* Module declarations from python_list */
|
|
|
|
/* Module declarations from python_cobject */
|
|
|
|
/* Module declarations from python_sequence */
|
|
|
|
/* Module declarations from python_mapping */
|
|
|
|
/* Module declarations from python_iterator */
|
|
|
|
/* Module declarations from python_type */
|
|
|
|
/* Module declarations from python_number */
|
|
|
|
/* Module declarations from python_int */
|
|
|
|
/* Module declarations from python_bool */
|
|
|
|
/* Module declarations from python_long */
|
|
|
|
/* Module declarations from python_float */
|
|
|
|
/* Module declarations from python_complex */
|
|
|
|
/* Module declarations from python_string */
|
|
|
|
/* Module declarations from python_unicode */
|
|
|
|
/* Module declarations from python_dict */
|
|
|
|
/* Module declarations from python_instance */
|
|
|
|
/* Module declarations from python_function */
|
|
|
|
/* Module declarations from python_method */
|
|
|
|
/* Module declarations from python_set */
|
|
|
|
/* Module declarations from python */
|
|
|
|
/* Module declarations from scikits.image.opencv.opencv_type */
|
|
|
|
/* Module declarations from scikits.image.opencv.opencv_backend */
|
|
|
|
static void (*__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage)(PyArrayObject *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *); /*proto*/
|
|
static struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *(*__pyx_f_7scikits_5image_6opencv_14opencv_backend_cvmat_ptr_from_iplimage)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *); /*proto*/
|
|
static int (*__pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array)(PyArrayObject *); /*proto*/
|
|
static int (*__pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype)(PyArrayObject *, PyObject *); /*proto*/
|
|
static int (*__pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_ndims)(PyArrayObject *, PyObject *); /*proto*/
|
|
static int (*__pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels)(PyArrayObject *, PyObject *); /*proto*/
|
|
static int (*__pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_same_dtype)(PyArrayObject *, PyArrayObject *); /*proto*/
|
|
static int (*__pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_same_shape)(PyArrayObject *, PyArrayObject *); /*proto*/
|
|
static int (*__pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_same_width_and_height)(PyArrayObject *, PyArrayObject *); /*proto*/
|
|
static int (*__pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_like)(PyArrayObject *, PyArrayObject *); /*proto*/
|
|
static int (*__pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_not_sharing_data)(PyArrayObject *, PyArrayObject *); /*proto*/
|
|
static PyArrayObject *(*__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array)(int, npy_intp *, PyObject *); /*proto*/
|
|
static PyArrayObject *(*__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like)(PyArrayObject *); /*proto*/
|
|
static PyArrayObject *(*__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like_diff_dtype)(PyArrayObject *, PyObject *); /*proto*/
|
|
static npy_intp (*__pyx_f_7scikits_5image_6opencv_14opencv_backend_get_array_nbytes)(PyArrayObject *); /*proto*/
|
|
static npy_intp *(*__pyx_f_7scikits_5image_6opencv_14opencv_backend_clone_array_shape)(PyArrayObject *); /*proto*/
|
|
static struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvPoint2D32f *(*__pyx_f_7scikits_5image_6opencv_14opencv_backend_array_as_cvPoint2D32f_ptr)(PyArrayObject *); /*proto*/
|
|
static struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvTermCriteria (*__pyx_f_7scikits_5image_6opencv_14opencv_backend_get_cvTermCriteria)(int, double); /*proto*/
|
|
static __pyx_t_7scikits_5image_6opencv_11opencv_type_IplConvKernel *(*__pyx_f_7scikits_5image_6opencv_14opencv_backend_get_IplConvKernel_ptr_from_array)(PyArrayObject *, PyObject *); /*proto*/
|
|
static void (*__pyx_f_7scikits_5image_6opencv_14opencv_backend_free_IplConvKernel)(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplConvKernel *); /*proto*/
|
|
/* Module declarations from scikits.image.opencv.opencv_cv */
|
|
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvSobelPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvSobel;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvLaplacePtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvLaplace;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvCannyPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvCanny;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvPreCorneDetectPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvPreCornerDetect;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvCornerEigenValsAndVecsPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvCornerEigenValsAndVecs;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvCornerMinEigenValPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvCornerMinEigenVal;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvCornerHarrisPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvCornerHarris;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvFindCornerSubPixPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvFindCornerSubPix;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvGoodFeaturesToTrackPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvGoodFeaturesToTrack;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvGetRectSubPixPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvGetRectSubPix;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvGetQuadrangleSubPixPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvGetQuadrangleSubPix;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvResizePtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvResize;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvWarpAffinePtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvWarpAffine;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvWarpPerspectivePtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvWarpPerspective;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvLogPolarPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvLogPolar;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvErodePtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvErode;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvDilatePtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvDilate;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvMorphologyExPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvMorphologyEx;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvSmoothPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvSmooth;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvFilter2DPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvFilter2D;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvIntegralPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvIntegral;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvCvtColorPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvCvtColor;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvThresholdPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvThreshold;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvAdaptiveThresholdPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvAdaptiveThreshold;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvPyrDownPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvPyrDown;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvPyrUpPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvPyrUp;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvCalibrateCamera2Ptr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvCalibrateCamera2;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvFindChessboardCornersPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvFindChessboardCorners;
|
|
static __pyx_t_7scikits_5image_6opencv_9opencv_cv_cvDrawChessboardCornersPtr __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvDrawChessboardCorners;
|
|
#define __Pyx_MODULE_NAME "scikits.image.opencv.opencv_cv"
|
|
int __pyx_module_is_main_scikits__image__opencv__opencv_cv = 0;
|
|
|
|
/* Implementation of scikits.image.opencv.opencv_cv */
|
|
static PyObject *__pyx_builtin_RuntimeError;
|
|
static PyObject *__pyx_builtin_ValueError;
|
|
static PyObject *__pyx_builtin_range;
|
|
static PyObject *__pyx_builtin_KeyError;
|
|
static char __pyx_k_1[] = "aperture_size must be 3, 5, or 7";
|
|
static char __pyx_k_3[] = "win must be a 2-tuple";
|
|
static char __pyx_k_4[] = "The window is too large.";
|
|
static char __pyx_k_6[] = "warpmat must be 2x3";
|
|
static char __pyx_k_8[] = "size must be a 2-tuple (height, width)";
|
|
static char __pyx_k_9[] = "unsupported interpolation type";
|
|
static char __pyx_k_12[] = "fillval must be a 4-tuple";
|
|
static char __pyx_k_13[] = "unsupported flag combination";
|
|
static char __pyx_k_16[] = "warpmat must be 3x3";
|
|
static char __pyx_k_18[] = "center must be a 2-tuple";
|
|
static char __pyx_k_22[] = "operation type not understood";
|
|
static char __pyx_k_25[] = "In place operation not supported with this filter";
|
|
static char __pyx_k_27[] = "anchor must be (x, y) tuple";
|
|
static char __pyx_k_28[] = "anchor point must be inside kernel";
|
|
static char __pyx_k_31[] = "unknown conversion code";
|
|
static char __pyx_k_36[] = "CV_ADAPTIVE_THRESH_MEAN_C";
|
|
static char __pyx_k_37[] = "CV_ADAPTIVE_THRESH_GAUSSIAN_C";
|
|
static char __pyx_k_38[] = "Invalid adaptive method";
|
|
static char __pyx_k_39[] = "CV_THRESH_BINARY_INV";
|
|
static char __pyx_k_40[] = "Invalid threshold type";
|
|
static char __pyx_k_41[] = "block size must be and odd number and greater than 1";
|
|
static char __pyx_k_44[] = "ndarray is not C contiguous";
|
|
static char __pyx_k_45[] = "ndarray is not Fortran contiguous";
|
|
static char __pyx_k_46[] = ">";
|
|
static char __pyx_k_47[] = "<";
|
|
static char __pyx_k_48[] = "Non-native byte order not supported";
|
|
static char __pyx_k_49[] = "unknown dtype code in numpy.pxd (%d)";
|
|
static char __pyx_k_50[] = "Format string allocated too short, see comment in numpy.pxd";
|
|
static char __pyx_k_51[] = "Format string allocated too short.";
|
|
static char __pyx_k_52[] = "*";
|
|
static char __pyx_k_53[] = "Could not load libcv";
|
|
static char __pyx_k_54[] = "cvCornerEigenValsAndVecs";
|
|
static char __pyx_k_55[] = "cvGoodFeaturesToTrack";
|
|
static char __pyx_k_56[] = "cvGetQuadrangleSubPix";
|
|
static char __pyx_k_57[] = "cvFindChessboardCorners";
|
|
static char __pyx_k_58[] = "cvDrawChessboardCorners";
|
|
static char __pyx_k_59[] = "cvSobel(src, xorder=1, yorder=0, aperture_size=3)\n\nApply the Sobel operator to the input image.\n\nParameters\n----------\nsrc : ndarray, 2D, dtype=[uint8, int8, float32]\n The source image.\nxorder : integer\n The x order of the Sobel operator.\nyorder : integer\n The y order of the Sobel operator.\naperture_size : integer=[3, 5, 7]\n The size of the Sobel kernel.\n\nReturns\n-------\nout : ndarray\n A new which is the result of applying the Sobel\n operator to src.";
|
|
static char __pyx_k_60[] = "cvLaplace(src, aperture_size=3)\n\nApply the Laplace operator to the input image.\n\nParameters\n----------\nsrc : ndarray, 2D, dtype=[uint8, int8, float32]\n The source image.\naperture_size : integer=[3, 5, 7]\n The size of the Sobel kernel.\n\nReturns\n-------\nout : ndarray\n A new which is the result of applying the Laplace\n operator to src.";
|
|
static char __pyx_k_61[] = "cvCanny(src, threshold1=10, threshold2=50, aperture_size=3)\n\nApply Canny edge detection to the input image.\n\nParameters\n----------\nsrc : ndarray, 2D, dtype=[uint8]\n The source image.\nthreshold1 : float\n The lower threshold used for edge linking.\nthreshold2 : float\n The upper threshold used to find strong edges.\naperture_size : integer=[3, 5, 7]\n The size of the Sobel kernel.\n\nReturns\n-------\nout : ndarray\n A new which is the result of applying Canny\n edge detection to src.";
|
|
static char __pyx_k_62[] = "cvPreCornerDetect(src, aperture_size=3)\n\nCalculate the feature map for corner detection.\n\nParameters\n----------\nsrc : ndarray, 2D, dtype=[uint8, float32]\n The source image.\naperture_size : integer=[3, 5, 7]\n The size of the Sobel kernel.\n\nReturns\n-------\nout : ndarray\n A new array of the corner candidates.";
|
|
static char __pyx_k_63[] = "cvCornerEigenValsAndVecs(src, block_size=3, aperture_size=3)\n\nCalculates the eigenvalues and eigenvectors of image\nblocks for corner detection.\n\nParameters\n----------\nsrc : ndarray, 2D, dtype=[uint8, float32]\n The source image.\nblock_size : integer\n The size of the neighborhood in which to calculate\n the eigenvalues and eigenvectors.\naperture_size : integer=[3, 5, 7]\n The size of the Sobel kernel.\n\nReturns\n-------\nout : ndarray\n A new array of the eigenvalues and eigenvectors.\n The shape of this array is (height, width, 6),\n Where height and width are the same as that\n of src.";
|
|
static char __pyx_k_64[] = "cvCornerMinEigenVal(src, block_size=3, aperture_size=3)\n\nCalculates the minimum eigenvalues of gradient matrices\nfor corner detection.\n\nParameters\n----------\nsrc : ndarray, 2D, dtype=[uint8, float32]\n The source image.\nblock_size : integer\n The size of the neighborhood in which to calculate\n the eigenvalues.\naperture_size : integer=[3, 5, 7]\n The size of the Sobel kernel.\n\nReturns\n-------\nout : ndarray\n A new array of the eigenvalues.";
|
|
static char __pyx_k_65[] = "cvCornerHarris(src, block_size=3, aperture_size=3, k=0.04)\n\nApplies the Harris edge detector to the input image.\n\nParameters\n----------\nsrc : ndarray, 2D, dtype=[uint8, float32]\n The source image.\nblock_size : integer\n The size of the neighborhood in which to apply the detector.\naperture_size : integer=[3, 5, 7]\n The size of the Sobel kernel.\nk : float\n Harris detector free parameter. See Notes.\n\nReturns\n-------\nout : ndarray\n A new array of the Harris corners.\n\nNotes\n-----\nThe function cvCornerHarris() runs the Harris edge\ndetector on the image. Similarly to cvCornerMinEigenVal()\nand cvCornerEigenValsAndVecs(), for each pixel it calculates\na gradient covariation matrix M over a block_size X block_size\nneighborhood. Then, it stores det(M) - k * trace(M)**2\nto the output image. Corners in the image can be found as the\nlocal maxima of the output image.";
|
|
static char __pyx_k_66[] = "cvFindCornerSubPix(src, corners, win, zero_zone=(-1, -1), iterations=0, epsilon=1e-5)\n\nRefines corner locations to sub-pixel accuracy.\n\nParameters\n----------\nsrc : ndarray, 2D, dtype=[uint8]\n The source image.\ncorners : ndarray, shape=(N x 2)\n An initial approximation of the corners in the image.\n The corners will be refined in-place in this array.\nwin : tuple, (height, width)\n The window within which the function iterates until it\n converges on the real corner. The actual window is twice\n the size of what is declared here. (an OpenCV peculiarity).\nzero_zone : Half of the size of the dead region in the middle\n of the search zone over which the calculations are not\n performed. It is used sometimes to avoid possible\n singularities of the autocorrelation matrix.\n The value of (-1,-1) indicates that there is no such size.\niterations : integer\n The maximum number of iterations to perform. If 0,\n the function iterates until the error is less than epsilon.\nepsilon : float\n The epsilon error, below which the function terminates.\n Can be used in combination with iterations.\n\nReturns\n-------\nNone. The array 'corners' is modified in place.";
|
|
static char __pyx_k_67[] = "cvGoodFeaturesToTrack(src, corner_count, quality_level, min_distance, block_size=3, use_harris=0, k=0.04)\n\nDetermines strong corners in an image.\n\nParameters\n----------\nsrc : ndarray, 2D, dtype=[uint8, float32]\n The source image.\ncorner_count : int\n The maximum number of corners to find.\n Only found corners are returned.\nquality_level : float\n Multiplier for the max/min eigenvalue;\n specifies the minimal accepted quality of\n image corners.\nmin_distance : float\n Limit, specifying the minimum possible\n distance between the returned corners;\n Euclidian distance is used.\nblock_size : integer\n The size of the neighborhood in which to apply the detector.\nuse_harris : integer\n If nonzero, Harris operator (cvCornerHarris())\n is used instead of default cvCornerMinEigenVal()\nk : float\n Harris detector free parameter.\n Used only if use_harris != 0.\n\nReturns\n-------\nout : ndarray\n The locations of the found corners in the image.\n\nNotes\n-----\nThis function finds distinct and strong corners\nin an image which can be used as features in a tracking\nalgorithm. It also insures that features are distanced\nfrom one another by at least min_distance.";
|
|
static char __pyx_k_68[] = "cvGetRectSubPix(src, size, center)\n\nRetrieves the pixel rectangle from an image with\nsub-pixel accuracy.\n\nParameters\n----------\nsrc : ndarray\n The source image.\nsize : two tuple, integers, (height, width)\n The size of the rectangle to extract.\ncenter : two tuple, floats, (x, y)\n The center location of the rectangle.\n The center must lie within the image, but the\n rectangle may extend beyond the bounds of the image.\n\nReturns\n-------\nout : ndarray\n The extracted rectangle of the image.\n\nNotes\n-----\nThe center of the specified rectangle must\nlie within the image, but the bounds of the rectangle\nmay extend beyond the image. Border replication is used\nto fill in missing pixels.";
|
|
static char __pyx_k_69[] = "cvGetQuadrangleSubPix(src, warpmat, float_out=False)\n\nRetrieves the pixel quandrangle from an image with\nsub-pixel accuracy. In english: apply an affine transform to an image.\n\nParameters\n----------\nsrc : ndarray\n The source image.\nwarpmat : ndarray, 2x3\n The affine transformation to apply to the src image.\nfloat_out : bool\n If True, the return array will have dtype np.float32.\n Otherwise, the return array will have the same dtype\n as the src array.\n If True, the src array MUST have dtype np.uint8\n\nReturns\n-------\nout : ndarray\n Warped image of same size as src.\n\nNotes\n-----\nThe values of pixels at non-integer coordinates are retrieved\nusing bilinear interpolation. When the function needs pixels\noutside of the image, it uses replication border mode to\nreconstruct the values. Every channel of multiple-channel\nimages is processed independently.\n\nThis function has less overhead than cvWarpAffine\nand should be used unless specific feature of that\nfunction are required.";
|
|
static char __pyx_k_70[] = "cvResize(src, size, method=CV_INTER_LINEAR)\n\nResize an to the given size.\n\nParameters\n----------\nsrc : ndarray\n The source image.\nsize : tuple, (height, width)\n The target resize size.\nmethod : integer\n The interpolation method used for resizing.\n Supported methods are:\n CV_INTER_NN\n CV_INTER_LINEAR\n CV_INTER_AREA\n CV_INTER_CUBIC\n\nReturns\n-------\nout : ndarray\n The resized image.";
|
|
static char __pyx_k_71[] = "CV_WARP_FILL_OUTLIERS";
|
|
static char __pyx_k_72[] = "cvWarpAffine(src, warpmat, flag=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS, fillval=(0., 0., 0., 0.))\n\nApplies an affine transformation to the image.\n\nParameters\n----------\nsrc : ndarray\n The source image.\nwarpmat : ndarray, 2x3\n The affine transformation to apply to the src image.\nflag : integer\n A combination of interpolation and method flags.\n Supported flags are: (see notes)\n Interpolation:\n CV_INTER_NN\n CV_INTER_LINEAR\n CV_INTER_AREA\n CV_INTER_CUBIC\n Method:\n CV_WARP_FILL_OUTLIERS\n CV_WARP_INVERSE_MAP\nfillval : 4-tuple, (R, G, B, A)\n The color to fill in missing pixels. Defaults to black.\n For < 4 channel images, use 0.'s for the value.\n\nReturns\n-------\nout : ndarray\n The warped image of same size and dtype as src.\n\nNotes\n-----\nCV_WARP_FILL_OUTLIERS - fills all of the destination image pixels;\n if some of them correspond to outliers in the source image,\n they are set to fillval.\nCV_WARP_INVERSE_MAP - indicates that warpmat is inversely transformed\n from the destination image to the source and, thus, can be used\n directly for pixel interpolation. Otherwise, the function finds\n the inverse transform from warpmat.\n\nThis function has a larger overhead than cvGetQuadrangleSubPix,\nand that function should be used instead, unless specific\nfeatures of this function are needed.";
|
|
static char __pyx_k_73[] = "cvWarpPerspective(src, warpmat, flag=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS, fillval=(0., 0., 0., 0.))\n\nApplies a perspective transformation to an image.\n\nParameters\n----------\nsrc : ndarray\n The source image.\nwarpmat : ndarray, 3x3\n The affine transformation to apply to the src image.\nflag : integer\n A combination of interpolation and method flags.\n Supported flags are: (see notes)\n Interpolation:\n CV_INTER_NN\n CV_INTER_LINEAR\n CV_INTER_AREA\n CV_INTER_CUBIC\n Method:\n CV_WARP_FILL_OUTLIERS\n CV_WARP_INVERSE_MAP\nfillval : 4-tuple, (R, G, B, A)\n The color to fill in missing pixels. Defaults to black.\n For < 4 channel images, use 0.'s for the value.\n\nReturns\n-------\nout : ndarray\n The warped image of same size and dtype as src.\n\nNotes\n-----\nCV_WARP_FILL_OUTLIERS - fills all of the destination image pixels;\n if some of them correspond to outliers in the source image,\n they are set to fillval.\nCV_WARP_INVERSE_MAP - indicates that warpmat is inversely transformed\n from the destination image to the source and, thus, can be used\n directly for pixel interpolation. Otherwise, the function finds\n the inverse transform from warpmat.";
|
|
static char __pyx_k_74[] = "cvLogPolar(src, center, M, flag=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS)\n\nRemaps and image to Log-Polar space.\n\nParameters\n----------\nsrc : ndarray\n The source image.\ncenter : tuple, (x, y)\n The keypoint for the log polar transform.\nM : float\n The scale factor for the transform.\n (40 is a good starting point for a 256x256 image)\nflag : integer\n A combination of interpolation and method flags.\n Supported flags are: (see notes)\n Interpolation:\n CV_INTER_NN\n CV_INTER_LINEAR\n CV_INTER_AREA\n CV_INTER_CUBIC\n Method:\n CV_WARP_FILL_OUTLIERS\n CV_WARP_INVERSE_MAP\n\nReturns\n-------\nout : ndarray\n A transformed image the same size and dtype as src.\n\nNotes\n-----\nCV_WARP_FILL_OUTLIERS - fills all of the destination image pixels;\n if some of them correspond to outliers in the source image,\n they are set to zero.\nCV_WARP_INVERSE_MAP - assume that the source image is already\n in Log-Polar space, and transform back to cartesian space.\n\nThe function emulates the human \342\200\234foveal\342\200\235 vision and can be used\nfor fast scale and rotation-invariant template matching,\nfor object tracking and so forth.";
|
|
static char __pyx_k_75[] = "cvErode(src, element=None, iterations=1, anchor=None, in_place=False)\n\nErode the source image with the given element.\n\nParameters\n----------\nsrc : ndarray\n The source image.\nelement : ndarray, 2D\n The structuring element. Must be 2D. Non-zero elements\n indicate which pixels of the underlying image to include\n in the operation as the element is slid over the image.\n If None, a 3x3 block element is used.\niterations : integer\n The number of times to perform the operation.\nanchor: 2-tuple, (x, y)\n The anchor of the structuring element. Must be\n FULLY inside the element. If None, the center of the\n element is used.\nin_place: bool\n If True, perform the operation in place.\n Otherwise, store the results in a new image.\n\nReturns\n-------\nout/None : ndarray or None\n An new array is returned only if in_place=False.\n Otherwise, this function returns None.";
|
|
static char __pyx_k_76[] = "cvDilate(src, element=None, iterations=1, anchor=None, in_place=False)\n\nDilate the source image with the given element.\n\nParameters\n----------\nsrc : ndarray\n The source image.\nelement : ndarray, 2D\n The structuring element. Must be 2D. Non-zero elements\n indicate which pixels of the underlying image to include\n in the operation as the element is slid over the image.\n If None, a 3x3 block element is used.\niterations : integer\n The number of times to perform the operation.\nanchor: 2-tuple, (x, y)\n The anchor of the structuring element. Must be\n FULLY inside the element. If None, the center of the\n element is used.\nin_place: bool\n If True, perform the operation in place.\n Otherwise, store the results in a new image.\n\nReturns\n-------\nout/None : ndarray or None\n An new array is returned only if in_place=False.\n Otherwise, this function returns None.";
|
|
static char __pyx_k_77[] = "cvMorphologyEx(src, element, operation, iterations=1, anchor=None, in_place=False)\n\nApply a morphological operation to the image.\n\nParameters\n----------\nsrc : ndarray\n The source image.\nelement : ndarray, 2D\n The structuring element. Must be 2D. Non-zero elements\n indicate which pixels of the underlying image to include\n in the operation as the element is slid over the image.\n Cannot be None.\noperation : flag\n The morphology operation to perform. Must be one of:\n CV_MOP_OPEN\n CV_MOP_CLOSE\n CV_MOP_GRADIENT\n CV_MOP_TOPHAT\n CV_MOP_BLACKHAT\niterations : integer\n The number of times to perform the operation.\nanchor: 2-tuple, (x, y)\n The anchor of the structuring element. Must be\n FULLY inside the element. If None, the center of the\n element is used.\nin_place: bool\n If True, perform the operation in place.\n Otherwise, store the results in a new image.\n\nReturns\n-------\nout/None : ndarray or None\n An new array is returned only if in_place=False.\n Otherwise, this function returns None.";
|
|
static char __pyx_k_78[] = "cvSmooth(src, smoothtype=CV_GAUSSIAN, param1=3, param2=0, param3=0., param4=0., in_place=False)\n\nSmooth an image with the specified filter.\n\nParameters\n----------\nsrc : ndarray\n The source image.\nsmoothtype : integer\n The flag representing which smoothing operation to perfom.\n See notes on restrictions.\n Must be one of:\n CV_BLUR_NO_SCALE\n CV_BLUR\n CV_GAUSSIAN\n CV_MEDIAN\n CV_BILATERAL\nparam1 : integer\n See notes.\nparam2 : integer\n See notes.\nparam3 : float\n See notes.\nparam4 : float\n See notes.\nin_place : bool\n If True, perform the operation in place.\n This is not supported for every combination of arguments.\n See notes.\n\nReturns\n-------\nout/None : ndarray or None\n If in_place == True the function operates in place and returns None.\n Otherwise, the operation returns a new array that is\n the result of the smoothing operation.\n\nNotes\n-----\nThe following details the restrictions and argument interpretaions\nfor each of the smoothing operations.\n\nCV_BLUR_NO_SCALE:\n Source image must be 2D and have dtype uint8, int8, or float32.\n param1 x param2 define the neighborhood over which the pixels\n are summed. If param2 is zero it is set equal to param1.\n param3 and param4 are ignored.\n in_place operation is not supported.\nCV_BLUR:\n Source image must have dtype uint8, int8, or float32.\n param1 x param2 define the neighborhood over which the pixels\n are summed. If param2 is zero it is set equal to param1.\n param3 and param4 are ignored.\nCV_GAUSSIAN:\n Source image must have dtype uint8, int8, or float32.\n param1 x param2 defines the size of the gaussian kernel.\n If param2 is zero it is set equal to param1.\n param3 is the standard deviation of the kernel.\n If param3 is zero, an optimum stddev is calculated based\n on the kernel size. If both param1 and param2 or zero,\n then an optimum kernel size is calculated based on\n param3.\n in_place operation is supported.\nCV_MEDIAN:\n Source image must have dtype uint8, or int8.\n param1 x param1 define the neigborhood over which\n to find the median.\n param2, param3, and param4 are ignored.\n in_place operation is not supported.\nCV_BILATERAL:\n Source image must have dtype uint8, or int8.\n param1 x param2 define the neighborhood.\n param3 defines the color stddev.\n param4 defines the space stddev.\n in_place operation is not supported.\n\nUsing standard sigma for small kernels (3x3 to 7x7)\ngives better speed.";
|
|
static char __pyx_k_79[] = "cvFilter2D(src, kernel, anchor=None, in_place=False)\n\nConvolve an image with the given kernel.\n\nParameters\n----------\nsrc : ndarray\n The source image.\nkernel : ndarray, 2D, dtype=float32\n The kernel with which to convolve the image.\nanchor : 2-tuple, (x, y)\n The kernel anchor.\nin_place : bool\n If True, perform the operation in_place.\n\nReturns\n-------\nout/None : ndarray or None\n If in_place is True, returns None.\n Otherwise a new array is returned which is the result\n of the convolution.\n\nNotes\n-----\nThis is a high performance function. OpenCV automatically\ndetermines, based on the size of the image and the kernel,\nwhether it will faster to do the convolution in the spatial\nor the frequency domain, and behaves accordingly.";
|
|
static char __pyx_k_80[] = "cvIntegral(src, square_sum=False, titled_sum=False)\n\nCalculate the integral of an image.\n\nParameters\n----------\nsrc : ndarray, dtyp=[uint8, float32, float64]\n The source image.\nsquare_sum : bool\n If True, also returns the square sum.\ntilted_sum : bool\n If True, also returns the titled sum (45 degree tilt)\n\nReturns\n-------\n[out1, out2, out3] : list of ndarray's\n Returns a list consisting at least of:\n out1: the integral image, and optionally:\n out2: the square sum image\n out3: the titled sum image,\n or any combination of these two.";
|
|
static char __pyx_k_81[] = "cvCvtColor(src, code)\n\nConvert an image to another color space.\n\nParameters\n----------\nsrc : ndarray, dtype=[uint8, uint16, float32]\n The source image.\ncode : integer\n A flag representing which color conversion to perform.\n Valid flags are the following:\n CV_BGR2BGRA, CV_RGB2RGBA, CV_BGRA2BGR, CV_RGBA2RGB,\n CV_BGR2RGBA, CV_RGB2BGRA, CV_RGBA2BGR, CV_BGRA2RGB,\n CV_BGR2RGB, CV_RGB2BGR, CV_BGRA2RGBA, CV_RGBA2BGRA,\n CV_BGR2GRAY, CV_RGB2GRAY, CV_GRAY2BGR, CV_GRAY2RGB,\n CV_GRAY2BGRA, CV_GRAY2RGBA, CV_BGRA2GRAY, CV_RGBA2GRAY,\n CV_BGR2BGR565, CV_RGB2BGR565, CV_BGR5652BGR, CV_BGR5652RGB,\n CV_BGRA2BGR565, CV_RGBA2BGR565, CV_BGR5652BGRA, CV_BGR5652RGBA,\n CV_GRAY2BGR565, CV_BGR5652GRAY, CV_BGR2BGR555, CV_RGB2BGR555,\n CV_BGR5552BGR, CV_BGR5552RGB, CV_BGRA2BGR555, CV_RGBA2BGR555,\n CV_BGR5552BGRA, CV_BGR5552RGBA, CV_GRAY2BGR555, CV_BGR5552GRAY,\n CV_BGR2XYZ, CV_RGB2XYZ, CV_XYZ2BGR, CV_XYZ2RGB,\n CV_BGR2YCrCb, CV_RGB2YCrCb, CV_YCrCb2BGR, CV_YCrCb2RGB,\n CV_BGR2HSV, CV_RGB2HSV, CV_BGR2Lab, CV_RGB2Lab,\n CV_BayerBG2BGR, CV_BayerGB2BGR, CV_BayerRG2BGR, CV_BayerGR2BGR,\n CV_BayerBG2RGB, CV_BayerGB2RGB, CV_BayerRG2RGB, CV_BayerGR2RGB,\n CV_BGR2Luv, CV_RGB2Luv, CV_BGR2HLS, CV_RGB2HLS,\n CV_HSV2BGR, CV_HSV2RGB, CV_Lab2BGR, CV_Lab2RGB,\n CV_Luv2BGR, CV_Luv2RGB, CV_HLS2BGR, CV_HLS2RGB\n\nReturns\n-------\nout : ndarray\n A new image in the requested color-space, with\n an appropriate dtype.\n\nNotes\n-----\nNot all conversion types support all dtypes.\nAn exception will be raise if the dtype is not supported.\nSee the OpenCV documentation for more details\nabout the specific color conversions.";
|
|
static char __pyx_k_82[] = "cvThreshold(src, threshold, max_value=255, threshold_type=CV_THRESH_BINARY, use_otsu=False)\n\nThreshold an image.\n\nParameters\n----------\nsrc : ndarray, 2D, dtype=[uint8, float32]\nthreshold : float\n The threshold value. (decision value)\nmax_value : float\n The maximum value.\nthreshold_type : integer\n The flag representing which type of thresholding to apply.\n Valid flags are:\n CV_THRESH_BINARY (max_value if src(x,y) > threshold else 0)\n CV_THRESH_BINARY_INV (0 if src(x,y) > threshold else max_value)\n CV_THRESH_TRUNC (threshold if src(x,y) > threshold else src(x,y))\n CV_THRESH_TOZERO (src(x,y) if src(x,y) > threshold else 0)\n CV_THRESH_TOZERO_INV (0 if src(x,y) > threshold else src(x,y))\nuse_otsu : bool\n If true, the optimum threshold is automatically computed\n and the passed in threshold value is ignored.\n Only implemented for uint8 source images.\n\nReturns\n-------\nout/(out, threshold) : ndarray or (ndarray, float)\n If use_otsu is True, then the computed threshold value is\n returned in addition to the thresholded image. Otherwise\n just the thresholded image is returned.";
|
|
static char __pyx_k_83[] = "cvAdaptiveThreshold(src, max_value, adaptive_method=CV_ADAPTIVE_THRESH_MEAN_C, threshold_type=CV_THRESH_BINARY, block_size=3, param1=5)\n\nApply an adaptive threshold to an image.\n\nParameters\n----------\nsrc : ndarray, 2D, dtype=uint8\nmax_value : float\n The maximum value.\nadaptive_method : integer\n The flag representing the adaptive method.\n Valid flags are:\n CV_ADAPTIVE_THRESH_MEAN_C (uses mean of the neighborhood)\n CV_ADAPTIVE_THRESH_GAUSSIAN_C (uses gaussian of the neighborhood)\nthreshold_type : integer\n The flag representing which type of thresholding to apply.\n Valid flags are:\n CV_THRESH_BINARY (max_value if src(x,y) > threshold else 0)\n CV_THRESH_BINARY_INV (0 if src(x,y) > threshold else max_value)\nblock_size : integer\n Defines a block_size x block_size neighborhood\nparam1 : float\n The weight to be subtracted from the neighborhood computation.\n\nReturns\n-------\nout : ndarray\n The thresholded image.";
|
|
static char __pyx_k_84[] = "cvPyrDown(src)\n\nDownsample an image.\n\nParameters\n----------\nsrc : ndarray, dtype=[uint8, uint16, float32, float64]\n\nReturns\n-------\nout : ndarray\n Downsampled image half the size of the original\n in each dimension.";
|
|
static char __pyx_k_85[] = "cvPyrUp(src)\n\nUpsample an image.\n\nParameters\n----------\nsrc : ndarray, dtype=[uint8, uint16, float32, float64]\n\nReturns\n-------\nout : ndarray\n Upsampled image twice the size of the original\n in each dimension.";
|
|
static char __pyx_k_86[] = "cvCalibrateCamera2(object_points, image_points, point_counts, image_size)\n\nFinds the intrinsic and extrinsic camera parameters\nusing a calibration pattern.\n\nParameters\n----------\nobject_points : ndarray, Nx3\n An array representing the (X, Y, Z) known coordinates of the\n calibration object.\nimage_points : ndarry, Nx2\n An array representing the pixel image coordinate of the\n points in object_points.\npoint_counts : ndarry, 1D, dtype=int32\n Vector containing the number of points in each particular view.\nimage_size : 2-tuple, (height, width)\n The height and width of the images used.\n\nReturns\n-------\n(intrinsics, distortion) : ndarray 3x3, ndarray 5-vector\n Intrinsics is the 3x3 camera instrinsics matrix.\n Distortion is the 5-vector of distortion coefficients.";
|
|
static char __pyx_k_87[] = "CV_CALIB_CB_ADAPTIVE_THRESH";
|
|
static char __pyx_k_88[] = "cvFindChessboardCorners(src, pattern_size, flag=CV_CALIB_CB_ADAPTIVE_THRESH)\n\nFinds the position of the internal corners of a chessboard.\n\nParameters\n----------\nsrc : ndarray, dtype=uint8\n Image to search for chessboard corners.\npattern_size : 2-tuple of inner corners (h,w)\nflag : integer\n CV_CALIB_CB_ADAPTIVE_THRESH - use adaptive thresholding\n to convert the image to black and white,\n rather than a fixed threshold level\n (computed from the average image brightness).\n CV_CALIB_CB_NORMALIZE_IMAGE - normalize the image using\n cvNormalizeHist() before applying fixed or adaptive\n thresholding.\n CV_CALIB_CB_FILTER_QUADS - use additional criteria\n (like contour area, perimeter, square-like shape) to\n filter out false quads that are extracted at the contour\n retrieval stage.\n\nReturns\n-------\nout : ndarray Nx2\n An nx2 array of the corners found.";
|
|
static char __pyx_k_89[] = "cvDrawChessboardCorners(src, pattern_size, corners, in_place=False)\n\nRenders found chessboard corners into an image.\n\nParameters\n----------\nsrc : ndarray, dim 3, dtype: uint8\n Image to draw into.\npattern_size : 2-tuple, (h, w)\n Number of inner corners (h,w)\ncorners : ndarray, nx2, dtype=float32\n Corners found in the image. See cvFindChessboardCorners and\n cvFindCornerSubPix\nin_place: bool\n If true, perform the drawing on the submitted\n image. If false, a copy of the image will be made and drawn to.\n\nReturns\n-------\nout/None : ndarray or none\n If in_place is True, the function returns None.\n Otherwise, the function returns a new image with\n the corners drawn into it.";
|
|
static char __pyx_k__B[] = "B";
|
|
static char __pyx_k__H[] = "H";
|
|
static char __pyx_k__I[] = "I";
|
|
static char __pyx_k__L[] = "L";
|
|
static char __pyx_k__M[] = "M";
|
|
static char __pyx_k__O[] = "O";
|
|
static char __pyx_k__Q[] = "Q";
|
|
static char __pyx_k__b[] = "b";
|
|
static char __pyx_k__d[] = "d";
|
|
static char __pyx_k__f[] = "f";
|
|
static char __pyx_k__g[] = "g";
|
|
static char __pyx_k__h[] = "h";
|
|
static char __pyx_k__i[] = "i";
|
|
static char __pyx_k__k[] = "k";
|
|
static char __pyx_k__l[] = "l";
|
|
static char __pyx_k__q[] = "q";
|
|
static char __pyx_k__x[] = "x";
|
|
static char __pyx_k__y[] = "y";
|
|
static char __pyx_k__Zd[] = "Zd";
|
|
static char __pyx_k__Zf[] = "Zf";
|
|
static char __pyx_k__Zg[] = "Zg";
|
|
static char __pyx_k__cv[] = "cv";
|
|
static char __pyx_k__np[] = "np";
|
|
static char __pyx_k__buf[] = "buf";
|
|
static char __pyx_k__doc[] = "doc";
|
|
static char __pyx_k__obj[] = "obj";
|
|
static char __pyx_k__src[] = "src";
|
|
static char __pyx_k__val[] = "val";
|
|
static char __pyx_k__win[] = "win";
|
|
static char __pyx_k__INT8[] = "INT8";
|
|
static char __pyx_k__code[] = "code";
|
|
static char __pyx_k__copy[] = "copy";
|
|
static char __pyx_k__flag[] = "flag";
|
|
static char __pyx_k__ndim[] = "ndim";
|
|
static char __pyx_k__size[] = "size";
|
|
static char __pyx_k__INT16[] = "INT16";
|
|
static char __pyx_k__INT32[] = "INT32";
|
|
static char __pyx_k__UINT8[] = "UINT8";
|
|
static char __pyx_k__cvdoc[] = "cvdoc";
|
|
static char __pyx_k__descr[] = "descr";
|
|
static char __pyx_k__dtype[] = "dtype";
|
|
static char __pyx_k__group[] = "group";
|
|
static char __pyx_k__image[] = "image";
|
|
static char __pyx_k__names[] = "names";
|
|
static char __pyx_k__numpy[] = "numpy";
|
|
static char __pyx_k__range[] = "range";
|
|
static char __pyx_k__shape[] = "shape";
|
|
static char __pyx_k__width[] = "width";
|
|
static char __pyx_k__UINT16[] = "UINT16";
|
|
static char __pyx_k__anchor[] = "anchor";
|
|
static char __pyx_k__center[] = "center";
|
|
static char __pyx_k__ctypes[] = "ctypes";
|
|
static char __pyx_k__fields[] = "fields";
|
|
static char __pyx_k__format[] = "format";
|
|
static char __pyx_k__height[] = "height";
|
|
static char __pyx_k__kernel[] = "kernel";
|
|
static char __pyx_k__method[] = "method";
|
|
static char __pyx_k__param1[] = "param1";
|
|
static char __pyx_k__param2[] = "param2";
|
|
static char __pyx_k__param3[] = "param3";
|
|
static char __pyx_k__param4[] = "param4";
|
|
static char __pyx_k__xorder[] = "xorder";
|
|
static char __pyx_k__yorder[] = "yorder";
|
|
static char __pyx_k__CV_BLUR[] = "CV_BLUR";
|
|
static char __pyx_k__FLOAT32[] = "FLOAT32";
|
|
static char __pyx_k__FLOAT64[] = "FLOAT64";
|
|
static char __pyx_k__corners[] = "corners";
|
|
static char __pyx_k__cvCanny[] = "cvCanny";
|
|
static char __pyx_k__cvErode[] = "cvErode";
|
|
static char __pyx_k__cvPyrUp[] = "cvPyrUp";
|
|
static char __pyx_k__cvSobel[] = "cvSobel";
|
|
static char __pyx_k__element[] = "element";
|
|
static char __pyx_k__epsilon[] = "epsilon";
|
|
static char __pyx_k__fillval[] = "fillval";
|
|
static char __pyx_k__package[] = "package";
|
|
static char __pyx_k__reshape[] = "reshape";
|
|
static char __pyx_k__strides[] = "strides";
|
|
static char __pyx_k__warpmat[] = "warpmat";
|
|
static char __pyx_k__KeyError[] = "KeyError";
|
|
static char __pyx_k____main__[] = "__main__";
|
|
static char __pyx_k__cvDilate[] = "cvDilate";
|
|
static char __pyx_k__cvResize[] = "cvResize";
|
|
static char __pyx_k__cvSmooth[] = "cvSmooth";
|
|
static char __pyx_k__in_place[] = "in_place";
|
|
static char __pyx_k__itemsize[] = "itemsize";
|
|
static char __pyx_k__readonly[] = "readonly";
|
|
static char __pyx_k__type_num[] = "type_num";
|
|
static char __pyx_k__use_otsu[] = "use_otsu";
|
|
static char __pyx_k__addressof[] = "addressof";
|
|
static char __pyx_k__byteorder[] = "byteorder";
|
|
static char __pyx_k__cvLaplace[] = "cvLaplace";
|
|
static char __pyx_k__cvPyrDown[] = "cvPyrDown";
|
|
static char __pyx_k__float_out[] = "float_out";
|
|
static char __pyx_k__max_value[] = "max_value";
|
|
static char __pyx_k__opencv_cv[] = "opencv_cv";
|
|
static char __pyx_k__operation[] = "operation";
|
|
static char __pyx_k__threshold[] = "threshold";
|
|
static char __pyx_k__zero_zone[] = "zero_zone";
|
|
static char __pyx_k__CV_BGR2HLS[] = "CV_BGR2HLS";
|
|
static char __pyx_k__CV_BGR2HSV[] = "CV_BGR2HSV";
|
|
static char __pyx_k__CV_BGR2Lab[] = "CV_BGR2Lab";
|
|
static char __pyx_k__CV_BGR2Luv[] = "CV_BGR2Luv";
|
|
static char __pyx_k__CV_BGR2RGB[] = "CV_BGR2RGB";
|
|
static char __pyx_k__CV_BGR2XYZ[] = "CV_BGR2XYZ";
|
|
static char __pyx_k__CV_HLS2BGR[] = "CV_HLS2BGR";
|
|
static char __pyx_k__CV_HLS2RGB[] = "CV_HLS2RGB";
|
|
static char __pyx_k__CV_HSV2BGR[] = "CV_HSV2BGR";
|
|
static char __pyx_k__CV_HSV2RGB[] = "CV_HSV2RGB";
|
|
static char __pyx_k__CV_Lab2BGR[] = "CV_Lab2BGR";
|
|
static char __pyx_k__CV_Lab2RGB[] = "CV_Lab2RGB";
|
|
static char __pyx_k__CV_Luv2BGR[] = "CV_Luv2BGR";
|
|
static char __pyx_k__CV_Luv2RGB[] = "CV_Luv2RGB";
|
|
static char __pyx_k__CV_RGB2BGR[] = "CV_RGB2BGR";
|
|
static char __pyx_k__CV_RGB2HLS[] = "CV_RGB2HLS";
|
|
static char __pyx_k__CV_RGB2HSV[] = "CV_RGB2HSV";
|
|
static char __pyx_k__CV_RGB2Lab[] = "CV_RGB2Lab";
|
|
static char __pyx_k__CV_RGB2Luv[] = "CV_RGB2Luv";
|
|
static char __pyx_k__CV_RGB2XYZ[] = "CV_RGB2XYZ";
|
|
static char __pyx_k__CV_XYZ2BGR[] = "CV_XYZ2BGR";
|
|
static char __pyx_k__CV_XYZ2RGB[] = "CV_XYZ2RGB";
|
|
static char __pyx_k__ValueError[] = "ValueError";
|
|
static char __pyx_k___libimport[] = "_libimport";
|
|
static char __pyx_k___utilities[] = "_utilities";
|
|
static char __pyx_k__block_size[] = "block_size";
|
|
static char __pyx_k__cvCvtColor[] = "cvCvtColor";
|
|
static char __pyx_k__cvFilter2D[] = "cvFilter2D";
|
|
static char __pyx_k__cvIntegral[] = "cvIntegral";
|
|
static char __pyx_k__cvLogPolar[] = "cvLogPolar";
|
|
static char __pyx_k__image_size[] = "image_size";
|
|
static char __pyx_k__iterations[] = "iterations";
|
|
static char __pyx_k__smoothtype[] = "smoothtype";
|
|
static char __pyx_k__square_sum[] = "square_sum";
|
|
static char __pyx_k__suboffsets[] = "suboffsets";
|
|
static char __pyx_k__threshold1[] = "threshold1";
|
|
static char __pyx_k__threshold2[] = "threshold2";
|
|
static char __pyx_k__tilted_sum[] = "tilted_sum";
|
|
static char __pyx_k__use_harris[] = "use_harris";
|
|
static char __pyx_k__CV_BGR2BGRA[] = "CV_BGR2BGRA";
|
|
static char __pyx_k__CV_BGR2GRAY[] = "CV_BGR2GRAY";
|
|
static char __pyx_k__CV_BGR2RGBA[] = "CV_BGR2RGBA";
|
|
static char __pyx_k__CV_BGRA2BGR[] = "CV_BGRA2BGR";
|
|
static char __pyx_k__CV_BGRA2RGB[] = "CV_BGRA2RGB";
|
|
static char __pyx_k__CV_GAUSSIAN[] = "CV_GAUSSIAN";
|
|
static char __pyx_k__CV_GRAY2BGR[] = "CV_GRAY2BGR";
|
|
static char __pyx_k__CV_GRAY2RGB[] = "CV_GRAY2RGB";
|
|
static char __pyx_k__CV_INTER_NN[] = "CV_INTER_NN";
|
|
static char __pyx_k__CV_MOP_OPEN[] = "CV_MOP_OPEN";
|
|
static char __pyx_k__CV_RGB2BGRA[] = "CV_RGB2BGRA";
|
|
static char __pyx_k__CV_RGB2GRAY[] = "CV_RGB2GRAY";
|
|
static char __pyx_k__CV_RGB2RGBA[] = "CV_RGB2RGBA";
|
|
static char __pyx_k__CV_RGBA2BGR[] = "CV_RGBA2BGR";
|
|
static char __pyx_k__CV_RGBA2RGB[] = "CV_RGBA2RGB";
|
|
static char __pyx_k__calibration[] = "calibration";
|
|
static char __pyx_k__cvThreshold[] = "cvThreshold";
|
|
static char __pyx_k__CV_BGR2YCrCb[] = "CV_BGR2YCrCb";
|
|
static char __pyx_k__CV_BGRA2GRAY[] = "CV_BGRA2GRAY";
|
|
static char __pyx_k__CV_BGRA2RGBA[] = "CV_BGRA2RGBA";
|
|
static char __pyx_k__CV_GRAY2BGRA[] = "CV_GRAY2BGRA";
|
|
static char __pyx_k__CV_GRAY2RGBA[] = "CV_GRAY2RGBA";
|
|
static char __pyx_k__CV_MOP_CLOSE[] = "CV_MOP_CLOSE";
|
|
static char __pyx_k__CV_RGB2YCrCb[] = "CV_RGB2YCrCb";
|
|
static char __pyx_k__CV_RGBA2BGRA[] = "CV_RGBA2BGRA";
|
|
static char __pyx_k__CV_RGBA2GRAY[] = "CV_RGBA2GRAY";
|
|
static char __pyx_k__CV_YCrCb2BGR[] = "CV_YCrCb2BGR";
|
|
static char __pyx_k__CV_YCrCb2RGB[] = "CV_YCrCb2RGB";
|
|
static char __pyx_k__RuntimeError[] = "RuntimeError";
|
|
static char __pyx_k__corner_count[] = "corner_count";
|
|
static char __pyx_k__cvWarpAffine[] = "cvWarpAffine";
|
|
static char __pyx_k__image_points[] = "image_points";
|
|
static char __pyx_k__min_distance[] = "min_distance";
|
|
static char __pyx_k__pattern_size[] = "pattern_size";
|
|
static char __pyx_k__point_counts[] = "point_counts";
|
|
static char __pyx_k__CV_BGR2BGR555[] = "CV_BGR2BGR555";
|
|
static char __pyx_k__CV_BGR2BGR565[] = "CV_BGR2BGR565";
|
|
static char __pyx_k__CV_BGR5552BGR[] = "CV_BGR5552BGR";
|
|
static char __pyx_k__CV_BGR5552RGB[] = "CV_BGR5552RGB";
|
|
static char __pyx_k__CV_BGR5652BGR[] = "CV_BGR5652BGR";
|
|
static char __pyx_k__CV_BGR5652RGB[] = "CV_BGR5652RGB";
|
|
static char __pyx_k__CV_INTER_AREA[] = "CV_INTER_AREA";
|
|
static char __pyx_k__CV_MOP_TOPHAT[] = "CV_MOP_TOPHAT";
|
|
static char __pyx_k__CV_RGB2BGR555[] = "CV_RGB2BGR555";
|
|
static char __pyx_k__CV_RGB2BGR565[] = "CV_RGB2BGR565";
|
|
static char __pyx_k__aperture_size[] = "aperture_size";
|
|
static char __pyx_k__object_points[] = "object_points";
|
|
static char __pyx_k__quality_level[] = "quality_level";
|
|
static char __pyx_k__CV_BGR5552BGRA[] = "CV_BGR5552BGRA";
|
|
static char __pyx_k__CV_BGR5552GRAY[] = "CV_BGR5552GRAY";
|
|
static char __pyx_k__CV_BGR5552RGBA[] = "CV_BGR5552RGBA";
|
|
static char __pyx_k__CV_BGR5652BGRA[] = "CV_BGR5652BGRA";
|
|
static char __pyx_k__CV_BGR5652GRAY[] = "CV_BGR5652GRAY";
|
|
static char __pyx_k__CV_BGR5652RGBA[] = "CV_BGR5652RGBA";
|
|
static char __pyx_k__CV_BGRA2BGR555[] = "CV_BGRA2BGR555";
|
|
static char __pyx_k__CV_BGRA2BGR565[] = "CV_BGRA2BGR565";
|
|
static char __pyx_k__CV_BayerBG2BGR[] = "CV_BayerBG2BGR";
|
|
static char __pyx_k__CV_BayerBG2RGB[] = "CV_BayerBG2RGB";
|
|
static char __pyx_k__CV_BayerGB2BGR[] = "CV_BayerGB2BGR";
|
|
static char __pyx_k__CV_BayerGB2RGB[] = "CV_BayerGB2RGB";
|
|
static char __pyx_k__CV_BayerGR2BGR[] = "CV_BayerGR2BGR";
|
|
static char __pyx_k__CV_BayerGR2RGB[] = "CV_BayerGR2RGB";
|
|
static char __pyx_k__CV_BayerRG2BGR[] = "CV_BayerRG2BGR";
|
|
static char __pyx_k__CV_BayerRG2RGB[] = "CV_BayerRG2RGB";
|
|
static char __pyx_k__CV_GRAY2BGR555[] = "CV_GRAY2BGR555";
|
|
static char __pyx_k__CV_GRAY2BGR565[] = "CV_GRAY2BGR565";
|
|
static char __pyx_k__CV_INTER_CUBIC[] = "CV_INTER_CUBIC";
|
|
static char __pyx_k__CV_RGBA2BGR555[] = "CV_RGBA2BGR555";
|
|
static char __pyx_k__CV_RGBA2BGR565[] = "CV_RGBA2BGR565";
|
|
static char __pyx_k___cvtcolor_dict[] = "_cvtcolor_dict";
|
|
static char __pyx_k__cvCornerHarris[] = "cvCornerHarris";
|
|
static char __pyx_k__cvMorphologyEx[] = "cvMorphologyEx";
|
|
static char __pyx_k__opencv_backend[] = "opencv_backend";
|
|
static char __pyx_k__threshold_type[] = "threshold_type";
|
|
static char __pyx_k__CV_INTER_LINEAR[] = "CV_INTER_LINEAR";
|
|
static char __pyx_k__CV_MOP_BLACKHAT[] = "CV_MOP_BLACKHAT";
|
|
static char __pyx_k__CV_MOP_GRADIENT[] = "CV_MOP_GRADIENT";
|
|
static char __pyx_k__adaptive_method[] = "adaptive_method";
|
|
static char __pyx_k__cvGetRectSubPix[] = "cvGetRectSubPix";
|
|
static char __pyx_k__CV_BLUR_NO_SCALE[] = "CV_BLUR_NO_SCALE";
|
|
static char __pyx_k__CV_THRESH_BINARY[] = "CV_THRESH_BINARY";
|
|
static char __pyx_k__opencv_constants[] = "opencv_constants";
|
|
static char __pyx_k__cvPreCornerDetect[] = "cvPreCornerDetect";
|
|
static char __pyx_k__cvWarpPerspective[] = "cvWarpPerspective";
|
|
static char __pyx_k__cvCalibrateCamera2[] = "cvCalibrateCamera2";
|
|
static char __pyx_k__cvFindCornerSubPix[] = "cvFindCornerSubPix";
|
|
static char __pyx_k__cvAdaptiveThreshold[] = "cvAdaptiveThreshold";
|
|
static char __pyx_k__cvCornerMinEigenVal[] = "cvCornerMinEigenVal";
|
|
static PyObject *__pyx_kp_s_1;
|
|
static PyObject *__pyx_kp_s_12;
|
|
static PyObject *__pyx_kp_s_13;
|
|
static PyObject *__pyx_kp_s_16;
|
|
static PyObject *__pyx_kp_s_18;
|
|
static PyObject *__pyx_kp_s_22;
|
|
static PyObject *__pyx_kp_s_25;
|
|
static PyObject *__pyx_kp_s_27;
|
|
static PyObject *__pyx_kp_s_28;
|
|
static PyObject *__pyx_kp_s_3;
|
|
static PyObject *__pyx_kp_s_31;
|
|
static PyObject *__pyx_n_s_36;
|
|
static PyObject *__pyx_n_s_37;
|
|
static PyObject *__pyx_kp_s_38;
|
|
static PyObject *__pyx_n_s_39;
|
|
static PyObject *__pyx_kp_s_4;
|
|
static PyObject *__pyx_kp_s_40;
|
|
static PyObject *__pyx_kp_s_41;
|
|
static PyObject *__pyx_kp_u_44;
|
|
static PyObject *__pyx_kp_u_45;
|
|
static PyObject *__pyx_kp_s_46;
|
|
static PyObject *__pyx_kp_s_47;
|
|
static PyObject *__pyx_kp_u_48;
|
|
static PyObject *__pyx_kp_u_49;
|
|
static PyObject *__pyx_kp_u_50;
|
|
static PyObject *__pyx_kp_u_51;
|
|
static PyObject *__pyx_n_s_52;
|
|
static PyObject *__pyx_kp_s_53;
|
|
static PyObject *__pyx_n_s_54;
|
|
static PyObject *__pyx_n_s_55;
|
|
static PyObject *__pyx_n_s_56;
|
|
static PyObject *__pyx_n_s_57;
|
|
static PyObject *__pyx_n_s_58;
|
|
static PyObject *__pyx_kp_s_59;
|
|
static PyObject *__pyx_kp_s_6;
|
|
static PyObject *__pyx_kp_s_60;
|
|
static PyObject *__pyx_kp_s_61;
|
|
static PyObject *__pyx_kp_s_62;
|
|
static PyObject *__pyx_kp_s_63;
|
|
static PyObject *__pyx_kp_s_64;
|
|
static PyObject *__pyx_kp_s_65;
|
|
static PyObject *__pyx_kp_s_66;
|
|
static PyObject *__pyx_kp_s_67;
|
|
static PyObject *__pyx_kp_s_68;
|
|
static PyObject *__pyx_kp_s_69;
|
|
static PyObject *__pyx_kp_s_70;
|
|
static PyObject *__pyx_n_s_71;
|
|
static PyObject *__pyx_kp_s_72;
|
|
static PyObject *__pyx_kp_s_73;
|
|
static PyObject *__pyx_kp_s_74;
|
|
static PyObject *__pyx_kp_s_75;
|
|
static PyObject *__pyx_kp_s_76;
|
|
static PyObject *__pyx_kp_s_77;
|
|
static PyObject *__pyx_kp_s_78;
|
|
static PyObject *__pyx_kp_s_79;
|
|
static PyObject *__pyx_kp_s_8;
|
|
static PyObject *__pyx_kp_s_80;
|
|
static PyObject *__pyx_kp_s_81;
|
|
static PyObject *__pyx_kp_s_82;
|
|
static PyObject *__pyx_kp_s_83;
|
|
static PyObject *__pyx_kp_s_84;
|
|
static PyObject *__pyx_kp_s_85;
|
|
static PyObject *__pyx_kp_s_86;
|
|
static PyObject *__pyx_n_s_87;
|
|
static PyObject *__pyx_kp_s_88;
|
|
static PyObject *__pyx_kp_s_89;
|
|
static PyObject *__pyx_kp_s_9;
|
|
static PyObject *__pyx_n_s__CV_BGR2BGR555;
|
|
static PyObject *__pyx_n_s__CV_BGR2BGR565;
|
|
static PyObject *__pyx_n_s__CV_BGR2BGRA;
|
|
static PyObject *__pyx_n_s__CV_BGR2GRAY;
|
|
static PyObject *__pyx_n_s__CV_BGR2HLS;
|
|
static PyObject *__pyx_n_s__CV_BGR2HSV;
|
|
static PyObject *__pyx_n_s__CV_BGR2Lab;
|
|
static PyObject *__pyx_n_s__CV_BGR2Luv;
|
|
static PyObject *__pyx_n_s__CV_BGR2RGB;
|
|
static PyObject *__pyx_n_s__CV_BGR2RGBA;
|
|
static PyObject *__pyx_n_s__CV_BGR2XYZ;
|
|
static PyObject *__pyx_n_s__CV_BGR2YCrCb;
|
|
static PyObject *__pyx_n_s__CV_BGR5552BGR;
|
|
static PyObject *__pyx_n_s__CV_BGR5552BGRA;
|
|
static PyObject *__pyx_n_s__CV_BGR5552GRAY;
|
|
static PyObject *__pyx_n_s__CV_BGR5552RGB;
|
|
static PyObject *__pyx_n_s__CV_BGR5552RGBA;
|
|
static PyObject *__pyx_n_s__CV_BGR5652BGR;
|
|
static PyObject *__pyx_n_s__CV_BGR5652BGRA;
|
|
static PyObject *__pyx_n_s__CV_BGR5652GRAY;
|
|
static PyObject *__pyx_n_s__CV_BGR5652RGB;
|
|
static PyObject *__pyx_n_s__CV_BGR5652RGBA;
|
|
static PyObject *__pyx_n_s__CV_BGRA2BGR;
|
|
static PyObject *__pyx_n_s__CV_BGRA2BGR555;
|
|
static PyObject *__pyx_n_s__CV_BGRA2BGR565;
|
|
static PyObject *__pyx_n_s__CV_BGRA2GRAY;
|
|
static PyObject *__pyx_n_s__CV_BGRA2RGB;
|
|
static PyObject *__pyx_n_s__CV_BGRA2RGBA;
|
|
static PyObject *__pyx_n_s__CV_BLUR;
|
|
static PyObject *__pyx_n_s__CV_BLUR_NO_SCALE;
|
|
static PyObject *__pyx_n_s__CV_BayerBG2BGR;
|
|
static PyObject *__pyx_n_s__CV_BayerBG2RGB;
|
|
static PyObject *__pyx_n_s__CV_BayerGB2BGR;
|
|
static PyObject *__pyx_n_s__CV_BayerGB2RGB;
|
|
static PyObject *__pyx_n_s__CV_BayerGR2BGR;
|
|
static PyObject *__pyx_n_s__CV_BayerGR2RGB;
|
|
static PyObject *__pyx_n_s__CV_BayerRG2BGR;
|
|
static PyObject *__pyx_n_s__CV_BayerRG2RGB;
|
|
static PyObject *__pyx_n_s__CV_GAUSSIAN;
|
|
static PyObject *__pyx_n_s__CV_GRAY2BGR;
|
|
static PyObject *__pyx_n_s__CV_GRAY2BGR555;
|
|
static PyObject *__pyx_n_s__CV_GRAY2BGR565;
|
|
static PyObject *__pyx_n_s__CV_GRAY2BGRA;
|
|
static PyObject *__pyx_n_s__CV_GRAY2RGB;
|
|
static PyObject *__pyx_n_s__CV_GRAY2RGBA;
|
|
static PyObject *__pyx_n_s__CV_HLS2BGR;
|
|
static PyObject *__pyx_n_s__CV_HLS2RGB;
|
|
static PyObject *__pyx_n_s__CV_HSV2BGR;
|
|
static PyObject *__pyx_n_s__CV_HSV2RGB;
|
|
static PyObject *__pyx_n_s__CV_INTER_AREA;
|
|
static PyObject *__pyx_n_s__CV_INTER_CUBIC;
|
|
static PyObject *__pyx_n_s__CV_INTER_LINEAR;
|
|
static PyObject *__pyx_n_s__CV_INTER_NN;
|
|
static PyObject *__pyx_n_s__CV_Lab2BGR;
|
|
static PyObject *__pyx_n_s__CV_Lab2RGB;
|
|
static PyObject *__pyx_n_s__CV_Luv2BGR;
|
|
static PyObject *__pyx_n_s__CV_Luv2RGB;
|
|
static PyObject *__pyx_n_s__CV_MOP_BLACKHAT;
|
|
static PyObject *__pyx_n_s__CV_MOP_CLOSE;
|
|
static PyObject *__pyx_n_s__CV_MOP_GRADIENT;
|
|
static PyObject *__pyx_n_s__CV_MOP_OPEN;
|
|
static PyObject *__pyx_n_s__CV_MOP_TOPHAT;
|
|
static PyObject *__pyx_n_s__CV_RGB2BGR;
|
|
static PyObject *__pyx_n_s__CV_RGB2BGR555;
|
|
static PyObject *__pyx_n_s__CV_RGB2BGR565;
|
|
static PyObject *__pyx_n_s__CV_RGB2BGRA;
|
|
static PyObject *__pyx_n_s__CV_RGB2GRAY;
|
|
static PyObject *__pyx_n_s__CV_RGB2HLS;
|
|
static PyObject *__pyx_n_s__CV_RGB2HSV;
|
|
static PyObject *__pyx_n_s__CV_RGB2Lab;
|
|
static PyObject *__pyx_n_s__CV_RGB2Luv;
|
|
static PyObject *__pyx_n_s__CV_RGB2RGBA;
|
|
static PyObject *__pyx_n_s__CV_RGB2XYZ;
|
|
static PyObject *__pyx_n_s__CV_RGB2YCrCb;
|
|
static PyObject *__pyx_n_s__CV_RGBA2BGR;
|
|
static PyObject *__pyx_n_s__CV_RGBA2BGR555;
|
|
static PyObject *__pyx_n_s__CV_RGBA2BGR565;
|
|
static PyObject *__pyx_n_s__CV_RGBA2BGRA;
|
|
static PyObject *__pyx_n_s__CV_RGBA2GRAY;
|
|
static PyObject *__pyx_n_s__CV_RGBA2RGB;
|
|
static PyObject *__pyx_n_s__CV_THRESH_BINARY;
|
|
static PyObject *__pyx_n_s__CV_XYZ2BGR;
|
|
static PyObject *__pyx_n_s__CV_XYZ2RGB;
|
|
static PyObject *__pyx_n_s__CV_YCrCb2BGR;
|
|
static PyObject *__pyx_n_s__CV_YCrCb2RGB;
|
|
static PyObject *__pyx_n_s__FLOAT32;
|
|
static PyObject *__pyx_n_s__FLOAT64;
|
|
static PyObject *__pyx_n_s__INT16;
|
|
static PyObject *__pyx_n_s__INT32;
|
|
static PyObject *__pyx_n_s__INT8;
|
|
static PyObject *__pyx_n_s__KeyError;
|
|
static PyObject *__pyx_n_s__M;
|
|
static PyObject *__pyx_n_s__RuntimeError;
|
|
static PyObject *__pyx_n_s__UINT16;
|
|
static PyObject *__pyx_n_s__UINT8;
|
|
static PyObject *__pyx_n_s__ValueError;
|
|
static PyObject *__pyx_n_s____main__;
|
|
static PyObject *__pyx_n_s___cvtcolor_dict;
|
|
static PyObject *__pyx_n_s___libimport;
|
|
static PyObject *__pyx_n_s___utilities;
|
|
static PyObject *__pyx_n_s__adaptive_method;
|
|
static PyObject *__pyx_n_s__addressof;
|
|
static PyObject *__pyx_n_s__anchor;
|
|
static PyObject *__pyx_n_s__aperture_size;
|
|
static PyObject *__pyx_n_s__block_size;
|
|
static PyObject *__pyx_n_s__buf;
|
|
static PyObject *__pyx_n_s__byteorder;
|
|
static PyObject *__pyx_kp_s__calibration;
|
|
static PyObject *__pyx_n_s__center;
|
|
static PyObject *__pyx_n_s__code;
|
|
static PyObject *__pyx_n_s__copy;
|
|
static PyObject *__pyx_n_s__corner_count;
|
|
static PyObject *__pyx_n_s__corners;
|
|
static PyObject *__pyx_n_s__ctypes;
|
|
static PyObject *__pyx_n_s__cv;
|
|
static PyObject *__pyx_n_s__cvAdaptiveThreshold;
|
|
static PyObject *__pyx_n_s__cvCalibrateCamera2;
|
|
static PyObject *__pyx_n_s__cvCanny;
|
|
static PyObject *__pyx_n_s__cvCornerHarris;
|
|
static PyObject *__pyx_n_s__cvCornerMinEigenVal;
|
|
static PyObject *__pyx_n_s__cvCvtColor;
|
|
static PyObject *__pyx_n_s__cvDilate;
|
|
static PyObject *__pyx_n_s__cvErode;
|
|
static PyObject *__pyx_n_s__cvFilter2D;
|
|
static PyObject *__pyx_n_s__cvFindCornerSubPix;
|
|
static PyObject *__pyx_n_s__cvGetRectSubPix;
|
|
static PyObject *__pyx_n_s__cvIntegral;
|
|
static PyObject *__pyx_n_s__cvLaplace;
|
|
static PyObject *__pyx_n_s__cvLogPolar;
|
|
static PyObject *__pyx_n_s__cvMorphologyEx;
|
|
static PyObject *__pyx_n_s__cvPreCornerDetect;
|
|
static PyObject *__pyx_n_s__cvPyrDown;
|
|
static PyObject *__pyx_n_s__cvPyrUp;
|
|
static PyObject *__pyx_n_s__cvResize;
|
|
static PyObject *__pyx_n_s__cvSmooth;
|
|
static PyObject *__pyx_n_s__cvSobel;
|
|
static PyObject *__pyx_n_s__cvThreshold;
|
|
static PyObject *__pyx_n_s__cvWarpAffine;
|
|
static PyObject *__pyx_n_s__cvWarpPerspective;
|
|
static PyObject *__pyx_n_s__cvdoc;
|
|
static PyObject *__pyx_n_s__descr;
|
|
static PyObject *__pyx_n_s__doc;
|
|
static PyObject *__pyx_n_s__dtype;
|
|
static PyObject *__pyx_n_s__element;
|
|
static PyObject *__pyx_n_s__epsilon;
|
|
static PyObject *__pyx_n_s__fields;
|
|
static PyObject *__pyx_n_s__fillval;
|
|
static PyObject *__pyx_n_s__flag;
|
|
static PyObject *__pyx_n_s__float_out;
|
|
static PyObject *__pyx_n_s__format;
|
|
static PyObject *__pyx_n_s__group;
|
|
static PyObject *__pyx_n_s__height;
|
|
static PyObject *__pyx_kp_s__image;
|
|
static PyObject *__pyx_n_s__image_points;
|
|
static PyObject *__pyx_n_s__image_size;
|
|
static PyObject *__pyx_n_s__in_place;
|
|
static PyObject *__pyx_n_s__itemsize;
|
|
static PyObject *__pyx_n_s__iterations;
|
|
static PyObject *__pyx_n_s__k;
|
|
static PyObject *__pyx_n_s__kernel;
|
|
static PyObject *__pyx_n_s__max_value;
|
|
static PyObject *__pyx_n_s__method;
|
|
static PyObject *__pyx_n_s__min_distance;
|
|
static PyObject *__pyx_n_s__names;
|
|
static PyObject *__pyx_n_s__ndim;
|
|
static PyObject *__pyx_n_s__np;
|
|
static PyObject *__pyx_n_s__numpy;
|
|
static PyObject *__pyx_n_s__obj;
|
|
static PyObject *__pyx_n_s__object_points;
|
|
static PyObject *__pyx_n_s__opencv_backend;
|
|
static PyObject *__pyx_n_s__opencv_constants;
|
|
static PyObject *__pyx_n_s__opencv_cv;
|
|
static PyObject *__pyx_n_s__operation;
|
|
static PyObject *__pyx_n_s__package;
|
|
static PyObject *__pyx_n_s__param1;
|
|
static PyObject *__pyx_n_s__param2;
|
|
static PyObject *__pyx_n_s__param3;
|
|
static PyObject *__pyx_n_s__param4;
|
|
static PyObject *__pyx_n_s__pattern_size;
|
|
static PyObject *__pyx_n_s__point_counts;
|
|
static PyObject *__pyx_n_s__quality_level;
|
|
static PyObject *__pyx_n_s__range;
|
|
static PyObject *__pyx_n_s__readonly;
|
|
static PyObject *__pyx_n_s__reshape;
|
|
static PyObject *__pyx_n_s__shape;
|
|
static PyObject *__pyx_n_s__size;
|
|
static PyObject *__pyx_n_s__smoothtype;
|
|
static PyObject *__pyx_n_s__square_sum;
|
|
static PyObject *__pyx_n_s__src;
|
|
static PyObject *__pyx_n_s__strides;
|
|
static PyObject *__pyx_n_s__suboffsets;
|
|
static PyObject *__pyx_n_s__threshold;
|
|
static PyObject *__pyx_n_s__threshold1;
|
|
static PyObject *__pyx_n_s__threshold2;
|
|
static PyObject *__pyx_n_s__threshold_type;
|
|
static PyObject *__pyx_n_s__tilted_sum;
|
|
static PyObject *__pyx_n_s__type_num;
|
|
static PyObject *__pyx_n_s__use_harris;
|
|
static PyObject *__pyx_n_s__use_otsu;
|
|
static PyObject *__pyx_n_s__val;
|
|
static PyObject *__pyx_n_s__warpmat;
|
|
static PyObject *__pyx_n_s__width;
|
|
static PyObject *__pyx_n_s__win;
|
|
static PyObject *__pyx_n_s__x;
|
|
static PyObject *__pyx_n_s__xorder;
|
|
static PyObject *__pyx_n_s__y;
|
|
static PyObject *__pyx_n_s__yorder;
|
|
static PyObject *__pyx_n_s__zero_zone;
|
|
static PyObject *__pyx_int_0;
|
|
static PyObject *__pyx_int_1;
|
|
static PyObject *__pyx_int_2;
|
|
static PyObject *__pyx_int_3;
|
|
static PyObject *__pyx_int_4;
|
|
static PyObject *__pyx_int_6;
|
|
static PyObject *__pyx_int_8;
|
|
static PyObject *__pyx_int_9;
|
|
static PyObject *__pyx_int_neg_1;
|
|
static PyObject *__pyx_int_10;
|
|
static PyObject *__pyx_int_11;
|
|
static PyObject *__pyx_int_15;
|
|
static PyObject *__pyx_int_16;
|
|
static PyObject *__pyx_int_17;
|
|
static PyObject *__pyx_int_18;
|
|
static PyObject *__pyx_int_19;
|
|
static PyObject *__pyx_int_24;
|
|
static PyObject *__pyx_int_25;
|
|
static PyObject *__pyx_int_26;
|
|
static PyObject *__pyx_int_27;
|
|
static PyObject *__pyx_k_2;
|
|
static PyObject *__pyx_k_5;
|
|
static int __pyx_k_7;
|
|
static PyObject *__pyx_k_10;
|
|
static int __pyx_k_11;
|
|
static PyObject *__pyx_k_14;
|
|
static int __pyx_k_15;
|
|
static int __pyx_k_17;
|
|
static PyObject *__pyx_k_19;
|
|
static PyObject *__pyx_k_20;
|
|
static PyObject *__pyx_k_21;
|
|
static PyObject *__pyx_k_23;
|
|
static int __pyx_k_24;
|
|
static PyObject *__pyx_k_26;
|
|
static PyObject *__pyx_k_29;
|
|
static PyObject *__pyx_k_30;
|
|
static PyObject *__pyx_k_32;
|
|
static int __pyx_k_33;
|
|
static int __pyx_k_34;
|
|
static int __pyx_k_35;
|
|
static int __pyx_k_42;
|
|
static PyObject *__pyx_k_43;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":312
|
|
* A new which is the result of applying the Sobel
|
|
* operator to src.''')
|
|
* def cvSobel(np.ndarray src, int xorder=1, int yorder=0, # <<<<<<<<<<<<<<
|
|
* int aperture_size=3):
|
|
*
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvSobel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvSobel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
int __pyx_v_xorder;
|
|
int __pyx_v_yorder;
|
|
int __pyx_v_aperture_size;
|
|
PyArrayObject *__pyx_v_out;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
int __pyx_t_7;
|
|
int __pyx_t_8;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__xorder,&__pyx_n_s__yorder,&__pyx_n_s__aperture_size,0};
|
|
__Pyx_SetupRefcountContext("cvSobel");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[4] = {0,0,0,0};
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xorder);
|
|
if (unlikely(value)) { values[1] = value; kw_args--; }
|
|
}
|
|
case 2:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__yorder);
|
|
if (unlikely(value)) { values[2] = value; kw_args--; }
|
|
}
|
|
case 3:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__aperture_size);
|
|
if (unlikely(value)) { values[3] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvSobel") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
if (values[1]) {
|
|
__pyx_v_xorder = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_xorder == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_xorder = ((int)1);
|
|
}
|
|
if (values[2]) {
|
|
__pyx_v_yorder = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_yorder == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_yorder = ((int)0);
|
|
}
|
|
if (values[3]) {
|
|
__pyx_v_aperture_size = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_aperture_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_aperture_size = ((int)3);
|
|
}
|
|
} else {
|
|
__pyx_v_xorder = ((int)1);
|
|
__pyx_v_yorder = ((int)0);
|
|
__pyx_v_aperture_size = ((int)3);
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 4: __pyx_v_aperture_size = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_aperture_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 3: __pyx_v_yorder = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_yorder == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 2: __pyx_v_xorder = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_xorder == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 1: __pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvSobel", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvSobel");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__pyx_v_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":315
|
|
* int aperture_size=3):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
* assert_dtype(src, [UINT8, INT8, FLOAT32])
|
|
* assert_nchannels(src, [1])
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":316
|
|
*
|
|
* validate_array(src)
|
|
* assert_dtype(src, [UINT8, INT8, FLOAT32]) # <<<<<<<<<<<<<<
|
|
* assert_nchannels(src, [1])
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__INT8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":317
|
|
* validate_array(src)
|
|
* assert_dtype(src, [UINT8, INT8, FLOAT32])
|
|
* assert_nchannels(src, [1]) # <<<<<<<<<<<<<<
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7):
|
|
*/
|
|
__pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_src, ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":319
|
|
* assert_nchannels(src, [1])
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7): # <<<<<<<<<<<<<<
|
|
* raise ValueError('aperture_size must be 3, 5, or 7')
|
|
*
|
|
*/
|
|
if ((__pyx_v_aperture_size != 3)) {
|
|
if ((__pyx_v_aperture_size != 5)) {
|
|
__pyx_t_6 = (__pyx_v_aperture_size != 7);
|
|
} else {
|
|
__pyx_t_6 = (__pyx_v_aperture_size != 5);
|
|
}
|
|
__pyx_t_7 = __pyx_t_6;
|
|
} else {
|
|
__pyx_t_7 = (__pyx_v_aperture_size != 3);
|
|
}
|
|
if (__pyx_t_7) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":320
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7):
|
|
* raise ValueError('aperture_size must be 3, 5, or 7') # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out
|
|
*/
|
|
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
|
|
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_1));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
|
|
__pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_Raise(__pyx_t_4, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":324
|
|
* cdef np.ndarray out
|
|
*
|
|
* if src.dtype == UINT8 or src.dtype == INT8: # <<<<<<<<<<<<<<
|
|
* out = new_array_like_diff_dtype(src, INT16)
|
|
* else:
|
|
*/
|
|
__pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_src), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (!__pyx_t_7) {
|
|
__pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_src), __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__INT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_8 = __pyx_t_6;
|
|
} else {
|
|
__pyx_t_8 = __pyx_t_7;
|
|
}
|
|
if (__pyx_t_8) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":325
|
|
*
|
|
* if src.dtype == UINT8 or src.dtype == INT8:
|
|
* out = new_array_like_diff_dtype(src, INT16) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* out = new_array_like(src)
|
|
*/
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__INT16); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like_diff_dtype(__pyx_v_src, __pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
goto __pyx_L7;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":327
|
|
* out = new_array_like_diff_dtype(src, INT16)
|
|
* else:
|
|
* out = new_array_like(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_5 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like(__pyx_v_src)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
}
|
|
__pyx_L7:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":332
|
|
* cdef IplImage outimg
|
|
*
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":333
|
|
*
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvSobel(&srcimg, &outimg, xorder, yorder, aperture_size)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":335
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
* c_cvSobel(&srcimg, &outimg, xorder, yorder, aperture_size) # <<<<<<<<<<<<<<
|
|
*
|
|
* return out
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvSobel((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_xorder, __pyx_v_yorder, __pyx_v_aperture_size);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":337
|
|
* c_cvSobel(&srcimg, &outimg, xorder, yorder, aperture_size)
|
|
*
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvSobel");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":361
|
|
* A new which is the result of applying the Laplace
|
|
* operator to src.''')
|
|
* def cvLaplace(np.ndarray src, int aperture_size=3): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvLaplace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvLaplace(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
int __pyx_v_aperture_size;
|
|
PyArrayObject *__pyx_v_out;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
int __pyx_t_7;
|
|
int __pyx_t_8;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__aperture_size,0};
|
|
__Pyx_SetupRefcountContext("cvLaplace");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[2] = {0,0};
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__aperture_size);
|
|
if (unlikely(value)) { values[1] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvLaplace") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
if (values[1]) {
|
|
__pyx_v_aperture_size = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_aperture_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_aperture_size = ((int)3);
|
|
}
|
|
} else {
|
|
__pyx_v_aperture_size = ((int)3);
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 2: __pyx_v_aperture_size = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_aperture_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 1: __pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvLaplace", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvLaplace");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__pyx_v_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":363
|
|
* def cvLaplace(np.ndarray src, int aperture_size=3):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
* assert_dtype(src, [UINT8, INT8, FLOAT32])
|
|
* assert_nchannels(src, [1])
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":364
|
|
*
|
|
* validate_array(src)
|
|
* assert_dtype(src, [UINT8, INT8, FLOAT32]) # <<<<<<<<<<<<<<
|
|
* assert_nchannels(src, [1])
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__INT8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":365
|
|
* validate_array(src)
|
|
* assert_dtype(src, [UINT8, INT8, FLOAT32])
|
|
* assert_nchannels(src, [1]) # <<<<<<<<<<<<<<
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7):
|
|
*/
|
|
__pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_src, ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":367
|
|
* assert_nchannels(src, [1])
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7): # <<<<<<<<<<<<<<
|
|
* raise ValueError('aperture_size must be 3, 5, or 7')
|
|
*
|
|
*/
|
|
if ((__pyx_v_aperture_size != 3)) {
|
|
if ((__pyx_v_aperture_size != 5)) {
|
|
__pyx_t_6 = (__pyx_v_aperture_size != 7);
|
|
} else {
|
|
__pyx_t_6 = (__pyx_v_aperture_size != 5);
|
|
}
|
|
__pyx_t_7 = __pyx_t_6;
|
|
} else {
|
|
__pyx_t_7 = (__pyx_v_aperture_size != 3);
|
|
}
|
|
if (__pyx_t_7) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":368
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7):
|
|
* raise ValueError('aperture_size must be 3, 5, or 7') # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out
|
|
*/
|
|
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
|
|
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_1));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
|
|
__pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_Raise(__pyx_t_4, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":372
|
|
* cdef np.ndarray out
|
|
*
|
|
* if src.dtype == UINT8 or src.dtype == INT8: # <<<<<<<<<<<<<<
|
|
* out = new_array_like_diff_dtype(src, INT16)
|
|
* else:
|
|
*/
|
|
__pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_src), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (!__pyx_t_7) {
|
|
__pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_src), __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__INT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_8 = __pyx_t_6;
|
|
} else {
|
|
__pyx_t_8 = __pyx_t_7;
|
|
}
|
|
if (__pyx_t_8) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":373
|
|
*
|
|
* if src.dtype == UINT8 or src.dtype == INT8:
|
|
* out = new_array_like_diff_dtype(src, INT16) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* out = new_array_like(src)
|
|
*/
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__INT16); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like_diff_dtype(__pyx_v_src, __pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
goto __pyx_L7;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":375
|
|
* out = new_array_like_diff_dtype(src, INT16)
|
|
* else:
|
|
* out = new_array_like(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_5 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like(__pyx_v_src)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
}
|
|
__pyx_L7:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":380
|
|
* cdef IplImage outimg
|
|
*
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":381
|
|
*
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvLaplace(&srcimg, &outimg, aperture_size)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":383
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
* c_cvLaplace(&srcimg, &outimg, aperture_size) # <<<<<<<<<<<<<<
|
|
*
|
|
* return out
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvLaplace((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_aperture_size);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":385
|
|
* c_cvLaplace(&srcimg, &outimg, aperture_size)
|
|
*
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvLaplace");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":413
|
|
* A new which is the result of applying Canny
|
|
* edge detection to src.''')
|
|
* def cvCanny(np.ndarray src, double threshold1=10, double threshold2=50, # <<<<<<<<<<<<<<
|
|
* int aperture_size=3):
|
|
*
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvCanny(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvCanny(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
double __pyx_v_threshold1;
|
|
double __pyx_v_threshold2;
|
|
int __pyx_v_aperture_size;
|
|
PyArrayObject *__pyx_v_out;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__threshold1,&__pyx_n_s__threshold2,&__pyx_n_s__aperture_size,0};
|
|
__Pyx_SetupRefcountContext("cvCanny");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[4] = {0,0,0,0};
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__threshold1);
|
|
if (unlikely(value)) { values[1] = value; kw_args--; }
|
|
}
|
|
case 2:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__threshold2);
|
|
if (unlikely(value)) { values[2] = value; kw_args--; }
|
|
}
|
|
case 3:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__aperture_size);
|
|
if (unlikely(value)) { values[3] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvCanny") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
if (values[1]) {
|
|
__pyx_v_threshold1 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_threshold1 = ((double)10);
|
|
}
|
|
if (values[2]) {
|
|
__pyx_v_threshold2 = __pyx_PyFloat_AsDouble(values[2]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_threshold2 = ((double)50);
|
|
}
|
|
if (values[3]) {
|
|
__pyx_v_aperture_size = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_aperture_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_aperture_size = ((int)3);
|
|
}
|
|
} else {
|
|
__pyx_v_threshold1 = ((double)10);
|
|
__pyx_v_threshold2 = ((double)50);
|
|
__pyx_v_aperture_size = ((int)3);
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 4: __pyx_v_aperture_size = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_aperture_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 3: __pyx_v_threshold2 = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 2: __pyx_v_threshold1 = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 1: __pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvCanny", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvCanny");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__pyx_v_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":416
|
|
* int aperture_size=3):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
* assert_dtype(src, [UINT8])
|
|
* assert_nchannels(src, [1])
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":417
|
|
*
|
|
* validate_array(src)
|
|
* assert_dtype(src, [UINT8]) # <<<<<<<<<<<<<<
|
|
* assert_nchannels(src, [1])
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":418
|
|
* validate_array(src)
|
|
* assert_dtype(src, [UINT8])
|
|
* assert_nchannels(src, [1]) # <<<<<<<<<<<<<<
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7):
|
|
*/
|
|
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_src, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":420
|
|
* assert_nchannels(src, [1])
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7): # <<<<<<<<<<<<<<
|
|
* raise ValueError('aperture_size must be 3, 5, or 7')
|
|
*
|
|
*/
|
|
if ((__pyx_v_aperture_size != 3)) {
|
|
if ((__pyx_v_aperture_size != 5)) {
|
|
__pyx_t_4 = (__pyx_v_aperture_size != 7);
|
|
} else {
|
|
__pyx_t_4 = (__pyx_v_aperture_size != 5);
|
|
}
|
|
__pyx_t_5 = __pyx_t_4;
|
|
} else {
|
|
__pyx_t_5 = (__pyx_v_aperture_size != 3);
|
|
}
|
|
if (__pyx_t_5) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":421
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7):
|
|
* raise ValueError('aperture_size must be 3, 5, or 7') # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out
|
|
*/
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_1));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
|
|
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_Raise(__pyx_t_2, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":424
|
|
*
|
|
* cdef np.ndarray out
|
|
* out = new_array_like(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_2 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like(__pyx_v_src)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":428
|
|
* cdef IplImage srcimg
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":429
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvCanny(&srcimg, &outimg, threshold1, threshold2, aperture_size)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":431
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
* c_cvCanny(&srcimg, &outimg, threshold1, threshold2, aperture_size) # <<<<<<<<<<<<<<
|
|
*
|
|
* return out
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvCanny((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_threshold1, __pyx_v_threshold2, __pyx_v_aperture_size);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":433
|
|
* c_cvCanny(&srcimg, &outimg, threshold1, threshold2, aperture_size)
|
|
*
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvCanny");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":456
|
|
* out : ndarray
|
|
* A new array of the corner candidates.''')
|
|
* def cvPreCornerDetect(np.ndarray src, int aperture_size=3): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvPreCornerDetect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvPreCornerDetect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
int __pyx_v_aperture_size;
|
|
PyArrayObject *__pyx_v_out;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__aperture_size,0};
|
|
__Pyx_SetupRefcountContext("cvPreCornerDetect");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[2] = {0,0};
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__aperture_size);
|
|
if (unlikely(value)) { values[1] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvPreCornerDetect") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
if (values[1]) {
|
|
__pyx_v_aperture_size = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_aperture_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_aperture_size = ((int)3);
|
|
}
|
|
} else {
|
|
__pyx_v_aperture_size = ((int)3);
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 2: __pyx_v_aperture_size = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_aperture_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 1: __pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvPreCornerDetect", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvPreCornerDetect");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__pyx_v_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":458
|
|
* def cvPreCornerDetect(np.ndarray src, int aperture_size=3):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
* assert_dtype(src, [UINT8, FLOAT32])
|
|
* assert_nchannels(src, [1])
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":459
|
|
*
|
|
* validate_array(src)
|
|
* assert_dtype(src, [UINT8, FLOAT32]) # <<<<<<<<<<<<<<
|
|
* assert_nchannels(src, [1])
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
|
|
PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, ((PyObject *)__pyx_t_4)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":460
|
|
* validate_array(src)
|
|
* assert_dtype(src, [UINT8, FLOAT32])
|
|
* assert_nchannels(src, [1]) # <<<<<<<<<<<<<<
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7):
|
|
*/
|
|
__pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_src, ((PyObject *)__pyx_t_4)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":462
|
|
* assert_nchannels(src, [1])
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7): # <<<<<<<<<<<<<<
|
|
* raise ValueError('aperture_size must be 3, 5, or 7')
|
|
*
|
|
*/
|
|
if ((__pyx_v_aperture_size != 3)) {
|
|
if ((__pyx_v_aperture_size != 5)) {
|
|
__pyx_t_5 = (__pyx_v_aperture_size != 7);
|
|
} else {
|
|
__pyx_t_5 = (__pyx_v_aperture_size != 5);
|
|
}
|
|
__pyx_t_6 = __pyx_t_5;
|
|
} else {
|
|
__pyx_t_6 = (__pyx_v_aperture_size != 3);
|
|
}
|
|
if (__pyx_t_6) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":463
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7):
|
|
* raise ValueError('aperture_size must be 3, 5, or 7') # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_1));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
|
|
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":466
|
|
*
|
|
* cdef np.ndarray out
|
|
* out = new_array_like_diff_dtype(src, FLOAT32) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like_diff_dtype(__pyx_v_src, __pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":470
|
|
* cdef IplImage srcimg
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":471
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvPreCornerDetect(&srcimg, &outimg, aperture_size)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":473
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
* c_cvPreCornerDetect(&srcimg, &outimg, aperture_size) # <<<<<<<<<<<<<<
|
|
*
|
|
* return out
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvPreCornerDetect((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_aperture_size);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":475
|
|
* c_cvPreCornerDetect(&srcimg, &outimg, aperture_size)
|
|
*
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvPreCornerDetect");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":505
|
|
* Where height and width are the same as that
|
|
* of src.''')
|
|
* def cvCornerEigenValsAndVecs(np.ndarray src, int block_size=3, # <<<<<<<<<<<<<<
|
|
* int aperture_size=3):
|
|
*
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvCornerEigenValsAndVecs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvCornerEigenValsAndVecs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
int __pyx_v_block_size;
|
|
int __pyx_v_aperture_size;
|
|
PyArrayObject *__pyx_v_out;
|
|
npy_intp __pyx_v_outshape[2];
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__block_size,&__pyx_n_s__aperture_size,0};
|
|
__Pyx_SetupRefcountContext("cvCornerEigenValsAndVecs");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[3] = {0,0,0};
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__block_size);
|
|
if (unlikely(value)) { values[1] = value; kw_args--; }
|
|
}
|
|
case 2:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__aperture_size);
|
|
if (unlikely(value)) { values[2] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvCornerEigenValsAndVecs") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
if (values[1]) {
|
|
__pyx_v_block_size = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_block_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_block_size = ((int)3);
|
|
}
|
|
if (values[2]) {
|
|
__pyx_v_aperture_size = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_aperture_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_aperture_size = ((int)3);
|
|
}
|
|
} else {
|
|
__pyx_v_block_size = ((int)3);
|
|
__pyx_v_aperture_size = ((int)3);
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 3: __pyx_v_aperture_size = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_aperture_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 2: __pyx_v_block_size = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_block_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 1: __pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvCornerEigenValsAndVecs", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvCornerEigenValsAndVecs");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__pyx_v_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":508
|
|
* int aperture_size=3):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
* assert_nchannels(src, [1])
|
|
* assert_dtype(src, [UINT8, FLOAT32])
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":509
|
|
*
|
|
* validate_array(src)
|
|
* assert_nchannels(src, [1]) # <<<<<<<<<<<<<<
|
|
* assert_dtype(src, [UINT8, FLOAT32])
|
|
*
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_src, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":510
|
|
* validate_array(src)
|
|
* assert_nchannels(src, [1])
|
|
* assert_dtype(src, [UINT8, FLOAT32]) # <<<<<<<<<<<<<<
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7):
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
|
|
PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, ((PyObject *)__pyx_t_4)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":512
|
|
* assert_dtype(src, [UINT8, FLOAT32])
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7): # <<<<<<<<<<<<<<
|
|
* raise ValueError('aperture_size must be 3, 5, or 7')
|
|
*
|
|
*/
|
|
if ((__pyx_v_aperture_size != 3)) {
|
|
if ((__pyx_v_aperture_size != 5)) {
|
|
__pyx_t_5 = (__pyx_v_aperture_size != 7);
|
|
} else {
|
|
__pyx_t_5 = (__pyx_v_aperture_size != 5);
|
|
}
|
|
__pyx_t_6 = __pyx_t_5;
|
|
} else {
|
|
__pyx_t_6 = (__pyx_v_aperture_size != 3);
|
|
}
|
|
if (__pyx_t_6) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":513
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7):
|
|
* raise ValueError('aperture_size must be 3, 5, or 7') # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_1));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
|
|
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":517
|
|
* cdef np.ndarray out
|
|
* cdef np.npy_intp outshape[2]
|
|
* outshape[0] = src.shape[0] # <<<<<<<<<<<<<<
|
|
* outshape[1] = src.shape[1] * 6
|
|
*
|
|
*/
|
|
(__pyx_v_outshape[0]) = (__pyx_v_src->dimensions[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":518
|
|
* cdef np.npy_intp outshape[2]
|
|
* outshape[0] = src.shape[0]
|
|
* outshape[1] = src.shape[1] * 6 # <<<<<<<<<<<<<<
|
|
*
|
|
* out = new_array(2, outshape, FLOAT32)
|
|
*/
|
|
(__pyx_v_outshape[1]) = ((__pyx_v_src->dimensions[1]) * 6);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":520
|
|
* outshape[1] = src.shape[1] * 6
|
|
*
|
|
* out = new_array(2, outshape, FLOAT32) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array(2, __pyx_v_outshape, __pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":524
|
|
* cdef IplImage srcimg
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":525
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvCornerEigenValsAndVecs(&srcimg, &outimg, block_size, aperture_size)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":527
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
* c_cvCornerEigenValsAndVecs(&srcimg, &outimg, block_size, aperture_size) # <<<<<<<<<<<<<<
|
|
*
|
|
* return out.reshape(out.shape[0], -1, 6)
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvCornerEigenValsAndVecs((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_block_size, __pyx_v_aperture_size);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":529
|
|
* c_cvCornerEigenValsAndVecs(&srcimg, &outimg, block_size, aperture_size)
|
|
*
|
|
* return out.reshape(out.shape[0], -1, 6) # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_out), __pyx_n_s__reshape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_3 = __Pyx_PyInt_to_py_npy_intp((__pyx_v_out->dimensions[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__Pyx_INCREF(__pyx_int_neg_1);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_neg_1);
|
|
__Pyx_GIVEREF(__pyx_int_neg_1);
|
|
__Pyx_INCREF(__pyx_int_6);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_6);
|
|
__Pyx_GIVEREF(__pyx_int_6);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvCornerEigenValsAndVecs");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":556
|
|
* out : ndarray
|
|
* A new array of the eigenvalues.''')
|
|
* def cvCornerMinEigenVal(np.ndarray src, int block_size=3, # <<<<<<<<<<<<<<
|
|
* int aperture_size=3):
|
|
*
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvCornerMinEigenVal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvCornerMinEigenVal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
int __pyx_v_block_size;
|
|
int __pyx_v_aperture_size;
|
|
PyArrayObject *__pyx_v_out;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__block_size,&__pyx_n_s__aperture_size,0};
|
|
__Pyx_SetupRefcountContext("cvCornerMinEigenVal");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[3] = {0,0,0};
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__block_size);
|
|
if (unlikely(value)) { values[1] = value; kw_args--; }
|
|
}
|
|
case 2:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__aperture_size);
|
|
if (unlikely(value)) { values[2] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvCornerMinEigenVal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
if (values[1]) {
|
|
__pyx_v_block_size = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_block_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_block_size = ((int)3);
|
|
}
|
|
if (values[2]) {
|
|
__pyx_v_aperture_size = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_aperture_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_aperture_size = ((int)3);
|
|
}
|
|
} else {
|
|
__pyx_v_block_size = ((int)3);
|
|
__pyx_v_aperture_size = ((int)3);
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 3: __pyx_v_aperture_size = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_aperture_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 2: __pyx_v_block_size = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_block_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 1: __pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvCornerMinEigenVal", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvCornerMinEigenVal");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__pyx_v_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":559
|
|
* int aperture_size=3):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
* assert_nchannels(src, [1])
|
|
* assert_dtype(src, [UINT8, FLOAT32])
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":560
|
|
*
|
|
* validate_array(src)
|
|
* assert_nchannels(src, [1]) # <<<<<<<<<<<<<<
|
|
* assert_dtype(src, [UINT8, FLOAT32])
|
|
*
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_src, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":561
|
|
* validate_array(src)
|
|
* assert_nchannels(src, [1])
|
|
* assert_dtype(src, [UINT8, FLOAT32]) # <<<<<<<<<<<<<<
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7):
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
|
|
PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, ((PyObject *)__pyx_t_4)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":563
|
|
* assert_dtype(src, [UINT8, FLOAT32])
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7): # <<<<<<<<<<<<<<
|
|
* raise ValueError('aperture_size must be 3, 5, or 7')
|
|
*
|
|
*/
|
|
if ((__pyx_v_aperture_size != 3)) {
|
|
if ((__pyx_v_aperture_size != 5)) {
|
|
__pyx_t_5 = (__pyx_v_aperture_size != 7);
|
|
} else {
|
|
__pyx_t_5 = (__pyx_v_aperture_size != 5);
|
|
}
|
|
__pyx_t_6 = __pyx_t_5;
|
|
} else {
|
|
__pyx_t_6 = (__pyx_v_aperture_size != 3);
|
|
}
|
|
if (__pyx_t_6) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":564
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7):
|
|
* raise ValueError('aperture_size must be 3, 5, or 7') # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_1));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
|
|
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":567
|
|
*
|
|
* cdef np.ndarray out
|
|
* out = new_array_like_diff_dtype(src, FLOAT32) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like_diff_dtype(__pyx_v_src, __pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":571
|
|
* cdef IplImage srcimg
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":572
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvCornerMinEigenVal(&srcimg, &outimg, block_size, aperture_size)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":574
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
* c_cvCornerMinEigenVal(&srcimg, &outimg, block_size, aperture_size) # <<<<<<<<<<<<<<
|
|
*
|
|
* return out
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvCornerMinEigenVal((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_block_size, __pyx_v_aperture_size);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":576
|
|
* c_cvCornerMinEigenVal(&srcimg, &outimg, block_size, aperture_size)
|
|
*
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvCornerMinEigenVal");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":613
|
|
* to the output image. Corners in the image can be found as the
|
|
* local maxima of the output image.''')
|
|
* def cvCornerHarris(np.ndarray src, int block_size=3, int aperture_size=3, # <<<<<<<<<<<<<<
|
|
* double k=0.04):
|
|
*
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvCornerHarris(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvCornerHarris(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
int __pyx_v_block_size;
|
|
int __pyx_v_aperture_size;
|
|
double __pyx_v_k;
|
|
PyArrayObject *__pyx_v_out;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__block_size,&__pyx_n_s__aperture_size,&__pyx_n_s__k,0};
|
|
__Pyx_SetupRefcountContext("cvCornerHarris");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[4] = {0,0,0,0};
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__block_size);
|
|
if (unlikely(value)) { values[1] = value; kw_args--; }
|
|
}
|
|
case 2:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__aperture_size);
|
|
if (unlikely(value)) { values[2] = value; kw_args--; }
|
|
}
|
|
case 3:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__k);
|
|
if (unlikely(value)) { values[3] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvCornerHarris") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
if (values[1]) {
|
|
__pyx_v_block_size = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_block_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_block_size = ((int)3);
|
|
}
|
|
if (values[2]) {
|
|
__pyx_v_aperture_size = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_aperture_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_aperture_size = ((int)3);
|
|
}
|
|
if (values[3]) {
|
|
__pyx_v_k = __pyx_PyFloat_AsDouble(values[3]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":614
|
|
* local maxima of the output image.''')
|
|
* def cvCornerHarris(np.ndarray src, int block_size=3, int aperture_size=3,
|
|
* double k=0.04): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_v_k = ((double)0.040000000000000001);
|
|
}
|
|
} else {
|
|
__pyx_v_block_size = ((int)3);
|
|
__pyx_v_aperture_size = ((int)3);
|
|
__pyx_v_k = ((double)0.040000000000000001);
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 4: __pyx_v_k = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 3: __pyx_v_aperture_size = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_aperture_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 2: __pyx_v_block_size = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_block_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 1: __pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvCornerHarris", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvCornerHarris");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__pyx_v_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":616
|
|
* double k=0.04):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
* assert_nchannels(src, [1])
|
|
* assert_dtype(src, [UINT8, FLOAT32])
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":617
|
|
*
|
|
* validate_array(src)
|
|
* assert_nchannels(src, [1]) # <<<<<<<<<<<<<<
|
|
* assert_dtype(src, [UINT8, FLOAT32])
|
|
*
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_src, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":618
|
|
* validate_array(src)
|
|
* assert_nchannels(src, [1])
|
|
* assert_dtype(src, [UINT8, FLOAT32]) # <<<<<<<<<<<<<<
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7):
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
|
|
PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, ((PyObject *)__pyx_t_4)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":620
|
|
* assert_dtype(src, [UINT8, FLOAT32])
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7): # <<<<<<<<<<<<<<
|
|
* raise ValueError('aperture_size must be 3, 5, or 7')
|
|
*
|
|
*/
|
|
if ((__pyx_v_aperture_size != 3)) {
|
|
if ((__pyx_v_aperture_size != 5)) {
|
|
__pyx_t_5 = (__pyx_v_aperture_size != 7);
|
|
} else {
|
|
__pyx_t_5 = (__pyx_v_aperture_size != 5);
|
|
}
|
|
__pyx_t_6 = __pyx_t_5;
|
|
} else {
|
|
__pyx_t_6 = (__pyx_v_aperture_size != 3);
|
|
}
|
|
if (__pyx_t_6) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":621
|
|
*
|
|
* if (aperture_size != 3 and aperture_size != 5 and aperture_size != 7):
|
|
* raise ValueError('aperture_size must be 3, 5, or 7') # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_1));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
|
|
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":624
|
|
*
|
|
* cdef np.ndarray out
|
|
* out = new_array_like_diff_dtype(src, FLOAT32) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like_diff_dtype(__pyx_v_src, __pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":628
|
|
* cdef IplImage srcimg
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":629
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvCornerHarris(&srcimg, &outimg, block_size, aperture_size, k)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":631
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
* c_cvCornerHarris(&srcimg, &outimg, block_size, aperture_size, k) # <<<<<<<<<<<<<<
|
|
*
|
|
* return out
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvCornerHarris((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_block_size, __pyx_v_aperture_size, __pyx_v_k);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":633
|
|
* c_cvCornerHarris(&srcimg, &outimg, block_size, aperture_size, k)
|
|
*
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvCornerHarris");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":671
|
|
* -------
|
|
* None. The array 'corners' is modified in place.''')
|
|
* def cvFindCornerSubPix(np.ndarray src, np.ndarray corners, win, # <<<<<<<<<<<<<<
|
|
* zero_zone=(-1, -1), int iterations=0,
|
|
* double epsilon=1e-5):
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvFindCornerSubPix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvFindCornerSubPix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
PyArrayObject *__pyx_v_corners = 0;
|
|
PyObject *__pyx_v_win = 0;
|
|
PyObject *__pyx_v_zero_zone = 0;
|
|
int __pyx_v_iterations;
|
|
double __pyx_v_epsilon;
|
|
int __pyx_v_count;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvPoint2D32f *__pyx_v_cvcorners;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvSize __pyx_v_cvwin;
|
|
int __pyx_v_imgheight;
|
|
int __pyx_v_imgwidth;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvSize __pyx_v_cvzerozone;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvTermCriteria __pyx_v_crit;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
Py_ssize_t __pyx_t_4;
|
|
int __pyx_t_5;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__corners,&__pyx_n_s__win,&__pyx_n_s__zero_zone,&__pyx_n_s__iterations,&__pyx_n_s__epsilon,0};
|
|
__Pyx_SetupRefcountContext("cvFindCornerSubPix");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[6] = {0,0,0,0,0,0};
|
|
values[3] = __pyx_k_2;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
|
|
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
|
|
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__corners);
|
|
if (likely(values[1])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvFindCornerSubPix", 0, 3, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 2:
|
|
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win);
|
|
if (likely(values[2])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvFindCornerSubPix", 0, 3, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 3:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__zero_zone);
|
|
if (unlikely(value)) { values[3] = value; kw_args--; }
|
|
}
|
|
case 4:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__iterations);
|
|
if (unlikely(value)) { values[4] = value; kw_args--; }
|
|
}
|
|
case 5:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__epsilon);
|
|
if (unlikely(value)) { values[5] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvFindCornerSubPix") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
__pyx_v_corners = ((PyArrayObject *)values[1]);
|
|
__pyx_v_win = values[2];
|
|
__pyx_v_zero_zone = values[3];
|
|
if (values[4]) {
|
|
__pyx_v_iterations = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_iterations == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_iterations = ((int)0);
|
|
}
|
|
if (values[5]) {
|
|
__pyx_v_epsilon = __pyx_PyFloat_AsDouble(values[5]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":673
|
|
* def cvFindCornerSubPix(np.ndarray src, np.ndarray corners, win,
|
|
* zero_zone=(-1, -1), int iterations=0,
|
|
* double epsilon=1e-5): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_v_epsilon = ((double)1.0000000000000001e-05);
|
|
}
|
|
} else {
|
|
__pyx_v_zero_zone = __pyx_k_2;
|
|
__pyx_v_iterations = ((int)0);
|
|
__pyx_v_epsilon = ((double)1.0000000000000001e-05);
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 6:
|
|
__pyx_v_epsilon = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 5)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 5:
|
|
__pyx_v_iterations = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 4)); if (unlikely((__pyx_v_iterations == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 4:
|
|
__pyx_v_zero_zone = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3:
|
|
__pyx_v_win = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
__pyx_v_corners = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
|
|
__pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvFindCornerSubPix", 0, 3, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvFindCornerSubPix");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__Pyx_INCREF((PyObject *)__pyx_v_corners);
|
|
__Pyx_INCREF(__pyx_v_win);
|
|
__Pyx_INCREF(__pyx_v_zero_zone);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_corners), __pyx_ptype_5numpy_ndarray, 1, "corners", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":675
|
|
* double epsilon=1e-5):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
* assert_nchannels(src, [1])
|
|
* assert_dtype(src, [UINT8])
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":676
|
|
*
|
|
* validate_array(src)
|
|
* assert_nchannels(src, [1]) # <<<<<<<<<<<<<<
|
|
* assert_dtype(src, [UINT8])
|
|
*
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_src, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":677
|
|
* validate_array(src)
|
|
* assert_nchannels(src, [1])
|
|
* assert_dtype(src, [UINT8]) # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(corners)
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":679
|
|
* assert_dtype(src, [UINT8])
|
|
*
|
|
* validate_array(corners) # <<<<<<<<<<<<<<
|
|
* assert_ndims(corners, [2])
|
|
* assert_dtype(corners, [FLOAT32])
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_corners); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":680
|
|
*
|
|
* validate_array(corners)
|
|
* assert_ndims(corners, [2]) # <<<<<<<<<<<<<<
|
|
* assert_dtype(corners, [FLOAT32])
|
|
*
|
|
*/
|
|
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_ndims(__pyx_v_corners, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":681
|
|
* validate_array(corners)
|
|
* assert_ndims(corners, [2])
|
|
* assert_dtype(corners, [FLOAT32]) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef int count = <int>(corners.shape[0] * corners.shape[1] / 2.)
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_corners, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":683
|
|
* assert_dtype(corners, [FLOAT32])
|
|
*
|
|
* cdef int count = <int>(corners.shape[0] * corners.shape[1] / 2.) # <<<<<<<<<<<<<<
|
|
* cdef CvPoint2D32f* cvcorners = array_as_cvPoint2D32f_ptr(corners)
|
|
*
|
|
*/
|
|
__pyx_v_count = ((int)(((__pyx_v_corners->dimensions[0]) * (__pyx_v_corners->dimensions[1])) / 2.0));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":684
|
|
*
|
|
* cdef int count = <int>(corners.shape[0] * corners.shape[1] / 2.)
|
|
* cdef CvPoint2D32f* cvcorners = array_as_cvPoint2D32f_ptr(corners) # <<<<<<<<<<<<<<
|
|
*
|
|
* if len(win) != 2:
|
|
*/
|
|
__pyx_v_cvcorners = __pyx_f_7scikits_5image_6opencv_14opencv_backend_array_as_cvPoint2D32f_ptr(__pyx_v_corners);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":686
|
|
* cdef CvPoint2D32f* cvcorners = array_as_cvPoint2D32f_ptr(corners)
|
|
*
|
|
* if len(win) != 2: # <<<<<<<<<<<<<<
|
|
* raise ValueError('win must be a 2-tuple')
|
|
* cdef CvSize cvwin
|
|
*/
|
|
__pyx_t_4 = PyObject_Length(__pyx_v_win); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_5 = (__pyx_t_4 != 2);
|
|
if (__pyx_t_5) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":687
|
|
*
|
|
* if len(win) != 2:
|
|
* raise ValueError('win must be a 2-tuple') # <<<<<<<<<<<<<<
|
|
* cdef CvSize cvwin
|
|
* cvwin.height = <int> win[0]
|
|
*/
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_3));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
|
|
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":689
|
|
* raise ValueError('win must be a 2-tuple')
|
|
* cdef CvSize cvwin
|
|
* cvwin.height = <int> win[0] # <<<<<<<<<<<<<<
|
|
* cvwin.width = <int> win[1]
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetItemInt(__pyx_v_win, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_cvwin.height = ((int)__pyx_t_1);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":690
|
|
* cdef CvSize cvwin
|
|
* cvwin.height = <int> win[0]
|
|
* cvwin.width = <int> win[1] # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef int imgheight = src.shape[0]
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetItemInt(__pyx_v_win, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_cvwin.width = ((int)__pyx_t_1);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":692
|
|
* cvwin.width = <int> win[1]
|
|
*
|
|
* cdef int imgheight = src.shape[0] # <<<<<<<<<<<<<<
|
|
* cdef int imgwidth = src.shape[1]
|
|
* if imgwidth < (cvwin.width * 2 + 5) or imgheight < (cvwin.height * 2 + 5):
|
|
*/
|
|
__pyx_v_imgheight = (__pyx_v_src->dimensions[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":693
|
|
*
|
|
* cdef int imgheight = src.shape[0]
|
|
* cdef int imgwidth = src.shape[1] # <<<<<<<<<<<<<<
|
|
* if imgwidth < (cvwin.width * 2 + 5) or imgheight < (cvwin.height * 2 + 5):
|
|
* raise ValueError('The window is too large.')
|
|
*/
|
|
__pyx_v_imgwidth = (__pyx_v_src->dimensions[1]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":694
|
|
* cdef int imgheight = src.shape[0]
|
|
* cdef int imgwidth = src.shape[1]
|
|
* if imgwidth < (cvwin.width * 2 + 5) or imgheight < (cvwin.height * 2 + 5): # <<<<<<<<<<<<<<
|
|
* raise ValueError('The window is too large.')
|
|
*
|
|
*/
|
|
if (!(__pyx_v_imgwidth < ((__pyx_v_cvwin.width * 2) + 5))) {
|
|
__pyx_t_5 = (__pyx_v_imgheight < ((__pyx_v_cvwin.height * 2) + 5));
|
|
} else {
|
|
__pyx_t_5 = (__pyx_v_imgwidth < ((__pyx_v_cvwin.width * 2) + 5));
|
|
}
|
|
if (__pyx_t_5) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":695
|
|
* cdef int imgwidth = src.shape[1]
|
|
* if imgwidth < (cvwin.width * 2 + 5) or imgheight < (cvwin.height * 2 + 5):
|
|
* raise ValueError('The window is too large.') # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef CvSize cvzerozone
|
|
*/
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_4));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_4));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
|
|
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_Raise(__pyx_t_2, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L7;
|
|
}
|
|
__pyx_L7:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":698
|
|
*
|
|
* cdef CvSize cvzerozone
|
|
* cvzerozone.height = <int> zero_zone[0] # <<<<<<<<<<<<<<
|
|
* cvzerozone.width = <int> zero_zone[1]
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_zero_zone, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v_cvzerozone.height = ((int)__pyx_t_1);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":699
|
|
* cdef CvSize cvzerozone
|
|
* cvzerozone.height = <int> zero_zone[0]
|
|
* cvzerozone.width = <int> zero_zone[1] # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_zero_zone, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v_cvzerozone.width = ((int)__pyx_t_1);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":702
|
|
*
|
|
* cdef IplImage srcimg
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef CvTermCriteria crit
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":705
|
|
*
|
|
* cdef CvTermCriteria crit
|
|
* crit = get_cvTermCriteria(iterations, epsilon) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvFindCornerSubPix(&srcimg, cvcorners, count, cvwin, cvzerozone, crit)
|
|
*/
|
|
__pyx_v_crit = __pyx_f_7scikits_5image_6opencv_14opencv_backend_get_cvTermCriteria(__pyx_v_iterations, __pyx_v_epsilon);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":707
|
|
* crit = get_cvTermCriteria(iterations, epsilon)
|
|
*
|
|
* c_cvFindCornerSubPix(&srcimg, cvcorners, count, cvwin, cvzerozone, crit) # <<<<<<<<<<<<<<
|
|
*
|
|
* return None
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvFindCornerSubPix((&__pyx_v_srcimg), __pyx_v_cvcorners, __pyx_v_count, __pyx_v_cvwin, __pyx_v_cvzerozone, __pyx_v_crit);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":709
|
|
* c_cvFindCornerSubPix(&srcimg, cvcorners, count, cvwin, cvzerozone, crit)
|
|
*
|
|
* return None # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(Py_None);
|
|
__pyx_r = Py_None;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvFindCornerSubPix");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_corners);
|
|
__Pyx_DECREF(__pyx_v_win);
|
|
__Pyx_DECREF(__pyx_v_zero_zone);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":756
|
|
* algorithm. It also insures that features are distanced
|
|
* from one another by at least min_distance.''')
|
|
* def cvGoodFeaturesToTrack(np.ndarray src, int corner_count, # <<<<<<<<<<<<<<
|
|
* double quality_level, double min_distance,
|
|
* int block_size=3, int use_harris=0, double k=0.04):
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvGoodFeaturesToTrack(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvGoodFeaturesToTrack(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
int __pyx_v_corner_count;
|
|
double __pyx_v_quality_level;
|
|
double __pyx_v_min_distance;
|
|
int __pyx_v_block_size;
|
|
int __pyx_v_use_harris;
|
|
double __pyx_v_k;
|
|
PyArrayObject *__pyx_v_eig = 0;
|
|
PyArrayObject *__pyx_v_temp = 0;
|
|
npy_intp __pyx_v_cornershape[2];
|
|
PyArrayObject *__pyx_v_out = 0;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvPoint2D32f *__pyx_v_cvcorners;
|
|
int __pyx_v_ncorners_found;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_eigimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_tempimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *__pyx_v_maskimg;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__corner_count,&__pyx_n_s__quality_level,&__pyx_n_s__min_distance,&__pyx_n_s__block_size,&__pyx_n_s__use_harris,&__pyx_n_s__k,0};
|
|
__Pyx_SetupRefcountContext("cvGoodFeaturesToTrack");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[7] = {0,0,0,0,0,0,0};
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
|
|
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
|
|
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
|
|
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__corner_count);
|
|
if (likely(values[1])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvGoodFeaturesToTrack", 0, 4, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 2:
|
|
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__quality_level);
|
|
if (likely(values[2])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvGoodFeaturesToTrack", 0, 4, 7, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 3:
|
|
values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__min_distance);
|
|
if (likely(values[3])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvGoodFeaturesToTrack", 0, 4, 7, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 4:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__block_size);
|
|
if (unlikely(value)) { values[4] = value; kw_args--; }
|
|
}
|
|
case 5:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_harris);
|
|
if (unlikely(value)) { values[5] = value; kw_args--; }
|
|
}
|
|
case 6:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__k);
|
|
if (unlikely(value)) { values[6] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvGoodFeaturesToTrack") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
__pyx_v_corner_count = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_corner_count == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_v_quality_level = __pyx_PyFloat_AsDouble(values[2]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_v_min_distance = __pyx_PyFloat_AsDouble(values[3]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
if (values[4]) {
|
|
__pyx_v_block_size = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_block_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_block_size = ((int)3);
|
|
}
|
|
if (values[5]) {
|
|
__pyx_v_use_harris = __Pyx_PyInt_AsInt(values[5]); if (unlikely((__pyx_v_use_harris == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_use_harris = ((int)0);
|
|
}
|
|
if (values[6]) {
|
|
__pyx_v_k = __pyx_PyFloat_AsDouble(values[6]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":758
|
|
* def cvGoodFeaturesToTrack(np.ndarray src, int corner_count,
|
|
* double quality_level, double min_distance,
|
|
* int block_size=3, int use_harris=0, double k=0.04): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_v_k = ((double)0.040000000000000001);
|
|
}
|
|
} else {
|
|
__pyx_v_block_size = ((int)3);
|
|
__pyx_v_use_harris = ((int)0);
|
|
__pyx_v_k = ((double)0.040000000000000001);
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 7:
|
|
__pyx_v_k = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 6)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 6:
|
|
__pyx_v_use_harris = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 5)); if (unlikely((__pyx_v_use_harris == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 5:
|
|
__pyx_v_block_size = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 4)); if (unlikely((__pyx_v_block_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 4:
|
|
__pyx_v_min_distance = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_v_quality_level = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_v_corner_count = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_corner_count == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvGoodFeaturesToTrack", 0, 4, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvGoodFeaturesToTrack");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":760
|
|
* int block_size=3, int use_harris=0, double k=0.04):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
* assert_dtype(src, [UINT8, FLOAT32])
|
|
* assert_nchannels(src, [1])
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":761
|
|
*
|
|
* validate_array(src)
|
|
* assert_dtype(src, [UINT8, FLOAT32]) # <<<<<<<<<<<<<<
|
|
* assert_nchannels(src, [1])
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
|
|
PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, ((PyObject *)__pyx_t_4)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":762
|
|
* validate_array(src)
|
|
* assert_dtype(src, [UINT8, FLOAT32])
|
|
* assert_nchannels(src, [1]) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray eig = new_array_like_diff_dtype(src, FLOAT32)
|
|
*/
|
|
__pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_src, ((PyObject *)__pyx_t_4)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":764
|
|
* assert_nchannels(src, [1])
|
|
*
|
|
* cdef np.ndarray eig = new_array_like_diff_dtype(src, FLOAT32) # <<<<<<<<<<<<<<
|
|
* cdef np.ndarray temp = new_array_like(eig)
|
|
*
|
|
*/
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_3 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like_diff_dtype(__pyx_v_src, __pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_v_eig = ((PyArrayObject *)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":765
|
|
*
|
|
* cdef np.ndarray eig = new_array_like_diff_dtype(src, FLOAT32)
|
|
* cdef np.ndarray temp = new_array_like(eig) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.npy_intp cornershape[2]
|
|
*/
|
|
__pyx_t_3 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like(__pyx_v_eig)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_v_temp = ((PyArrayObject *)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":768
|
|
*
|
|
* cdef np.npy_intp cornershape[2]
|
|
* cornershape[0] = <np.npy_intp>corner_count # <<<<<<<<<<<<<<
|
|
* cornershape[1] = 2
|
|
*
|
|
*/
|
|
(__pyx_v_cornershape[0]) = ((npy_intp)__pyx_v_corner_count);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":769
|
|
* cdef np.npy_intp cornershape[2]
|
|
* cornershape[0] = <np.npy_intp>corner_count
|
|
* cornershape[1] = 2 # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out = new_array(2, cornershape, FLOAT32)
|
|
*/
|
|
(__pyx_v_cornershape[1]) = 2;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":771
|
|
* cornershape[1] = 2
|
|
*
|
|
* cdef np.ndarray out = new_array(2, cornershape, FLOAT32) # <<<<<<<<<<<<<<
|
|
* cdef CvPoint2D32f* cvcorners = array_as_cvPoint2D32f_ptr(out)
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array(2, __pyx_v_cornershape, __pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":772
|
|
*
|
|
* cdef np.ndarray out = new_array(2, cornershape, FLOAT32)
|
|
* cdef CvPoint2D32f* cvcorners = array_as_cvPoint2D32f_ptr(out) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef int ncorners_found
|
|
*/
|
|
__pyx_v_cvcorners = __pyx_f_7scikits_5image_6opencv_14opencv_backend_array_as_cvPoint2D32f_ptr(__pyx_v_out);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":775
|
|
*
|
|
* cdef int ncorners_found
|
|
* ncorners_found = corner_count # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_v_ncorners_found = __pyx_v_corner_count;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":782
|
|
* cdef IplImage *maskimg
|
|
*
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(eig, &eigimg)
|
|
* populate_iplimage(temp, &tempimg)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":783
|
|
*
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(eig, &eigimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(temp, &tempimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_eig, (&__pyx_v_eigimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":784
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(eig, &eigimg)
|
|
* populate_iplimage(temp, &tempimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* # don't need to support ROI. The user can just pass a slice.
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_temp, (&__pyx_v_tempimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":787
|
|
*
|
|
* # don't need to support ROI. The user can just pass a slice.
|
|
* maskimg = NULL # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvGoodFeaturesToTrack(&srcimg, &eigimg, &tempimg, cvcorners,
|
|
*/
|
|
__pyx_v_maskimg = NULL;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":792
|
|
* &ncorners_found, quality_level, min_distance,
|
|
* maskimg, block_size,
|
|
* use_harris, k) # <<<<<<<<<<<<<<
|
|
*
|
|
* return out[:ncorners_found]
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvGoodFeaturesToTrack((&__pyx_v_srcimg), (&__pyx_v_eigimg), (&__pyx_v_tempimg), __pyx_v_cvcorners, (&__pyx_v_ncorners_found), __pyx_v_quality_level, __pyx_v_min_distance, __pyx_v_maskimg, __pyx_v_block_size, __pyx_v_use_harris, __pyx_v_k);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":794
|
|
* use_harris, k)
|
|
*
|
|
* return out[:ncorners_found] # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_4 = PySequence_GetSlice(((PyObject *)__pyx_v_out), 0, __pyx_v_ncorners_found); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvGoodFeaturesToTrack");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_eig);
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_temp);
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":829
|
|
* may extend beyond the image. Border replication is used
|
|
* to fill in missing pixels.''')
|
|
* def cvGetRectSubPix(np.ndarray src, size, center): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvGetRectSubPix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvGetRectSubPix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
PyObject *__pyx_v_size = 0;
|
|
PyObject *__pyx_v_center = 0;
|
|
npy_intp *__pyx_v_shape;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvPoint2D32f __pyx_v_cvcenter;
|
|
PyArrayObject *__pyx_v_out = 0;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
npy_intp __pyx_t_3;
|
|
float __pyx_t_4;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__size,&__pyx_n_s__center,0};
|
|
__Pyx_SetupRefcountContext("cvGetRectSubPix");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[3] = {0,0,0};
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size);
|
|
if (likely(values[1])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvGetRectSubPix", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 2:
|
|
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__center);
|
|
if (likely(values[2])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvGetRectSubPix", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvGetRectSubPix") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
__pyx_v_size = values[1];
|
|
__pyx_v_center = values[2];
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
__pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
__pyx_v_size = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
__pyx_v_center = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvGetRectSubPix", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvGetRectSubPix");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":831
|
|
* def cvGetRectSubPix(np.ndarray src, size, center):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.npy_intp* shape = clone_array_shape(src)
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":833
|
|
* validate_array(src)
|
|
*
|
|
* cdef np.npy_intp* shape = clone_array_shape(src) # <<<<<<<<<<<<<<
|
|
* shape[0] = <np.npy_intp>size[0]
|
|
* shape[1] = <np.npy_intp>size[1]
|
|
*/
|
|
__pyx_v_shape = __pyx_f_7scikits_5image_6opencv_14opencv_backend_clone_array_shape(__pyx_v_src);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":834
|
|
*
|
|
* cdef np.npy_intp* shape = clone_array_shape(src)
|
|
* shape[0] = <np.npy_intp>size[0] # <<<<<<<<<<<<<<
|
|
* shape[1] = <np.npy_intp>size[1]
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_size, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyInt_from_py_npy_intp(__pyx_t_2); if (unlikely((__pyx_t_3 == (npy_intp)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
(__pyx_v_shape[0]) = ((npy_intp)__pyx_t_3);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":835
|
|
* cdef np.npy_intp* shape = clone_array_shape(src)
|
|
* shape[0] = <np.npy_intp>size[0]
|
|
* shape[1] = <np.npy_intp>size[1] # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef CvPoint2D32f cvcenter
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_size, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyInt_from_py_npy_intp(__pyx_t_2); if (unlikely((__pyx_t_3 == (npy_intp)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
(__pyx_v_shape[1]) = ((npy_intp)__pyx_t_3);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":838
|
|
*
|
|
* cdef CvPoint2D32f cvcenter
|
|
* cvcenter.x = <float>center[0] # <<<<<<<<<<<<<<
|
|
* cvcenter.y = <float>center[1]
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_center, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v_cvcenter.x = ((float)__pyx_t_4);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":839
|
|
* cdef CvPoint2D32f cvcenter
|
|
* cvcenter.x = <float>center[0]
|
|
* cvcenter.y = <float>center[1] # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out = new_array(src.ndim, shape, src.dtype)
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_center, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v_cvcenter.y = ((float)__pyx_t_4);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":841
|
|
* cvcenter.y = <float>center[1]
|
|
*
|
|
* cdef np.ndarray out = new_array(src.ndim, shape, src.dtype) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_src), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array(__pyx_v_src->nd, __pyx_v_shape, __pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":845
|
|
* cdef IplImage srcimg
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":846
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvGetRectSubPix(&srcimg, &outimg, cvcenter)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":848
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
* c_cvGetRectSubPix(&srcimg, &outimg, cvcenter) # <<<<<<<<<<<<<<
|
|
*
|
|
* PyMem_Free(shape)
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvGetRectSubPix((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_cvcenter);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":850
|
|
* c_cvGetRectSubPix(&srcimg, &outimg, cvcenter)
|
|
*
|
|
* PyMem_Free(shape) # <<<<<<<<<<<<<<
|
|
*
|
|
* return out
|
|
*/
|
|
PyMem_Free(__pyx_v_shape);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":852
|
|
* PyMem_Free(shape)
|
|
*
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvGetRectSubPix");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":893
|
|
* and should be used unless specific feature of that
|
|
* function are required.''')
|
|
* def cvGetQuadrangleSubPix(np.ndarray src, np.ndarray warpmat, float_out=False): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvGetQuadrangleSubPix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvGetQuadrangleSubPix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
PyArrayObject *__pyx_v_warpmat = 0;
|
|
PyObject *__pyx_v_float_out = 0;
|
|
PyArrayObject *__pyx_v_out;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_cvmat;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *__pyx_v_cvmatptr;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__warpmat,&__pyx_n_s__float_out,0};
|
|
__Pyx_SetupRefcountContext("cvGetQuadrangleSubPix");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[3] = {0,0,0};
|
|
values[2] = __pyx_k_5;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__warpmat);
|
|
if (likely(values[1])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvGetQuadrangleSubPix", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 2:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__float_out);
|
|
if (unlikely(value)) { values[2] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvGetQuadrangleSubPix") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
__pyx_v_warpmat = ((PyArrayObject *)values[1]);
|
|
__pyx_v_float_out = values[2];
|
|
} else {
|
|
__pyx_v_float_out = __pyx_k_5;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 3:
|
|
__pyx_v_float_out = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2:
|
|
__pyx_v_warpmat = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
|
|
__pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvGetQuadrangleSubPix", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvGetQuadrangleSubPix");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__Pyx_INCREF((PyObject *)__pyx_v_warpmat);
|
|
__Pyx_INCREF(__pyx_v_float_out);
|
|
__pyx_v_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_warpmat), __pyx_ptype_5numpy_ndarray, 1, "warpmat", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":895
|
|
* def cvGetQuadrangleSubPix(np.ndarray src, np.ndarray warpmat, float_out=False):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
* validate_array(warpmat)
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":896
|
|
*
|
|
* validate_array(src)
|
|
* validate_array(warpmat) # <<<<<<<<<<<<<<
|
|
*
|
|
* assert_nchannels(src, [1, 3])
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_warpmat); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":898
|
|
* validate_array(warpmat)
|
|
*
|
|
* assert_nchannels(src, [1, 3]) # <<<<<<<<<<<<<<
|
|
*
|
|
* assert_nchannels(warpmat, [1])
|
|
*/
|
|
__pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_src, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":900
|
|
* assert_nchannels(src, [1, 3])
|
|
*
|
|
* assert_nchannels(warpmat, [1]) # <<<<<<<<<<<<<<
|
|
*
|
|
* if warpmat.shape[0] != 2 or warpmat.shape[1] != 3:
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_warpmat, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":902
|
|
* assert_nchannels(warpmat, [1])
|
|
*
|
|
* if warpmat.shape[0] != 2 or warpmat.shape[1] != 3: # <<<<<<<<<<<<<<
|
|
* raise ValueError('warpmat must be 2x3')
|
|
*
|
|
*/
|
|
if (!((__pyx_v_warpmat->dimensions[0]) != 2)) {
|
|
__pyx_t_3 = ((__pyx_v_warpmat->dimensions[1]) != 3);
|
|
} else {
|
|
__pyx_t_3 = ((__pyx_v_warpmat->dimensions[0]) != 2);
|
|
}
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":903
|
|
*
|
|
* if warpmat.shape[0] != 2 or warpmat.shape[1] != 3:
|
|
* raise ValueError('warpmat must be 2x3') # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out
|
|
*/
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
|
|
__pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_4, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":907
|
|
* cdef np.ndarray out
|
|
*
|
|
* if float_out: # <<<<<<<<<<<<<<
|
|
* assert_dtype(src, [UINT8])
|
|
* out = new_array_like_diff_dtype(src, FLOAT32)
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_float_out); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":908
|
|
*
|
|
* if float_out:
|
|
* assert_dtype(src, [UINT8]) # <<<<<<<<<<<<<<
|
|
* out = new_array_like_diff_dtype(src, FLOAT32)
|
|
* else:
|
|
*/
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":909
|
|
* if float_out:
|
|
* assert_dtype(src, [UINT8])
|
|
* out = new_array_like_diff_dtype(src, FLOAT32) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* out = new_array_like(src)
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like_diff_dtype(__pyx_v_src, __pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L7;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":911
|
|
* out = new_array_like_diff_dtype(src, FLOAT32)
|
|
* else:
|
|
* out = new_array_like(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_4 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like(__pyx_v_src)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
}
|
|
__pyx_L7:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":918
|
|
* cdef CvMat* cvmatptr
|
|
*
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
* populate_iplimage(warpmat, &cvmat)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":919
|
|
*
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(warpmat, &cvmat)
|
|
* cvmatptr = cvmat_ptr_from_iplimage(&cvmat)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":920
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg)
|
|
* populate_iplimage(warpmat, &cvmat) # <<<<<<<<<<<<<<
|
|
* cvmatptr = cvmat_ptr_from_iplimage(&cvmat)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_warpmat, (&__pyx_v_cvmat));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":921
|
|
* populate_iplimage(out, &outimg)
|
|
* populate_iplimage(warpmat, &cvmat)
|
|
* cvmatptr = cvmat_ptr_from_iplimage(&cvmat) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvGetQuadrangleSubPix(&srcimg, &outimg, cvmatptr)
|
|
*/
|
|
__pyx_v_cvmatptr = __pyx_f_7scikits_5image_6opencv_14opencv_backend_cvmat_ptr_from_iplimage((&__pyx_v_cvmat));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":923
|
|
* cvmatptr = cvmat_ptr_from_iplimage(&cvmat)
|
|
*
|
|
* c_cvGetQuadrangleSubPix(&srcimg, &outimg, cvmatptr) # <<<<<<<<<<<<<<
|
|
*
|
|
* PyMem_Free(cvmatptr)
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvGetQuadrangleSubPix((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_cvmatptr);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":925
|
|
* c_cvGetQuadrangleSubPix(&srcimg, &outimg, cvmatptr)
|
|
*
|
|
* PyMem_Free(cvmatptr) # <<<<<<<<<<<<<<
|
|
*
|
|
* return out
|
|
*/
|
|
PyMem_Free(__pyx_v_cvmatptr);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":927
|
|
* PyMem_Free(cvmatptr)
|
|
*
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvGetQuadrangleSubPix");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_warpmat);
|
|
__Pyx_DECREF(__pyx_v_float_out);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":957
|
|
* out : ndarray
|
|
* The resized image.''')
|
|
* def cvResize(np.ndarray src, size, int method=CV_INTER_LINEAR): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvResize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvResize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
PyObject *__pyx_v_size = 0;
|
|
int __pyx_v_method;
|
|
int __pyx_v_ndim;
|
|
npy_intp *__pyx_v_shape;
|
|
PyArrayObject *__pyx_v_out = 0;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
Py_ssize_t __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
int __pyx_t_7;
|
|
int __pyx_t_8;
|
|
npy_intp __pyx_t_9;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__size,&__pyx_n_s__method,0};
|
|
__Pyx_SetupRefcountContext("cvResize");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[3] = {0,0,0};
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size);
|
|
if (likely(values[1])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvResize", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 2:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__method);
|
|
if (unlikely(value)) { values[2] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvResize") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
__pyx_v_size = values[1];
|
|
if (values[2]) {
|
|
__pyx_v_method = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_method == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_method = __pyx_k_7;
|
|
}
|
|
} else {
|
|
__pyx_v_method = __pyx_k_7;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 3:
|
|
__pyx_v_method = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_method == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 2:
|
|
__pyx_v_size = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
__pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvResize", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvResize");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__Pyx_INCREF(__pyx_v_size);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":959
|
|
* def cvResize(np.ndarray src, size, int method=CV_INTER_LINEAR):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* if len(size) != 2:
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":961
|
|
* validate_array(src)
|
|
*
|
|
* if len(size) != 2: # <<<<<<<<<<<<<<
|
|
* raise ValueError('size must be a 2-tuple (height, width)')
|
|
*
|
|
*/
|
|
__pyx_t_2 = PyObject_Length(__pyx_v_size); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_3 = (__pyx_t_2 != 2);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":962
|
|
*
|
|
* if len(size) != 2:
|
|
* raise ValueError('size must be a 2-tuple (height, width)') # <<<<<<<<<<<<<<
|
|
*
|
|
* if method not in [CV_INTER_NN, CV_INTER_LINEAR, CV_INTER_AREA,
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_8));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_8));
|
|
__pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_5, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":964
|
|
* raise ValueError('size must be a 2-tuple (height, width)')
|
|
*
|
|
* if method not in [CV_INTER_NN, CV_INTER_LINEAR, CV_INTER_AREA, # <<<<<<<<<<<<<<
|
|
* CV_INTER_CUBIC]:
|
|
* raise ValueError('unsupported interpolation type')
|
|
*/
|
|
__pyx_t_1 = __pyx_v_method;
|
|
__pyx_t_5 = PyInt_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_INTER_NN); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_NE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (((int)__pyx_t_3)) {
|
|
__pyx_t_6 = PyInt_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_INTER_LINEAR); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_NE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_7 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_8 = ((int)__pyx_t_7);
|
|
} else {
|
|
__pyx_t_8 = ((int)__pyx_t_3);
|
|
}
|
|
if (__pyx_t_8) {
|
|
__pyx_t_5 = PyInt_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_INTER_AREA); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_NE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_7 = ((int)__pyx_t_3);
|
|
} else {
|
|
__pyx_t_7 = __pyx_t_8;
|
|
}
|
|
if (__pyx_t_7) {
|
|
__pyx_t_6 = PyInt_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":965
|
|
*
|
|
* if method not in [CV_INTER_NN, CV_INTER_LINEAR, CV_INTER_AREA,
|
|
* CV_INTER_CUBIC]: # <<<<<<<<<<<<<<
|
|
* raise ValueError('unsupported interpolation type')
|
|
*
|
|
*/
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_INTER_CUBIC); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_NE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_3 = ((int)__pyx_t_8);
|
|
} else {
|
|
__pyx_t_3 = __pyx_t_7;
|
|
}
|
|
__pyx_t_7 = __pyx_t_3;
|
|
if (__pyx_t_7) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":966
|
|
* if method not in [CV_INTER_NN, CV_INTER_LINEAR, CV_INTER_AREA,
|
|
* CV_INTER_CUBIC]:
|
|
* raise ValueError('unsupported interpolation type') # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef int ndim = src.ndim
|
|
*/
|
|
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
|
|
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_9));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
|
|
__pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_Raise(__pyx_t_4, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L7;
|
|
}
|
|
__pyx_L7:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":968
|
|
* raise ValueError('unsupported interpolation type')
|
|
*
|
|
* cdef int ndim = src.ndim # <<<<<<<<<<<<<<
|
|
* cdef np.npy_intp* shape = clone_array_shape(src)
|
|
* shape[0] = <np.npy_intp>size[0]
|
|
*/
|
|
__pyx_v_ndim = __pyx_v_src->nd;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":969
|
|
*
|
|
* cdef int ndim = src.ndim
|
|
* cdef np.npy_intp* shape = clone_array_shape(src) # <<<<<<<<<<<<<<
|
|
* shape[0] = <np.npy_intp>size[0]
|
|
* shape[1] = <np.npy_intp>size[1]
|
|
*/
|
|
__pyx_v_shape = __pyx_f_7scikits_5image_6opencv_14opencv_backend_clone_array_shape(__pyx_v_src);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":970
|
|
* cdef int ndim = src.ndim
|
|
* cdef np.npy_intp* shape = clone_array_shape(src)
|
|
* shape[0] = <np.npy_intp>size[0] # <<<<<<<<<<<<<<
|
|
* shape[1] = <np.npy_intp>size[1]
|
|
*
|
|
*/
|
|
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_size, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_9 = __Pyx_PyInt_from_py_npy_intp(__pyx_t_4); if (unlikely((__pyx_t_9 == (npy_intp)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
(__pyx_v_shape[0]) = ((npy_intp)__pyx_t_9);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":971
|
|
* cdef np.npy_intp* shape = clone_array_shape(src)
|
|
* shape[0] = <np.npy_intp>size[0]
|
|
* shape[1] = <np.npy_intp>size[1] # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out = new_array(ndim, shape, src.dtype)
|
|
*/
|
|
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_size, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_9 = __Pyx_PyInt_from_py_npy_intp(__pyx_t_4); if (unlikely((__pyx_t_9 == (npy_intp)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
(__pyx_v_shape[1]) = ((npy_intp)__pyx_t_9);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":973
|
|
* shape[1] = <np.npy_intp>size[1]
|
|
*
|
|
* cdef np.ndarray out = new_array(ndim, shape, src.dtype) # <<<<<<<<<<<<<<
|
|
* validate_array(out)
|
|
*
|
|
*/
|
|
__pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_src), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array(__pyx_v_ndim, __pyx_v_shape, __pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":974
|
|
*
|
|
* cdef np.ndarray out = new_array(ndim, shape, src.dtype)
|
|
* validate_array(out) # <<<<<<<<<<<<<<
|
|
*
|
|
* PyMem_Free(shape)
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_out); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":976
|
|
* validate_array(out)
|
|
*
|
|
* PyMem_Free(shape) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
PyMem_Free(__pyx_v_shape);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":980
|
|
* cdef IplImage srcimg
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":981
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvResize(&srcimg, &outimg, method)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":983
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
* c_cvResize(&srcimg, &outimg, method) # <<<<<<<<<<<<<<
|
|
*
|
|
* return out
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvResize((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_method);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":985
|
|
* c_cvResize(&srcimg, &outimg, method)
|
|
*
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvResize");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_DECREF(__pyx_v_size);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1036
|
|
* and that function should be used instead, unless specific
|
|
* features of this function are needed.''')
|
|
* def cvWarpAffine(np.ndarray src, np.ndarray warpmat, # <<<<<<<<<<<<<<
|
|
* int flag=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS,
|
|
* fillval=(0., 0., 0., 0.)):
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvWarpAffine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvWarpAffine(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
PyArrayObject *__pyx_v_warpmat = 0;
|
|
int __pyx_v_flag;
|
|
PyObject *__pyx_v_fillval = 0;
|
|
PyObject *__pyx_v_valid_flags;
|
|
PyArrayObject *__pyx_v_out;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvScalar __pyx_v_cvfill;
|
|
int __pyx_v_i;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_cvmat;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *__pyx_v_cvmatptr;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
Py_ssize_t __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
double __pyx_t_6;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__warpmat,&__pyx_n_s__flag,&__pyx_n_s__fillval,0};
|
|
__Pyx_SetupRefcountContext("cvWarpAffine");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[4] = {0,0,0,0};
|
|
values[3] = __pyx_k_10;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__warpmat);
|
|
if (likely(values[1])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvWarpAffine", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 2:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__flag);
|
|
if (unlikely(value)) { values[2] = value; kw_args--; }
|
|
}
|
|
case 3:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fillval);
|
|
if (unlikely(value)) { values[3] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvWarpAffine") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
__pyx_v_warpmat = ((PyArrayObject *)values[1]);
|
|
if (values[2]) {
|
|
__pyx_v_flag = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_flag == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_flag = __pyx_k_11;
|
|
}
|
|
__pyx_v_fillval = values[3];
|
|
} else {
|
|
__pyx_v_flag = __pyx_k_11;
|
|
__pyx_v_fillval = __pyx_k_10;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 4:
|
|
__pyx_v_fillval = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3:
|
|
__pyx_v_flag = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_flag == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 2:
|
|
__pyx_v_warpmat = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
|
|
__pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvWarpAffine", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvWarpAffine");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__Pyx_INCREF((PyObject *)__pyx_v_warpmat);
|
|
__Pyx_INCREF(__pyx_v_fillval);
|
|
__pyx_v_valid_flags = Py_None; __Pyx_INCREF(Py_None);
|
|
__pyx_v_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_warpmat), __pyx_ptype_5numpy_ndarray, 1, "warpmat", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1040
|
|
* fillval=(0., 0., 0., 0.)):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
* validate_array(warpmat)
|
|
* if len(fillval) != 4:
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1041
|
|
*
|
|
* validate_array(src)
|
|
* validate_array(warpmat) # <<<<<<<<<<<<<<
|
|
* if len(fillval) != 4:
|
|
* raise ValueError('fillval must be a 4-tuple')
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_warpmat); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1042
|
|
* validate_array(src)
|
|
* validate_array(warpmat)
|
|
* if len(fillval) != 4: # <<<<<<<<<<<<<<
|
|
* raise ValueError('fillval must be a 4-tuple')
|
|
* assert_nchannels(src, [1, 3])
|
|
*/
|
|
__pyx_t_2 = PyObject_Length(__pyx_v_fillval); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_3 = (__pyx_t_2 != 4);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1043
|
|
* validate_array(warpmat)
|
|
* if len(fillval) != 4:
|
|
* raise ValueError('fillval must be a 4-tuple') # <<<<<<<<<<<<<<
|
|
* assert_nchannels(src, [1, 3])
|
|
* assert_nchannels(warpmat, [1])
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_12));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_12));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_12));
|
|
__pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_5, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1044
|
|
* if len(fillval) != 4:
|
|
* raise ValueError('fillval must be a 4-tuple')
|
|
* assert_nchannels(src, [1, 3]) # <<<<<<<<<<<<<<
|
|
* assert_nchannels(warpmat, [1])
|
|
*
|
|
*/
|
|
__pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_src, ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1045
|
|
* raise ValueError('fillval must be a 4-tuple')
|
|
* assert_nchannels(src, [1, 3])
|
|
* assert_nchannels(warpmat, [1]) # <<<<<<<<<<<<<<
|
|
*
|
|
* if warpmat.shape[0] != 2 or warpmat.shape[1] != 3:
|
|
*/
|
|
__pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_warpmat, ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1047
|
|
* assert_nchannels(warpmat, [1])
|
|
*
|
|
* if warpmat.shape[0] != 2 or warpmat.shape[1] != 3: # <<<<<<<<<<<<<<
|
|
* raise ValueError('warpmat must be 2x3')
|
|
*
|
|
*/
|
|
if (!((__pyx_v_warpmat->dimensions[0]) != 2)) {
|
|
__pyx_t_3 = ((__pyx_v_warpmat->dimensions[1]) != 3);
|
|
} else {
|
|
__pyx_t_3 = ((__pyx_v_warpmat->dimensions[0]) != 2);
|
|
}
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1048
|
|
*
|
|
* if warpmat.shape[0] != 2 or warpmat.shape[1] != 3:
|
|
* raise ValueError('warpmat must be 2x3') # <<<<<<<<<<<<<<
|
|
*
|
|
* valid_flags = [0, 1, 2, 3, 8, 16, 9, 17, 11, 19, 10, 18]
|
|
*/
|
|
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
|
|
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
|
|
__pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_Raise(__pyx_t_4, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L7;
|
|
}
|
|
__pyx_L7:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1050
|
|
* raise ValueError('warpmat must be 2x3')
|
|
*
|
|
* valid_flags = [0, 1, 2, 3, 8, 16, 9, 17, 11, 19, 10, 18] # <<<<<<<<<<<<<<
|
|
* if flag not in valid_flags:
|
|
* raise ValueError('unsupported flag combination')
|
|
*/
|
|
__pyx_t_4 = PyList_New(12); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
|
|
__Pyx_INCREF(__pyx_int_0);
|
|
PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_0);
|
|
__Pyx_GIVEREF(__pyx_int_0);
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_4, 1, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_4, 2, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_4, 3, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_8);
|
|
PyList_SET_ITEM(__pyx_t_4, 4, __pyx_int_8);
|
|
__Pyx_GIVEREF(__pyx_int_8);
|
|
__Pyx_INCREF(__pyx_int_16);
|
|
PyList_SET_ITEM(__pyx_t_4, 5, __pyx_int_16);
|
|
__Pyx_GIVEREF(__pyx_int_16);
|
|
__Pyx_INCREF(__pyx_int_9);
|
|
PyList_SET_ITEM(__pyx_t_4, 6, __pyx_int_9);
|
|
__Pyx_GIVEREF(__pyx_int_9);
|
|
__Pyx_INCREF(__pyx_int_17);
|
|
PyList_SET_ITEM(__pyx_t_4, 7, __pyx_int_17);
|
|
__Pyx_GIVEREF(__pyx_int_17);
|
|
__Pyx_INCREF(__pyx_int_11);
|
|
PyList_SET_ITEM(__pyx_t_4, 8, __pyx_int_11);
|
|
__Pyx_GIVEREF(__pyx_int_11);
|
|
__Pyx_INCREF(__pyx_int_19);
|
|
PyList_SET_ITEM(__pyx_t_4, 9, __pyx_int_19);
|
|
__Pyx_GIVEREF(__pyx_int_19);
|
|
__Pyx_INCREF(__pyx_int_10);
|
|
PyList_SET_ITEM(__pyx_t_4, 10, __pyx_int_10);
|
|
__Pyx_GIVEREF(__pyx_int_10);
|
|
__Pyx_INCREF(__pyx_int_18);
|
|
PyList_SET_ITEM(__pyx_t_4, 11, __pyx_int_18);
|
|
__Pyx_GIVEREF(__pyx_int_18);
|
|
__Pyx_DECREF(__pyx_v_valid_flags);
|
|
__pyx_v_valid_flags = ((PyObject *)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1051
|
|
*
|
|
* valid_flags = [0, 1, 2, 3, 8, 16, 9, 17, 11, 19, 10, 18]
|
|
* if flag not in valid_flags: # <<<<<<<<<<<<<<
|
|
* raise ValueError('unsupported flag combination')
|
|
*
|
|
*/
|
|
__pyx_t_4 = PyInt_FromLong(__pyx_v_flag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_3 = (!PySequence_Contains(__pyx_v_valid_flags, __pyx_t_4)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1052
|
|
* valid_flags = [0, 1, 2, 3, 8, 16, 9, 17, 11, 19, 10, 18]
|
|
* if flag not in valid_flags:
|
|
* raise ValueError('unsupported flag combination') # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_13));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_13));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_13));
|
|
__pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_5, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L8;
|
|
}
|
|
__pyx_L8:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1055
|
|
*
|
|
* cdef np.ndarray out
|
|
* out = new_array_like(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef CvScalar cvfill
|
|
*/
|
|
__pyx_t_5 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like(__pyx_v_src)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1059
|
|
* cdef CvScalar cvfill
|
|
* cdef int i
|
|
* for i in range(4): # <<<<<<<<<<<<<<
|
|
* cvfill.val[i] = <double>fillval[i]
|
|
*
|
|
*/
|
|
for (__pyx_t_1 = 0; __pyx_t_1 < 4; __pyx_t_1+=1) {
|
|
__pyx_v_i = __pyx_t_1;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1060
|
|
* cdef int i
|
|
* for i in range(4):
|
|
* cvfill.val[i] = <double>fillval[i] # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetItemInt(__pyx_v_fillval, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
(__pyx_v_cvfill.val[__pyx_v_i]) = ((double)__pyx_t_6);
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1067
|
|
* cdef CvMat* cvmatptr
|
|
*
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
* populate_iplimage(warpmat, &cvmat)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1068
|
|
*
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(warpmat, &cvmat)
|
|
* cvmatptr = cvmat_ptr_from_iplimage(&cvmat)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1069
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg)
|
|
* populate_iplimage(warpmat, &cvmat) # <<<<<<<<<<<<<<
|
|
* cvmatptr = cvmat_ptr_from_iplimage(&cvmat)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_warpmat, (&__pyx_v_cvmat));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1070
|
|
* populate_iplimage(out, &outimg)
|
|
* populate_iplimage(warpmat, &cvmat)
|
|
* cvmatptr = cvmat_ptr_from_iplimage(&cvmat) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvWarpAffine(&srcimg, &outimg, cvmatptr, flag, cvfill)
|
|
*/
|
|
__pyx_v_cvmatptr = __pyx_f_7scikits_5image_6opencv_14opencv_backend_cvmat_ptr_from_iplimage((&__pyx_v_cvmat));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1072
|
|
* cvmatptr = cvmat_ptr_from_iplimage(&cvmat)
|
|
*
|
|
* c_cvWarpAffine(&srcimg, &outimg, cvmatptr, flag, cvfill) # <<<<<<<<<<<<<<
|
|
*
|
|
* PyMem_Free(cvmatptr)
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvWarpAffine((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_cvmatptr, __pyx_v_flag, __pyx_v_cvfill);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1074
|
|
* c_cvWarpAffine(&srcimg, &outimg, cvmatptr, flag, cvfill)
|
|
*
|
|
* PyMem_Free(cvmatptr) # <<<<<<<<<<<<<<
|
|
*
|
|
* return out
|
|
*/
|
|
PyMem_Free(__pyx_v_cvmatptr);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1076
|
|
* PyMem_Free(cvmatptr)
|
|
*
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvWarpAffine");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF(__pyx_v_valid_flags);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_warpmat);
|
|
__Pyx_DECREF(__pyx_v_fillval);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1123
|
|
* directly for pixel interpolation. Otherwise, the function finds
|
|
* the inverse transform from warpmat.''')
|
|
* def cvWarpPerspective(np.ndarray src, np.ndarray warpmat, # <<<<<<<<<<<<<<
|
|
* int flag=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS,
|
|
* fillval=(0., 0., 0., 0.)):
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvWarpPerspective(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvWarpPerspective(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
PyArrayObject *__pyx_v_warpmat = 0;
|
|
int __pyx_v_flag;
|
|
PyObject *__pyx_v_fillval = 0;
|
|
PyObject *__pyx_v_valid_flags;
|
|
PyArrayObject *__pyx_v_out;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvScalar __pyx_v_cvfill;
|
|
int __pyx_v_i;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_cvmat;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *__pyx_v_cvmatptr;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
Py_ssize_t __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
double __pyx_t_6;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__warpmat,&__pyx_n_s__flag,&__pyx_n_s__fillval,0};
|
|
__Pyx_SetupRefcountContext("cvWarpPerspective");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[4] = {0,0,0,0};
|
|
values[3] = __pyx_k_14;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__warpmat);
|
|
if (likely(values[1])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvWarpPerspective", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 2:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__flag);
|
|
if (unlikely(value)) { values[2] = value; kw_args--; }
|
|
}
|
|
case 3:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fillval);
|
|
if (unlikely(value)) { values[3] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvWarpPerspective") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
__pyx_v_warpmat = ((PyArrayObject *)values[1]);
|
|
if (values[2]) {
|
|
__pyx_v_flag = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_flag == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_flag = __pyx_k_15;
|
|
}
|
|
__pyx_v_fillval = values[3];
|
|
} else {
|
|
__pyx_v_flag = __pyx_k_15;
|
|
__pyx_v_fillval = __pyx_k_14;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 4:
|
|
__pyx_v_fillval = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3:
|
|
__pyx_v_flag = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_flag == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 2:
|
|
__pyx_v_warpmat = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
|
|
__pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvWarpPerspective", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvWarpPerspective");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__Pyx_INCREF((PyObject *)__pyx_v_warpmat);
|
|
__Pyx_INCREF(__pyx_v_fillval);
|
|
__pyx_v_valid_flags = Py_None; __Pyx_INCREF(Py_None);
|
|
__pyx_v_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_warpmat), __pyx_ptype_5numpy_ndarray, 1, "warpmat", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1127
|
|
* fillval=(0., 0., 0., 0.)):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
* validate_array(warpmat)
|
|
* if len(fillval) != 4:
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1128
|
|
*
|
|
* validate_array(src)
|
|
* validate_array(warpmat) # <<<<<<<<<<<<<<
|
|
* if len(fillval) != 4:
|
|
* raise ValueError('fillval must be a 4-tuple')
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_warpmat); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1129
|
|
* validate_array(src)
|
|
* validate_array(warpmat)
|
|
* if len(fillval) != 4: # <<<<<<<<<<<<<<
|
|
* raise ValueError('fillval must be a 4-tuple')
|
|
* assert_nchannels(src, [1, 3])
|
|
*/
|
|
__pyx_t_2 = PyObject_Length(__pyx_v_fillval); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_3 = (__pyx_t_2 != 4);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1130
|
|
* validate_array(warpmat)
|
|
* if len(fillval) != 4:
|
|
* raise ValueError('fillval must be a 4-tuple') # <<<<<<<<<<<<<<
|
|
* assert_nchannels(src, [1, 3])
|
|
* assert_nchannels(warpmat, [1])
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_12));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_12));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_12));
|
|
__pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_5, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1131
|
|
* if len(fillval) != 4:
|
|
* raise ValueError('fillval must be a 4-tuple')
|
|
* assert_nchannels(src, [1, 3]) # <<<<<<<<<<<<<<
|
|
* assert_nchannels(warpmat, [1])
|
|
* if warpmat.shape[0] != 3 or warpmat.shape[1] != 3:
|
|
*/
|
|
__pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_src, ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1132
|
|
* raise ValueError('fillval must be a 4-tuple')
|
|
* assert_nchannels(src, [1, 3])
|
|
* assert_nchannels(warpmat, [1]) # <<<<<<<<<<<<<<
|
|
* if warpmat.shape[0] != 3 or warpmat.shape[1] != 3:
|
|
* raise ValueError('warpmat must be 3x3')
|
|
*/
|
|
__pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_warpmat, ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1133
|
|
* assert_nchannels(src, [1, 3])
|
|
* assert_nchannels(warpmat, [1])
|
|
* if warpmat.shape[0] != 3 or warpmat.shape[1] != 3: # <<<<<<<<<<<<<<
|
|
* raise ValueError('warpmat must be 3x3')
|
|
*
|
|
*/
|
|
if (!((__pyx_v_warpmat->dimensions[0]) != 3)) {
|
|
__pyx_t_3 = ((__pyx_v_warpmat->dimensions[1]) != 3);
|
|
} else {
|
|
__pyx_t_3 = ((__pyx_v_warpmat->dimensions[0]) != 3);
|
|
}
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1134
|
|
* assert_nchannels(warpmat, [1])
|
|
* if warpmat.shape[0] != 3 or warpmat.shape[1] != 3:
|
|
* raise ValueError('warpmat must be 3x3') # <<<<<<<<<<<<<<
|
|
*
|
|
* valid_flags = [0, 1, 2, 3, 8, 16, 9, 17, 11, 19, 10, 18]
|
|
*/
|
|
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_16));
|
|
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_16));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_16));
|
|
__pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_Raise(__pyx_t_4, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L7;
|
|
}
|
|
__pyx_L7:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1136
|
|
* raise ValueError('warpmat must be 3x3')
|
|
*
|
|
* valid_flags = [0, 1, 2, 3, 8, 16, 9, 17, 11, 19, 10, 18] # <<<<<<<<<<<<<<
|
|
* if flag not in valid_flags:
|
|
* raise ValueError('unsupported flag combination')
|
|
*/
|
|
__pyx_t_4 = PyList_New(12); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
|
|
__Pyx_INCREF(__pyx_int_0);
|
|
PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_0);
|
|
__Pyx_GIVEREF(__pyx_int_0);
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_4, 1, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_4, 2, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_4, 3, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_8);
|
|
PyList_SET_ITEM(__pyx_t_4, 4, __pyx_int_8);
|
|
__Pyx_GIVEREF(__pyx_int_8);
|
|
__Pyx_INCREF(__pyx_int_16);
|
|
PyList_SET_ITEM(__pyx_t_4, 5, __pyx_int_16);
|
|
__Pyx_GIVEREF(__pyx_int_16);
|
|
__Pyx_INCREF(__pyx_int_9);
|
|
PyList_SET_ITEM(__pyx_t_4, 6, __pyx_int_9);
|
|
__Pyx_GIVEREF(__pyx_int_9);
|
|
__Pyx_INCREF(__pyx_int_17);
|
|
PyList_SET_ITEM(__pyx_t_4, 7, __pyx_int_17);
|
|
__Pyx_GIVEREF(__pyx_int_17);
|
|
__Pyx_INCREF(__pyx_int_11);
|
|
PyList_SET_ITEM(__pyx_t_4, 8, __pyx_int_11);
|
|
__Pyx_GIVEREF(__pyx_int_11);
|
|
__Pyx_INCREF(__pyx_int_19);
|
|
PyList_SET_ITEM(__pyx_t_4, 9, __pyx_int_19);
|
|
__Pyx_GIVEREF(__pyx_int_19);
|
|
__Pyx_INCREF(__pyx_int_10);
|
|
PyList_SET_ITEM(__pyx_t_4, 10, __pyx_int_10);
|
|
__Pyx_GIVEREF(__pyx_int_10);
|
|
__Pyx_INCREF(__pyx_int_18);
|
|
PyList_SET_ITEM(__pyx_t_4, 11, __pyx_int_18);
|
|
__Pyx_GIVEREF(__pyx_int_18);
|
|
__Pyx_DECREF(__pyx_v_valid_flags);
|
|
__pyx_v_valid_flags = ((PyObject *)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1137
|
|
*
|
|
* valid_flags = [0, 1, 2, 3, 8, 16, 9, 17, 11, 19, 10, 18]
|
|
* if flag not in valid_flags: # <<<<<<<<<<<<<<
|
|
* raise ValueError('unsupported flag combination')
|
|
*
|
|
*/
|
|
__pyx_t_4 = PyInt_FromLong(__pyx_v_flag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_3 = (!PySequence_Contains(__pyx_v_valid_flags, __pyx_t_4)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1138
|
|
* valid_flags = [0, 1, 2, 3, 8, 16, 9, 17, 11, 19, 10, 18]
|
|
* if flag not in valid_flags:
|
|
* raise ValueError('unsupported flag combination') # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_13));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_13));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_13));
|
|
__pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_5, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L8;
|
|
}
|
|
__pyx_L8:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1141
|
|
*
|
|
* cdef np.ndarray out
|
|
* out = new_array_like(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef CvScalar cvfill
|
|
*/
|
|
__pyx_t_5 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like(__pyx_v_src)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1145
|
|
* cdef CvScalar cvfill
|
|
* cdef int i
|
|
* for i in range(4): # <<<<<<<<<<<<<<
|
|
* cvfill.val[i] = <double>fillval[i]
|
|
*
|
|
*/
|
|
for (__pyx_t_1 = 0; __pyx_t_1 < 4; __pyx_t_1+=1) {
|
|
__pyx_v_i = __pyx_t_1;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1146
|
|
* cdef int i
|
|
* for i in range(4):
|
|
* cvfill.val[i] = <double>fillval[i] # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetItemInt(__pyx_v_fillval, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
(__pyx_v_cvfill.val[__pyx_v_i]) = ((double)__pyx_t_6);
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1151
|
|
* cdef IplImage outimg
|
|
* cdef IplImage cvmat
|
|
* cdef CvMat* cvmatptr = NULL # <<<<<<<<<<<<<<
|
|
*
|
|
* populate_iplimage(src, &srcimg)
|
|
*/
|
|
__pyx_v_cvmatptr = NULL;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1153
|
|
* cdef CvMat* cvmatptr = NULL
|
|
*
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
* populate_iplimage(warpmat, &cvmat)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1154
|
|
*
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(warpmat, &cvmat)
|
|
* cvmatptr = cvmat_ptr_from_iplimage(&cvmat)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1155
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg)
|
|
* populate_iplimage(warpmat, &cvmat) # <<<<<<<<<<<<<<
|
|
* cvmatptr = cvmat_ptr_from_iplimage(&cvmat)
|
|
* c_cvWarpPerspective(&srcimg, &outimg, cvmatptr, flag, cvfill)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_warpmat, (&__pyx_v_cvmat));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1156
|
|
* populate_iplimage(out, &outimg)
|
|
* populate_iplimage(warpmat, &cvmat)
|
|
* cvmatptr = cvmat_ptr_from_iplimage(&cvmat) # <<<<<<<<<<<<<<
|
|
* c_cvWarpPerspective(&srcimg, &outimg, cvmatptr, flag, cvfill)
|
|
*
|
|
*/
|
|
__pyx_v_cvmatptr = __pyx_f_7scikits_5image_6opencv_14opencv_backend_cvmat_ptr_from_iplimage((&__pyx_v_cvmat));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1157
|
|
* populate_iplimage(warpmat, &cvmat)
|
|
* cvmatptr = cvmat_ptr_from_iplimage(&cvmat)
|
|
* c_cvWarpPerspective(&srcimg, &outimg, cvmatptr, flag, cvfill) # <<<<<<<<<<<<<<
|
|
*
|
|
* PyMem_Free(cvmatptr)
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvWarpPerspective((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_cvmatptr, __pyx_v_flag, __pyx_v_cvfill);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1159
|
|
* c_cvWarpPerspective(&srcimg, &outimg, cvmatptr, flag, cvfill)
|
|
*
|
|
* PyMem_Free(cvmatptr) # <<<<<<<<<<<<<<
|
|
*
|
|
* return out
|
|
*/
|
|
PyMem_Free(__pyx_v_cvmatptr);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1161
|
|
* PyMem_Free(cvmatptr)
|
|
*
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvWarpPerspective");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF(__pyx_v_valid_flags);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_warpmat);
|
|
__Pyx_DECREF(__pyx_v_fillval);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1210
|
|
* for fast scale and rotation-invariant template matching,
|
|
* for object tracking and so forth.''')
|
|
* def cvLogPolar(np.ndarray src, center, double M, # <<<<<<<<<<<<<<
|
|
* int flag=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS):
|
|
*
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvLogPolar(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvLogPolar(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
PyObject *__pyx_v_center = 0;
|
|
double __pyx_v_M;
|
|
int __pyx_v_flag;
|
|
PyObject *__pyx_v_valid_flags;
|
|
PyArrayObject *__pyx_v_out = 0;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvPoint2D32f __pyx_v_cv_center;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
Py_ssize_t __pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
float __pyx_t_6;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__center,&__pyx_n_s__M,&__pyx_n_s__flag,0};
|
|
__Pyx_SetupRefcountContext("cvLogPolar");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[4] = {0,0,0,0};
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__center);
|
|
if (likely(values[1])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvLogPolar", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 2:
|
|
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__M);
|
|
if (likely(values[2])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvLogPolar", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 3:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__flag);
|
|
if (unlikely(value)) { values[3] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvLogPolar") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
__pyx_v_center = values[1];
|
|
__pyx_v_M = __pyx_PyFloat_AsDouble(values[2]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
if (values[3]) {
|
|
__pyx_v_flag = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_flag == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_flag = __pyx_k_17;
|
|
}
|
|
} else {
|
|
__pyx_v_flag = __pyx_k_17;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 4:
|
|
__pyx_v_flag = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_flag == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 3:
|
|
__pyx_v_M = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_v_center = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
__pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvLogPolar", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvLogPolar");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__Pyx_INCREF(__pyx_v_center);
|
|
__pyx_v_valid_flags = Py_None; __Pyx_INCREF(Py_None);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1213
|
|
* int flag=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
* if len(center) != 2:
|
|
* raise ValueError('center must be a 2-tuple')
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1214
|
|
*
|
|
* validate_array(src)
|
|
* if len(center) != 2: # <<<<<<<<<<<<<<
|
|
* raise ValueError('center must be a 2-tuple')
|
|
*
|
|
*/
|
|
__pyx_t_2 = PyObject_Length(__pyx_v_center); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_3 = (__pyx_t_2 != 2);
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1215
|
|
* validate_array(src)
|
|
* if len(center) != 2:
|
|
* raise ValueError('center must be a 2-tuple') # <<<<<<<<<<<<<<
|
|
*
|
|
* valid_flags = [0, 16, 8, 24, 1, 17, 9, 25, 2, 18, 10, 26, 3, 19, 11, 27]
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_18));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_18));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_18));
|
|
__pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_5, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1217
|
|
* raise ValueError('center must be a 2-tuple')
|
|
*
|
|
* valid_flags = [0, 16, 8, 24, 1, 17, 9, 25, 2, 18, 10, 26, 3, 19, 11, 27] # <<<<<<<<<<<<<<
|
|
* if flag not in valid_flags:
|
|
* raise ValueError('unsupported flag combination')
|
|
*/
|
|
__pyx_t_5 = PyList_New(16); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_0);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_0);
|
|
__Pyx_GIVEREF(__pyx_int_0);
|
|
__Pyx_INCREF(__pyx_int_16);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_16);
|
|
__Pyx_GIVEREF(__pyx_int_16);
|
|
__Pyx_INCREF(__pyx_int_8);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, __pyx_int_8);
|
|
__Pyx_GIVEREF(__pyx_int_8);
|
|
__Pyx_INCREF(__pyx_int_24);
|
|
PyList_SET_ITEM(__pyx_t_5, 3, __pyx_int_24);
|
|
__Pyx_GIVEREF(__pyx_int_24);
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_5, 4, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_17);
|
|
PyList_SET_ITEM(__pyx_t_5, 5, __pyx_int_17);
|
|
__Pyx_GIVEREF(__pyx_int_17);
|
|
__Pyx_INCREF(__pyx_int_9);
|
|
PyList_SET_ITEM(__pyx_t_5, 6, __pyx_int_9);
|
|
__Pyx_GIVEREF(__pyx_int_9);
|
|
__Pyx_INCREF(__pyx_int_25);
|
|
PyList_SET_ITEM(__pyx_t_5, 7, __pyx_int_25);
|
|
__Pyx_GIVEREF(__pyx_int_25);
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 8, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
__Pyx_INCREF(__pyx_int_18);
|
|
PyList_SET_ITEM(__pyx_t_5, 9, __pyx_int_18);
|
|
__Pyx_GIVEREF(__pyx_int_18);
|
|
__Pyx_INCREF(__pyx_int_10);
|
|
PyList_SET_ITEM(__pyx_t_5, 10, __pyx_int_10);
|
|
__Pyx_GIVEREF(__pyx_int_10);
|
|
__Pyx_INCREF(__pyx_int_26);
|
|
PyList_SET_ITEM(__pyx_t_5, 11, __pyx_int_26);
|
|
__Pyx_GIVEREF(__pyx_int_26);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 12, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_19);
|
|
PyList_SET_ITEM(__pyx_t_5, 13, __pyx_int_19);
|
|
__Pyx_GIVEREF(__pyx_int_19);
|
|
__Pyx_INCREF(__pyx_int_11);
|
|
PyList_SET_ITEM(__pyx_t_5, 14, __pyx_int_11);
|
|
__Pyx_GIVEREF(__pyx_int_11);
|
|
__Pyx_INCREF(__pyx_int_27);
|
|
PyList_SET_ITEM(__pyx_t_5, 15, __pyx_int_27);
|
|
__Pyx_GIVEREF(__pyx_int_27);
|
|
__Pyx_DECREF(__pyx_v_valid_flags);
|
|
__pyx_v_valid_flags = ((PyObject *)__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1218
|
|
*
|
|
* valid_flags = [0, 16, 8, 24, 1, 17, 9, 25, 2, 18, 10, 26, 3, 19, 11, 27]
|
|
* if flag not in valid_flags: # <<<<<<<<<<<<<<
|
|
* raise ValueError('unsupported flag combination')
|
|
*
|
|
*/
|
|
__pyx_t_5 = PyInt_FromLong(__pyx_v_flag); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_3 = (!PySequence_Contains(__pyx_v_valid_flags, __pyx_t_5)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1219
|
|
* valid_flags = [0, 16, 8, 24, 1, 17, 9, 25, 2, 18, 10, 26, 3, 19, 11, 27]
|
|
* if flag not in valid_flags:
|
|
* raise ValueError('unsupported flag combination') # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out = new_array_like(src)
|
|
*/
|
|
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_13));
|
|
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_s_13));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_13));
|
|
__pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_Raise(__pyx_t_4, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L7;
|
|
}
|
|
__pyx_L7:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1221
|
|
* raise ValueError('unsupported flag combination')
|
|
*
|
|
* cdef np.ndarray out = new_array_like(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef CvPoint2D32f cv_center
|
|
*/
|
|
__pyx_t_4 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like(__pyx_v_src)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1224
|
|
*
|
|
* cdef CvPoint2D32f cv_center
|
|
* cv_center.x = <float>center[0] # <<<<<<<<<<<<<<
|
|
* cv_center.y = <float>center[1]
|
|
*
|
|
*/
|
|
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_center, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_v_cv_center.x = ((float)__pyx_t_6);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1225
|
|
* cdef CvPoint2D32f cv_center
|
|
* cv_center.x = <float>center[0]
|
|
* cv_center.y = <float>center[1] # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_center, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_v_cv_center.y = ((float)__pyx_t_6);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1229
|
|
* cdef IplImage srcimg
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1230
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvLogPolar(&srcimg, &outimg, cv_center, M, flag)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1232
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
* c_cvLogPolar(&srcimg, &outimg, cv_center, M, flag) # <<<<<<<<<<<<<<
|
|
* return out
|
|
*
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvLogPolar((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_cv_center, __pyx_v_M, __pyx_v_flag);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1233
|
|
*
|
|
* c_cvLogPolar(&srcimg, &outimg, cv_center, M, flag)
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvLogPolar");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF(__pyx_v_valid_flags);
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_DECREF(__pyx_v_center);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1269
|
|
* An new array is returned only if in_place=False.
|
|
* Otherwise, this function returns None.''')
|
|
* def cvErode(np.ndarray src, np.ndarray element=None, int iterations=1, # <<<<<<<<<<<<<<
|
|
* anchor=None, in_place=False):
|
|
*
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvErode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvErode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
PyArrayObject *__pyx_v_element = 0;
|
|
int __pyx_v_iterations;
|
|
PyObject *__pyx_v_anchor = 0;
|
|
PyObject *__pyx_v_in_place = 0;
|
|
PyArrayObject *__pyx_v_out;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplConvKernel *__pyx_v_iplkernel;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
int __pyx_t_3;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplConvKernel *__pyx_t_4;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__element,&__pyx_n_s__iterations,&__pyx_n_s__anchor,&__pyx_n_s__in_place,0};
|
|
__Pyx_SetupRefcountContext("cvErode");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1270
|
|
* Otherwise, this function returns None.''')
|
|
* def cvErode(np.ndarray src, np.ndarray element=None, int iterations=1,
|
|
* anchor=None, in_place=False): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[5] = {0,0,0,0,0};
|
|
values[1] = (PyObject*)((PyArrayObject *)Py_None);
|
|
values[3] = ((PyObject *)Py_None);
|
|
values[4] = __pyx_k_19;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
|
|
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__element);
|
|
if (unlikely(value)) { values[1] = value; kw_args--; }
|
|
}
|
|
case 2:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__iterations);
|
|
if (unlikely(value)) { values[2] = value; kw_args--; }
|
|
}
|
|
case 3:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__anchor);
|
|
if (unlikely(value)) { values[3] = value; kw_args--; }
|
|
}
|
|
case 4:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__in_place);
|
|
if (unlikely(value)) { values[4] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvErode") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
__pyx_v_element = ((PyArrayObject *)values[1]);
|
|
if (values[2]) {
|
|
__pyx_v_iterations = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_iterations == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_iterations = ((int)1);
|
|
}
|
|
__pyx_v_anchor = values[3];
|
|
__pyx_v_in_place = values[4];
|
|
} else {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1269
|
|
* An new array is returned only if in_place=False.
|
|
* Otherwise, this function returns None.''')
|
|
* def cvErode(np.ndarray src, np.ndarray element=None, int iterations=1, # <<<<<<<<<<<<<<
|
|
* anchor=None, in_place=False):
|
|
*
|
|
*/
|
|
__pyx_v_element = ((PyArrayObject *)Py_None);
|
|
__pyx_v_iterations = ((int)1);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1270
|
|
* Otherwise, this function returns None.''')
|
|
* def cvErode(np.ndarray src, np.ndarray element=None, int iterations=1,
|
|
* anchor=None, in_place=False): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_v_anchor = ((PyObject *)Py_None);
|
|
__pyx_v_in_place = __pyx_k_19;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 5: __pyx_v_in_place = PyTuple_GET_ITEM(__pyx_args, 4);
|
|
case 4: __pyx_v_anchor = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3: __pyx_v_iterations = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_iterations == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 2: __pyx_v_element = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
|
|
case 1: __pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvErode", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvErode");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__Pyx_INCREF((PyObject *)__pyx_v_element);
|
|
__Pyx_INCREF(__pyx_v_anchor);
|
|
__Pyx_INCREF(__pyx_v_in_place);
|
|
__pyx_v_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_5numpy_ndarray, 1, "element", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1272
|
|
* anchor=None, in_place=False):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1277
|
|
* cdef IplConvKernel* iplkernel
|
|
*
|
|
* if element == None: # <<<<<<<<<<<<<<
|
|
* iplkernel = NULL
|
|
* else:
|
|
*/
|
|
__pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_element), Py_None, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1278
|
|
*
|
|
* if element == None:
|
|
* iplkernel = NULL # <<<<<<<<<<<<<<
|
|
* else:
|
|
* iplkernel = get_IplConvKernel_ptr_from_array(element, anchor)
|
|
*/
|
|
__pyx_v_iplkernel = NULL;
|
|
goto __pyx_L6;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1280
|
|
* iplkernel = NULL
|
|
* else:
|
|
* iplkernel = get_IplConvKernel_ptr_from_array(element, anchor) # <<<<<<<<<<<<<<
|
|
*
|
|
* if in_place:
|
|
*/
|
|
__pyx_t_4 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_get_IplConvKernel_ptr_from_array(__pyx_v_element, __pyx_v_anchor); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_v_iplkernel = __pyx_t_4;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1282
|
|
* iplkernel = get_IplConvKernel_ptr_from_array(element, anchor)
|
|
*
|
|
* if in_place: # <<<<<<<<<<<<<<
|
|
* out = src
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_in_place); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1283
|
|
*
|
|
* if in_place:
|
|
* out = src # <<<<<<<<<<<<<<
|
|
* else:
|
|
* out = new_array_like(src)
|
|
*/
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_src));
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = __pyx_v_src;
|
|
goto __pyx_L7;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1285
|
|
* out = src
|
|
* else:
|
|
* out = new_array_like(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_2 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like(__pyx_v_src)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
}
|
|
__pyx_L7:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1289
|
|
* cdef IplImage srcimg
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1290
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvErode(&srcimg, &outimg, iplkernel, iterations)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1292
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
* c_cvErode(&srcimg, &outimg, iplkernel, iterations) # <<<<<<<<<<<<<<
|
|
*
|
|
* free_IplConvKernel(iplkernel)
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvErode((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_iplkernel, __pyx_v_iterations);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1294
|
|
* c_cvErode(&srcimg, &outimg, iplkernel, iterations)
|
|
*
|
|
* free_IplConvKernel(iplkernel) # <<<<<<<<<<<<<<
|
|
*
|
|
* if in_place:
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_free_IplConvKernel(__pyx_v_iplkernel);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1296
|
|
* free_IplConvKernel(iplkernel)
|
|
*
|
|
* if in_place: # <<<<<<<<<<<<<<
|
|
* return None
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_in_place); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1297
|
|
*
|
|
* if in_place:
|
|
* return None # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return out
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(Py_None);
|
|
__pyx_r = Py_None;
|
|
goto __pyx_L0;
|
|
goto __pyx_L8;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1299
|
|
* return None
|
|
* else:
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
}
|
|
__pyx_L8:;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvErode");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_element);
|
|
__Pyx_DECREF(__pyx_v_anchor);
|
|
__Pyx_DECREF(__pyx_v_in_place);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1335
|
|
* An new array is returned only if in_place=False.
|
|
* Otherwise, this function returns None.''')
|
|
* def cvDilate(np.ndarray src, np.ndarray element=None, int iterations=1, # <<<<<<<<<<<<<<
|
|
* anchor=None, in_place=False):
|
|
*
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvDilate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvDilate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
PyArrayObject *__pyx_v_element = 0;
|
|
int __pyx_v_iterations;
|
|
PyObject *__pyx_v_anchor = 0;
|
|
PyObject *__pyx_v_in_place = 0;
|
|
PyArrayObject *__pyx_v_out;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplConvKernel *__pyx_v_iplkernel;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
int __pyx_t_3;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplConvKernel *__pyx_t_4;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__element,&__pyx_n_s__iterations,&__pyx_n_s__anchor,&__pyx_n_s__in_place,0};
|
|
__Pyx_SetupRefcountContext("cvDilate");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1336
|
|
* Otherwise, this function returns None.''')
|
|
* def cvDilate(np.ndarray src, np.ndarray element=None, int iterations=1,
|
|
* anchor=None, in_place=False): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[5] = {0,0,0,0,0};
|
|
values[1] = (PyObject*)((PyArrayObject *)Py_None);
|
|
values[3] = ((PyObject *)Py_None);
|
|
values[4] = __pyx_k_20;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
|
|
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__element);
|
|
if (unlikely(value)) { values[1] = value; kw_args--; }
|
|
}
|
|
case 2:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__iterations);
|
|
if (unlikely(value)) { values[2] = value; kw_args--; }
|
|
}
|
|
case 3:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__anchor);
|
|
if (unlikely(value)) { values[3] = value; kw_args--; }
|
|
}
|
|
case 4:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__in_place);
|
|
if (unlikely(value)) { values[4] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvDilate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
__pyx_v_element = ((PyArrayObject *)values[1]);
|
|
if (values[2]) {
|
|
__pyx_v_iterations = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_iterations == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_iterations = ((int)1);
|
|
}
|
|
__pyx_v_anchor = values[3];
|
|
__pyx_v_in_place = values[4];
|
|
} else {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1335
|
|
* An new array is returned only if in_place=False.
|
|
* Otherwise, this function returns None.''')
|
|
* def cvDilate(np.ndarray src, np.ndarray element=None, int iterations=1, # <<<<<<<<<<<<<<
|
|
* anchor=None, in_place=False):
|
|
*
|
|
*/
|
|
__pyx_v_element = ((PyArrayObject *)Py_None);
|
|
__pyx_v_iterations = ((int)1);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1336
|
|
* Otherwise, this function returns None.''')
|
|
* def cvDilate(np.ndarray src, np.ndarray element=None, int iterations=1,
|
|
* anchor=None, in_place=False): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_v_anchor = ((PyObject *)Py_None);
|
|
__pyx_v_in_place = __pyx_k_20;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 5: __pyx_v_in_place = PyTuple_GET_ITEM(__pyx_args, 4);
|
|
case 4: __pyx_v_anchor = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3: __pyx_v_iterations = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_iterations == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 2: __pyx_v_element = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
|
|
case 1: __pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvDilate", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvDilate");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__Pyx_INCREF((PyObject *)__pyx_v_element);
|
|
__Pyx_INCREF(__pyx_v_anchor);
|
|
__Pyx_INCREF(__pyx_v_in_place);
|
|
__pyx_v_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_5numpy_ndarray, 1, "element", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1338
|
|
* anchor=None, in_place=False):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1343
|
|
* cdef IplConvKernel* iplkernel
|
|
*
|
|
* if element == None: # <<<<<<<<<<<<<<
|
|
* iplkernel = NULL
|
|
* else:
|
|
*/
|
|
__pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_element), Py_None, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1344
|
|
*
|
|
* if element == None:
|
|
* iplkernel = NULL # <<<<<<<<<<<<<<
|
|
* else:
|
|
* iplkernel = get_IplConvKernel_ptr_from_array(element, anchor)
|
|
*/
|
|
__pyx_v_iplkernel = NULL;
|
|
goto __pyx_L6;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1346
|
|
* iplkernel = NULL
|
|
* else:
|
|
* iplkernel = get_IplConvKernel_ptr_from_array(element, anchor) # <<<<<<<<<<<<<<
|
|
*
|
|
* if in_place:
|
|
*/
|
|
__pyx_t_4 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_get_IplConvKernel_ptr_from_array(__pyx_v_element, __pyx_v_anchor); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_v_iplkernel = __pyx_t_4;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1348
|
|
* iplkernel = get_IplConvKernel_ptr_from_array(element, anchor)
|
|
*
|
|
* if in_place: # <<<<<<<<<<<<<<
|
|
* out = src
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_in_place); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1349
|
|
*
|
|
* if in_place:
|
|
* out = src # <<<<<<<<<<<<<<
|
|
* else:
|
|
* out = new_array_like(src)
|
|
*/
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_src));
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = __pyx_v_src;
|
|
goto __pyx_L7;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1351
|
|
* out = src
|
|
* else:
|
|
* out = new_array_like(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_2 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like(__pyx_v_src)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
}
|
|
__pyx_L7:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1355
|
|
* cdef IplImage srcimg
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1356
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvDilate(&srcimg, &outimg, iplkernel, iterations)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1358
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
* c_cvDilate(&srcimg, &outimg, iplkernel, iterations) # <<<<<<<<<<<<<<
|
|
*
|
|
* free_IplConvKernel(iplkernel)
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvDilate((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_iplkernel, __pyx_v_iterations);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1360
|
|
* c_cvDilate(&srcimg, &outimg, iplkernel, iterations)
|
|
*
|
|
* free_IplConvKernel(iplkernel) # <<<<<<<<<<<<<<
|
|
*
|
|
* if in_place:
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_free_IplConvKernel(__pyx_v_iplkernel);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1362
|
|
* free_IplConvKernel(iplkernel)
|
|
*
|
|
* if in_place: # <<<<<<<<<<<<<<
|
|
* return None
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_in_place); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1363
|
|
*
|
|
* if in_place:
|
|
* return None # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return out
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(Py_None);
|
|
__pyx_r = Py_None;
|
|
goto __pyx_L0;
|
|
goto __pyx_L8;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1365
|
|
* return None
|
|
* else:
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
}
|
|
__pyx_L8:;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvDilate");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_element);
|
|
__Pyx_DECREF(__pyx_v_anchor);
|
|
__Pyx_DECREF(__pyx_v_in_place);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1408
|
|
* An new array is returned only if in_place=False.
|
|
* Otherwise, this function returns None.''')
|
|
* def cvMorphologyEx(np.ndarray src, np.ndarray element, int operation, # <<<<<<<<<<<<<<
|
|
* int iterations=1, anchor=None, in_place=False):
|
|
*
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvMorphologyEx(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvMorphologyEx(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
PyArrayObject *__pyx_v_element = 0;
|
|
int __pyx_v_operation;
|
|
int __pyx_v_iterations;
|
|
PyObject *__pyx_v_anchor = 0;
|
|
PyObject *__pyx_v_in_place = 0;
|
|
PyArrayObject *__pyx_v_out;
|
|
PyArrayObject *__pyx_v_temp;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplConvKernel *__pyx_v_iplkernel;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_tempimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *__pyx_v_tempimgptr;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplConvKernel *__pyx_t_2;
|
|
int __pyx_t_3;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
int __pyx_t_7;
|
|
int __pyx_t_8;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__element,&__pyx_n_s__operation,&__pyx_n_s__iterations,&__pyx_n_s__anchor,&__pyx_n_s__in_place,0};
|
|
__Pyx_SetupRefcountContext("cvMorphologyEx");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1409
|
|
* Otherwise, this function returns None.''')
|
|
* def cvMorphologyEx(np.ndarray src, np.ndarray element, int operation,
|
|
* int iterations=1, anchor=None, in_place=False): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[6] = {0,0,0,0,0,0};
|
|
values[4] = ((PyObject *)Py_None);
|
|
values[5] = __pyx_k_21;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
|
|
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
|
|
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__element);
|
|
if (likely(values[1])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvMorphologyEx", 0, 3, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 2:
|
|
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__operation);
|
|
if (likely(values[2])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvMorphologyEx", 0, 3, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 3:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__iterations);
|
|
if (unlikely(value)) { values[3] = value; kw_args--; }
|
|
}
|
|
case 4:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__anchor);
|
|
if (unlikely(value)) { values[4] = value; kw_args--; }
|
|
}
|
|
case 5:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__in_place);
|
|
if (unlikely(value)) { values[5] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvMorphologyEx") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
__pyx_v_element = ((PyArrayObject *)values[1]);
|
|
__pyx_v_operation = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_operation == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
if (values[3]) {
|
|
__pyx_v_iterations = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_iterations == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_iterations = ((int)1);
|
|
}
|
|
__pyx_v_anchor = values[4];
|
|
__pyx_v_in_place = values[5];
|
|
} else {
|
|
__pyx_v_iterations = ((int)1);
|
|
__pyx_v_anchor = ((PyObject *)Py_None);
|
|
__pyx_v_in_place = __pyx_k_21;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 6:
|
|
__pyx_v_in_place = PyTuple_GET_ITEM(__pyx_args, 5);
|
|
case 5:
|
|
__pyx_v_anchor = PyTuple_GET_ITEM(__pyx_args, 4);
|
|
case 4:
|
|
__pyx_v_iterations = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_iterations == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 3:
|
|
__pyx_v_operation = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_operation == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_v_element = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
|
|
__pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvMorphologyEx", 0, 3, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvMorphologyEx");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__Pyx_INCREF((PyObject *)__pyx_v_element);
|
|
__Pyx_INCREF(__pyx_v_anchor);
|
|
__Pyx_INCREF(__pyx_v_in_place);
|
|
__pyx_v_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
__pyx_v_temp = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_5numpy_ndarray, 1, "element", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1411
|
|
* int iterations=1, anchor=None, in_place=False):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1417
|
|
* cdef IplConvKernel* iplkernel
|
|
*
|
|
* iplkernel = get_IplConvKernel_ptr_from_array(element, anchor) # <<<<<<<<<<<<<<
|
|
*
|
|
* if in_place:
|
|
*/
|
|
__pyx_t_2 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_get_IplConvKernel_ptr_from_array(__pyx_v_element, __pyx_v_anchor); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_v_iplkernel = __pyx_t_2;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1419
|
|
* iplkernel = get_IplConvKernel_ptr_from_array(element, anchor)
|
|
*
|
|
* if in_place: # <<<<<<<<<<<<<<
|
|
* out = src
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_in_place); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_3) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1420
|
|
*
|
|
* if in_place:
|
|
* out = src # <<<<<<<<<<<<<<
|
|
* else:
|
|
* out = new_array_like(src)
|
|
*/
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_src));
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = __pyx_v_src;
|
|
goto __pyx_L6;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1422
|
|
* out = src
|
|
* else:
|
|
* out = new_array_like(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_4 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like(__pyx_v_src)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1427
|
|
* cdef IplImage outimg
|
|
* cdef IplImage tempimg
|
|
* cdef IplImage* tempimgptr = &tempimg # <<<<<<<<<<<<<<
|
|
*
|
|
* populate_iplimage(src, &srcimg)
|
|
*/
|
|
__pyx_v_tempimgptr = (&__pyx_v_tempimg);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1429
|
|
* cdef IplImage* tempimgptr = &tempimg
|
|
*
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1430
|
|
*
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* # determine if we need the tempimg
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1433
|
|
*
|
|
* # determine if we need the tempimg
|
|
* if operation == CV_MOP_OPEN or operation == CV_MOP_CLOSE: # <<<<<<<<<<<<<<
|
|
* tempimgptr = NULL
|
|
* elif operation == CV_MOP_GRADIENT:
|
|
*/
|
|
__pyx_t_4 = PyInt_FromLong(__pyx_v_operation); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_MOP_OPEN); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (!__pyx_t_3) {
|
|
__pyx_t_6 = PyInt_FromLong(__pyx_v_operation); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_MOP_CLOSE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_8 = __pyx_t_7;
|
|
} else {
|
|
__pyx_t_8 = __pyx_t_3;
|
|
}
|
|
if (__pyx_t_8) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1434
|
|
* # determine if we need the tempimg
|
|
* if operation == CV_MOP_OPEN or operation == CV_MOP_CLOSE:
|
|
* tempimgptr = NULL # <<<<<<<<<<<<<<
|
|
* elif operation == CV_MOP_GRADIENT:
|
|
* temp = new_array_like(src)
|
|
*/
|
|
__pyx_v_tempimgptr = NULL;
|
|
goto __pyx_L7;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1435
|
|
* if operation == CV_MOP_OPEN or operation == CV_MOP_CLOSE:
|
|
* tempimgptr = NULL
|
|
* elif operation == CV_MOP_GRADIENT: # <<<<<<<<<<<<<<
|
|
* temp = new_array_like(src)
|
|
* populate_iplimage(temp, &tempimg)
|
|
*/
|
|
__pyx_t_4 = PyInt_FromLong(__pyx_v_operation); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_MOP_GRADIENT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (__pyx_t_8) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1436
|
|
* tempimgptr = NULL
|
|
* elif operation == CV_MOP_GRADIENT:
|
|
* temp = new_array_like(src) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(temp, &tempimg)
|
|
* elif operation == CV_MOP_TOPHAT or operation == CV_MOP_BLACKHAT:
|
|
*/
|
|
__pyx_t_6 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like(__pyx_v_src)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_temp));
|
|
__pyx_v_temp = ((PyArrayObject *)__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1437
|
|
* elif operation == CV_MOP_GRADIENT:
|
|
* temp = new_array_like(src)
|
|
* populate_iplimage(temp, &tempimg) # <<<<<<<<<<<<<<
|
|
* elif operation == CV_MOP_TOPHAT or operation == CV_MOP_BLACKHAT:
|
|
* if in_place:
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_temp, (&__pyx_v_tempimg));
|
|
goto __pyx_L7;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1438
|
|
* temp = new_array_like(src)
|
|
* populate_iplimage(temp, &tempimg)
|
|
* elif operation == CV_MOP_TOPHAT or operation == CV_MOP_BLACKHAT: # <<<<<<<<<<<<<<
|
|
* if in_place:
|
|
* temp = new_array_like(src)
|
|
*/
|
|
__pyx_t_6 = PyInt_FromLong(__pyx_v_operation); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_MOP_TOPHAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (!__pyx_t_8) {
|
|
__pyx_t_4 = PyInt_FromLong(__pyx_v_operation); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_MOP_BLACKHAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_7 = __pyx_t_3;
|
|
} else {
|
|
__pyx_t_7 = __pyx_t_8;
|
|
}
|
|
if (__pyx_t_7) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1439
|
|
* populate_iplimage(temp, &tempimg)
|
|
* elif operation == CV_MOP_TOPHAT or operation == CV_MOP_BLACKHAT:
|
|
* if in_place: # <<<<<<<<<<<<<<
|
|
* temp = new_array_like(src)
|
|
* populate_iplimage(temp, &tempimg)
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_in_place); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_7) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1440
|
|
* elif operation == CV_MOP_TOPHAT or operation == CV_MOP_BLACKHAT:
|
|
* if in_place:
|
|
* temp = new_array_like(src) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(temp, &tempimg)
|
|
* else:
|
|
*/
|
|
__pyx_t_6 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like(__pyx_v_src)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_temp));
|
|
__pyx_v_temp = ((PyArrayObject *)__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1441
|
|
* if in_place:
|
|
* temp = new_array_like(src)
|
|
* populate_iplimage(temp, &tempimg) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* tempimgptr = NULL
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_temp, (&__pyx_v_tempimg));
|
|
goto __pyx_L8;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1443
|
|
* populate_iplimage(temp, &tempimg)
|
|
* else:
|
|
* tempimgptr = NULL # <<<<<<<<<<<<<<
|
|
* else:
|
|
* raise RuntimeError('operation type not understood')
|
|
*/
|
|
__pyx_v_tempimgptr = NULL;
|
|
}
|
|
__pyx_L8:;
|
|
goto __pyx_L7;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1445
|
|
* tempimgptr = NULL
|
|
* else:
|
|
* raise RuntimeError('operation type not understood') # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvMorphologyEx(&srcimg, &outimg, tempimgptr, iplkernel, operation,
|
|
*/
|
|
__pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_22));
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_s_22));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22));
|
|
__pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_Raise(__pyx_t_5, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
}
|
|
__pyx_L7:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1448
|
|
*
|
|
* c_cvMorphologyEx(&srcimg, &outimg, tempimgptr, iplkernel, operation,
|
|
* iterations) # <<<<<<<<<<<<<<
|
|
*
|
|
* free_IplConvKernel(iplkernel)
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvMorphologyEx((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_tempimgptr, __pyx_v_iplkernel, __pyx_v_operation, __pyx_v_iterations);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1450
|
|
* iterations)
|
|
*
|
|
* free_IplConvKernel(iplkernel) # <<<<<<<<<<<<<<
|
|
*
|
|
* if in_place:
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_free_IplConvKernel(__pyx_v_iplkernel);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1452
|
|
* free_IplConvKernel(iplkernel)
|
|
*
|
|
* if in_place: # <<<<<<<<<<<<<<
|
|
* return None
|
|
* else:
|
|
*/
|
|
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_in_place); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_7) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1453
|
|
*
|
|
* if in_place:
|
|
* return None # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return out
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(Py_None);
|
|
__pyx_r = Py_None;
|
|
goto __pyx_L0;
|
|
goto __pyx_L9;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1455
|
|
* return None
|
|
* else:
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
}
|
|
__pyx_L9:;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvMorphologyEx");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_temp);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_element);
|
|
__Pyx_DECREF(__pyx_v_anchor);
|
|
__Pyx_DECREF(__pyx_v_in_place);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1541
|
|
* Using standard sigma for small kernels (3x3 to 7x7)
|
|
* gives better speed.''')
|
|
* def cvSmooth(np.ndarray src, int smoothtype=CV_GAUSSIAN, int param1=3, # <<<<<<<<<<<<<<
|
|
* int param2=0, double param3=0, double param4=0,
|
|
* bool in_place=False):
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvSmooth(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvSmooth(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
int __pyx_v_smoothtype;
|
|
int __pyx_v_param1;
|
|
int __pyx_v_param2;
|
|
double __pyx_v_param3;
|
|
double __pyx_v_param4;
|
|
PyObject *__pyx_v_in_place = 0;
|
|
PyArrayObject *__pyx_v_out;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
int __pyx_t_7;
|
|
int __pyx_t_8;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__smoothtype,&__pyx_n_s__param1,&__pyx_n_s__param2,&__pyx_n_s__param3,&__pyx_n_s__param4,&__pyx_n_s__in_place,0};
|
|
__Pyx_SetupRefcountContext("cvSmooth");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[7] = {0,0,0,0,0,0,0};
|
|
values[6] = (PyObject*)__pyx_k_23;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
|
|
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
|
|
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
|
|
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__smoothtype);
|
|
if (unlikely(value)) { values[1] = value; kw_args--; }
|
|
}
|
|
case 2:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__param1);
|
|
if (unlikely(value)) { values[2] = value; kw_args--; }
|
|
}
|
|
case 3:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__param2);
|
|
if (unlikely(value)) { values[3] = value; kw_args--; }
|
|
}
|
|
case 4:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__param3);
|
|
if (unlikely(value)) { values[4] = value; kw_args--; }
|
|
}
|
|
case 5:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__param4);
|
|
if (unlikely(value)) { values[5] = value; kw_args--; }
|
|
}
|
|
case 6:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__in_place);
|
|
if (unlikely(value)) { values[6] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvSmooth") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
if (values[1]) {
|
|
__pyx_v_smoothtype = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_smoothtype == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_smoothtype = __pyx_k_24;
|
|
}
|
|
if (values[2]) {
|
|
__pyx_v_param1 = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_param1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_param1 = ((int)3);
|
|
}
|
|
if (values[3]) {
|
|
__pyx_v_param2 = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_param2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_param2 = ((int)0);
|
|
}
|
|
if (values[4]) {
|
|
__pyx_v_param3 = __pyx_PyFloat_AsDouble(values[4]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_param3 = ((double)0);
|
|
}
|
|
if (values[5]) {
|
|
__pyx_v_param4 = __pyx_PyFloat_AsDouble(values[5]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_param4 = ((double)0);
|
|
}
|
|
__pyx_v_in_place = ((PyObject *)values[6]);
|
|
} else {
|
|
__pyx_v_smoothtype = __pyx_k_24;
|
|
__pyx_v_param1 = ((int)3);
|
|
__pyx_v_param2 = ((int)0);
|
|
__pyx_v_param3 = ((double)0);
|
|
__pyx_v_param4 = ((double)0);
|
|
__pyx_v_in_place = __pyx_k_23;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 7: __pyx_v_in_place = ((PyObject *)PyTuple_GET_ITEM(__pyx_args, 6));
|
|
case 6: __pyx_v_param4 = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 5)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 5: __pyx_v_param3 = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 4)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 4: __pyx_v_param2 = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_param2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 3: __pyx_v_param1 = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_param1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 2: __pyx_v_smoothtype = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_smoothtype == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 1: __pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvSmooth", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvSmooth");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__Pyx_INCREF(__pyx_v_in_place);
|
|
__pyx_v_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_place), &PyBool_Type, 1, "in_place", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1545
|
|
* bool in_place=False):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1552
|
|
*
|
|
* # CV_BLUR_NO_SCALE
|
|
* if smoothtype == CV_BLUR_NO_SCALE: # <<<<<<<<<<<<<<
|
|
*
|
|
* if in_place:
|
|
*/
|
|
__pyx_t_2 = PyInt_FromLong(__pyx_v_smoothtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BLUR_NO_SCALE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (__pyx_t_5) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1554
|
|
* if smoothtype == CV_BLUR_NO_SCALE:
|
|
*
|
|
* if in_place: # <<<<<<<<<<<<<<
|
|
* raise RuntimeError('In place operation not supported with this '
|
|
* 'filter')
|
|
*/
|
|
__pyx_t_5 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_in_place)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_5) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1555
|
|
*
|
|
* if in_place:
|
|
* raise RuntimeError('In place operation not supported with this ' # <<<<<<<<<<<<<<
|
|
* 'filter')
|
|
*
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_25));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_25));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_25));
|
|
__pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L7;
|
|
}
|
|
__pyx_L7:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1558
|
|
* 'filter')
|
|
*
|
|
* assert_dtype(src, [UINT8, INT8, FLOAT32]) # <<<<<<<<<<<<<<
|
|
* assert_ndims(src, [2])
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__INT8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, ((PyObject *)__pyx_t_6)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1559
|
|
*
|
|
* assert_dtype(src, [UINT8, INT8, FLOAT32])
|
|
* assert_ndims(src, [2]) # <<<<<<<<<<<<<<
|
|
*
|
|
* if src.dtype == FLOAT32:
|
|
*/
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_ndims(__pyx_v_src, ((PyObject *)__pyx_t_6)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1561
|
|
* assert_ndims(src, [2])
|
|
*
|
|
* if src.dtype == FLOAT32: # <<<<<<<<<<<<<<
|
|
* out = new_array_like(src)
|
|
* else:
|
|
*/
|
|
__pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_src), __pyx_n_s__dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (__pyx_t_5) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1562
|
|
*
|
|
* if src.dtype == FLOAT32:
|
|
* out = new_array_like(src) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* out = new_array_like_diff_dtype(src, INT16)
|
|
*/
|
|
__pyx_t_4 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like(__pyx_v_src)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L8;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1564
|
|
* out = new_array_like(src)
|
|
* else:
|
|
* out = new_array_like_diff_dtype(src, INT16) # <<<<<<<<<<<<<<
|
|
*
|
|
* # CV_BLUR and CV_GAUSSIAN
|
|
*/
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__INT16); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_2 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like_diff_dtype(__pyx_v_src, __pyx_t_4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
}
|
|
__pyx_L8:;
|
|
goto __pyx_L6;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1567
|
|
*
|
|
* # CV_BLUR and CV_GAUSSIAN
|
|
* elif smoothtype == CV_BLUR or smoothtype == CV_GAUSSIAN: # <<<<<<<<<<<<<<
|
|
*
|
|
* assert_dtype(src, [UINT8, INT8, FLOAT32])
|
|
*/
|
|
__pyx_t_2 = PyInt_FromLong(__pyx_v_smoothtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BLUR); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (!__pyx_t_5) {
|
|
__pyx_t_6 = PyInt_FromLong(__pyx_v_smoothtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_GAUSSIAN); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_8 = __pyx_t_7;
|
|
} else {
|
|
__pyx_t_8 = __pyx_t_5;
|
|
}
|
|
if (__pyx_t_8) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1569
|
|
* elif smoothtype == CV_BLUR or smoothtype == CV_GAUSSIAN:
|
|
*
|
|
* assert_dtype(src, [UINT8, INT8, FLOAT32]) # <<<<<<<<<<<<<<
|
|
* assert_nchannels(src, [1, 3])
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__INT8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyList_SET_ITEM(__pyx_t_3, 2, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1570
|
|
*
|
|
* assert_dtype(src, [UINT8, INT8, FLOAT32])
|
|
* assert_nchannels(src, [1, 3]) # <<<<<<<<<<<<<<
|
|
*
|
|
* if in_place:
|
|
*/
|
|
__pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_src, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1572
|
|
* assert_nchannels(src, [1, 3])
|
|
*
|
|
* if in_place: # <<<<<<<<<<<<<<
|
|
* out = src
|
|
* else:
|
|
*/
|
|
__pyx_t_8 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_in_place)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_8) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1573
|
|
*
|
|
* if in_place:
|
|
* out = src # <<<<<<<<<<<<<<
|
|
* else:
|
|
* out = new_array_like(src)
|
|
*/
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_src));
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = __pyx_v_src;
|
|
goto __pyx_L9;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1575
|
|
* out = src
|
|
* else:
|
|
* out = new_array_like(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* # CV_MEDIAN and CV_BILATERAL
|
|
*/
|
|
__pyx_t_3 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like(__pyx_v_src)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
}
|
|
__pyx_L9:;
|
|
goto __pyx_L6;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1579
|
|
* # CV_MEDIAN and CV_BILATERAL
|
|
* else:
|
|
* assert_dtype(src, [UINT8, INT8]) # <<<<<<<<<<<<<<
|
|
* assert_nchannels(src, [1, 3])
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__INT8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
|
|
PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, ((PyObject *)__pyx_t_4)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1580
|
|
* else:
|
|
* assert_dtype(src, [UINT8, INT8])
|
|
* assert_nchannels(src, [1, 3]) # <<<<<<<<<<<<<<
|
|
*
|
|
* if in_place:
|
|
*/
|
|
__pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_4, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_src, ((PyObject *)__pyx_t_4)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1582
|
|
* assert_nchannels(src, [1, 3])
|
|
*
|
|
* if in_place: # <<<<<<<<<<<<<<
|
|
* raise RuntimeError('In place operation not supported with this '
|
|
* 'filter')
|
|
*/
|
|
__pyx_t_8 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_in_place)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_8) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1583
|
|
*
|
|
* if in_place:
|
|
* raise RuntimeError('In place operation not supported with this ' # <<<<<<<<<<<<<<
|
|
* 'filter')
|
|
*
|
|
*/
|
|
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_25));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_25));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_25));
|
|
__pyx_t_6 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_Raise(__pyx_t_6, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L10;
|
|
}
|
|
__pyx_L10:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1586
|
|
* 'filter')
|
|
*
|
|
* out = new_array_like(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_6 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like(__pyx_v_src)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1590
|
|
* cdef IplImage srcimg
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1591
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvSmooth(&srcimg, &outimg, smoothtype, param1, param2, param3, param4)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1593
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
* c_cvSmooth(&srcimg, &outimg, smoothtype, param1, param2, param3, param4) # <<<<<<<<<<<<<<
|
|
*
|
|
* if in_place:
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvSmooth((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_smoothtype, __pyx_v_param1, __pyx_v_param2, __pyx_v_param3, __pyx_v_param4);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1595
|
|
* c_cvSmooth(&srcimg, &outimg, smoothtype, param1, param2, param3, param4)
|
|
*
|
|
* if in_place: # <<<<<<<<<<<<<<
|
|
* return None
|
|
* else:
|
|
*/
|
|
__pyx_t_8 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_in_place)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_8) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1596
|
|
*
|
|
* if in_place:
|
|
* return None # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return out
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(Py_None);
|
|
__pyx_r = Py_None;
|
|
goto __pyx_L0;
|
|
goto __pyx_L11;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1598
|
|
* return None
|
|
* else:
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
}
|
|
__pyx_L11:;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvSmooth");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_DECREF(__pyx_v_in_place);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1634
|
|
* whether it will faster to do the convolution in the spatial
|
|
* or the frequency domain, and behaves accordingly.''')
|
|
* def cvFilter2D(np.ndarray src, np.ndarray kernel, anchor=None, in_place=False): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvFilter2D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvFilter2D(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
PyArrayObject *__pyx_v_kernel = 0;
|
|
PyObject *__pyx_v_anchor = 0;
|
|
PyObject *__pyx_v_in_place = 0;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvPoint __pyx_v_cv_anchor;
|
|
PyArrayObject *__pyx_v_out;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_kernelimg;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *__pyx_v_cv_kernel;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
int __pyx_t_4;
|
|
Py_ssize_t __pyx_t_5;
|
|
int __pyx_t_6;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__kernel,&__pyx_n_s__anchor,&__pyx_n_s__in_place,0};
|
|
__Pyx_SetupRefcountContext("cvFilter2D");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[4] = {0,0,0,0};
|
|
values[2] = ((PyObject *)Py_None);
|
|
values[3] = __pyx_k_26;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__kernel);
|
|
if (likely(values[1])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvFilter2D", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1634; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 2:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__anchor);
|
|
if (unlikely(value)) { values[2] = value; kw_args--; }
|
|
}
|
|
case 3:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__in_place);
|
|
if (unlikely(value)) { values[3] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvFilter2D") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1634; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
__pyx_v_kernel = ((PyArrayObject *)values[1]);
|
|
__pyx_v_anchor = values[2];
|
|
__pyx_v_in_place = values[3];
|
|
} else {
|
|
__pyx_v_anchor = ((PyObject *)Py_None);
|
|
__pyx_v_in_place = __pyx_k_26;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 4:
|
|
__pyx_v_in_place = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3:
|
|
__pyx_v_anchor = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2:
|
|
__pyx_v_kernel = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
|
|
__pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvFilter2D", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1634; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvFilter2D");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__Pyx_INCREF((PyObject *)__pyx_v_kernel);
|
|
__Pyx_INCREF(__pyx_v_anchor);
|
|
__Pyx_INCREF(__pyx_v_in_place);
|
|
__pyx_v_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kernel), __pyx_ptype_5numpy_ndarray, 1, "kernel", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1636
|
|
* def cvFilter2D(np.ndarray src, np.ndarray kernel, anchor=None, in_place=False):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
* validate_array(kernel)
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1637
|
|
*
|
|
* validate_array(src)
|
|
* validate_array(kernel) # <<<<<<<<<<<<<<
|
|
*
|
|
* assert_ndims(kernel, [2])
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_kernel); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1639
|
|
* validate_array(kernel)
|
|
*
|
|
* assert_ndims(kernel, [2]) # <<<<<<<<<<<<<<
|
|
* assert_dtype(kernel, [FLOAT32])
|
|
*
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_ndims(__pyx_v_kernel, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1640
|
|
*
|
|
* assert_ndims(kernel, [2])
|
|
* assert_dtype(kernel, [FLOAT32]) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef CvPoint cv_anchor
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_kernel, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1643
|
|
*
|
|
* cdef CvPoint cv_anchor
|
|
* if anchor is not None: # <<<<<<<<<<<<<<
|
|
* assert len(anchor) == 2, 'anchor must be (x, y) tuple'
|
|
* cv_anchor.x = <int>anchor[0]
|
|
*/
|
|
__pyx_t_4 = (__pyx_v_anchor != Py_None);
|
|
if (__pyx_t_4) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1644
|
|
* cdef CvPoint cv_anchor
|
|
* if anchor is not None:
|
|
* assert len(anchor) == 2, 'anchor must be (x, y) tuple' # <<<<<<<<<<<<<<
|
|
* cv_anchor.x = <int>anchor[0]
|
|
* cv_anchor.y = <int>anchor[1]
|
|
*/
|
|
#ifndef PYREX_WITHOUT_ASSERTIONS
|
|
__pyx_t_5 = PyObject_Length(__pyx_v_anchor); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (unlikely(!(__pyx_t_5 == 2))) {
|
|
PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_27));
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
}
|
|
#endif
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1645
|
|
* if anchor is not None:
|
|
* assert len(anchor) == 2, 'anchor must be (x, y) tuple'
|
|
* cv_anchor.x = <int>anchor[0] # <<<<<<<<<<<<<<
|
|
* cv_anchor.y = <int>anchor[1]
|
|
* assert (cv_anchor.x < kernel.shape[1]) and (cv_anchor.x >= 0) \
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetItemInt(__pyx_v_anchor, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_cv_anchor.x = ((int)__pyx_t_1);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1646
|
|
* assert len(anchor) == 2, 'anchor must be (x, y) tuple'
|
|
* cv_anchor.x = <int>anchor[0]
|
|
* cv_anchor.y = <int>anchor[1] # <<<<<<<<<<<<<<
|
|
* assert (cv_anchor.x < kernel.shape[1]) and (cv_anchor.x >= 0) \
|
|
* and (cv_anchor.y < kernel.shape[0]) and (cv_anchor.y >= 0), \
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetItemInt(__pyx_v_anchor, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_cv_anchor.y = ((int)__pyx_t_1);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1647
|
|
* cv_anchor.x = <int>anchor[0]
|
|
* cv_anchor.y = <int>anchor[1]
|
|
* assert (cv_anchor.x < kernel.shape[1]) and (cv_anchor.x >= 0) \ # <<<<<<<<<<<<<<
|
|
* and (cv_anchor.y < kernel.shape[0]) and (cv_anchor.y >= 0), \
|
|
* 'anchor point must be inside kernel'
|
|
*/
|
|
#ifndef PYREX_WITHOUT_ASSERTIONS
|
|
if ((__pyx_v_cv_anchor.x < (__pyx_v_kernel->dimensions[1]))) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1648
|
|
* cv_anchor.y = <int>anchor[1]
|
|
* assert (cv_anchor.x < kernel.shape[1]) and (cv_anchor.x >= 0) \
|
|
* and (cv_anchor.y < kernel.shape[0]) and (cv_anchor.y >= 0), \ # <<<<<<<<<<<<<<
|
|
* 'anchor point must be inside kernel'
|
|
* else:
|
|
*/
|
|
if ((__pyx_v_cv_anchor.x >= 0)) {
|
|
if ((__pyx_v_cv_anchor.y < (__pyx_v_kernel->dimensions[0]))) {
|
|
__pyx_t_4 = (__pyx_v_cv_anchor.y >= 0);
|
|
} else {
|
|
__pyx_t_4 = (__pyx_v_cv_anchor.y < (__pyx_v_kernel->dimensions[0]));
|
|
}
|
|
__pyx_t_6 = __pyx_t_4;
|
|
} else {
|
|
__pyx_t_6 = (__pyx_v_cv_anchor.x >= 0);
|
|
}
|
|
__pyx_t_4 = __pyx_t_6;
|
|
} else {
|
|
__pyx_t_4 = (__pyx_v_cv_anchor.x < (__pyx_v_kernel->dimensions[1]));
|
|
}
|
|
if (unlikely(!__pyx_t_4)) {
|
|
PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_kp_s_28));
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
}
|
|
#endif
|
|
goto __pyx_L6;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1651
|
|
* 'anchor point must be inside kernel'
|
|
* else:
|
|
* cv_anchor.x = <int>(kernel.shape[1] / 2.) # <<<<<<<<<<<<<<
|
|
* cv_anchor.y = <int>(kernel.shape[0] / 2.)
|
|
*
|
|
*/
|
|
__pyx_v_cv_anchor.x = ((int)((__pyx_v_kernel->dimensions[1]) / 2.0));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1652
|
|
* else:
|
|
* cv_anchor.x = <int>(kernel.shape[1] / 2.)
|
|
* cv_anchor.y = <int>(kernel.shape[0] / 2.) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out
|
|
*/
|
|
__pyx_v_cv_anchor.y = ((int)((__pyx_v_kernel->dimensions[0]) / 2.0));
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1656
|
|
* cdef np.ndarray out
|
|
*
|
|
* if in_place: # <<<<<<<<<<<<<<
|
|
* out = src
|
|
* else:
|
|
*/
|
|
__pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_in_place); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_4) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1657
|
|
*
|
|
* if in_place:
|
|
* out = src # <<<<<<<<<<<<<<
|
|
* else:
|
|
* out = new_array_like(src)
|
|
*/
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_src));
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = __pyx_v_src;
|
|
goto __pyx_L7;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1659
|
|
* out = src
|
|
* else:
|
|
* out = new_array_like(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_3 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like(__pyx_v_src)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
}
|
|
__pyx_L7:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1664
|
|
* cdef IplImage outimg
|
|
* cdef IplImage kernelimg
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
* populate_iplimage(kernel, &kernelimg)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1665
|
|
* cdef IplImage kernelimg
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(kernel, &kernelimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1666
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg)
|
|
* populate_iplimage(kernel, &kernelimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef CvMat* cv_kernel
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_kernel, (&__pyx_v_kernelimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1669
|
|
*
|
|
* cdef CvMat* cv_kernel
|
|
* cv_kernel = cvmat_ptr_from_iplimage(&kernelimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvFilter2D(&srcimg, &outimg, cv_kernel, cv_anchor)
|
|
*/
|
|
__pyx_v_cv_kernel = __pyx_f_7scikits_5image_6opencv_14opencv_backend_cvmat_ptr_from_iplimage((&__pyx_v_kernelimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1671
|
|
* cv_kernel = cvmat_ptr_from_iplimage(&kernelimg)
|
|
*
|
|
* c_cvFilter2D(&srcimg, &outimg, cv_kernel, cv_anchor) # <<<<<<<<<<<<<<
|
|
*
|
|
* PyMem_Free(cv_kernel)
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvFilter2D((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_cv_kernel, __pyx_v_cv_anchor);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1673
|
|
* c_cvFilter2D(&srcimg, &outimg, cv_kernel, cv_anchor)
|
|
*
|
|
* PyMem_Free(cv_kernel) # <<<<<<<<<<<<<<
|
|
*
|
|
* if in_place:
|
|
*/
|
|
PyMem_Free(__pyx_v_cv_kernel);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1675
|
|
* PyMem_Free(cv_kernel)
|
|
*
|
|
* if in_place: # <<<<<<<<<<<<<<
|
|
* return None
|
|
* else:
|
|
*/
|
|
__pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_in_place); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_4) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1676
|
|
*
|
|
* if in_place:
|
|
* return None # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return out
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(Py_None);
|
|
__pyx_r = Py_None;
|
|
goto __pyx_L0;
|
|
goto __pyx_L8;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1678
|
|
* return None
|
|
* else:
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
}
|
|
__pyx_L8:;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvFilter2D");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_kernel);
|
|
__Pyx_DECREF(__pyx_v_anchor);
|
|
__Pyx_DECREF(__pyx_v_in_place);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1707
|
|
* out3: the titled sum image,
|
|
* or any combination of these two.''')
|
|
* def cvIntegral(np.ndarray src, square_sum=False, tilted_sum=False): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvIntegral(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvIntegral(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
PyObject *__pyx_v_square_sum = 0;
|
|
PyObject *__pyx_v_tilted_sum = 0;
|
|
PyObject *__pyx_v_out;
|
|
PyArrayObject *__pyx_v_outsum;
|
|
PyArrayObject *__pyx_v_outsqsum;
|
|
PyArrayObject *__pyx_v_outtiltsum;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outsumimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outsqsumimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outtiltsumimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *__pyx_v_outsqsumimgptr;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *__pyx_v_outtiltsumimgptr;
|
|
npy_intp *__pyx_v_out_shape;
|
|
int __pyx_v_out_dims;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__square_sum,&__pyx_n_s__tilted_sum,0};
|
|
__Pyx_SetupRefcountContext("cvIntegral");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[3] = {0,0,0};
|
|
values[1] = __pyx_k_29;
|
|
values[2] = __pyx_k_30;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__square_sum);
|
|
if (unlikely(value)) { values[1] = value; kw_args--; }
|
|
}
|
|
case 2:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tilted_sum);
|
|
if (unlikely(value)) { values[2] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvIntegral") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1707; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
__pyx_v_square_sum = values[1];
|
|
__pyx_v_tilted_sum = values[2];
|
|
} else {
|
|
__pyx_v_square_sum = __pyx_k_29;
|
|
__pyx_v_tilted_sum = __pyx_k_30;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 3: __pyx_v_tilted_sum = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: __pyx_v_square_sum = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: __pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvIntegral", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1707; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvIntegral");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__Pyx_INCREF(__pyx_v_square_sum);
|
|
__Pyx_INCREF(__pyx_v_tilted_sum);
|
|
__pyx_v_out = Py_None; __Pyx_INCREF(Py_None);
|
|
__pyx_v_outsum = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
__pyx_v_outsqsum = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
__pyx_v_outtiltsum = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1709
|
|
* def cvIntegral(np.ndarray src, square_sum=False, tilted_sum=False):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
* assert_dtype(src, [UINT8, FLOAT32, FLOAT64])
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1710
|
|
*
|
|
* validate_array(src)
|
|
* assert_dtype(src, [UINT8, FLOAT32, FLOAT64]) # <<<<<<<<<<<<<<
|
|
*
|
|
* out = []
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1712
|
|
* assert_dtype(src, [UINT8, FLOAT32, FLOAT64])
|
|
*
|
|
* out = [] # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray outsum
|
|
*/
|
|
__pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_DECREF(__pyx_v_out);
|
|
__pyx_v_out = ((PyObject *)__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1722
|
|
* cdef IplImage outsqsumimg
|
|
* cdef IplImage outtiltsumimg
|
|
* cdef IplImage* outsqsumimgptr = &outsqsumimg # <<<<<<<<<<<<<<
|
|
* cdef IplImage* outtiltsumimgptr = &outtiltsumimg
|
|
*
|
|
*/
|
|
__pyx_v_outsqsumimgptr = (&__pyx_v_outsqsumimg);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1723
|
|
* cdef IplImage outtiltsumimg
|
|
* cdef IplImage* outsqsumimgptr = &outsqsumimg
|
|
* cdef IplImage* outtiltsumimgptr = &outtiltsumimg # <<<<<<<<<<<<<<
|
|
*
|
|
* populate_iplimage(src, &srcimg)
|
|
*/
|
|
__pyx_v_outtiltsumimgptr = (&__pyx_v_outtiltsumimg);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1725
|
|
* cdef IplImage* outtiltsumimgptr = &outtiltsumimg
|
|
*
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* # out arrays need to be (H + 1) x (W + 1)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1728
|
|
*
|
|
* # out arrays need to be (H + 1) x (W + 1)
|
|
* cdef np.npy_intp* out_shape = clone_array_shape(src) # <<<<<<<<<<<<<<
|
|
* out_shape[0] = src.shape[0] + 1
|
|
* out_shape[1] = src.shape[1] + 1
|
|
*/
|
|
__pyx_v_out_shape = __pyx_f_7scikits_5image_6opencv_14opencv_backend_clone_array_shape(__pyx_v_src);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1729
|
|
* # out arrays need to be (H + 1) x (W + 1)
|
|
* cdef np.npy_intp* out_shape = clone_array_shape(src)
|
|
* out_shape[0] = src.shape[0] + 1 # <<<<<<<<<<<<<<
|
|
* out_shape[1] = src.shape[1] + 1
|
|
* cdef int out_dims = src.ndim
|
|
*/
|
|
(__pyx_v_out_shape[0]) = ((__pyx_v_src->dimensions[0]) + 1);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1730
|
|
* cdef np.npy_intp* out_shape = clone_array_shape(src)
|
|
* out_shape[0] = src.shape[0] + 1
|
|
* out_shape[1] = src.shape[1] + 1 # <<<<<<<<<<<<<<
|
|
* cdef int out_dims = src.ndim
|
|
*
|
|
*/
|
|
(__pyx_v_out_shape[1]) = ((__pyx_v_src->dimensions[1]) + 1);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1731
|
|
* out_shape[0] = src.shape[0] + 1
|
|
* out_shape[1] = src.shape[1] + 1
|
|
* cdef int out_dims = src.ndim # <<<<<<<<<<<<<<
|
|
*
|
|
* if src.dtype == UINT8:
|
|
*/
|
|
__pyx_v_out_dims = __pyx_v_src->nd;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1733
|
|
* cdef int out_dims = src.ndim
|
|
*
|
|
* if src.dtype == UINT8: # <<<<<<<<<<<<<<
|
|
* outsum = new_array(out_dims, out_shape, INT32)
|
|
* else:
|
|
*/
|
|
__pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_src), __pyx_n_s__dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (__pyx_t_6) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1734
|
|
*
|
|
* if src.dtype == UINT8:
|
|
* outsum = new_array(out_dims, out_shape, INT32) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* outsum = new_array(out_dims, out_shape, FLOAT64)
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__INT32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array(__pyx_v_out_dims, __pyx_v_out_shape, __pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_outsum));
|
|
__pyx_v_outsum = ((PyArrayObject *)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L6;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1736
|
|
* outsum = new_array(out_dims, out_shape, INT32)
|
|
* else:
|
|
* outsum = new_array(out_dims, out_shape, FLOAT64) # <<<<<<<<<<<<<<
|
|
*
|
|
* populate_iplimage(outsum, &outsumimg)
|
|
*/
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_3 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array(__pyx_v_out_dims, __pyx_v_out_shape, __pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_outsum));
|
|
__pyx_v_outsum = ((PyArrayObject *)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1738
|
|
* outsum = new_array(out_dims, out_shape, FLOAT64)
|
|
*
|
|
* populate_iplimage(outsum, &outsumimg) # <<<<<<<<<<<<<<
|
|
* out.append(outsum)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_outsum, (&__pyx_v_outsumimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1739
|
|
*
|
|
* populate_iplimage(outsum, &outsumimg)
|
|
* out.append(outsum) # <<<<<<<<<<<<<<
|
|
*
|
|
* if square_sum:
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_out, ((PyObject *)__pyx_v_outsum)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1741
|
|
* out.append(outsum)
|
|
*
|
|
* if square_sum: # <<<<<<<<<<<<<<
|
|
* outsqsum = new_array(out_dims, out_shape, FLOAT64)
|
|
* populate_iplimage(outsqsum, &outsqsumimg)
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_square_sum); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_6) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1742
|
|
*
|
|
* if square_sum:
|
|
* outsqsum = new_array(out_dims, out_shape, FLOAT64) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(outsqsum, &outsqsumimg)
|
|
* out.append(outsqsum)
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array(__pyx_v_out_dims, __pyx_v_out_shape, __pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_outsqsum));
|
|
__pyx_v_outsqsum = ((PyArrayObject *)__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1743
|
|
* if square_sum:
|
|
* outsqsum = new_array(out_dims, out_shape, FLOAT64)
|
|
* populate_iplimage(outsqsum, &outsqsumimg) # <<<<<<<<<<<<<<
|
|
* out.append(outsqsum)
|
|
* else:
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_outsqsum, (&__pyx_v_outsqsumimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1744
|
|
* outsqsum = new_array(out_dims, out_shape, FLOAT64)
|
|
* populate_iplimage(outsqsum, &outsqsumimg)
|
|
* out.append(outsqsum) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* outsqsumimgptr = NULL
|
|
*/
|
|
__pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_out, ((PyObject *)__pyx_v_outsqsum)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
goto __pyx_L7;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1746
|
|
* out.append(outsqsum)
|
|
* else:
|
|
* outsqsumimgptr = NULL # <<<<<<<<<<<<<<
|
|
*
|
|
* if tilted_sum:
|
|
*/
|
|
__pyx_v_outsqsumimgptr = NULL;
|
|
}
|
|
__pyx_L7:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1748
|
|
* outsqsumimgptr = NULL
|
|
*
|
|
* if tilted_sum: # <<<<<<<<<<<<<<
|
|
* outtiltsum = new_array(out_dims, out_shape, outsum.dtype)
|
|
* populate_iplimage(outtiltsum, &outtiltsumimg)
|
|
*/
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_tilted_sum); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_6) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1749
|
|
*
|
|
* if tilted_sum:
|
|
* outtiltsum = new_array(out_dims, out_shape, outsum.dtype) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(outtiltsum, &outtiltsumimg)
|
|
* out.append(outtiltsum)
|
|
*/
|
|
__pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_outsum), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_3 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array(__pyx_v_out_dims, __pyx_v_out_shape, __pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_outtiltsum));
|
|
__pyx_v_outtiltsum = ((PyArrayObject *)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1750
|
|
* if tilted_sum:
|
|
* outtiltsum = new_array(out_dims, out_shape, outsum.dtype)
|
|
* populate_iplimage(outtiltsum, &outtiltsumimg) # <<<<<<<<<<<<<<
|
|
* out.append(outtiltsum)
|
|
* else:
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_outtiltsum, (&__pyx_v_outtiltsumimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1751
|
|
* outtiltsum = new_array(out_dims, out_shape, outsum.dtype)
|
|
* populate_iplimage(outtiltsum, &outtiltsumimg)
|
|
* out.append(outtiltsum) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* outtiltsumimgptr = NULL
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyObject_Append(__pyx_v_out, ((PyObject *)__pyx_v_outtiltsum)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
goto __pyx_L8;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1753
|
|
* out.append(outtiltsum)
|
|
* else:
|
|
* outtiltsumimgptr = NULL # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvIntegral(&srcimg, &outsumimg, outsqsumimgptr, outtiltsumimgptr)
|
|
*/
|
|
__pyx_v_outtiltsumimgptr = NULL;
|
|
}
|
|
__pyx_L8:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1755
|
|
* outtiltsumimgptr = NULL
|
|
*
|
|
* c_cvIntegral(&srcimg, &outsumimg, outsqsumimgptr, outtiltsumimgptr) # <<<<<<<<<<<<<<
|
|
*
|
|
* PyMem_Free(out_shape)
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvIntegral((&__pyx_v_srcimg), (&__pyx_v_outsumimg), __pyx_v_outsqsumimgptr, __pyx_v_outtiltsumimgptr);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1757
|
|
* c_cvIntegral(&srcimg, &outsumimg, outsqsumimgptr, outtiltsumimgptr)
|
|
*
|
|
* PyMem_Free(out_shape) # <<<<<<<<<<<<<<
|
|
*
|
|
* return out
|
|
*/
|
|
PyMem_Free(__pyx_v_out_shape);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1759
|
|
* PyMem_Free(out_shape)
|
|
*
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(__pyx_v_out);
|
|
__pyx_r = __pyx_v_out;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvIntegral");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF(__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_outsum);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_outsqsum);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_outtiltsum);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_DECREF(__pyx_v_square_sum);
|
|
__Pyx_DECREF(__pyx_v_tilted_sum);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1809
|
|
* See the OpenCV documentation for more details
|
|
* about the specific color conversions.''')
|
|
* def cvCvtColor(np.ndarray src, int code): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvCvtColor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvCvtColor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
int __pyx_v_code;
|
|
PyObject *__pyx_v_conversion_params;
|
|
int __pyx_v_src_channels;
|
|
int __pyx_v_out_channels;
|
|
PyObject *__pyx_v_src_dtypes;
|
|
PyArrayObject *__pyx_v_out;
|
|
npy_intp __pyx_v_out_shape2[2];
|
|
npy_intp __pyx_v_out_shape3[3];
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__code,0};
|
|
__Pyx_SetupRefcountContext("cvCvtColor");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[2] = {0,0};
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__code);
|
|
if (likely(values[1])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvCvtColor", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvCvtColor") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
__pyx_v_code = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_code == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
__pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
__pyx_v_code = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_code == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvCvtColor", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvCvtColor");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__pyx_v_conversion_params = Py_None; __Pyx_INCREF(Py_None);
|
|
__pyx_v_src_dtypes = Py_None; __Pyx_INCREF(Py_None);
|
|
__pyx_v_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1811
|
|
* def cvCvtColor(np.ndarray src, int code):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
* assert_dtype(src, [UINT8, UINT16, FLOAT32])
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1812
|
|
*
|
|
* validate_array(src)
|
|
* assert_dtype(src, [UINT8, UINT16, FLOAT32]) # <<<<<<<<<<<<<<
|
|
*
|
|
* try:
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1814
|
|
* assert_dtype(src, [UINT8, UINT16, FLOAT32])
|
|
*
|
|
* try: # <<<<<<<<<<<<<<
|
|
* conversion_params = _cvtcolor_dict[code]
|
|
* except KeyError:
|
|
*/
|
|
{
|
|
PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
|
|
__Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
|
|
__Pyx_XGOTREF(__pyx_save_exc_type);
|
|
__Pyx_XGOTREF(__pyx_save_exc_value);
|
|
__Pyx_XGOTREF(__pyx_save_exc_tb);
|
|
/*try:*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1815
|
|
*
|
|
* try:
|
|
* conversion_params = _cvtcolor_dict[code] # <<<<<<<<<<<<<<
|
|
* except KeyError:
|
|
* print 'unknown conversion code'
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s___cvtcolor_dict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, __pyx_v_code, sizeof(int), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_v_conversion_params);
|
|
__pyx_v_conversion_params = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
}
|
|
__Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
|
|
__Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
|
|
__Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
|
|
goto __pyx_L13_try_end;
|
|
__pyx_L6_error:;
|
|
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1816
|
|
* try:
|
|
* conversion_params = _cvtcolor_dict[code]
|
|
* except KeyError: # <<<<<<<<<<<<<<
|
|
* print 'unknown conversion code'
|
|
* raise
|
|
*/
|
|
__pyx_t_1 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
|
|
if (__pyx_t_1) {
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvCvtColor");
|
|
if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1817
|
|
* conversion_params = _cvtcolor_dict[code]
|
|
* except KeyError:
|
|
* print 'unknown conversion code' # <<<<<<<<<<<<<<
|
|
* raise
|
|
*
|
|
*/
|
|
if (__Pyx_PrintOne(((PyObject *)__pyx_kp_s_31)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1817; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1818
|
|
* except KeyError:
|
|
* print 'unknown conversion code'
|
|
* raise # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef int src_channels = <int>conversion_params[0]
|
|
*/
|
|
__Pyx_Raise(__pyx_t_4, __pyx_t_5, __pyx_t_3);
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
goto __pyx_L7_exception_handled;
|
|
}
|
|
__pyx_L8_except_error:;
|
|
__Pyx_XGIVEREF(__pyx_save_exc_type);
|
|
__Pyx_XGIVEREF(__pyx_save_exc_value);
|
|
__Pyx_XGIVEREF(__pyx_save_exc_tb);
|
|
__Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
|
|
goto __pyx_L1_error;
|
|
__pyx_L7_exception_handled:;
|
|
__Pyx_XGIVEREF(__pyx_save_exc_type);
|
|
__Pyx_XGIVEREF(__pyx_save_exc_value);
|
|
__Pyx_XGIVEREF(__pyx_save_exc_tb);
|
|
__Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
|
|
__pyx_L13_try_end:;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1820
|
|
* raise
|
|
*
|
|
* cdef int src_channels = <int>conversion_params[0] # <<<<<<<<<<<<<<
|
|
* cdef int out_channels = <int>conversion_params[1]
|
|
* src_dtypes = conversion_params[2]
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetItemInt(__pyx_v_conversion_params, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_src_channels = ((int)__pyx_t_1);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1821
|
|
*
|
|
* cdef int src_channels = <int>conversion_params[0]
|
|
* cdef int out_channels = <int>conversion_params[1] # <<<<<<<<<<<<<<
|
|
* src_dtypes = conversion_params[2]
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetItemInt(__pyx_v_conversion_params, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_out_channels = ((int)__pyx_t_1);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1822
|
|
* cdef int src_channels = <int>conversion_params[0]
|
|
* cdef int out_channels = <int>conversion_params[1]
|
|
* src_dtypes = conversion_params[2] # <<<<<<<<<<<<<<
|
|
*
|
|
* assert_nchannels(src, src_channels)
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetItemInt(__pyx_v_conversion_params, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_v_src_dtypes);
|
|
__pyx_v_src_dtypes = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1824
|
|
* src_dtypes = conversion_params[2]
|
|
*
|
|
* assert_nchannels(src, src_channels) # <<<<<<<<<<<<<<
|
|
* assert_dtype(src, src_dtypes)
|
|
*
|
|
*/
|
|
__pyx_t_3 = PyInt_FromLong(__pyx_v_src_channels); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_src, __pyx_t_3); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1825
|
|
*
|
|
* assert_nchannels(src, src_channels)
|
|
* assert_dtype(src, src_dtypes) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, __pyx_v_src_dtypes); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1833
|
|
* cdef np.npy_intp out_shape2[2]
|
|
* cdef np.npy_intp out_shape3[3]
|
|
* out_shape2[0] = src.shape[0] # <<<<<<<<<<<<<<
|
|
* out_shape2[1] = src.shape[1]
|
|
* out_shape3[0] = src.shape[0]
|
|
*/
|
|
(__pyx_v_out_shape2[0]) = (__pyx_v_src->dimensions[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1834
|
|
* cdef np.npy_intp out_shape3[3]
|
|
* out_shape2[0] = src.shape[0]
|
|
* out_shape2[1] = src.shape[1] # <<<<<<<<<<<<<<
|
|
* out_shape3[0] = src.shape[0]
|
|
* out_shape3[1] = src.shape[1]
|
|
*/
|
|
(__pyx_v_out_shape2[1]) = (__pyx_v_src->dimensions[1]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1835
|
|
* out_shape2[0] = src.shape[0]
|
|
* out_shape2[1] = src.shape[1]
|
|
* out_shape3[0] = src.shape[0] # <<<<<<<<<<<<<<
|
|
* out_shape3[1] = src.shape[1]
|
|
*
|
|
*/
|
|
(__pyx_v_out_shape3[0]) = (__pyx_v_src->dimensions[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1836
|
|
* out_shape2[1] = src.shape[1]
|
|
* out_shape3[0] = src.shape[0]
|
|
* out_shape3[1] = src.shape[1] # <<<<<<<<<<<<<<
|
|
*
|
|
* if out_channels == 1:
|
|
*/
|
|
(__pyx_v_out_shape3[1]) = (__pyx_v_src->dimensions[1]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1838
|
|
* out_shape3[1] = src.shape[1]
|
|
*
|
|
* if out_channels == 1: # <<<<<<<<<<<<<<
|
|
* out = new_array(2, out_shape2, src.dtype)
|
|
* else:
|
|
*/
|
|
__pyx_t_6 = (__pyx_v_out_channels == 1);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1839
|
|
*
|
|
* if out_channels == 1:
|
|
* out = new_array(2, out_shape2, src.dtype) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* out_shape3[2] = <np.npy_intp>out_channels
|
|
*/
|
|
__pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_src), __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_5 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array(2, __pyx_v_out_shape2, __pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
goto __pyx_L16;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1841
|
|
* out = new_array(2, out_shape2, src.dtype)
|
|
* else:
|
|
* out_shape3[2] = <np.npy_intp>out_channels # <<<<<<<<<<<<<<
|
|
* out = new_array(3, out_shape3, src.dtype)
|
|
*
|
|
*/
|
|
(__pyx_v_out_shape3[2]) = ((npy_intp)__pyx_v_out_channels);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1842
|
|
* else:
|
|
* out_shape3[2] = <np.npy_intp>out_channels
|
|
* out = new_array(3, out_shape3, src.dtype) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_src), __pyx_n_s__dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_3 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array(3, __pyx_v_out_shape3, __pyx_t_5)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
}
|
|
__pyx_L16:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1846
|
|
* cdef IplImage srcimg
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1847
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvCvtColor(&srcimg, &outimg, code)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1849
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
* c_cvCvtColor(&srcimg, &outimg, code) # <<<<<<<<<<<<<<
|
|
*
|
|
* return out
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvCvtColor((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_code);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1851
|
|
* c_cvCvtColor(&srcimg, &outimg, code)
|
|
*
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvCvtColor");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF(__pyx_v_conversion_params);
|
|
__Pyx_DECREF(__pyx_v_src_dtypes);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1889
|
|
* returned in addition to the thresholded image. Otherwise
|
|
* just the thresholded image is returned.''')
|
|
* def cvThreshold(np.ndarray src, double threshold, double max_value=255, # <<<<<<<<<<<<<<
|
|
* int threshold_type=CV_THRESH_BINARY, use_otsu=False):
|
|
*
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvThreshold(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvThreshold(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
double __pyx_v_threshold;
|
|
double __pyx_v_max_value;
|
|
int __pyx_v_threshold_type;
|
|
PyObject *__pyx_v_use_otsu = 0;
|
|
PyArrayObject *__pyx_v_out = 0;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__threshold,&__pyx_n_s__max_value,&__pyx_n_s__threshold_type,&__pyx_n_s__use_otsu,0};
|
|
__Pyx_SetupRefcountContext("cvThreshold");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[5] = {0,0,0,0,0};
|
|
values[4] = __pyx_k_32;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
|
|
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__threshold);
|
|
if (likely(values[1])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvThreshold", 0, 2, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 2:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__max_value);
|
|
if (unlikely(value)) { values[2] = value; kw_args--; }
|
|
}
|
|
case 3:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__threshold_type);
|
|
if (unlikely(value)) { values[3] = value; kw_args--; }
|
|
}
|
|
case 4:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__use_otsu);
|
|
if (unlikely(value)) { values[4] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvThreshold") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
__pyx_v_threshold = __pyx_PyFloat_AsDouble(values[1]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
if (values[2]) {
|
|
__pyx_v_max_value = __pyx_PyFloat_AsDouble(values[2]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_max_value = ((double)255);
|
|
}
|
|
if (values[3]) {
|
|
__pyx_v_threshold_type = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_threshold_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_threshold_type = __pyx_k_33;
|
|
}
|
|
__pyx_v_use_otsu = values[4];
|
|
} else {
|
|
__pyx_v_max_value = ((double)255);
|
|
__pyx_v_threshold_type = __pyx_k_33;
|
|
__pyx_v_use_otsu = __pyx_k_32;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 5:
|
|
__pyx_v_use_otsu = PyTuple_GET_ITEM(__pyx_args, 4);
|
|
case 4:
|
|
__pyx_v_threshold_type = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_threshold_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 3:
|
|
__pyx_v_max_value = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 2:
|
|
__pyx_v_threshold = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvThreshold", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvThreshold");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__Pyx_INCREF(__pyx_v_use_otsu);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1892
|
|
* int threshold_type=CV_THRESH_BINARY, use_otsu=False):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
* assert_nchannels(src, [1])
|
|
* assert_dtype(src, [UINT8, FLOAT32])
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1893
|
|
*
|
|
* validate_array(src)
|
|
* assert_nchannels(src, [1]) # <<<<<<<<<<<<<<
|
|
* assert_dtype(src, [UINT8, FLOAT32])
|
|
*
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_src, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1894
|
|
* validate_array(src)
|
|
* assert_nchannels(src, [1])
|
|
* assert_dtype(src, [UINT8, FLOAT32]) # <<<<<<<<<<<<<<
|
|
*
|
|
* if use_otsu:
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
|
|
PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, ((PyObject *)__pyx_t_4)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1896
|
|
* assert_dtype(src, [UINT8, FLOAT32])
|
|
*
|
|
* if use_otsu: # <<<<<<<<<<<<<<
|
|
* assert_dtype(src, [UINT8])
|
|
* threshold_type += 8
|
|
*/
|
|
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_use_otsu); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_5) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1897
|
|
*
|
|
* if use_otsu:
|
|
* assert_dtype(src, [UINT8]) # <<<<<<<<<<<<<<
|
|
* threshold_type += 8
|
|
*
|
|
*/
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1898
|
|
* if use_otsu:
|
|
* assert_dtype(src, [UINT8])
|
|
* threshold_type += 8 # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out = new_array_like(src)
|
|
*/
|
|
__pyx_v_threshold_type += 8;
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1900
|
|
* threshold_type += 8
|
|
*
|
|
* cdef np.ndarray out = new_array_like(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_3 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like(__pyx_v_src)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1904
|
|
* cdef IplImage srcimg
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1905
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* threshold = c_cvThreshold(&srcimg, &outimg, threshold, max_value,
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1908
|
|
*
|
|
* threshold = c_cvThreshold(&srcimg, &outimg, threshold, max_value,
|
|
* threshold_type) # <<<<<<<<<<<<<<
|
|
*
|
|
* if use_otsu:
|
|
*/
|
|
__pyx_v_threshold = __pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvThreshold((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_threshold, __pyx_v_max_value, __pyx_v_threshold_type);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1910
|
|
* threshold_type)
|
|
*
|
|
* if use_otsu: # <<<<<<<<<<<<<<
|
|
* return (out, threshold)
|
|
* else:
|
|
*/
|
|
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_use_otsu); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_5) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1911
|
|
*
|
|
* if use_otsu:
|
|
* return (out, threshold) # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return out
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_3 = PyFloat_FromDouble(__pyx_v_threshold); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_out));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_out));
|
|
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_r = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
goto __pyx_L0;
|
|
goto __pyx_L7;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1913
|
|
* return (out, threshold)
|
|
* else:
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
}
|
|
__pyx_L7:;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvThreshold");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_DECREF(__pyx_v_use_otsu);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1949
|
|
* out : ndarray
|
|
* The thresholded image.''')
|
|
* def cvAdaptiveThreshold(np.ndarray src, double max_value, # <<<<<<<<<<<<<<
|
|
* int adaptive_method=CV_ADAPTIVE_THRESH_MEAN_C,
|
|
* int threshold_type=CV_THRESH_BINARY,
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvAdaptiveThreshold(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvAdaptiveThreshold(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
double __pyx_v_max_value;
|
|
int __pyx_v_adaptive_method;
|
|
int __pyx_v_threshold_type;
|
|
int __pyx_v_block_size;
|
|
double __pyx_v_param1;
|
|
PyArrayObject *__pyx_v_out = 0;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
int __pyx_t_7;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__max_value,&__pyx_n_s__adaptive_method,&__pyx_n_s__threshold_type,&__pyx_n_s__block_size,&__pyx_n_s__param1,0};
|
|
__Pyx_SetupRefcountContext("cvAdaptiveThreshold");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[6] = {0,0,0,0,0,0};
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
|
|
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
|
|
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__max_value);
|
|
if (likely(values[1])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvAdaptiveThreshold", 0, 2, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1949; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 2:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__adaptive_method);
|
|
if (unlikely(value)) { values[2] = value; kw_args--; }
|
|
}
|
|
case 3:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__threshold_type);
|
|
if (unlikely(value)) { values[3] = value; kw_args--; }
|
|
}
|
|
case 4:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__block_size);
|
|
if (unlikely(value)) { values[4] = value; kw_args--; }
|
|
}
|
|
case 5:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__param1);
|
|
if (unlikely(value)) { values[5] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvAdaptiveThreshold") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1949; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
__pyx_v_max_value = __pyx_PyFloat_AsDouble(values[1]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1949; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
if (values[2]) {
|
|
__pyx_v_adaptive_method = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_adaptive_method == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1950; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_adaptive_method = __pyx_k_34;
|
|
}
|
|
if (values[3]) {
|
|
__pyx_v_threshold_type = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_threshold_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_threshold_type = __pyx_k_35;
|
|
}
|
|
if (values[4]) {
|
|
__pyx_v_block_size = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_block_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_block_size = ((int)3);
|
|
}
|
|
if (values[5]) {
|
|
__pyx_v_param1 = __pyx_PyFloat_AsDouble(values[5]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_param1 = ((double)5);
|
|
}
|
|
} else {
|
|
__pyx_v_adaptive_method = __pyx_k_34;
|
|
__pyx_v_threshold_type = __pyx_k_35;
|
|
__pyx_v_block_size = ((int)3);
|
|
__pyx_v_param1 = ((double)5);
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 6:
|
|
__pyx_v_param1 = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 5)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 5:
|
|
__pyx_v_block_size = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 4)); if (unlikely((__pyx_v_block_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 4:
|
|
__pyx_v_threshold_type = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_threshold_type == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 3:
|
|
__pyx_v_adaptive_method = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_adaptive_method == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1950; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 2:
|
|
__pyx_v_max_value = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1949; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvAdaptiveThreshold", 0, 2, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1949; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvAdaptiveThreshold");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1954
|
|
* int block_size=3, double param1=5):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
* assert_nchannels(src, [1])
|
|
* assert_dtype(src, [UINT8])
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1955
|
|
*
|
|
* validate_array(src)
|
|
* assert_nchannels(src, [1]) # <<<<<<<<<<<<<<
|
|
* assert_dtype(src, [UINT8])
|
|
*
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_src, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1956
|
|
* validate_array(src)
|
|
* assert_nchannels(src, [1])
|
|
* assert_dtype(src, [UINT8]) # <<<<<<<<<<<<<<
|
|
*
|
|
* if (adaptive_method!=CV_ADAPTIVE_THRESH_MEAN_C and
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1958
|
|
* assert_dtype(src, [UINT8])
|
|
*
|
|
* if (adaptive_method!=CV_ADAPTIVE_THRESH_MEAN_C and # <<<<<<<<<<<<<<
|
|
* adaptive_method!=CV_ADAPTIVE_THRESH_GAUSSIAN_C):
|
|
* raise ValueError('Invalid adaptive method')
|
|
*/
|
|
__pyx_t_3 = PyInt_FromLong(__pyx_v_adaptive_method); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_36); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_NE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (__pyx_t_5) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1959
|
|
*
|
|
* if (adaptive_method!=CV_ADAPTIVE_THRESH_MEAN_C and
|
|
* adaptive_method!=CV_ADAPTIVE_THRESH_GAUSSIAN_C): # <<<<<<<<<<<<<<
|
|
* raise ValueError('Invalid adaptive method')
|
|
*
|
|
*/
|
|
__pyx_t_4 = PyInt_FromLong(__pyx_v_adaptive_method); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_37); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_NE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_7 = __pyx_t_6;
|
|
} else {
|
|
__pyx_t_7 = __pyx_t_5;
|
|
}
|
|
if (__pyx_t_7) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1960
|
|
* if (adaptive_method!=CV_ADAPTIVE_THRESH_MEAN_C and
|
|
* adaptive_method!=CV_ADAPTIVE_THRESH_GAUSSIAN_C):
|
|
* raise ValueError('Invalid adaptive method') # <<<<<<<<<<<<<<
|
|
*
|
|
* if (threshold_type!=CV_THRESH_BINARY and
|
|
*/
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_38));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_38));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_38));
|
|
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_Raise(__pyx_t_2, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1962
|
|
* raise ValueError('Invalid adaptive method')
|
|
*
|
|
* if (threshold_type!=CV_THRESH_BINARY and # <<<<<<<<<<<<<<
|
|
* threshold_type!=CV_THRESH_BINARY_INV):
|
|
* raise ValueError('Invalid threshold type')
|
|
*/
|
|
__pyx_t_2 = PyInt_FromLong(__pyx_v_threshold_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_THRESH_BINARY); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_NE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
if (__pyx_t_7) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1963
|
|
*
|
|
* if (threshold_type!=CV_THRESH_BINARY and
|
|
* threshold_type!=CV_THRESH_BINARY_INV): # <<<<<<<<<<<<<<
|
|
* raise ValueError('Invalid threshold type')
|
|
*
|
|
*/
|
|
__pyx_t_4 = PyInt_FromLong(__pyx_v_threshold_type); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_39); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_6 = __pyx_t_5;
|
|
} else {
|
|
__pyx_t_6 = __pyx_t_7;
|
|
}
|
|
if (__pyx_t_6) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1964
|
|
* if (threshold_type!=CV_THRESH_BINARY and
|
|
* threshold_type!=CV_THRESH_BINARY_INV):
|
|
* raise ValueError('Invalid threshold type') # <<<<<<<<<<<<<<
|
|
*
|
|
* if (block_size % 2 != 1 or block_size <= 1):
|
|
*/
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_40));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_40));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_40));
|
|
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L7;
|
|
}
|
|
__pyx_L7:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1966
|
|
* raise ValueError('Invalid threshold type')
|
|
*
|
|
* if (block_size % 2 != 1 or block_size <= 1): # <<<<<<<<<<<<<<
|
|
* raise ValueError('block size must be and odd number and greater than 1')
|
|
*
|
|
*/
|
|
if (!(__Pyx_mod_long(__pyx_v_block_size, 2) != 1)) {
|
|
__pyx_t_6 = (__pyx_v_block_size <= 1);
|
|
} else {
|
|
__pyx_t_6 = (__Pyx_mod_long(__pyx_v_block_size, 2) != 1);
|
|
}
|
|
if (__pyx_t_6) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1967
|
|
*
|
|
* if (block_size % 2 != 1 or block_size <= 1):
|
|
* raise ValueError('block size must be and odd number and greater than 1') # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out = new_array_like(src)
|
|
*/
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_41));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_s_41));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_41));
|
|
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_Raise(__pyx_t_2, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L8;
|
|
}
|
|
__pyx_L8:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1969
|
|
* raise ValueError('block size must be and odd number and greater than 1')
|
|
*
|
|
* cdef np.ndarray out = new_array_like(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_2 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like(__pyx_v_src)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1973
|
|
* cdef IplImage srcimg
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1974
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvAdaptiveThreshold(&srcimg, &outimg, max_value, adaptive_method,
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1977
|
|
*
|
|
* c_cvAdaptiveThreshold(&srcimg, &outimg, max_value, adaptive_method,
|
|
* threshold_type, block_size, param1) # <<<<<<<<<<<<<<
|
|
*
|
|
* return out
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvAdaptiveThreshold((&__pyx_v_srcimg), (&__pyx_v_outimg), __pyx_v_max_value, __pyx_v_adaptive_method, __pyx_v_threshold_type, __pyx_v_block_size, __pyx_v_param1);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1979
|
|
* threshold_type, block_size, param1)
|
|
*
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvAdaptiveThreshold");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2000
|
|
* Downsampled image half the size of the original
|
|
* in each dimension.''')
|
|
* def cvPyrDown(np.ndarray src): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvPyrDown(PyObject *__pyx_self, PyObject *__pyx_v_src); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvPyrDown(PyObject *__pyx_self, PyObject *__pyx_v_src) {
|
|
int __pyx_v_outdim;
|
|
npy_intp *__pyx_v_outshape;
|
|
PyArrayObject *__pyx_v_out = 0;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_SetupRefcountContext("cvPyrDown");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2002
|
|
* def cvPyrDown(np.ndarray src):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
* assert_dtype(src, [UINT8, UINT16, FLOAT32, FLOAT64])
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(((PyArrayObject *)__pyx_v_src)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2003
|
|
*
|
|
* validate_array(src)
|
|
* assert_dtype(src, [UINT8, UINT16, FLOAT32, FLOAT64]) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef int outdim = src.ndim
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PyList_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyList_SET_ITEM(__pyx_t_6, 3, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(((PyArrayObject *)__pyx_v_src), ((PyObject *)__pyx_t_6)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2005
|
|
* assert_dtype(src, [UINT8, UINT16, FLOAT32, FLOAT64])
|
|
*
|
|
* cdef int outdim = src.ndim # <<<<<<<<<<<<<<
|
|
* cdef np.npy_intp* outshape = clone_array_shape(src)
|
|
* outshape[0] = <np.npy_intp>(src.shape[0] + 1) / 2
|
|
*/
|
|
__pyx_v_outdim = ((PyArrayObject *)__pyx_v_src)->nd;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2006
|
|
*
|
|
* cdef int outdim = src.ndim
|
|
* cdef np.npy_intp* outshape = clone_array_shape(src) # <<<<<<<<<<<<<<
|
|
* outshape[0] = <np.npy_intp>(src.shape[0] + 1) / 2
|
|
* outshape[1] = <np.npy_intp>(src.shape[1] + 1) / 2
|
|
*/
|
|
__pyx_v_outshape = __pyx_f_7scikits_5image_6opencv_14opencv_backend_clone_array_shape(((PyArrayObject *)__pyx_v_src));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2007
|
|
* cdef int outdim = src.ndim
|
|
* cdef np.npy_intp* outshape = clone_array_shape(src)
|
|
* outshape[0] = <np.npy_intp>(src.shape[0] + 1) / 2 # <<<<<<<<<<<<<<
|
|
* outshape[1] = <np.npy_intp>(src.shape[1] + 1) / 2
|
|
*
|
|
*/
|
|
(__pyx_v_outshape[0]) = __Pyx_div_long(((npy_intp)((((PyArrayObject *)__pyx_v_src)->dimensions[0]) + 1)), 2);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2008
|
|
* cdef np.npy_intp* outshape = clone_array_shape(src)
|
|
* outshape[0] = <np.npy_intp>(src.shape[0] + 1) / 2
|
|
* outshape[1] = <np.npy_intp>(src.shape[1] + 1) / 2 # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out = new_array(outdim, outshape, src.dtype)
|
|
*/
|
|
(__pyx_v_outshape[1]) = __Pyx_div_long(((npy_intp)((((PyArrayObject *)__pyx_v_src)->dimensions[1]) + 1)), 2);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2010
|
|
* outshape[1] = <np.npy_intp>(src.shape[1] + 1) / 2
|
|
*
|
|
* cdef np.ndarray out = new_array(outdim, outshape, src.dtype) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_v_src, __pyx_n_s__dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_5 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array(__pyx_v_outdim, __pyx_v_outshape, __pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2014
|
|
* cdef IplImage srcimg
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(((PyArrayObject *)__pyx_v_src), (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2015
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvPyrDown(&srcimg, &outimg, 7)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2017
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
* c_cvPyrDown(&srcimg, &outimg, 7) # <<<<<<<<<<<<<<
|
|
*
|
|
* PyMem_Free(outshape)
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvPyrDown((&__pyx_v_srcimg), (&__pyx_v_outimg), 7);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2019
|
|
* c_cvPyrDown(&srcimg, &outimg, 7)
|
|
*
|
|
* PyMem_Free(outshape) # <<<<<<<<<<<<<<
|
|
*
|
|
* return out
|
|
*/
|
|
PyMem_Free(__pyx_v_outshape);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2021
|
|
* PyMem_Free(outshape)
|
|
*
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvPyrDown");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2042
|
|
* Upsampled image twice the size of the original
|
|
* in each dimension.''')
|
|
* def cvPyrUp(np.ndarray src): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvPyrUp(PyObject *__pyx_self, PyObject *__pyx_v_src); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvPyrUp(PyObject *__pyx_self, PyObject *__pyx_v_src) {
|
|
int __pyx_v_outdim;
|
|
npy_intp *__pyx_v_outshape;
|
|
PyArrayObject *__pyx_v_out = 0;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
__Pyx_SetupRefcountContext("cvPyrUp");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2044
|
|
* def cvPyrUp(np.ndarray src):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
* assert_dtype(src, [UINT8, UINT16, FLOAT32, FLOAT64])
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(((PyArrayObject *)__pyx_v_src)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2045
|
|
*
|
|
* validate_array(src)
|
|
* assert_dtype(src, [UINT8, UINT16, FLOAT32, FLOAT64]) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef int outdim = src.ndim
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT64); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PyList_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_4);
|
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
PyList_SET_ITEM(__pyx_t_6, 3, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_4 = 0;
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(((PyArrayObject *)__pyx_v_src), ((PyObject *)__pyx_t_6)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2047
|
|
* assert_dtype(src, [UINT8, UINT16, FLOAT32, FLOAT64])
|
|
*
|
|
* cdef int outdim = src.ndim # <<<<<<<<<<<<<<
|
|
* cdef np.npy_intp* outshape = clone_array_shape(src)
|
|
* outshape[0] = <np.npy_intp>(src.shape[0] * 2)
|
|
*/
|
|
__pyx_v_outdim = ((PyArrayObject *)__pyx_v_src)->nd;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2048
|
|
*
|
|
* cdef int outdim = src.ndim
|
|
* cdef np.npy_intp* outshape = clone_array_shape(src) # <<<<<<<<<<<<<<
|
|
* outshape[0] = <np.npy_intp>(src.shape[0] * 2)
|
|
* outshape[1] = <np.npy_intp>(src.shape[1] * 2)
|
|
*/
|
|
__pyx_v_outshape = __pyx_f_7scikits_5image_6opencv_14opencv_backend_clone_array_shape(((PyArrayObject *)__pyx_v_src));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2049
|
|
* cdef int outdim = src.ndim
|
|
* cdef np.npy_intp* outshape = clone_array_shape(src)
|
|
* outshape[0] = <np.npy_intp>(src.shape[0] * 2) # <<<<<<<<<<<<<<
|
|
* outshape[1] = <np.npy_intp>(src.shape[1] * 2)
|
|
*
|
|
*/
|
|
(__pyx_v_outshape[0]) = ((npy_intp)((((PyArrayObject *)__pyx_v_src)->dimensions[0]) * 2));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2050
|
|
* cdef np.npy_intp* outshape = clone_array_shape(src)
|
|
* outshape[0] = <np.npy_intp>(src.shape[0] * 2)
|
|
* outshape[1] = <np.npy_intp>(src.shape[1] * 2) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out = new_array(outdim, outshape, src.dtype)
|
|
*/
|
|
(__pyx_v_outshape[1]) = ((npy_intp)((((PyArrayObject *)__pyx_v_src)->dimensions[1]) * 2));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2052
|
|
* outshape[1] = <np.npy_intp>(src.shape[1] * 2)
|
|
*
|
|
* cdef np.ndarray out = new_array(outdim, outshape, src.dtype) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_v_src, __pyx_n_s__dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_5 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array(__pyx_v_outdim, __pyx_v_outshape, __pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2056
|
|
* cdef IplImage srcimg
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(((PyArrayObject *)__pyx_v_src), (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2057
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(src, &srcimg)
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvPyrUp(&srcimg, &outimg, 7)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2059
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
* c_cvPyrUp(&srcimg, &outimg, 7) # <<<<<<<<<<<<<<
|
|
*
|
|
* PyMem_Free(outshape)
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvPyrUp((&__pyx_v_srcimg), (&__pyx_v_outimg), 7);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2061
|
|
* c_cvPyrUp(&srcimg, &outimg, 7)
|
|
*
|
|
* PyMem_Free(outshape) # <<<<<<<<<<<<<<
|
|
*
|
|
* return out
|
|
*/
|
|
PyMem_Free(__pyx_v_outshape);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2063
|
|
* PyMem_Free(outshape)
|
|
*
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvPyrUp");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2094
|
|
* Intrinsics is the 3x3 camera instrinsics matrix.
|
|
* Distortion is the 5-vector of distortion coefficients.''')
|
|
* def cvCalibrateCamera2(np.ndarray object_points, np.ndarray image_points, # <<<<<<<<<<<<<<
|
|
* np.ndarray point_counts, image_size):
|
|
*
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvCalibrateCamera2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvCalibrateCamera2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_object_points = 0;
|
|
PyArrayObject *__pyx_v_image_points = 0;
|
|
PyArrayObject *__pyx_v_point_counts = 0;
|
|
PyObject *__pyx_v_image_size = 0;
|
|
npy_intp __pyx_v_intrinsics_shape[2];
|
|
PyArrayObject *__pyx_v_intrinsics = 0;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_ipl_intrinsics;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *__pyx_v_cvmat_intrinsics;
|
|
npy_intp __pyx_v_distortion_shape[2];
|
|
PyArrayObject *__pyx_v_distortion = 0;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_ipl_distortion;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *__pyx_v_cvmat_distortion;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_ipl_object_points;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_ipl_image_points;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_ipl_point_counts;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *__pyx_v_cvmat_object_points;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *__pyx_v_cvmat_image_points;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *__pyx_v_cvmat_point_counts;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvSize __pyx_v_cv_image_size;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__object_points,&__pyx_n_s__image_points,&__pyx_n_s__point_counts,&__pyx_n_s__image_size,0};
|
|
__Pyx_SetupRefcountContext("cvCalibrateCamera2");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[4] = {0,0,0,0};
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__object_points);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__image_points);
|
|
if (likely(values[1])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvCalibrateCamera2", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 2:
|
|
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__point_counts);
|
|
if (likely(values[2])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvCalibrateCamera2", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 3:
|
|
values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__image_size);
|
|
if (likely(values[3])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvCalibrateCamera2", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvCalibrateCamera2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_object_points = ((PyArrayObject *)values[0]);
|
|
__pyx_v_image_points = ((PyArrayObject *)values[1]);
|
|
__pyx_v_point_counts = ((PyArrayObject *)values[2]);
|
|
__pyx_v_image_size = values[3];
|
|
} else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
|
|
goto __pyx_L5_argtuple_error;
|
|
} else {
|
|
__pyx_v_object_points = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
__pyx_v_image_points = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
|
|
__pyx_v_point_counts = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2));
|
|
__pyx_v_image_size = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvCalibrateCamera2", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvCalibrateCamera2");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_object_points), __pyx_ptype_5numpy_ndarray, 1, "object_points", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_image_points), __pyx_ptype_5numpy_ndarray, 1, "image_points", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_point_counts), __pyx_ptype_5numpy_ndarray, 1, "point_counts", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2098
|
|
*
|
|
* # Validate input
|
|
* validate_array(object_points) # <<<<<<<<<<<<<<
|
|
* assert_ndims(object_points, [2])
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_object_points); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2099
|
|
* # Validate input
|
|
* validate_array(object_points)
|
|
* assert_ndims(object_points, [2]) # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(image_points)
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_ndims(__pyx_v_object_points, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2101
|
|
* assert_ndims(object_points, [2])
|
|
*
|
|
* validate_array(image_points) # <<<<<<<<<<<<<<
|
|
* assert_ndims(image_points, [2])
|
|
*
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_image_points); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2102
|
|
*
|
|
* validate_array(image_points)
|
|
* assert_ndims(image_points, [2]) # <<<<<<<<<<<<<<
|
|
*
|
|
* assert_dtype(point_counts, [INT32])
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_ndims(__pyx_v_image_points, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2104
|
|
* assert_ndims(image_points, [2])
|
|
*
|
|
* assert_dtype(point_counts, [INT32]) # <<<<<<<<<<<<<<
|
|
* assert_ndims(point_counts, [1])
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__INT32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_point_counts, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2105
|
|
*
|
|
* assert_dtype(point_counts, [INT32])
|
|
* assert_ndims(point_counts, [1]) # <<<<<<<<<<<<<<
|
|
*
|
|
* # Allocate a new intrinsics array
|
|
*/
|
|
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_ndims(__pyx_v_point_counts, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2109
|
|
* # Allocate a new intrinsics array
|
|
* cdef np.npy_intp intrinsics_shape[2]
|
|
* intrinsics_shape[0] = <np.npy_intp> 3 # <<<<<<<<<<<<<<
|
|
* intrinsics_shape[1] = <np.npy_intp> 3
|
|
* cdef np.ndarray intrinsics = new_array(2, intrinsics_shape, FLOAT64)
|
|
*/
|
|
(__pyx_v_intrinsics_shape[0]) = ((npy_intp)3);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2110
|
|
* cdef np.npy_intp intrinsics_shape[2]
|
|
* intrinsics_shape[0] = <np.npy_intp> 3
|
|
* intrinsics_shape[1] = <np.npy_intp> 3 # <<<<<<<<<<<<<<
|
|
* cdef np.ndarray intrinsics = new_array(2, intrinsics_shape, FLOAT64)
|
|
* cdef IplImage ipl_intrinsics
|
|
*/
|
|
(__pyx_v_intrinsics_shape[1]) = ((npy_intp)3);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2111
|
|
* intrinsics_shape[0] = <np.npy_intp> 3
|
|
* intrinsics_shape[1] = <np.npy_intp> 3
|
|
* cdef np.ndarray intrinsics = new_array(2, intrinsics_shape, FLOAT64) # <<<<<<<<<<<<<<
|
|
* cdef IplImage ipl_intrinsics
|
|
* populate_iplimage(intrinsics, &ipl_intrinsics)
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT64); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array(2, __pyx_v_intrinsics_shape, __pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_intrinsics = ((PyArrayObject *)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2113
|
|
* cdef np.ndarray intrinsics = new_array(2, intrinsics_shape, FLOAT64)
|
|
* cdef IplImage ipl_intrinsics
|
|
* populate_iplimage(intrinsics, &ipl_intrinsics) # <<<<<<<<<<<<<<
|
|
* cdef CvMat* cvmat_intrinsics = cvmat_ptr_from_iplimage(&ipl_intrinsics)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_intrinsics, (&__pyx_v_ipl_intrinsics));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2114
|
|
* cdef IplImage ipl_intrinsics
|
|
* populate_iplimage(intrinsics, &ipl_intrinsics)
|
|
* cdef CvMat* cvmat_intrinsics = cvmat_ptr_from_iplimage(&ipl_intrinsics) # <<<<<<<<<<<<<<
|
|
*
|
|
* # Allocate a new distortion array
|
|
*/
|
|
__pyx_v_cvmat_intrinsics = __pyx_f_7scikits_5image_6opencv_14opencv_backend_cvmat_ptr_from_iplimage((&__pyx_v_ipl_intrinsics));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2118
|
|
* # Allocate a new distortion array
|
|
* cdef np.npy_intp distortion_shape[2]
|
|
* distortion_shape[0] = <np.npy_intp> 1 # <<<<<<<<<<<<<<
|
|
* distortion_shape[1] = <np.npy_intp> 5
|
|
* cdef np.ndarray distortion = new_array(2, distortion_shape, FLOAT64)
|
|
*/
|
|
(__pyx_v_distortion_shape[0]) = ((npy_intp)1);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2119
|
|
* cdef np.npy_intp distortion_shape[2]
|
|
* distortion_shape[0] = <np.npy_intp> 1
|
|
* distortion_shape[1] = <np.npy_intp> 5 # <<<<<<<<<<<<<<
|
|
* cdef np.ndarray distortion = new_array(2, distortion_shape, FLOAT64)
|
|
* cdef IplImage ipl_distortion
|
|
*/
|
|
(__pyx_v_distortion_shape[1]) = ((npy_intp)5);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2120
|
|
* distortion_shape[0] = <np.npy_intp> 1
|
|
* distortion_shape[1] = <np.npy_intp> 5
|
|
* cdef np.ndarray distortion = new_array(2, distortion_shape, FLOAT64) # <<<<<<<<<<<<<<
|
|
* cdef IplImage ipl_distortion
|
|
* populate_iplimage(distortion, &ipl_distortion)
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array(2, __pyx_v_distortion_shape, __pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v_distortion = ((PyArrayObject *)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2122
|
|
* cdef np.ndarray distortion = new_array(2, distortion_shape, FLOAT64)
|
|
* cdef IplImage ipl_distortion
|
|
* populate_iplimage(distortion, &ipl_distortion) # <<<<<<<<<<<<<<
|
|
* cdef CvMat* cvmat_distortion = cvmat_ptr_from_iplimage(&ipl_distortion)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_distortion, (&__pyx_v_ipl_distortion));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2123
|
|
* cdef IplImage ipl_distortion
|
|
* populate_iplimage(distortion, &ipl_distortion)
|
|
* cdef CvMat* cvmat_distortion = cvmat_ptr_from_iplimage(&ipl_distortion) # <<<<<<<<<<<<<<
|
|
*
|
|
* # Make the object & image points & npoints accessible for OpenCV
|
|
*/
|
|
__pyx_v_cvmat_distortion = __pyx_f_7scikits_5image_6opencv_14opencv_backend_cvmat_ptr_from_iplimage((&__pyx_v_ipl_distortion));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2128
|
|
* cdef IplImage ipl_object_points, ipl_image_points, ipl_point_counts
|
|
* cdef CvMat* cvmat_object_points, *cvmat_image_points, *cvmat_point_counts
|
|
* populate_iplimage(object_points, &ipl_object_points) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(image_points, &ipl_image_points)
|
|
* populate_iplimage(point_counts, &ipl_point_counts)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_object_points, (&__pyx_v_ipl_object_points));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2129
|
|
* cdef CvMat* cvmat_object_points, *cvmat_image_points, *cvmat_point_counts
|
|
* populate_iplimage(object_points, &ipl_object_points)
|
|
* populate_iplimage(image_points, &ipl_image_points) # <<<<<<<<<<<<<<
|
|
* populate_iplimage(point_counts, &ipl_point_counts)
|
|
*
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_image_points, (&__pyx_v_ipl_image_points));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2130
|
|
* populate_iplimage(object_points, &ipl_object_points)
|
|
* populate_iplimage(image_points, &ipl_image_points)
|
|
* populate_iplimage(point_counts, &ipl_point_counts) # <<<<<<<<<<<<<<
|
|
*
|
|
* cvmat_object_points = cvmat_ptr_from_iplimage(&ipl_object_points)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_point_counts, (&__pyx_v_ipl_point_counts));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2132
|
|
* populate_iplimage(point_counts, &ipl_point_counts)
|
|
*
|
|
* cvmat_object_points = cvmat_ptr_from_iplimage(&ipl_object_points) # <<<<<<<<<<<<<<
|
|
* cvmat_image_points = cvmat_ptr_from_iplimage(&ipl_image_points)
|
|
* cvmat_point_counts = cvmat_ptr_from_iplimage(&ipl_point_counts)
|
|
*/
|
|
__pyx_v_cvmat_object_points = __pyx_f_7scikits_5image_6opencv_14opencv_backend_cvmat_ptr_from_iplimage((&__pyx_v_ipl_object_points));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2133
|
|
*
|
|
* cvmat_object_points = cvmat_ptr_from_iplimage(&ipl_object_points)
|
|
* cvmat_image_points = cvmat_ptr_from_iplimage(&ipl_image_points) # <<<<<<<<<<<<<<
|
|
* cvmat_point_counts = cvmat_ptr_from_iplimage(&ipl_point_counts)
|
|
*
|
|
*/
|
|
__pyx_v_cvmat_image_points = __pyx_f_7scikits_5image_6opencv_14opencv_backend_cvmat_ptr_from_iplimage((&__pyx_v_ipl_image_points));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2134
|
|
* cvmat_object_points = cvmat_ptr_from_iplimage(&ipl_object_points)
|
|
* cvmat_image_points = cvmat_ptr_from_iplimage(&ipl_image_points)
|
|
* cvmat_point_counts = cvmat_ptr_from_iplimage(&ipl_point_counts) # <<<<<<<<<<<<<<
|
|
*
|
|
* # Set image size
|
|
*/
|
|
__pyx_v_cvmat_point_counts = __pyx_f_7scikits_5image_6opencv_14opencv_backend_cvmat_ptr_from_iplimage((&__pyx_v_ipl_point_counts));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2138
|
|
* # Set image size
|
|
* cdef CvSize cv_image_size
|
|
* cv_image_size.height = image_size[0] # <<<<<<<<<<<<<<
|
|
* cv_image_size.width = image_size[1]
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetItemInt(__pyx_v_image_size, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_cv_image_size.height = __pyx_t_1;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2139
|
|
* cdef CvSize cv_image_size
|
|
* cv_image_size.height = image_size[0]
|
|
* cv_image_size.width = image_size[1] # <<<<<<<<<<<<<<
|
|
*
|
|
* # Call the function
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetItemInt(__pyx_v_image_size, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_cv_image_size.width = __pyx_t_1;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2144
|
|
* c_cvCalibrateCamera2(cvmat_object_points, cvmat_image_points,
|
|
* cvmat_point_counts, cv_image_size, cvmat_intrinsics,
|
|
* cvmat_distortion, NULL, NULL, 0) # <<<<<<<<<<<<<<
|
|
*
|
|
* # Convert distortion back into a vector
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvCalibrateCamera2(__pyx_v_cvmat_object_points, __pyx_v_cvmat_image_points, __pyx_v_cvmat_point_counts, __pyx_v_cv_image_size, __pyx_v_cvmat_intrinsics, __pyx_v_cvmat_distortion, NULL, NULL, 0);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2147
|
|
*
|
|
* # Convert distortion back into a vector
|
|
* distortion = np.PyArray_Squeeze(distortion) # <<<<<<<<<<<<<<
|
|
*
|
|
* PyMem_Free(cvmat_intrinsics)
|
|
*/
|
|
__pyx_t_3 = PyArray_Squeeze(__pyx_v_distortion); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_distortion));
|
|
__pyx_v_distortion = ((PyArrayObject *)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2149
|
|
* distortion = np.PyArray_Squeeze(distortion)
|
|
*
|
|
* PyMem_Free(cvmat_intrinsics) # <<<<<<<<<<<<<<
|
|
* PyMem_Free(cvmat_distortion)
|
|
* PyMem_Free(cvmat_object_points)
|
|
*/
|
|
PyMem_Free(__pyx_v_cvmat_intrinsics);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2150
|
|
*
|
|
* PyMem_Free(cvmat_intrinsics)
|
|
* PyMem_Free(cvmat_distortion) # <<<<<<<<<<<<<<
|
|
* PyMem_Free(cvmat_object_points)
|
|
* PyMem_Free(cvmat_image_points)
|
|
*/
|
|
PyMem_Free(__pyx_v_cvmat_distortion);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2151
|
|
* PyMem_Free(cvmat_intrinsics)
|
|
* PyMem_Free(cvmat_distortion)
|
|
* PyMem_Free(cvmat_object_points) # <<<<<<<<<<<<<<
|
|
* PyMem_Free(cvmat_image_points)
|
|
* PyMem_Free(cvmat_point_counts)
|
|
*/
|
|
PyMem_Free(__pyx_v_cvmat_object_points);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2152
|
|
* PyMem_Free(cvmat_distortion)
|
|
* PyMem_Free(cvmat_object_points)
|
|
* PyMem_Free(cvmat_image_points) # <<<<<<<<<<<<<<
|
|
* PyMem_Free(cvmat_point_counts)
|
|
*
|
|
*/
|
|
PyMem_Free(__pyx_v_cvmat_image_points);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2153
|
|
* PyMem_Free(cvmat_object_points)
|
|
* PyMem_Free(cvmat_image_points)
|
|
* PyMem_Free(cvmat_point_counts) # <<<<<<<<<<<<<<
|
|
*
|
|
* return intrinsics, distortion
|
|
*/
|
|
PyMem_Free(__pyx_v_cvmat_point_counts);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2155
|
|
* PyMem_Free(cvmat_point_counts)
|
|
*
|
|
* return intrinsics, distortion # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_intrinsics));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_intrinsics));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_intrinsics));
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_distortion));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_distortion));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_v_distortion));
|
|
__pyx_r = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvCalibrateCamera2");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_intrinsics);
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_distortion);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2189
|
|
* out : ndarray Nx2
|
|
* An nx2 array of the corners found.''')
|
|
* def cvFindChessboardCorners(np.ndarray src, pattern_size, # <<<<<<<<<<<<<<
|
|
* int flag=CV_CALIB_CB_ADAPTIVE_THRESH):
|
|
*
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvFindChessboardCorners(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvFindChessboardCorners(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
PyObject *__pyx_v_pattern_size = 0;
|
|
int __pyx_v_flag;
|
|
npy_intp __pyx_v_outshape[2];
|
|
PyArrayObject *__pyx_v_out;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvPoint2D32f *__pyx_v_cvpoints;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvSize __pyx_v_cvpattern_size;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_srcimg;
|
|
int __pyx_v_ncorners_found;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
npy_intp __pyx_t_4;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__pattern_size,&__pyx_n_s__flag,0};
|
|
__Pyx_SetupRefcountContext("cvFindChessboardCorners");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[3] = {0,0,0};
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pattern_size);
|
|
if (likely(values[1])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvFindChessboardCorners", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 2:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__flag);
|
|
if (unlikely(value)) { values[2] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvFindChessboardCorners") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
__pyx_v_pattern_size = values[1];
|
|
if (values[2]) {
|
|
__pyx_v_flag = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_flag == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
} else {
|
|
__pyx_v_flag = __pyx_k_42;
|
|
}
|
|
} else {
|
|
__pyx_v_flag = __pyx_k_42;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 3:
|
|
__pyx_v_flag = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_flag == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
case 2:
|
|
__pyx_v_pattern_size = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
__pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvFindChessboardCorners", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvFindChessboardCorners");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__pyx_v_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2192
|
|
* int flag=CV_CALIB_CB_ADAPTIVE_THRESH):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* assert_nchannels(src, [1, 3])
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2194
|
|
* validate_array(src)
|
|
*
|
|
* assert_nchannels(src, [1, 3]) # <<<<<<<<<<<<<<
|
|
* assert_dtype(src, [UINT8])
|
|
*
|
|
*/
|
|
__pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_src, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2195
|
|
*
|
|
* assert_nchannels(src, [1, 3])
|
|
* assert_dtype(src, [UINT8]) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.npy_intp outshape[2]
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2198
|
|
*
|
|
* cdef np.npy_intp outshape[2]
|
|
* outshape[0] = <np.npy_intp> pattern_size[0] * pattern_size[1] # <<<<<<<<<<<<<<
|
|
* outshape[1] = <np.npy_intp> 2
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetItemInt(__pyx_v_pattern_size, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_4 = __Pyx_PyInt_from_py_npy_intp(__pyx_t_3); if (unlikely((__pyx_t_4 == (npy_intp)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = __Pyx_PyInt_to_py_npy_intp(((npy_intp)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pattern_size, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = PyNumber_Multiply(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_4 = __Pyx_PyInt_from_py_npy_intp(__pyx_t_5); if (unlikely((__pyx_t_4 == (npy_intp)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
(__pyx_v_outshape[0]) = __pyx_t_4;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2199
|
|
* cdef np.npy_intp outshape[2]
|
|
* outshape[0] = <np.npy_intp> pattern_size[0] * pattern_size[1]
|
|
* outshape[1] = <np.npy_intp> 2 # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out
|
|
*/
|
|
(__pyx_v_outshape[1]) = ((npy_intp)2);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2202
|
|
*
|
|
* cdef np.ndarray out
|
|
* out = new_array(2, outshape, FLOAT32) # <<<<<<<<<<<<<<
|
|
* cdef CvPoint2D32f* cvpoints = array_as_cvPoint2D32f_ptr(out)
|
|
*
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_2 = ((PyObject *)__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array(2, __pyx_v_outshape, __pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2203
|
|
* cdef np.ndarray out
|
|
* out = new_array(2, outshape, FLOAT32)
|
|
* cdef CvPoint2D32f* cvpoints = array_as_cvPoint2D32f_ptr(out) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef CvSize cvpattern_size
|
|
*/
|
|
__pyx_v_cvpoints = __pyx_f_7scikits_5image_6opencv_14opencv_backend_array_as_cvPoint2D32f_ptr(__pyx_v_out);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2206
|
|
*
|
|
* cdef CvSize cvpattern_size
|
|
* cvpattern_size.height = pattern_size[0] # <<<<<<<<<<<<<<
|
|
* cvpattern_size.width = pattern_size[1]
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pattern_size, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v_cvpattern_size.height = __pyx_t_1;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2207
|
|
* cdef CvSize cvpattern_size
|
|
* cvpattern_size.height = pattern_size[0]
|
|
* cvpattern_size.width = pattern_size[1] # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage srcimg
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pattern_size, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_v_cvpattern_size.width = __pyx_t_1;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2210
|
|
*
|
|
* cdef IplImage srcimg
|
|
* populate_iplimage(src, &srcimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef int ncorners_found
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_src, (&__pyx_v_srcimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2214
|
|
* cdef int ncorners_found
|
|
* c_cvFindChessboardCorners(&srcimg, cvpattern_size, cvpoints,
|
|
* &ncorners_found, flag) # <<<<<<<<<<<<<<
|
|
*
|
|
* return out[:ncorners_found]
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvFindChessboardCorners((&__pyx_v_srcimg), __pyx_v_cvpattern_size, __pyx_v_cvpoints, (&__pyx_v_ncorners_found), __pyx_v_flag);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2216
|
|
* &ncorners_found, flag)
|
|
*
|
|
* return out[:ncorners_found] # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_2 = PySequence_GetSlice(((PyObject *)__pyx_v_out), 0, __pyx_v_ncorners_found); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_r = __pyx_t_2;
|
|
__pyx_t_2 = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvFindChessboardCorners");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2247
|
|
* Otherwise, the function returns a new image with
|
|
* the corners drawn into it.''')
|
|
* def cvDrawChessboardCorners(np.ndarray src, pattern_size, np.ndarray corners, # <<<<<<<<<<<<<<
|
|
* in_place=False):
|
|
*
|
|
*/
|
|
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvDrawChessboardCorners(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
static PyObject *__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvDrawChessboardCorners(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
PyArrayObject *__pyx_v_src = 0;
|
|
PyObject *__pyx_v_pattern_size = 0;
|
|
PyArrayObject *__pyx_v_corners = 0;
|
|
PyObject *__pyx_v_in_place = 0;
|
|
PyArrayObject *__pyx_v_out;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvSize __pyx_v_cvpattern_size;
|
|
__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage __pyx_v_outimg;
|
|
struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvPoint2D32f *__pyx_v_cvcorners;
|
|
int __pyx_v_ncount;
|
|
int __pyx_v_pattern_was_found;
|
|
PyObject *__pyx_r = NULL;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__src,&__pyx_n_s__pattern_size,&__pyx_n_s__corners,&__pyx_n_s__in_place,0};
|
|
__Pyx_SetupRefcountContext("cvDrawChessboardCorners");
|
|
__pyx_self = __pyx_self;
|
|
if (unlikely(__pyx_kwds)) {
|
|
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
|
|
PyObject* values[4] = {0,0,0,0};
|
|
values[3] = __pyx_k_43;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
|
|
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
|
|
case 0: break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 0:
|
|
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__src);
|
|
if (likely(values[0])) kw_args--;
|
|
else goto __pyx_L5_argtuple_error;
|
|
case 1:
|
|
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pattern_size);
|
|
if (likely(values[1])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvDrawChessboardCorners", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2247; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 2:
|
|
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__corners);
|
|
if (likely(values[2])) kw_args--;
|
|
else {
|
|
__Pyx_RaiseArgtupleInvalid("cvDrawChessboardCorners", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2247; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
case 3:
|
|
if (kw_args > 0) {
|
|
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__in_place);
|
|
if (unlikely(value)) { values[3] = value; kw_args--; }
|
|
}
|
|
}
|
|
if (unlikely(kw_args > 0)) {
|
|
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cvDrawChessboardCorners") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2247; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
}
|
|
__pyx_v_src = ((PyArrayObject *)values[0]);
|
|
__pyx_v_pattern_size = values[1];
|
|
__pyx_v_corners = ((PyArrayObject *)values[2]);
|
|
__pyx_v_in_place = values[3];
|
|
} else {
|
|
__pyx_v_in_place = __pyx_k_43;
|
|
switch (PyTuple_GET_SIZE(__pyx_args)) {
|
|
case 4:
|
|
__pyx_v_in_place = PyTuple_GET_ITEM(__pyx_args, 3);
|
|
case 3:
|
|
__pyx_v_corners = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2));
|
|
__pyx_v_pattern_size = PyTuple_GET_ITEM(__pyx_args, 1);
|
|
__pyx_v_src = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
|
|
break;
|
|
default: goto __pyx_L5_argtuple_error;
|
|
}
|
|
}
|
|
goto __pyx_L4_argument_unpacking_done;
|
|
__pyx_L5_argtuple_error:;
|
|
__Pyx_RaiseArgtupleInvalid("cvDrawChessboardCorners", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2247; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
|
|
__pyx_L3_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvDrawChessboardCorners");
|
|
return NULL;
|
|
__pyx_L4_argument_unpacking_done:;
|
|
__Pyx_INCREF((PyObject *)__pyx_v_src);
|
|
__Pyx_INCREF(__pyx_v_pattern_size);
|
|
__Pyx_INCREF((PyObject *)__pyx_v_corners);
|
|
__Pyx_INCREF(__pyx_v_in_place);
|
|
__pyx_v_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_5numpy_ndarray, 1, "src", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_corners), __pyx_ptype_5numpy_ndarray, 1, "corners", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2250
|
|
* in_place=False):
|
|
*
|
|
* validate_array(src) # <<<<<<<<<<<<<<
|
|
*
|
|
* assert_nchannels(src, [3])
|
|
*/
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array(__pyx_v_src); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2252
|
|
* validate_array(src)
|
|
*
|
|
* assert_nchannels(src, [3]) # <<<<<<<<<<<<<<
|
|
* assert_dtype(src, [UINT8])
|
|
*
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels(__pyx_v_src, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2253
|
|
*
|
|
* assert_nchannels(src, [3])
|
|
* assert_dtype(src, [UINT8]) # <<<<<<<<<<<<<<
|
|
*
|
|
* assert_ndims(corners, [2])
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_src, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2255
|
|
* assert_dtype(src, [UINT8])
|
|
*
|
|
* assert_ndims(corners, [2]) # <<<<<<<<<<<<<<
|
|
* assert_dtype(corners, [FLOAT32])
|
|
*
|
|
*/
|
|
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_ndims(__pyx_v_corners, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2256
|
|
*
|
|
* assert_ndims(corners, [2])
|
|
* assert_dtype(corners, [FLOAT32]) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef np.ndarray out
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_1 = __pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype(__pyx_v_corners, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2260
|
|
* cdef np.ndarray out
|
|
*
|
|
* if not in_place: # <<<<<<<<<<<<<<
|
|
* out = src.copy()
|
|
* else:
|
|
*/
|
|
__pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_in_place); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_5 = (!__pyx_t_4);
|
|
if (__pyx_t_5) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2261
|
|
*
|
|
* if not in_place:
|
|
* out = src.copy() # <<<<<<<<<<<<<<
|
|
* else:
|
|
* out = src
|
|
*/
|
|
__pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_src), __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = ((PyArrayObject *)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
goto __pyx_L6;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2263
|
|
* out = src.copy()
|
|
* else:
|
|
* out = src # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef CvSize cvpattern_size
|
|
*/
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_src));
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_out));
|
|
__pyx_v_out = __pyx_v_src;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2266
|
|
*
|
|
* cdef CvSize cvpattern_size
|
|
* cvpattern_size.height = pattern_size[0] # <<<<<<<<<<<<<<
|
|
* cvpattern_size.width = pattern_size[1]
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetItemInt(__pyx_v_pattern_size, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_cvpattern_size.height = __pyx_t_1;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2267
|
|
* cdef CvSize cvpattern_size
|
|
* cvpattern_size.height = pattern_size[0]
|
|
* cvpattern_size.width = pattern_size[1] # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef IplImage outimg
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetItemInt(__pyx_v_pattern_size, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_cvpattern_size.width = __pyx_t_1;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2270
|
|
*
|
|
* cdef IplImage outimg
|
|
* populate_iplimage(out, &outimg) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef CvPoint2D32f* cvcorners = array_as_cvPoint2D32f_ptr(corners)
|
|
*/
|
|
__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage(__pyx_v_out, (&__pyx_v_outimg));
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2272
|
|
* populate_iplimage(out, &outimg)
|
|
*
|
|
* cdef CvPoint2D32f* cvcorners = array_as_cvPoint2D32f_ptr(corners) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef int ncount = pattern_size[0] * pattern_size[1]
|
|
*/
|
|
__pyx_v_cvcorners = __pyx_f_7scikits_5image_6opencv_14opencv_backend_array_as_cvPoint2D32f_ptr(__pyx_v_corners);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2274
|
|
* cdef CvPoint2D32f* cvcorners = array_as_cvPoint2D32f_ptr(corners)
|
|
*
|
|
* cdef int ncount = pattern_size[0] * pattern_size[1] # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef int pattern_was_found
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetItemInt(__pyx_v_pattern_size, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pattern_size, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = PyNumber_Multiply(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_v_ncount = __pyx_t_1;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2278
|
|
* cdef int pattern_was_found
|
|
*
|
|
* if corners.shape[0] == ncount: # <<<<<<<<<<<<<<
|
|
* pattern_was_found = 1
|
|
* else:
|
|
*/
|
|
__pyx_t_5 = ((__pyx_v_corners->dimensions[0]) == __pyx_v_ncount);
|
|
if (__pyx_t_5) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2279
|
|
*
|
|
* if corners.shape[0] == ncount:
|
|
* pattern_was_found = 1 # <<<<<<<<<<<<<<
|
|
* else:
|
|
* pattern_was_found = 0
|
|
*/
|
|
__pyx_v_pattern_was_found = 1;
|
|
goto __pyx_L7;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2281
|
|
* pattern_was_found = 1
|
|
* else:
|
|
* pattern_was_found = 0 # <<<<<<<<<<<<<<
|
|
*
|
|
* c_cvDrawChessboardCorners(&outimg, cvpattern_size, cvcorners,
|
|
*/
|
|
__pyx_v_pattern_was_found = 0;
|
|
}
|
|
__pyx_L7:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2284
|
|
*
|
|
* c_cvDrawChessboardCorners(&outimg, cvpattern_size, cvcorners,
|
|
* ncount, pattern_was_found) # <<<<<<<<<<<<<<
|
|
*
|
|
* if in_place:
|
|
*/
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvDrawChessboardCorners((&__pyx_v_outimg), __pyx_v_cvpattern_size, __pyx_v_cvcorners, __pyx_v_ncount, __pyx_v_pattern_was_found);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2286
|
|
* ncount, pattern_was_found)
|
|
*
|
|
* if in_place: # <<<<<<<<<<<<<<
|
|
* return None
|
|
* else:
|
|
*/
|
|
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_in_place); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_t_5) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2287
|
|
*
|
|
* if in_place:
|
|
* return None # <<<<<<<<<<<<<<
|
|
* else:
|
|
* return out
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(Py_None);
|
|
__pyx_r = Py_None;
|
|
goto __pyx_L0;
|
|
goto __pyx_L8;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2289
|
|
* return None
|
|
* else:
|
|
* return out # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__Pyx_INCREF(((PyObject *)__pyx_v_out));
|
|
__pyx_r = ((PyObject *)__pyx_v_out);
|
|
goto __pyx_L0;
|
|
}
|
|
__pyx_L8:;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv.cvDrawChessboardCorners");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF((PyObject *)__pyx_v_out);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_src);
|
|
__Pyx_DECREF(__pyx_v_pattern_size);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_corners);
|
|
__Pyx_DECREF(__pyx_v_in_place);
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":158
|
|
* # experimental exception made for __getbuffer__ and __releasebuffer__
|
|
* # -- the details of this may change.
|
|
* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
|
|
* # This implementation of getbuffer is geared towards Cython
|
|
* # requirements, and does not yet fullfill the PEP.
|
|
*/
|
|
|
|
static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
|
|
static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
|
|
int __pyx_v_copy_shape;
|
|
int __pyx_v_i;
|
|
int __pyx_v_ndim;
|
|
int __pyx_v_endian_detector;
|
|
int __pyx_v_little_endian;
|
|
int __pyx_v_t;
|
|
char *__pyx_v_f;
|
|
PyArray_Descr *__pyx_v_descr = 0;
|
|
int __pyx_v_offset;
|
|
int __pyx_v_hasfields;
|
|
int __pyx_r;
|
|
int __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
int __pyx_t_4;
|
|
int __pyx_t_5;
|
|
int __pyx_t_6;
|
|
int __pyx_t_7;
|
|
int __pyx_t_8;
|
|
char *__pyx_t_9;
|
|
__Pyx_SetupRefcountContext("__getbuffer__");
|
|
if (__pyx_v_info == NULL) return 0;
|
|
__pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(__pyx_v_info->obj);
|
|
__Pyx_INCREF((PyObject *)__pyx_v_self);
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":164
|
|
* # of flags
|
|
* cdef int copy_shape, i, ndim
|
|
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
|
|
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
|
|
*
|
|
*/
|
|
__pyx_v_endian_detector = 1;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":165
|
|
* cdef int copy_shape, i, ndim
|
|
* cdef int endian_detector = 1
|
|
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
|
|
*
|
|
* ndim = PyArray_NDIM(self)
|
|
*/
|
|
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":167
|
|
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
|
|
*
|
|
* ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
|
|
*
|
|
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
|
|
*/
|
|
__pyx_v_ndim = PyArray_NDIM(((PyArrayObject *)__pyx_v_self));
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":169
|
|
* ndim = PyArray_NDIM(self)
|
|
*
|
|
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
|
|
* copy_shape = 1
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":170
|
|
*
|
|
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
|
|
* copy_shape = 1 # <<<<<<<<<<<<<<
|
|
* else:
|
|
* copy_shape = 0
|
|
*/
|
|
__pyx_v_copy_shape = 1;
|
|
goto __pyx_L5;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":172
|
|
* copy_shape = 1
|
|
* else:
|
|
* copy_shape = 0 # <<<<<<<<<<<<<<
|
|
*
|
|
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
|
|
*/
|
|
__pyx_v_copy_shape = 0;
|
|
}
|
|
__pyx_L5:;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":174
|
|
* copy_shape = 0
|
|
*
|
|
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
|
|
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
|
|
* raise ValueError(u"ndarray is not C contiguous")
|
|
*/
|
|
if (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS)) {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":175
|
|
*
|
|
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
|
|
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
|
|
* raise ValueError(u"ndarray is not C contiguous")
|
|
*
|
|
*/
|
|
__pyx_t_1 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_C_CONTIGUOUS));
|
|
} else {
|
|
__pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS);
|
|
}
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":176
|
|
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
|
|
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
|
|
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
|
|
*
|
|
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
|
|
*/
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_u_44));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_u_44));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_u_44));
|
|
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":178
|
|
* raise ValueError(u"ndarray is not C contiguous")
|
|
*
|
|
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
|
|
* and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
|
|
* raise ValueError(u"ndarray is not Fortran contiguous")
|
|
*/
|
|
if (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS)) {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":179
|
|
*
|
|
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
|
|
* and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
|
|
* raise ValueError(u"ndarray is not Fortran contiguous")
|
|
*
|
|
*/
|
|
__pyx_t_1 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_F_CONTIGUOUS));
|
|
} else {
|
|
__pyx_t_1 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS);
|
|
}
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":180
|
|
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
|
|
* and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
|
|
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
|
|
*
|
|
* info.buf = PyArray_DATA(self)
|
|
*/
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_u_45));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_u_45));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_u_45));
|
|
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_Raise(__pyx_t_2, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L7;
|
|
}
|
|
__pyx_L7:;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":182
|
|
* raise ValueError(u"ndarray is not Fortran contiguous")
|
|
*
|
|
* info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
|
|
* info.ndim = ndim
|
|
* if copy_shape:
|
|
*/
|
|
__pyx_v_info->buf = PyArray_DATA(((PyArrayObject *)__pyx_v_self));
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":183
|
|
*
|
|
* info.buf = PyArray_DATA(self)
|
|
* info.ndim = ndim # <<<<<<<<<<<<<<
|
|
* if copy_shape:
|
|
* # Allocate new buffer for strides and shape info. This is allocated
|
|
*/
|
|
__pyx_v_info->ndim = __pyx_v_ndim;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":184
|
|
* info.buf = PyArray_DATA(self)
|
|
* info.ndim = ndim
|
|
* if copy_shape: # <<<<<<<<<<<<<<
|
|
* # Allocate new buffer for strides and shape info. This is allocated
|
|
* # as one block, strides first.
|
|
*/
|
|
__pyx_t_4 = __pyx_v_copy_shape;
|
|
if (__pyx_t_4) {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":187
|
|
* # Allocate new buffer for strides and shape info. This is allocated
|
|
* # as one block, strides first.
|
|
* info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<<
|
|
* info.shape = info.strides + ndim
|
|
* for i in range(ndim):
|
|
*/
|
|
__pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * __pyx_v_ndim) * 2)));
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":188
|
|
* # as one block, strides first.
|
|
* info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)
|
|
* info.shape = info.strides + ndim # <<<<<<<<<<<<<<
|
|
* for i in range(ndim):
|
|
* info.strides[i] = PyArray_STRIDES(self)[i]
|
|
*/
|
|
__pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":189
|
|
* info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)
|
|
* info.shape = info.strides + ndim
|
|
* for i in range(ndim): # <<<<<<<<<<<<<<
|
|
* info.strides[i] = PyArray_STRIDES(self)[i]
|
|
* info.shape[i] = PyArray_DIMS(self)[i]
|
|
*/
|
|
__pyx_t_4 = __pyx_v_ndim;
|
|
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
|
|
__pyx_v_i = __pyx_t_5;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":190
|
|
* info.shape = info.strides + ndim
|
|
* for i in range(ndim):
|
|
* info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
|
|
* info.shape[i] = PyArray_DIMS(self)[i]
|
|
* else:
|
|
*/
|
|
(__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(((PyArrayObject *)__pyx_v_self))[__pyx_v_i]);
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":191
|
|
* for i in range(ndim):
|
|
* info.strides[i] = PyArray_STRIDES(self)[i]
|
|
* info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
|
|
* else:
|
|
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
|
|
*/
|
|
(__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(((PyArrayObject *)__pyx_v_self))[__pyx_v_i]);
|
|
}
|
|
goto __pyx_L8;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":193
|
|
* info.shape[i] = PyArray_DIMS(self)[i]
|
|
* else:
|
|
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
|
|
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
|
|
* info.suboffsets = NULL
|
|
*/
|
|
__pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(((PyArrayObject *)__pyx_v_self)));
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":194
|
|
* else:
|
|
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
|
|
* info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
|
|
* info.suboffsets = NULL
|
|
* info.itemsize = PyArray_ITEMSIZE(self)
|
|
*/
|
|
__pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(((PyArrayObject *)__pyx_v_self)));
|
|
}
|
|
__pyx_L8:;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":195
|
|
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
|
|
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
|
|
* info.suboffsets = NULL # <<<<<<<<<<<<<<
|
|
* info.itemsize = PyArray_ITEMSIZE(self)
|
|
* info.readonly = not PyArray_ISWRITEABLE(self)
|
|
*/
|
|
__pyx_v_info->suboffsets = NULL;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":196
|
|
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
|
|
* info.suboffsets = NULL
|
|
* info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
|
|
* info.readonly = not PyArray_ISWRITEABLE(self)
|
|
*
|
|
*/
|
|
__pyx_v_info->itemsize = PyArray_ITEMSIZE(((PyArrayObject *)__pyx_v_self));
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":197
|
|
* info.suboffsets = NULL
|
|
* info.itemsize = PyArray_ITEMSIZE(self)
|
|
* info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef int t
|
|
*/
|
|
__pyx_v_info->readonly = (!PyArray_ISWRITEABLE(((PyArrayObject *)__pyx_v_self)));
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":200
|
|
*
|
|
* cdef int t
|
|
* cdef char* f = NULL # <<<<<<<<<<<<<<
|
|
* cdef dtype descr = self.descr
|
|
* cdef list stack
|
|
*/
|
|
__pyx_v_f = NULL;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":201
|
|
* cdef int t
|
|
* cdef char* f = NULL
|
|
* cdef dtype descr = self.descr # <<<<<<<<<<<<<<
|
|
* cdef list stack
|
|
* cdef int offset
|
|
*/
|
|
__Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_self)->descr));
|
|
__pyx_v_descr = ((PyArrayObject *)__pyx_v_self)->descr;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":205
|
|
* cdef int offset
|
|
*
|
|
* cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<<
|
|
*
|
|
* if not hasfields and not copy_shape:
|
|
*/
|
|
__pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":207
|
|
* cdef bint hasfields = PyDataType_HASFIELDS(descr)
|
|
*
|
|
* if not hasfields and not copy_shape: # <<<<<<<<<<<<<<
|
|
* # do not call releasebuffer
|
|
* info.obj = None
|
|
*/
|
|
if ((!__pyx_v_hasfields)) {
|
|
__pyx_t_1 = (!__pyx_v_copy_shape);
|
|
} else {
|
|
__pyx_t_1 = (!__pyx_v_hasfields);
|
|
}
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":209
|
|
* if not hasfields and not copy_shape:
|
|
* # do not call releasebuffer
|
|
* info.obj = None # <<<<<<<<<<<<<<
|
|
* else:
|
|
* # need to call releasebuffer
|
|
*/
|
|
__Pyx_INCREF(Py_None);
|
|
__Pyx_GIVEREF(Py_None);
|
|
__Pyx_GOTREF(__pyx_v_info->obj);
|
|
__Pyx_DECREF(__pyx_v_info->obj);
|
|
__pyx_v_info->obj = Py_None;
|
|
goto __pyx_L11;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":212
|
|
* else:
|
|
* # need to call releasebuffer
|
|
* info.obj = self # <<<<<<<<<<<<<<
|
|
*
|
|
* if not hasfields:
|
|
*/
|
|
__Pyx_INCREF(__pyx_v_self);
|
|
__Pyx_GIVEREF(__pyx_v_self);
|
|
__Pyx_GOTREF(__pyx_v_info->obj);
|
|
__Pyx_DECREF(__pyx_v_info->obj);
|
|
__pyx_v_info->obj = __pyx_v_self;
|
|
}
|
|
__pyx_L11:;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":214
|
|
* info.obj = self
|
|
*
|
|
* if not hasfields: # <<<<<<<<<<<<<<
|
|
* t = descr.type_num
|
|
* if ((descr.byteorder == '>' and little_endian) or
|
|
*/
|
|
__pyx_t_1 = (!__pyx_v_hasfields);
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":215
|
|
*
|
|
* if not hasfields:
|
|
* t = descr.type_num # <<<<<<<<<<<<<<
|
|
* if ((descr.byteorder == '>' and little_endian) or
|
|
* (descr.byteorder == '<' and not little_endian)):
|
|
*/
|
|
__pyx_v_t = __pyx_v_descr->type_num;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":216
|
|
* if not hasfields:
|
|
* t = descr.type_num
|
|
* if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<<
|
|
* (descr.byteorder == '<' and not little_endian)):
|
|
* raise ValueError(u"Non-native byte order not supported")
|
|
*/
|
|
__pyx_t_2 = PyInt_FromLong(__pyx_v_descr->byteorder); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_kp_s_46), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (__pyx_t_1) {
|
|
__pyx_t_6 = __pyx_v_little_endian;
|
|
__pyx_t_7 = __pyx_t_6;
|
|
} else {
|
|
__pyx_t_7 = __pyx_t_1;
|
|
}
|
|
if (!__pyx_t_7) {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":217
|
|
* t = descr.type_num
|
|
* if ((descr.byteorder == '>' and little_endian) or
|
|
* (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<<
|
|
* raise ValueError(u"Non-native byte order not supported")
|
|
* if t == NPY_BYTE: f = "b"
|
|
*/
|
|
__pyx_t_3 = PyInt_FromLong(__pyx_v_descr->byteorder); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_kp_s_47), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (__pyx_t_1) {
|
|
__pyx_t_6 = (!__pyx_v_little_endian);
|
|
__pyx_t_8 = __pyx_t_6;
|
|
} else {
|
|
__pyx_t_8 = __pyx_t_1;
|
|
}
|
|
__pyx_t_1 = __pyx_t_8;
|
|
} else {
|
|
__pyx_t_1 = __pyx_t_7;
|
|
}
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":218
|
|
* if ((descr.byteorder == '>' and little_endian) or
|
|
* (descr.byteorder == '<' and not little_endian)):
|
|
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
|
|
* if t == NPY_BYTE: f = "b"
|
|
* elif t == NPY_UBYTE: f = "B"
|
|
*/
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_u_48));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_u_48));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_u_48));
|
|
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L13;
|
|
}
|
|
__pyx_L13:;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":219
|
|
* (descr.byteorder == '<' and not little_endian)):
|
|
* raise ValueError(u"Non-native byte order not supported")
|
|
* if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_UBYTE: f = "B"
|
|
* elif t == NPY_SHORT: f = "h"
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_t == NPY_BYTE);
|
|
if (__pyx_t_1) {
|
|
__pyx_v_f = __pyx_k__b;
|
|
goto __pyx_L14;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":220
|
|
* raise ValueError(u"Non-native byte order not supported")
|
|
* if t == NPY_BYTE: f = "b"
|
|
* elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_SHORT: f = "h"
|
|
* elif t == NPY_USHORT: f = "H"
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_t == NPY_UBYTE);
|
|
if (__pyx_t_1) {
|
|
__pyx_v_f = __pyx_k__B;
|
|
goto __pyx_L14;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":221
|
|
* if t == NPY_BYTE: f = "b"
|
|
* elif t == NPY_UBYTE: f = "B"
|
|
* elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_USHORT: f = "H"
|
|
* elif t == NPY_INT: f = "i"
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_t == NPY_SHORT);
|
|
if (__pyx_t_1) {
|
|
__pyx_v_f = __pyx_k__h;
|
|
goto __pyx_L14;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":222
|
|
* elif t == NPY_UBYTE: f = "B"
|
|
* elif t == NPY_SHORT: f = "h"
|
|
* elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_INT: f = "i"
|
|
* elif t == NPY_UINT: f = "I"
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_t == NPY_USHORT);
|
|
if (__pyx_t_1) {
|
|
__pyx_v_f = __pyx_k__H;
|
|
goto __pyx_L14;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":223
|
|
* elif t == NPY_SHORT: f = "h"
|
|
* elif t == NPY_USHORT: f = "H"
|
|
* elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_UINT: f = "I"
|
|
* elif t == NPY_LONG: f = "l"
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_t == NPY_INT);
|
|
if (__pyx_t_1) {
|
|
__pyx_v_f = __pyx_k__i;
|
|
goto __pyx_L14;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":224
|
|
* elif t == NPY_USHORT: f = "H"
|
|
* elif t == NPY_INT: f = "i"
|
|
* elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_LONG: f = "l"
|
|
* elif t == NPY_ULONG: f = "L"
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_t == NPY_UINT);
|
|
if (__pyx_t_1) {
|
|
__pyx_v_f = __pyx_k__I;
|
|
goto __pyx_L14;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":225
|
|
* elif t == NPY_INT: f = "i"
|
|
* elif t == NPY_UINT: f = "I"
|
|
* elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_ULONG: f = "L"
|
|
* elif t == NPY_LONGLONG: f = "q"
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_t == NPY_LONG);
|
|
if (__pyx_t_1) {
|
|
__pyx_v_f = __pyx_k__l;
|
|
goto __pyx_L14;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":226
|
|
* elif t == NPY_UINT: f = "I"
|
|
* elif t == NPY_LONG: f = "l"
|
|
* elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_LONGLONG: f = "q"
|
|
* elif t == NPY_ULONGLONG: f = "Q"
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_t == NPY_ULONG);
|
|
if (__pyx_t_1) {
|
|
__pyx_v_f = __pyx_k__L;
|
|
goto __pyx_L14;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":227
|
|
* elif t == NPY_LONG: f = "l"
|
|
* elif t == NPY_ULONG: f = "L"
|
|
* elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_ULONGLONG: f = "Q"
|
|
* elif t == NPY_FLOAT: f = "f"
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_t == NPY_LONGLONG);
|
|
if (__pyx_t_1) {
|
|
__pyx_v_f = __pyx_k__q;
|
|
goto __pyx_L14;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":228
|
|
* elif t == NPY_ULONG: f = "L"
|
|
* elif t == NPY_LONGLONG: f = "q"
|
|
* elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_FLOAT: f = "f"
|
|
* elif t == NPY_DOUBLE: f = "d"
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_t == NPY_ULONGLONG);
|
|
if (__pyx_t_1) {
|
|
__pyx_v_f = __pyx_k__Q;
|
|
goto __pyx_L14;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":229
|
|
* elif t == NPY_LONGLONG: f = "q"
|
|
* elif t == NPY_ULONGLONG: f = "Q"
|
|
* elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_DOUBLE: f = "d"
|
|
* elif t == NPY_LONGDOUBLE: f = "g"
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_t == NPY_FLOAT);
|
|
if (__pyx_t_1) {
|
|
__pyx_v_f = __pyx_k__f;
|
|
goto __pyx_L14;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":230
|
|
* elif t == NPY_ULONGLONG: f = "Q"
|
|
* elif t == NPY_FLOAT: f = "f"
|
|
* elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_LONGDOUBLE: f = "g"
|
|
* elif t == NPY_CFLOAT: f = "Zf"
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_t == NPY_DOUBLE);
|
|
if (__pyx_t_1) {
|
|
__pyx_v_f = __pyx_k__d;
|
|
goto __pyx_L14;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":231
|
|
* elif t == NPY_FLOAT: f = "f"
|
|
* elif t == NPY_DOUBLE: f = "d"
|
|
* elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_CFLOAT: f = "Zf"
|
|
* elif t == NPY_CDOUBLE: f = "Zd"
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_t == NPY_LONGDOUBLE);
|
|
if (__pyx_t_1) {
|
|
__pyx_v_f = __pyx_k__g;
|
|
goto __pyx_L14;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":232
|
|
* elif t == NPY_DOUBLE: f = "d"
|
|
* elif t == NPY_LONGDOUBLE: f = "g"
|
|
* elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_CDOUBLE: f = "Zd"
|
|
* elif t == NPY_CLONGDOUBLE: f = "Zg"
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_t == NPY_CFLOAT);
|
|
if (__pyx_t_1) {
|
|
__pyx_v_f = __pyx_k__Zf;
|
|
goto __pyx_L14;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":233
|
|
* elif t == NPY_LONGDOUBLE: f = "g"
|
|
* elif t == NPY_CFLOAT: f = "Zf"
|
|
* elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_CLONGDOUBLE: f = "Zg"
|
|
* elif t == NPY_OBJECT: f = "O"
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_t == NPY_CDOUBLE);
|
|
if (__pyx_t_1) {
|
|
__pyx_v_f = __pyx_k__Zd;
|
|
goto __pyx_L14;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":234
|
|
* elif t == NPY_CFLOAT: f = "Zf"
|
|
* elif t == NPY_CDOUBLE: f = "Zd"
|
|
* elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_OBJECT: f = "O"
|
|
* else:
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_t == NPY_CLONGDOUBLE);
|
|
if (__pyx_t_1) {
|
|
__pyx_v_f = __pyx_k__Zg;
|
|
goto __pyx_L14;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":235
|
|
* elif t == NPY_CDOUBLE: f = "Zd"
|
|
* elif t == NPY_CLONGDOUBLE: f = "Zg"
|
|
* elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
|
|
* else:
|
|
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
|
|
*/
|
|
__pyx_t_1 = (__pyx_v_t == NPY_OBJECT);
|
|
if (__pyx_t_1) {
|
|
__pyx_v_f = __pyx_k__O;
|
|
goto __pyx_L14;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":237
|
|
* elif t == NPY_OBJECT: f = "O"
|
|
* else:
|
|
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
|
|
* info.format = f
|
|
* return
|
|
*/
|
|
__pyx_t_3 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_49), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_Raise(__pyx_t_2, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
}
|
|
__pyx_L14:;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":238
|
|
* else:
|
|
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
|
|
* info.format = f # <<<<<<<<<<<<<<
|
|
* return
|
|
* else:
|
|
*/
|
|
__pyx_v_info->format = __pyx_v_f;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":239
|
|
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
|
|
* info.format = f
|
|
* return # <<<<<<<<<<<<<<
|
|
* else:
|
|
* info.format = <char*>stdlib.malloc(_buffer_format_string_len)
|
|
*/
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
goto __pyx_L12;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":241
|
|
* return
|
|
* else:
|
|
* info.format = <char*>stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
|
|
* info.format[0] = '^' # Native data types, manual alignment
|
|
* offset = 0
|
|
*/
|
|
__pyx_v_info->format = ((char *)malloc(255));
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":242
|
|
* else:
|
|
* info.format = <char*>stdlib.malloc(_buffer_format_string_len)
|
|
* info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<<
|
|
* offset = 0
|
|
* f = _util_dtypestring(descr, info.format + 1,
|
|
*/
|
|
(__pyx_v_info->format[0]) = '^';
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":243
|
|
* info.format = <char*>stdlib.malloc(_buffer_format_string_len)
|
|
* info.format[0] = '^' # Native data types, manual alignment
|
|
* offset = 0 # <<<<<<<<<<<<<<
|
|
* f = _util_dtypestring(descr, info.format + 1,
|
|
* info.format + _buffer_format_string_len,
|
|
*/
|
|
__pyx_v_offset = 0;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":246
|
|
* f = _util_dtypestring(descr, info.format + 1,
|
|
* info.format + _buffer_format_string_len,
|
|
* &offset) # <<<<<<<<<<<<<<
|
|
* f[0] = 0 # Terminate format string
|
|
*
|
|
*/
|
|
__pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_v_f = __pyx_t_9;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":247
|
|
* info.format + _buffer_format_string_len,
|
|
* &offset)
|
|
* f[0] = 0 # Terminate format string # <<<<<<<<<<<<<<
|
|
*
|
|
* def __releasebuffer__(ndarray self, Py_buffer* info):
|
|
*/
|
|
(__pyx_v_f[0]) = 0;
|
|
}
|
|
__pyx_L12:;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_AddTraceback("numpy.ndarray.__getbuffer__");
|
|
__pyx_r = -1;
|
|
__Pyx_GOTREF(__pyx_v_info->obj);
|
|
__Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL;
|
|
goto __pyx_L2;
|
|
__pyx_L0:;
|
|
if (__pyx_v_info->obj == Py_None) {
|
|
__Pyx_GOTREF(Py_None);
|
|
__Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL;
|
|
}
|
|
__pyx_L2:;
|
|
__Pyx_XDECREF((PyObject *)__pyx_v_descr);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_self);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":249
|
|
* f[0] = 0 # Terminate format string
|
|
*
|
|
* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
|
|
* if PyArray_HASFIELDS(self):
|
|
* stdlib.free(info.format)
|
|
*/
|
|
|
|
static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
|
|
static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
|
|
int __pyx_t_1;
|
|
__Pyx_SetupRefcountContext("__releasebuffer__");
|
|
__Pyx_INCREF((PyObject *)__pyx_v_self);
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":250
|
|
*
|
|
* def __releasebuffer__(ndarray self, Py_buffer* info):
|
|
* if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
|
|
* stdlib.free(info.format)
|
|
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
|
|
*/
|
|
__pyx_t_1 = PyArray_HASFIELDS(((PyArrayObject *)__pyx_v_self));
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":251
|
|
* def __releasebuffer__(ndarray self, Py_buffer* info):
|
|
* if PyArray_HASFIELDS(self):
|
|
* stdlib.free(info.format) # <<<<<<<<<<<<<<
|
|
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
|
|
* stdlib.free(info.strides)
|
|
*/
|
|
free(__pyx_v_info->format);
|
|
goto __pyx_L5;
|
|
}
|
|
__pyx_L5:;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":252
|
|
* if PyArray_HASFIELDS(self):
|
|
* stdlib.free(info.format)
|
|
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
|
|
* stdlib.free(info.strides)
|
|
* # info.shape was stored after info.strides in the same block
|
|
*/
|
|
__pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
|
|
if (__pyx_t_1) {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":253
|
|
* stdlib.free(info.format)
|
|
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
|
|
* stdlib.free(info.strides) # <<<<<<<<<<<<<<
|
|
* # info.shape was stored after info.strides in the same block
|
|
*
|
|
*/
|
|
free(__pyx_v_info->strides);
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
__Pyx_DECREF((PyObject *)__pyx_v_self);
|
|
__Pyx_FinishRefcountContext();
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":704
|
|
* ctypedef npy_cdouble complex_t
|
|
*
|
|
* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
|
|
* return PyArray_MultiIterNew(1, <void*>a)
|
|
*
|
|
*/
|
|
|
|
static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
|
|
PyObject *__pyx_r = NULL;
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_SetupRefcountContext("PyArray_MultiIterNew1");
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":705
|
|
*
|
|
* cdef inline object PyArray_MultiIterNew1(a):
|
|
* return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef inline object PyArray_MultiIterNew2(a, b):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("numpy.PyArray_MultiIterNew1");
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":707
|
|
* return PyArray_MultiIterNew(1, <void*>a)
|
|
*
|
|
* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
|
|
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
|
|
*
|
|
*/
|
|
|
|
static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
|
|
PyObject *__pyx_r = NULL;
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_SetupRefcountContext("PyArray_MultiIterNew2");
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":708
|
|
*
|
|
* cdef inline object PyArray_MultiIterNew2(a, b):
|
|
* return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef inline object PyArray_MultiIterNew3(a, b, c):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("numpy.PyArray_MultiIterNew2");
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":710
|
|
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
|
|
*
|
|
* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
|
|
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
|
|
*
|
|
*/
|
|
|
|
static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
|
|
PyObject *__pyx_r = NULL;
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_SetupRefcountContext("PyArray_MultiIterNew3");
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":711
|
|
*
|
|
* cdef inline object PyArray_MultiIterNew3(a, b, c):
|
|
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef inline object PyArray_MultiIterNew4(a, b, c, d):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("numpy.PyArray_MultiIterNew3");
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":713
|
|
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
|
|
*
|
|
* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
|
|
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
|
|
*
|
|
*/
|
|
|
|
static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
|
|
PyObject *__pyx_r = NULL;
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_SetupRefcountContext("PyArray_MultiIterNew4");
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":714
|
|
*
|
|
* cdef inline object PyArray_MultiIterNew4(a, b, c, d):
|
|
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("numpy.PyArray_MultiIterNew4");
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":716
|
|
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
|
|
*
|
|
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
|
|
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
|
|
*
|
|
*/
|
|
|
|
static INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
|
|
PyObject *__pyx_r = NULL;
|
|
PyObject *__pyx_t_1 = NULL;
|
|
__Pyx_SetupRefcountContext("PyArray_MultiIterNew5");
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":717
|
|
*
|
|
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
|
|
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
|
|
*
|
|
* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
|
|
*/
|
|
__Pyx_XDECREF(__pyx_r);
|
|
__pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_1);
|
|
__pyx_r = __pyx_t_1;
|
|
__pyx_t_1 = 0;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_AddTraceback("numpy.PyArray_MultiIterNew5");
|
|
__pyx_r = 0;
|
|
__pyx_L0:;
|
|
__Pyx_XGIVEREF(__pyx_r);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":719
|
|
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
|
|
*
|
|
* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
|
|
* # Recursive utility function used in __getbuffer__ to get format
|
|
* # string. The new location in the format string is returned.
|
|
*/
|
|
|
|
static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
|
|
PyArray_Descr *__pyx_v_child;
|
|
int __pyx_v_endian_detector;
|
|
int __pyx_v_little_endian;
|
|
PyObject *__pyx_v_fields;
|
|
PyObject *__pyx_v_childname;
|
|
PyObject *__pyx_v_new_offset;
|
|
PyObject *__pyx_v_t;
|
|
char *__pyx_r;
|
|
Py_ssize_t __pyx_t_1;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
PyObject *__pyx_t_4 = NULL;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
int __pyx_t_6;
|
|
int __pyx_t_7;
|
|
int __pyx_t_8;
|
|
int __pyx_t_9;
|
|
char *__pyx_t_10;
|
|
__Pyx_SetupRefcountContext("_util_dtypestring");
|
|
__Pyx_INCREF((PyObject *)__pyx_v_descr);
|
|
__pyx_v_child = ((PyArray_Descr *)Py_None); __Pyx_INCREF(Py_None);
|
|
__pyx_v_fields = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
|
|
__pyx_v_childname = Py_None; __Pyx_INCREF(Py_None);
|
|
__pyx_v_new_offset = Py_None; __Pyx_INCREF(Py_None);
|
|
__pyx_v_t = Py_None; __Pyx_INCREF(Py_None);
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":726
|
|
* cdef int delta_offset
|
|
* cdef tuple i
|
|
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
|
|
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
|
|
* cdef tuple fields
|
|
*/
|
|
__pyx_v_endian_detector = 1;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":727
|
|
* cdef tuple i
|
|
* cdef int endian_detector = 1
|
|
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
|
|
* cdef tuple fields
|
|
*
|
|
*/
|
|
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":730
|
|
* cdef tuple fields
|
|
*
|
|
* for childname in descr.names: # <<<<<<<<<<<<<<
|
|
* fields = descr.fields[childname]
|
|
* child, new_offset = fields
|
|
*/
|
|
if (likely(((PyObject *)__pyx_v_descr->names) != Py_None)) {
|
|
__pyx_t_1 = 0; __pyx_t_2 = ((PyObject *)__pyx_v_descr->names); __Pyx_INCREF(__pyx_t_2);
|
|
} else {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
}
|
|
for (;;) {
|
|
if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
|
|
__pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++;
|
|
__Pyx_DECREF(__pyx_v_childname);
|
|
__pyx_v_childname = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":731
|
|
*
|
|
* for childname in descr.names:
|
|
* fields = descr.fields[childname] # <<<<<<<<<<<<<<
|
|
* child, new_offset = fields
|
|
*
|
|
*/
|
|
__pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
if (!(likely(PyTuple_CheckExact(__pyx_t_3)) || (__pyx_t_3) == Py_None || (PyErr_Format(PyExc_TypeError, "Expected tuple, got %s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_fields));
|
|
__pyx_v_fields = ((PyObject *)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":732
|
|
* for childname in descr.names:
|
|
* fields = descr.fields[childname]
|
|
* child, new_offset = fields # <<<<<<<<<<<<<<
|
|
*
|
|
* if (end - f) - (new_offset - offset[0]) < 15:
|
|
*/
|
|
if (likely(((PyObject *)__pyx_v_fields) != Py_None) && likely(PyTuple_GET_SIZE(((PyObject *)__pyx_v_fields)) == 2)) {
|
|
PyObject* tuple = ((PyObject *)__pyx_v_fields);
|
|
__pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
|
|
if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
|
|
__Pyx_DECREF(((PyObject *)__pyx_v_child));
|
|
__pyx_v_child = ((PyArray_Descr *)__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_v_new_offset);
|
|
__pyx_v_new_offset = __pyx_t_4;
|
|
__pyx_t_4 = 0;
|
|
} else {
|
|
__Pyx_UnpackTupleError(((PyObject *)__pyx_v_fields), 2);
|
|
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":734
|
|
* child, new_offset = fields
|
|
*
|
|
* if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
|
|
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
|
|
*
|
|
*/
|
|
__pyx_t_4 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_4);
|
|
__pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (__pyx_t_6) {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":735
|
|
*
|
|
* if (end - f) - (new_offset - offset[0]) < 15:
|
|
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
|
|
*
|
|
* if ((child.byteorder == '>' and little_endian) or
|
|
*/
|
|
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_u_50));
|
|
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_u_50));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_u_50));
|
|
__pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L5;
|
|
}
|
|
__pyx_L5:;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":737
|
|
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
|
|
*
|
|
* if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<<
|
|
* (child.byteorder == '<' and not little_endian)):
|
|
* raise ValueError(u"Non-native byte order not supported")
|
|
*/
|
|
__pyx_t_3 = PyInt_FromLong(__pyx_v_child->byteorder); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_5 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_kp_s_46), Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (__pyx_t_6) {
|
|
__pyx_t_7 = __pyx_v_little_endian;
|
|
__pyx_t_8 = __pyx_t_7;
|
|
} else {
|
|
__pyx_t_8 = __pyx_t_6;
|
|
}
|
|
if (!__pyx_t_8) {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":738
|
|
*
|
|
* if ((child.byteorder == '>' and little_endian) or
|
|
* (child.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<<
|
|
* raise ValueError(u"Non-native byte order not supported")
|
|
* # One could encode it in the format string and have Cython
|
|
*/
|
|
__pyx_t_5 = PyInt_FromLong(__pyx_v_child->byteorder); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_3 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_kp_s_47), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (__pyx_t_6) {
|
|
__pyx_t_7 = (!__pyx_v_little_endian);
|
|
__pyx_t_9 = __pyx_t_7;
|
|
} else {
|
|
__pyx_t_9 = __pyx_t_6;
|
|
}
|
|
__pyx_t_6 = __pyx_t_9;
|
|
} else {
|
|
__pyx_t_6 = __pyx_t_8;
|
|
}
|
|
if (__pyx_t_6) {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":739
|
|
* if ((child.byteorder == '>' and little_endian) or
|
|
* (child.byteorder == '<' and not little_endian)):
|
|
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
|
|
* # One could encode it in the format string and have Cython
|
|
* # complain instead, BUT: < and > in format strings also imply
|
|
*/
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_u_48));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_u_48));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_u_48));
|
|
__pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_Raise(__pyx_t_5, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L6;
|
|
}
|
|
__pyx_L6:;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":749
|
|
*
|
|
* # Output padding bytes
|
|
* while offset[0] < new_offset: # <<<<<<<<<<<<<<
|
|
* f[0] = 120 # "x"; pad byte
|
|
* f += 1
|
|
*/
|
|
while (1) {
|
|
__pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (!__pyx_t_6) break;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":750
|
|
* # Output padding bytes
|
|
* while offset[0] < new_offset:
|
|
* f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
|
|
* f += 1
|
|
* offset[0] += 1
|
|
*/
|
|
(__pyx_v_f[0]) = 120;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":751
|
|
* while offset[0] < new_offset:
|
|
* f[0] = 120 # "x"; pad byte
|
|
* f += 1 # <<<<<<<<<<<<<<
|
|
* offset[0] += 1
|
|
*
|
|
*/
|
|
__pyx_v_f += 1;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":752
|
|
* f[0] = 120 # "x"; pad byte
|
|
* f += 1
|
|
* offset[0] += 1 # <<<<<<<<<<<<<<
|
|
*
|
|
* offset[0] += child.itemsize
|
|
*/
|
|
(__pyx_v_offset[0]) += 1;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":754
|
|
* offset[0] += 1
|
|
*
|
|
* offset[0] += child.itemsize # <<<<<<<<<<<<<<
|
|
*
|
|
* if not PyDataType_HASFIELDS(child):
|
|
*/
|
|
(__pyx_v_offset[0]) += __pyx_v_child->elsize;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":756
|
|
* offset[0] += child.itemsize
|
|
*
|
|
* if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
|
|
* t = child.type_num
|
|
* if end - f < 5:
|
|
*/
|
|
__pyx_t_6 = (!PyDataType_HASFIELDS(__pyx_v_child));
|
|
if (__pyx_t_6) {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":757
|
|
*
|
|
* if not PyDataType_HASFIELDS(child):
|
|
* t = child.type_num # <<<<<<<<<<<<<<
|
|
* if end - f < 5:
|
|
* raise RuntimeError(u"Format string allocated too short.")
|
|
*/
|
|
__pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_v_t);
|
|
__pyx_v_t = __pyx_t_3;
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":758
|
|
* if not PyDataType_HASFIELDS(child):
|
|
* t = child.type_num
|
|
* if end - f < 5: # <<<<<<<<<<<<<<
|
|
* raise RuntimeError(u"Format string allocated too short.")
|
|
*
|
|
*/
|
|
__pyx_t_6 = ((__pyx_v_end - __pyx_v_f) < 5);
|
|
if (__pyx_t_6) {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":759
|
|
* t = child.type_num
|
|
* if end - f < 5:
|
|
* raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
|
|
*
|
|
* # Until ticket #99 is fixed, use integers to avoid warnings
|
|
*/
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_u_51));
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_u_51));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_u_51));
|
|
__pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_Raise(__pyx_t_5, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L10;
|
|
}
|
|
__pyx_L10:;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":762
|
|
*
|
|
* # Until ticket #99 is fixed, use integers to avoid warnings
|
|
* if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_UBYTE: f[0] = 66 #"B"
|
|
* elif t == NPY_SHORT: f[0] = 104 #"h"
|
|
*/
|
|
__pyx_t_5 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (__pyx_t_6) {
|
|
(__pyx_v_f[0]) = 98;
|
|
goto __pyx_L11;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":763
|
|
* # Until ticket #99 is fixed, use integers to avoid warnings
|
|
* if t == NPY_BYTE: f[0] = 98 #"b"
|
|
* elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_SHORT: f[0] = 104 #"h"
|
|
* elif t == NPY_USHORT: f[0] = 72 #"H"
|
|
*/
|
|
__pyx_t_3 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (__pyx_t_6) {
|
|
(__pyx_v_f[0]) = 66;
|
|
goto __pyx_L11;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":764
|
|
* if t == NPY_BYTE: f[0] = 98 #"b"
|
|
* elif t == NPY_UBYTE: f[0] = 66 #"B"
|
|
* elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_USHORT: f[0] = 72 #"H"
|
|
* elif t == NPY_INT: f[0] = 105 #"i"
|
|
*/
|
|
__pyx_t_5 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (__pyx_t_6) {
|
|
(__pyx_v_f[0]) = 104;
|
|
goto __pyx_L11;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":765
|
|
* elif t == NPY_UBYTE: f[0] = 66 #"B"
|
|
* elif t == NPY_SHORT: f[0] = 104 #"h"
|
|
* elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_INT: f[0] = 105 #"i"
|
|
* elif t == NPY_UINT: f[0] = 73 #"I"
|
|
*/
|
|
__pyx_t_3 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (__pyx_t_6) {
|
|
(__pyx_v_f[0]) = 72;
|
|
goto __pyx_L11;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":766
|
|
* elif t == NPY_SHORT: f[0] = 104 #"h"
|
|
* elif t == NPY_USHORT: f[0] = 72 #"H"
|
|
* elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_UINT: f[0] = 73 #"I"
|
|
* elif t == NPY_LONG: f[0] = 108 #"l"
|
|
*/
|
|
__pyx_t_5 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (__pyx_t_6) {
|
|
(__pyx_v_f[0]) = 105;
|
|
goto __pyx_L11;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":767
|
|
* elif t == NPY_USHORT: f[0] = 72 #"H"
|
|
* elif t == NPY_INT: f[0] = 105 #"i"
|
|
* elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_LONG: f[0] = 108 #"l"
|
|
* elif t == NPY_ULONG: f[0] = 76 #"L"
|
|
*/
|
|
__pyx_t_3 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (__pyx_t_6) {
|
|
(__pyx_v_f[0]) = 73;
|
|
goto __pyx_L11;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":768
|
|
* elif t == NPY_INT: f[0] = 105 #"i"
|
|
* elif t == NPY_UINT: f[0] = 73 #"I"
|
|
* elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_ULONG: f[0] = 76 #"L"
|
|
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
|
|
*/
|
|
__pyx_t_5 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (__pyx_t_6) {
|
|
(__pyx_v_f[0]) = 108;
|
|
goto __pyx_L11;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":769
|
|
* elif t == NPY_UINT: f[0] = 73 #"I"
|
|
* elif t == NPY_LONG: f[0] = 108 #"l"
|
|
* elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
|
|
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
|
|
*/
|
|
__pyx_t_3 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (__pyx_t_6) {
|
|
(__pyx_v_f[0]) = 76;
|
|
goto __pyx_L11;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":770
|
|
* elif t == NPY_LONG: f[0] = 108 #"l"
|
|
* elif t == NPY_ULONG: f[0] = 76 #"L"
|
|
* elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
|
|
* elif t == NPY_FLOAT: f[0] = 102 #"f"
|
|
*/
|
|
__pyx_t_5 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (__pyx_t_6) {
|
|
(__pyx_v_f[0]) = 113;
|
|
goto __pyx_L11;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":771
|
|
* elif t == NPY_ULONG: f[0] = 76 #"L"
|
|
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
|
|
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_FLOAT: f[0] = 102 #"f"
|
|
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
|
|
*/
|
|
__pyx_t_3 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (__pyx_t_6) {
|
|
(__pyx_v_f[0]) = 81;
|
|
goto __pyx_L11;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":772
|
|
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
|
|
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
|
|
* elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
|
|
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
|
|
*/
|
|
__pyx_t_5 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (__pyx_t_6) {
|
|
(__pyx_v_f[0]) = 102;
|
|
goto __pyx_L11;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":773
|
|
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
|
|
* elif t == NPY_FLOAT: f[0] = 102 #"f"
|
|
* elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
|
|
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
|
|
*/
|
|
__pyx_t_3 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (__pyx_t_6) {
|
|
(__pyx_v_f[0]) = 100;
|
|
goto __pyx_L11;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":774
|
|
* elif t == NPY_FLOAT: f[0] = 102 #"f"
|
|
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
|
|
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
|
|
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
|
|
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
|
|
*/
|
|
__pyx_t_5 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (__pyx_t_6) {
|
|
(__pyx_v_f[0]) = 103;
|
|
goto __pyx_L11;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":775
|
|
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
|
|
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
|
|
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
|
|
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
|
|
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
|
|
*/
|
|
__pyx_t_3 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (__pyx_t_6) {
|
|
(__pyx_v_f[0]) = 90;
|
|
(__pyx_v_f[1]) = 102;
|
|
__pyx_v_f += 1;
|
|
goto __pyx_L11;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":776
|
|
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
|
|
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
|
|
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
|
|
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
|
|
* elif t == NPY_OBJECT: f[0] = 79 #"O"
|
|
*/
|
|
__pyx_t_5 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (__pyx_t_6) {
|
|
(__pyx_v_f[0]) = 90;
|
|
(__pyx_v_f[1]) = 100;
|
|
__pyx_v_f += 1;
|
|
goto __pyx_L11;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":777
|
|
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
|
|
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
|
|
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
|
|
* elif t == NPY_OBJECT: f[0] = 79 #"O"
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (__pyx_t_6) {
|
|
(__pyx_v_f[0]) = 90;
|
|
(__pyx_v_f[1]) = 103;
|
|
__pyx_v_f += 1;
|
|
goto __pyx_L11;
|
|
}
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":778
|
|
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
|
|
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
|
|
* elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
|
|
* else:
|
|
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
|
|
*/
|
|
__pyx_t_5 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (__pyx_t_6) {
|
|
(__pyx_v_f[0]) = 79;
|
|
goto __pyx_L11;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":780
|
|
* elif t == NPY_OBJECT: f[0] = 79 #"O"
|
|
* else:
|
|
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
|
|
* f += 1
|
|
* else:
|
|
*/
|
|
__pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_49), __pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
}
|
|
__pyx_L11:;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":781
|
|
* else:
|
|
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
|
|
* f += 1 # <<<<<<<<<<<<<<
|
|
* else:
|
|
* # Cython ignores struct boundary information ("T{...}"),
|
|
*/
|
|
__pyx_v_f += 1;
|
|
goto __pyx_L9;
|
|
}
|
|
/*else*/ {
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":785
|
|
* # Cython ignores struct boundary information ("T{...}"),
|
|
* # so don't output it
|
|
* f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
|
|
* return f
|
|
*
|
|
*/
|
|
__pyx_t_10 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_v_f = __pyx_t_10;
|
|
}
|
|
__pyx_L9:;
|
|
}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":786
|
|
* # so don't output it
|
|
* f = _util_dtypestring(child, f, end, offset)
|
|
* return f # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__pyx_r = __pyx_v_f;
|
|
goto __pyx_L0;
|
|
|
|
__pyx_r = 0;
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_4);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_AddTraceback("numpy._util_dtypestring");
|
|
__pyx_r = NULL;
|
|
__pyx_L0:;
|
|
__Pyx_DECREF((PyObject *)__pyx_v_child);
|
|
__Pyx_DECREF(__pyx_v_fields);
|
|
__Pyx_DECREF(__pyx_v_childname);
|
|
__Pyx_DECREF(__pyx_v_new_offset);
|
|
__Pyx_DECREF(__pyx_v_t);
|
|
__Pyx_DECREF((PyObject *)__pyx_v_descr);
|
|
__Pyx_FinishRefcountContext();
|
|
return __pyx_r;
|
|
}
|
|
|
|
static struct PyMethodDef __pyx_methods[] = {
|
|
{__Pyx_NAMESTR("cvSobel"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvSobel, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvLaplace"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvLaplace, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvCanny"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvCanny, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvPreCornerDetect"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvPreCornerDetect, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvCornerEigenValsAndVecs"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvCornerEigenValsAndVecs, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvCornerMinEigenVal"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvCornerMinEigenVal, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvCornerHarris"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvCornerHarris, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvFindCornerSubPix"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvFindCornerSubPix, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvGoodFeaturesToTrack"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvGoodFeaturesToTrack, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvGetRectSubPix"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvGetRectSubPix, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvGetQuadrangleSubPix"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvGetQuadrangleSubPix, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvResize"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvResize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvWarpAffine"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvWarpAffine, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvWarpPerspective"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvWarpPerspective, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvLogPolar"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvLogPolar, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvErode"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvErode, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvDilate"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvDilate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvMorphologyEx"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvMorphologyEx, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvSmooth"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvSmooth, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvFilter2D"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvFilter2D, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvIntegral"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvIntegral, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvCvtColor"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvCvtColor, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvThreshold"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvThreshold, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvAdaptiveThreshold"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvAdaptiveThreshold, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvPyrDown"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvPyrDown, METH_O, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvPyrUp"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvPyrUp, METH_O, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvCalibrateCamera2"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvCalibrateCamera2, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvFindChessboardCorners"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvFindChessboardCorners, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{__Pyx_NAMESTR("cvDrawChessboardCorners"), (PyCFunction)__pyx_pf_7scikits_5image_6opencv_9opencv_cv_cvDrawChessboardCorners, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
static void __pyx_init_filenames(void); /*proto*/
|
|
|
|
char* __pyx_import_star_type_names[] = {
|
|
"cvErodePtr",
|
|
"IplImage",
|
|
"cvFindCornerSubPixPtr",
|
|
"va_list",
|
|
"cvCornerEigenValsAndVecsPtr",
|
|
"_IplConvKernel",
|
|
"cvCannyPtr",
|
|
"cvResizePtr",
|
|
"cvPyrDownPtr",
|
|
"cvCvtColorPtr",
|
|
"INT8_t",
|
|
"cvIntegralPtr",
|
|
"cvAdaptiveThresholdPtr",
|
|
"Py_complex",
|
|
"_IplImage",
|
|
"cvGetRectSubPixPtr",
|
|
"cvThresholdPtr",
|
|
"FILE",
|
|
"cvFilter2DPtr",
|
|
"cvGoodFeaturesToTrackPtr",
|
|
"cvCalibrateCamera2Ptr",
|
|
"cvPyrUpPtr",
|
|
"_inittab",
|
|
"UINT8_t",
|
|
"cvWarpAffinePtr",
|
|
"cvCornerHarrisPtr",
|
|
"cvDilatePtr",
|
|
"CvScalar",
|
|
"cvSobelPtr",
|
|
"INT16_t",
|
|
"FLOAT64_t",
|
|
"CvMat_uProxy",
|
|
"FLOAT32_t",
|
|
"IplConvKernel",
|
|
"INT32_t",
|
|
"PyTypeObject",
|
|
"cvLogPolarPtr",
|
|
"CvTermCriteria",
|
|
"CvMat",
|
|
"PyObject",
|
|
"cvMorphologyExPtr",
|
|
"cvLaplacePtr",
|
|
"cvFindChessboardCornersPtr",
|
|
"cvCornerMinEigenValPtr",
|
|
"cvDrawChessboardCornersPtr",
|
|
"cvWarpPerspectivePtr",
|
|
"cvGetQuadrangleSubPixPtr",
|
|
"CvPoint2D32f",
|
|
"CvSize",
|
|
"cvPreCorneDetectPtr",
|
|
"PY_LONG_LONG",
|
|
"CvPoint",
|
|
"cvSmoothPtr",
|
|
"Py_UNICODE",
|
|
0
|
|
};
|
|
|
|
static int __pyx_import_star_set(PyObject *o, PyObject* py_name, char *name) {
|
|
char** type_name = __pyx_import_star_type_names;
|
|
while (*type_name) {
|
|
if (__Pyx_StrEq(name, *type_name)) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot overwrite C type %s", name);
|
|
goto bad;
|
|
}
|
|
type_name++;
|
|
}
|
|
if (0);
|
|
else if (__Pyx_StrEq(name, "c_cvSmooth")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvSmooth to scikits.image.opencv.opencv_cv.cvSmoothPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvCanny")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvCanny to scikits.image.opencv.opencv_cv.cvCannyPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvCvtColor")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvCvtColor to scikits.image.opencv.opencv_cv.cvCvtColorPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvCornerMinEigenVal")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvCornerMinEigenVal to scikits.image.opencv.opencv_cv.cvCornerMinEigenValPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvErode")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvErode to scikits.image.opencv.opencv_cv.cvErodePtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvFilter2D")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvFilter2D to scikits.image.opencv.opencv_cv.cvFilter2DPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvFindChessboardCorners")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvFindChessboardCorners to scikits.image.opencv.opencv_cv.cvFindChessboardCornersPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvGetRectSubPix")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvGetRectSubPix to scikits.image.opencv.opencv_cv.cvGetRectSubPixPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvResize")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvResize to scikits.image.opencv.opencv_cv.cvResizePtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvGoodFeaturesToTrack")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvGoodFeaturesToTrack to scikits.image.opencv.opencv_cv.cvGoodFeaturesToTrackPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvCornerEigenValsAndVecs")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvCornerEigenValsAndVecs to scikits.image.opencv.opencv_cv.cvCornerEigenValsAndVecsPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvPreCornerDetect")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvPreCornerDetect to scikits.image.opencv.opencv_cv.cvPreCorneDetectPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvPyrDown")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvPyrDown to scikits.image.opencv.opencv_cv.cvPyrDownPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvGetQuadrangleSubPix")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvGetQuadrangleSubPix to scikits.image.opencv.opencv_cv.cvGetQuadrangleSubPixPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvLogPolar")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvLogPolar to scikits.image.opencv.opencv_cv.cvLogPolarPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvThreshold")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvThreshold to scikits.image.opencv.opencv_cv.cvThresholdPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvLaplace")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvLaplace to scikits.image.opencv.opencv_cv.cvLaplacePtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvMorphologyEx")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvMorphologyEx to scikits.image.opencv.opencv_cv.cvMorphologyExPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvCornerHarris")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvCornerHarris to scikits.image.opencv.opencv_cv.cvCornerHarrisPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvWarpAffine")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvWarpAffine to scikits.image.opencv.opencv_cv.cvWarpAffinePtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvCalibrateCamera2")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvCalibrateCamera2 to scikits.image.opencv.opencv_cv.cvCalibrateCamera2Ptr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvSobel")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvSobel to scikits.image.opencv.opencv_cv.cvSobelPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvPyrUp")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvPyrUp to scikits.image.opencv.opencv_cv.cvPyrUpPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvDrawChessboardCorners")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvDrawChessboardCorners to scikits.image.opencv.opencv_cv.cvDrawChessboardCornersPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvDilate")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvDilate to scikits.image.opencv.opencv_cv.cvDilatePtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvWarpPerspective")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvWarpPerspective to scikits.image.opencv.opencv_cv.cvWarpPerspectivePtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvFindCornerSubPix")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvFindCornerSubPix to scikits.image.opencv.opencv_cv.cvFindCornerSubPixPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvIntegral")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvIntegral to scikits.image.opencv.opencv_cv.cvIntegralPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else if (__Pyx_StrEq(name, "c_cvAdaptiveThreshold")) {
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert Python object c_cvAdaptiveThreshold to scikits.image.opencv.opencv_cv.cvAdaptiveThresholdPtr");
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
|
|
}
|
|
else {
|
|
if (PyObject_SetAttr(__pyx_m, py_name, o) < 0) goto bad;
|
|
}
|
|
return 0;
|
|
__pyx_L2_error:;
|
|
__Pyx_AddTraceback("scikits.image.opencv.opencv_cv");
|
|
bad:
|
|
Py_DECREF(o);
|
|
return -1;
|
|
}
|
|
|
|
|
|
/* import_all_from is an unexposed function from ceval.c */
|
|
|
|
static int
|
|
__Pyx_import_all_from(PyObject *locals, PyObject *v)
|
|
{
|
|
PyObject *all = __Pyx_GetAttrString(v, "__all__");
|
|
PyObject *dict, *name, *value;
|
|
int skip_leading_underscores = 0;
|
|
int pos, err;
|
|
|
|
if (all == NULL) {
|
|
if (!PyErr_ExceptionMatches(PyExc_AttributeError))
|
|
return -1; /* Unexpected error */
|
|
PyErr_Clear();
|
|
dict = __Pyx_GetAttrString(v, "__dict__");
|
|
if (dict == NULL) {
|
|
if (!PyErr_ExceptionMatches(PyExc_AttributeError))
|
|
return -1;
|
|
PyErr_SetString(PyExc_ImportError,
|
|
"from-import-* object has no __dict__ and no __all__");
|
|
return -1;
|
|
}
|
|
all = PyMapping_Keys(dict);
|
|
Py_DECREF(dict);
|
|
if (all == NULL)
|
|
return -1;
|
|
skip_leading_underscores = 1;
|
|
}
|
|
|
|
for (pos = 0, err = 0; ; pos++) {
|
|
name = PySequence_GetItem(all, pos);
|
|
if (name == NULL) {
|
|
if (!PyErr_ExceptionMatches(PyExc_IndexError))
|
|
err = -1;
|
|
else
|
|
PyErr_Clear();
|
|
break;
|
|
}
|
|
if (skip_leading_underscores &&
|
|
#if PY_MAJOR_VERSION < 3
|
|
PyString_Check(name) &&
|
|
PyString_AS_STRING(name)[0] == '_')
|
|
#else
|
|
PyUnicode_Check(name) &&
|
|
PyUnicode_AS_UNICODE(name)[0] == '_')
|
|
#endif
|
|
{
|
|
Py_DECREF(name);
|
|
continue;
|
|
}
|
|
value = PyObject_GetAttr(v, name);
|
|
if (value == NULL)
|
|
err = -1;
|
|
else if (PyDict_CheckExact(locals))
|
|
err = PyDict_SetItem(locals, name, value);
|
|
else
|
|
err = PyObject_SetItem(locals, name, value);
|
|
Py_DECREF(name);
|
|
Py_XDECREF(value);
|
|
if (err != 0)
|
|
break;
|
|
}
|
|
Py_DECREF(all);
|
|
return err;
|
|
}
|
|
|
|
|
|
static int __pyx_import_star(PyObject* m) {
|
|
|
|
int i;
|
|
int ret = -1;
|
|
char* s;
|
|
PyObject *locals = 0;
|
|
PyObject *list = 0;
|
|
PyObject *name;
|
|
PyObject *item;
|
|
|
|
locals = PyDict_New(); if (!locals) goto bad;
|
|
if (__Pyx_import_all_from(locals, m) < 0) goto bad;
|
|
list = PyDict_Items(locals); if (!list) goto bad;
|
|
|
|
for(i=0; i<PyList_GET_SIZE(list); i++) {
|
|
name = PyTuple_GET_ITEM(PyList_GET_ITEM(list, i), 0);
|
|
item = PyTuple_GET_ITEM(PyList_GET_ITEM(list, i), 1);
|
|
#if PY_MAJOR_VERSION < 3
|
|
s = PyString_AsString(name);
|
|
#else
|
|
s = PyUnicode_AsString(name);
|
|
#endif
|
|
if (!s) goto bad;
|
|
if (__pyx_import_star_set(item, name, s) < 0) goto bad;
|
|
}
|
|
ret = 0;
|
|
|
|
bad:
|
|
Py_XDECREF(locals);
|
|
Py_XDECREF(list);
|
|
return ret;
|
|
}
|
|
|
|
|
|
#if PY_MAJOR_VERSION >= 3
|
|
static struct PyModuleDef __pyx_moduledef = {
|
|
PyModuleDef_HEAD_INIT,
|
|
__Pyx_NAMESTR("opencv_cv"),
|
|
0, /* m_doc */
|
|
-1, /* m_size */
|
|
__pyx_methods /* m_methods */,
|
|
NULL, /* m_reload */
|
|
NULL, /* m_traverse */
|
|
NULL, /* m_clear */
|
|
NULL /* m_free */
|
|
};
|
|
#endif
|
|
|
|
static __Pyx_StringTabEntry __pyx_string_tab[] = {
|
|
{&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 1, 0},
|
|
{&__pyx_n_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 1},
|
|
{&__pyx_n_s_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 1},
|
|
{&__pyx_kp_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 0},
|
|
{&__pyx_n_s_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 0, 1, 1},
|
|
{&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 0, 1, 0},
|
|
{&__pyx_kp_u_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 1, 0, 0},
|
|
{&__pyx_kp_u_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 1, 0, 0},
|
|
{&__pyx_kp_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 0, 1, 0},
|
|
{&__pyx_kp_u_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 1, 0, 0},
|
|
{&__pyx_kp_u_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 1, 0, 0},
|
|
{&__pyx_kp_u_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 1, 0, 0},
|
|
{&__pyx_kp_u_51, __pyx_k_51, sizeof(__pyx_k_51), 0, 1, 0, 0},
|
|
{&__pyx_n_s_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 0, 1, 1},
|
|
{&__pyx_kp_s_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 1, 0},
|
|
{&__pyx_n_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 1},
|
|
{&__pyx_n_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 1},
|
|
{&__pyx_n_s_56, __pyx_k_56, sizeof(__pyx_k_56), 0, 0, 1, 1},
|
|
{&__pyx_n_s_57, __pyx_k_57, sizeof(__pyx_k_57), 0, 0, 1, 1},
|
|
{&__pyx_n_s_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 0, 1, 1},
|
|
{&__pyx_kp_s_59, __pyx_k_59, sizeof(__pyx_k_59), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_61, __pyx_k_61, sizeof(__pyx_k_61), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_63, __pyx_k_63, sizeof(__pyx_k_63), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_65, __pyx_k_65, sizeof(__pyx_k_65), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_67, __pyx_k_67, sizeof(__pyx_k_67), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_68, __pyx_k_68, sizeof(__pyx_k_68), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_69, __pyx_k_69, sizeof(__pyx_k_69), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_70, __pyx_k_70, sizeof(__pyx_k_70), 0, 0, 1, 0},
|
|
{&__pyx_n_s_71, __pyx_k_71, sizeof(__pyx_k_71), 0, 0, 1, 1},
|
|
{&__pyx_kp_s_72, __pyx_k_72, sizeof(__pyx_k_72), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_73, __pyx_k_73, sizeof(__pyx_k_73), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_74, __pyx_k_74, sizeof(__pyx_k_74), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_75, __pyx_k_75, sizeof(__pyx_k_75), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_76, __pyx_k_76, sizeof(__pyx_k_76), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_77, __pyx_k_77, sizeof(__pyx_k_77), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_78, __pyx_k_78, sizeof(__pyx_k_78), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_79, __pyx_k_79, sizeof(__pyx_k_79), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_80, __pyx_k_80, sizeof(__pyx_k_80), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_81, __pyx_k_81, sizeof(__pyx_k_81), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_82, __pyx_k_82, sizeof(__pyx_k_82), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_83, __pyx_k_83, sizeof(__pyx_k_83), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_84, __pyx_k_84, sizeof(__pyx_k_84), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_85, __pyx_k_85, sizeof(__pyx_k_85), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_86, __pyx_k_86, sizeof(__pyx_k_86), 0, 0, 1, 0},
|
|
{&__pyx_n_s_87, __pyx_k_87, sizeof(__pyx_k_87), 0, 0, 1, 1},
|
|
{&__pyx_kp_s_88, __pyx_k_88, sizeof(__pyx_k_88), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_89, __pyx_k_89, sizeof(__pyx_k_89), 0, 0, 1, 0},
|
|
{&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0},
|
|
{&__pyx_n_s__CV_BGR2BGR555, __pyx_k__CV_BGR2BGR555, sizeof(__pyx_k__CV_BGR2BGR555), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR2BGR565, __pyx_k__CV_BGR2BGR565, sizeof(__pyx_k__CV_BGR2BGR565), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR2BGRA, __pyx_k__CV_BGR2BGRA, sizeof(__pyx_k__CV_BGR2BGRA), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR2GRAY, __pyx_k__CV_BGR2GRAY, sizeof(__pyx_k__CV_BGR2GRAY), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR2HLS, __pyx_k__CV_BGR2HLS, sizeof(__pyx_k__CV_BGR2HLS), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR2HSV, __pyx_k__CV_BGR2HSV, sizeof(__pyx_k__CV_BGR2HSV), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR2Lab, __pyx_k__CV_BGR2Lab, sizeof(__pyx_k__CV_BGR2Lab), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR2Luv, __pyx_k__CV_BGR2Luv, sizeof(__pyx_k__CV_BGR2Luv), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR2RGB, __pyx_k__CV_BGR2RGB, sizeof(__pyx_k__CV_BGR2RGB), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR2RGBA, __pyx_k__CV_BGR2RGBA, sizeof(__pyx_k__CV_BGR2RGBA), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR2XYZ, __pyx_k__CV_BGR2XYZ, sizeof(__pyx_k__CV_BGR2XYZ), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR2YCrCb, __pyx_k__CV_BGR2YCrCb, sizeof(__pyx_k__CV_BGR2YCrCb), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR5552BGR, __pyx_k__CV_BGR5552BGR, sizeof(__pyx_k__CV_BGR5552BGR), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR5552BGRA, __pyx_k__CV_BGR5552BGRA, sizeof(__pyx_k__CV_BGR5552BGRA), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR5552GRAY, __pyx_k__CV_BGR5552GRAY, sizeof(__pyx_k__CV_BGR5552GRAY), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR5552RGB, __pyx_k__CV_BGR5552RGB, sizeof(__pyx_k__CV_BGR5552RGB), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR5552RGBA, __pyx_k__CV_BGR5552RGBA, sizeof(__pyx_k__CV_BGR5552RGBA), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR5652BGR, __pyx_k__CV_BGR5652BGR, sizeof(__pyx_k__CV_BGR5652BGR), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR5652BGRA, __pyx_k__CV_BGR5652BGRA, sizeof(__pyx_k__CV_BGR5652BGRA), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR5652GRAY, __pyx_k__CV_BGR5652GRAY, sizeof(__pyx_k__CV_BGR5652GRAY), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR5652RGB, __pyx_k__CV_BGR5652RGB, sizeof(__pyx_k__CV_BGR5652RGB), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGR5652RGBA, __pyx_k__CV_BGR5652RGBA, sizeof(__pyx_k__CV_BGR5652RGBA), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGRA2BGR, __pyx_k__CV_BGRA2BGR, sizeof(__pyx_k__CV_BGRA2BGR), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGRA2BGR555, __pyx_k__CV_BGRA2BGR555, sizeof(__pyx_k__CV_BGRA2BGR555), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGRA2BGR565, __pyx_k__CV_BGRA2BGR565, sizeof(__pyx_k__CV_BGRA2BGR565), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGRA2GRAY, __pyx_k__CV_BGRA2GRAY, sizeof(__pyx_k__CV_BGRA2GRAY), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGRA2RGB, __pyx_k__CV_BGRA2RGB, sizeof(__pyx_k__CV_BGRA2RGB), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BGRA2RGBA, __pyx_k__CV_BGRA2RGBA, sizeof(__pyx_k__CV_BGRA2RGBA), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BLUR, __pyx_k__CV_BLUR, sizeof(__pyx_k__CV_BLUR), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BLUR_NO_SCALE, __pyx_k__CV_BLUR_NO_SCALE, sizeof(__pyx_k__CV_BLUR_NO_SCALE), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BayerBG2BGR, __pyx_k__CV_BayerBG2BGR, sizeof(__pyx_k__CV_BayerBG2BGR), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BayerBG2RGB, __pyx_k__CV_BayerBG2RGB, sizeof(__pyx_k__CV_BayerBG2RGB), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BayerGB2BGR, __pyx_k__CV_BayerGB2BGR, sizeof(__pyx_k__CV_BayerGB2BGR), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BayerGB2RGB, __pyx_k__CV_BayerGB2RGB, sizeof(__pyx_k__CV_BayerGB2RGB), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BayerGR2BGR, __pyx_k__CV_BayerGR2BGR, sizeof(__pyx_k__CV_BayerGR2BGR), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BayerGR2RGB, __pyx_k__CV_BayerGR2RGB, sizeof(__pyx_k__CV_BayerGR2RGB), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BayerRG2BGR, __pyx_k__CV_BayerRG2BGR, sizeof(__pyx_k__CV_BayerRG2BGR), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_BayerRG2RGB, __pyx_k__CV_BayerRG2RGB, sizeof(__pyx_k__CV_BayerRG2RGB), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_GAUSSIAN, __pyx_k__CV_GAUSSIAN, sizeof(__pyx_k__CV_GAUSSIAN), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_GRAY2BGR, __pyx_k__CV_GRAY2BGR, sizeof(__pyx_k__CV_GRAY2BGR), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_GRAY2BGR555, __pyx_k__CV_GRAY2BGR555, sizeof(__pyx_k__CV_GRAY2BGR555), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_GRAY2BGR565, __pyx_k__CV_GRAY2BGR565, sizeof(__pyx_k__CV_GRAY2BGR565), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_GRAY2BGRA, __pyx_k__CV_GRAY2BGRA, sizeof(__pyx_k__CV_GRAY2BGRA), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_GRAY2RGB, __pyx_k__CV_GRAY2RGB, sizeof(__pyx_k__CV_GRAY2RGB), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_GRAY2RGBA, __pyx_k__CV_GRAY2RGBA, sizeof(__pyx_k__CV_GRAY2RGBA), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_HLS2BGR, __pyx_k__CV_HLS2BGR, sizeof(__pyx_k__CV_HLS2BGR), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_HLS2RGB, __pyx_k__CV_HLS2RGB, sizeof(__pyx_k__CV_HLS2RGB), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_HSV2BGR, __pyx_k__CV_HSV2BGR, sizeof(__pyx_k__CV_HSV2BGR), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_HSV2RGB, __pyx_k__CV_HSV2RGB, sizeof(__pyx_k__CV_HSV2RGB), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_INTER_AREA, __pyx_k__CV_INTER_AREA, sizeof(__pyx_k__CV_INTER_AREA), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_INTER_CUBIC, __pyx_k__CV_INTER_CUBIC, sizeof(__pyx_k__CV_INTER_CUBIC), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_INTER_LINEAR, __pyx_k__CV_INTER_LINEAR, sizeof(__pyx_k__CV_INTER_LINEAR), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_INTER_NN, __pyx_k__CV_INTER_NN, sizeof(__pyx_k__CV_INTER_NN), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_Lab2BGR, __pyx_k__CV_Lab2BGR, sizeof(__pyx_k__CV_Lab2BGR), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_Lab2RGB, __pyx_k__CV_Lab2RGB, sizeof(__pyx_k__CV_Lab2RGB), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_Luv2BGR, __pyx_k__CV_Luv2BGR, sizeof(__pyx_k__CV_Luv2BGR), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_Luv2RGB, __pyx_k__CV_Luv2RGB, sizeof(__pyx_k__CV_Luv2RGB), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_MOP_BLACKHAT, __pyx_k__CV_MOP_BLACKHAT, sizeof(__pyx_k__CV_MOP_BLACKHAT), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_MOP_CLOSE, __pyx_k__CV_MOP_CLOSE, sizeof(__pyx_k__CV_MOP_CLOSE), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_MOP_GRADIENT, __pyx_k__CV_MOP_GRADIENT, sizeof(__pyx_k__CV_MOP_GRADIENT), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_MOP_OPEN, __pyx_k__CV_MOP_OPEN, sizeof(__pyx_k__CV_MOP_OPEN), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_MOP_TOPHAT, __pyx_k__CV_MOP_TOPHAT, sizeof(__pyx_k__CV_MOP_TOPHAT), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_RGB2BGR, __pyx_k__CV_RGB2BGR, sizeof(__pyx_k__CV_RGB2BGR), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_RGB2BGR555, __pyx_k__CV_RGB2BGR555, sizeof(__pyx_k__CV_RGB2BGR555), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_RGB2BGR565, __pyx_k__CV_RGB2BGR565, sizeof(__pyx_k__CV_RGB2BGR565), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_RGB2BGRA, __pyx_k__CV_RGB2BGRA, sizeof(__pyx_k__CV_RGB2BGRA), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_RGB2GRAY, __pyx_k__CV_RGB2GRAY, sizeof(__pyx_k__CV_RGB2GRAY), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_RGB2HLS, __pyx_k__CV_RGB2HLS, sizeof(__pyx_k__CV_RGB2HLS), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_RGB2HSV, __pyx_k__CV_RGB2HSV, sizeof(__pyx_k__CV_RGB2HSV), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_RGB2Lab, __pyx_k__CV_RGB2Lab, sizeof(__pyx_k__CV_RGB2Lab), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_RGB2Luv, __pyx_k__CV_RGB2Luv, sizeof(__pyx_k__CV_RGB2Luv), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_RGB2RGBA, __pyx_k__CV_RGB2RGBA, sizeof(__pyx_k__CV_RGB2RGBA), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_RGB2XYZ, __pyx_k__CV_RGB2XYZ, sizeof(__pyx_k__CV_RGB2XYZ), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_RGB2YCrCb, __pyx_k__CV_RGB2YCrCb, sizeof(__pyx_k__CV_RGB2YCrCb), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_RGBA2BGR, __pyx_k__CV_RGBA2BGR, sizeof(__pyx_k__CV_RGBA2BGR), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_RGBA2BGR555, __pyx_k__CV_RGBA2BGR555, sizeof(__pyx_k__CV_RGBA2BGR555), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_RGBA2BGR565, __pyx_k__CV_RGBA2BGR565, sizeof(__pyx_k__CV_RGBA2BGR565), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_RGBA2BGRA, __pyx_k__CV_RGBA2BGRA, sizeof(__pyx_k__CV_RGBA2BGRA), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_RGBA2GRAY, __pyx_k__CV_RGBA2GRAY, sizeof(__pyx_k__CV_RGBA2GRAY), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_RGBA2RGB, __pyx_k__CV_RGBA2RGB, sizeof(__pyx_k__CV_RGBA2RGB), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_THRESH_BINARY, __pyx_k__CV_THRESH_BINARY, sizeof(__pyx_k__CV_THRESH_BINARY), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_XYZ2BGR, __pyx_k__CV_XYZ2BGR, sizeof(__pyx_k__CV_XYZ2BGR), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_XYZ2RGB, __pyx_k__CV_XYZ2RGB, sizeof(__pyx_k__CV_XYZ2RGB), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_YCrCb2BGR, __pyx_k__CV_YCrCb2BGR, sizeof(__pyx_k__CV_YCrCb2BGR), 0, 0, 1, 1},
|
|
{&__pyx_n_s__CV_YCrCb2RGB, __pyx_k__CV_YCrCb2RGB, sizeof(__pyx_k__CV_YCrCb2RGB), 0, 0, 1, 1},
|
|
{&__pyx_n_s__FLOAT32, __pyx_k__FLOAT32, sizeof(__pyx_k__FLOAT32), 0, 0, 1, 1},
|
|
{&__pyx_n_s__FLOAT64, __pyx_k__FLOAT64, sizeof(__pyx_k__FLOAT64), 0, 0, 1, 1},
|
|
{&__pyx_n_s__INT16, __pyx_k__INT16, sizeof(__pyx_k__INT16), 0, 0, 1, 1},
|
|
{&__pyx_n_s__INT32, __pyx_k__INT32, sizeof(__pyx_k__INT32), 0, 0, 1, 1},
|
|
{&__pyx_n_s__INT8, __pyx_k__INT8, sizeof(__pyx_k__INT8), 0, 0, 1, 1},
|
|
{&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1},
|
|
{&__pyx_n_s__M, __pyx_k__M, sizeof(__pyx_k__M), 0, 0, 1, 1},
|
|
{&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1},
|
|
{&__pyx_n_s__UINT16, __pyx_k__UINT16, sizeof(__pyx_k__UINT16), 0, 0, 1, 1},
|
|
{&__pyx_n_s__UINT8, __pyx_k__UINT8, sizeof(__pyx_k__UINT8), 0, 0, 1, 1},
|
|
{&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
|
|
{&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
|
|
{&__pyx_n_s___cvtcolor_dict, __pyx_k___cvtcolor_dict, sizeof(__pyx_k___cvtcolor_dict), 0, 0, 1, 1},
|
|
{&__pyx_n_s___libimport, __pyx_k___libimport, sizeof(__pyx_k___libimport), 0, 0, 1, 1},
|
|
{&__pyx_n_s___utilities, __pyx_k___utilities, sizeof(__pyx_k___utilities), 0, 0, 1, 1},
|
|
{&__pyx_n_s__adaptive_method, __pyx_k__adaptive_method, sizeof(__pyx_k__adaptive_method), 0, 0, 1, 1},
|
|
{&__pyx_n_s__addressof, __pyx_k__addressof, sizeof(__pyx_k__addressof), 0, 0, 1, 1},
|
|
{&__pyx_n_s__anchor, __pyx_k__anchor, sizeof(__pyx_k__anchor), 0, 0, 1, 1},
|
|
{&__pyx_n_s__aperture_size, __pyx_k__aperture_size, sizeof(__pyx_k__aperture_size), 0, 0, 1, 1},
|
|
{&__pyx_n_s__block_size, __pyx_k__block_size, sizeof(__pyx_k__block_size), 0, 0, 1, 1},
|
|
{&__pyx_n_s__buf, __pyx_k__buf, sizeof(__pyx_k__buf), 0, 0, 1, 1},
|
|
{&__pyx_n_s__byteorder, __pyx_k__byteorder, sizeof(__pyx_k__byteorder), 0, 0, 1, 1},
|
|
{&__pyx_kp_s__calibration, __pyx_k__calibration, sizeof(__pyx_k__calibration), 0, 0, 1, 0},
|
|
{&__pyx_n_s__center, __pyx_k__center, sizeof(__pyx_k__center), 0, 0, 1, 1},
|
|
{&__pyx_n_s__code, __pyx_k__code, sizeof(__pyx_k__code), 0, 0, 1, 1},
|
|
{&__pyx_n_s__copy, __pyx_k__copy, sizeof(__pyx_k__copy), 0, 0, 1, 1},
|
|
{&__pyx_n_s__corner_count, __pyx_k__corner_count, sizeof(__pyx_k__corner_count), 0, 0, 1, 1},
|
|
{&__pyx_n_s__corners, __pyx_k__corners, sizeof(__pyx_k__corners), 0, 0, 1, 1},
|
|
{&__pyx_n_s__ctypes, __pyx_k__ctypes, sizeof(__pyx_k__ctypes), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cv, __pyx_k__cv, sizeof(__pyx_k__cv), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvAdaptiveThreshold, __pyx_k__cvAdaptiveThreshold, sizeof(__pyx_k__cvAdaptiveThreshold), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvCalibrateCamera2, __pyx_k__cvCalibrateCamera2, sizeof(__pyx_k__cvCalibrateCamera2), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvCanny, __pyx_k__cvCanny, sizeof(__pyx_k__cvCanny), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvCornerHarris, __pyx_k__cvCornerHarris, sizeof(__pyx_k__cvCornerHarris), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvCornerMinEigenVal, __pyx_k__cvCornerMinEigenVal, sizeof(__pyx_k__cvCornerMinEigenVal), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvCvtColor, __pyx_k__cvCvtColor, sizeof(__pyx_k__cvCvtColor), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvDilate, __pyx_k__cvDilate, sizeof(__pyx_k__cvDilate), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvErode, __pyx_k__cvErode, sizeof(__pyx_k__cvErode), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvFilter2D, __pyx_k__cvFilter2D, sizeof(__pyx_k__cvFilter2D), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvFindCornerSubPix, __pyx_k__cvFindCornerSubPix, sizeof(__pyx_k__cvFindCornerSubPix), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvGetRectSubPix, __pyx_k__cvGetRectSubPix, sizeof(__pyx_k__cvGetRectSubPix), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvIntegral, __pyx_k__cvIntegral, sizeof(__pyx_k__cvIntegral), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvLaplace, __pyx_k__cvLaplace, sizeof(__pyx_k__cvLaplace), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvLogPolar, __pyx_k__cvLogPolar, sizeof(__pyx_k__cvLogPolar), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvMorphologyEx, __pyx_k__cvMorphologyEx, sizeof(__pyx_k__cvMorphologyEx), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvPreCornerDetect, __pyx_k__cvPreCornerDetect, sizeof(__pyx_k__cvPreCornerDetect), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvPyrDown, __pyx_k__cvPyrDown, sizeof(__pyx_k__cvPyrDown), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvPyrUp, __pyx_k__cvPyrUp, sizeof(__pyx_k__cvPyrUp), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvResize, __pyx_k__cvResize, sizeof(__pyx_k__cvResize), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvSmooth, __pyx_k__cvSmooth, sizeof(__pyx_k__cvSmooth), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvSobel, __pyx_k__cvSobel, sizeof(__pyx_k__cvSobel), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvThreshold, __pyx_k__cvThreshold, sizeof(__pyx_k__cvThreshold), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvWarpAffine, __pyx_k__cvWarpAffine, sizeof(__pyx_k__cvWarpAffine), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvWarpPerspective, __pyx_k__cvWarpPerspective, sizeof(__pyx_k__cvWarpPerspective), 0, 0, 1, 1},
|
|
{&__pyx_n_s__cvdoc, __pyx_k__cvdoc, sizeof(__pyx_k__cvdoc), 0, 0, 1, 1},
|
|
{&__pyx_n_s__descr, __pyx_k__descr, sizeof(__pyx_k__descr), 0, 0, 1, 1},
|
|
{&__pyx_n_s__doc, __pyx_k__doc, sizeof(__pyx_k__doc), 0, 0, 1, 1},
|
|
{&__pyx_n_s__dtype, __pyx_k__dtype, sizeof(__pyx_k__dtype), 0, 0, 1, 1},
|
|
{&__pyx_n_s__element, __pyx_k__element, sizeof(__pyx_k__element), 0, 0, 1, 1},
|
|
{&__pyx_n_s__epsilon, __pyx_k__epsilon, sizeof(__pyx_k__epsilon), 0, 0, 1, 1},
|
|
{&__pyx_n_s__fields, __pyx_k__fields, sizeof(__pyx_k__fields), 0, 0, 1, 1},
|
|
{&__pyx_n_s__fillval, __pyx_k__fillval, sizeof(__pyx_k__fillval), 0, 0, 1, 1},
|
|
{&__pyx_n_s__flag, __pyx_k__flag, sizeof(__pyx_k__flag), 0, 0, 1, 1},
|
|
{&__pyx_n_s__float_out, __pyx_k__float_out, sizeof(__pyx_k__float_out), 0, 0, 1, 1},
|
|
{&__pyx_n_s__format, __pyx_k__format, sizeof(__pyx_k__format), 0, 0, 1, 1},
|
|
{&__pyx_n_s__group, __pyx_k__group, sizeof(__pyx_k__group), 0, 0, 1, 1},
|
|
{&__pyx_n_s__height, __pyx_k__height, sizeof(__pyx_k__height), 0, 0, 1, 1},
|
|
{&__pyx_kp_s__image, __pyx_k__image, sizeof(__pyx_k__image), 0, 0, 1, 0},
|
|
{&__pyx_n_s__image_points, __pyx_k__image_points, sizeof(__pyx_k__image_points), 0, 0, 1, 1},
|
|
{&__pyx_n_s__image_size, __pyx_k__image_size, sizeof(__pyx_k__image_size), 0, 0, 1, 1},
|
|
{&__pyx_n_s__in_place, __pyx_k__in_place, sizeof(__pyx_k__in_place), 0, 0, 1, 1},
|
|
{&__pyx_n_s__itemsize, __pyx_k__itemsize, sizeof(__pyx_k__itemsize), 0, 0, 1, 1},
|
|
{&__pyx_n_s__iterations, __pyx_k__iterations, sizeof(__pyx_k__iterations), 0, 0, 1, 1},
|
|
{&__pyx_n_s__k, __pyx_k__k, sizeof(__pyx_k__k), 0, 0, 1, 1},
|
|
{&__pyx_n_s__kernel, __pyx_k__kernel, sizeof(__pyx_k__kernel), 0, 0, 1, 1},
|
|
{&__pyx_n_s__max_value, __pyx_k__max_value, sizeof(__pyx_k__max_value), 0, 0, 1, 1},
|
|
{&__pyx_n_s__method, __pyx_k__method, sizeof(__pyx_k__method), 0, 0, 1, 1},
|
|
{&__pyx_n_s__min_distance, __pyx_k__min_distance, sizeof(__pyx_k__min_distance), 0, 0, 1, 1},
|
|
{&__pyx_n_s__names, __pyx_k__names, sizeof(__pyx_k__names), 0, 0, 1, 1},
|
|
{&__pyx_n_s__ndim, __pyx_k__ndim, sizeof(__pyx_k__ndim), 0, 0, 1, 1},
|
|
{&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1},
|
|
{&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1},
|
|
{&__pyx_n_s__obj, __pyx_k__obj, sizeof(__pyx_k__obj), 0, 0, 1, 1},
|
|
{&__pyx_n_s__object_points, __pyx_k__object_points, sizeof(__pyx_k__object_points), 0, 0, 1, 1},
|
|
{&__pyx_n_s__opencv_backend, __pyx_k__opencv_backend, sizeof(__pyx_k__opencv_backend), 0, 0, 1, 1},
|
|
{&__pyx_n_s__opencv_constants, __pyx_k__opencv_constants, sizeof(__pyx_k__opencv_constants), 0, 0, 1, 1},
|
|
{&__pyx_n_s__opencv_cv, __pyx_k__opencv_cv, sizeof(__pyx_k__opencv_cv), 0, 0, 1, 1},
|
|
{&__pyx_n_s__operation, __pyx_k__operation, sizeof(__pyx_k__operation), 0, 0, 1, 1},
|
|
{&__pyx_n_s__package, __pyx_k__package, sizeof(__pyx_k__package), 0, 0, 1, 1},
|
|
{&__pyx_n_s__param1, __pyx_k__param1, sizeof(__pyx_k__param1), 0, 0, 1, 1},
|
|
{&__pyx_n_s__param2, __pyx_k__param2, sizeof(__pyx_k__param2), 0, 0, 1, 1},
|
|
{&__pyx_n_s__param3, __pyx_k__param3, sizeof(__pyx_k__param3), 0, 0, 1, 1},
|
|
{&__pyx_n_s__param4, __pyx_k__param4, sizeof(__pyx_k__param4), 0, 0, 1, 1},
|
|
{&__pyx_n_s__pattern_size, __pyx_k__pattern_size, sizeof(__pyx_k__pattern_size), 0, 0, 1, 1},
|
|
{&__pyx_n_s__point_counts, __pyx_k__point_counts, sizeof(__pyx_k__point_counts), 0, 0, 1, 1},
|
|
{&__pyx_n_s__quality_level, __pyx_k__quality_level, sizeof(__pyx_k__quality_level), 0, 0, 1, 1},
|
|
{&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
|
|
{&__pyx_n_s__readonly, __pyx_k__readonly, sizeof(__pyx_k__readonly), 0, 0, 1, 1},
|
|
{&__pyx_n_s__reshape, __pyx_k__reshape, sizeof(__pyx_k__reshape), 0, 0, 1, 1},
|
|
{&__pyx_n_s__shape, __pyx_k__shape, sizeof(__pyx_k__shape), 0, 0, 1, 1},
|
|
{&__pyx_n_s__size, __pyx_k__size, sizeof(__pyx_k__size), 0, 0, 1, 1},
|
|
{&__pyx_n_s__smoothtype, __pyx_k__smoothtype, sizeof(__pyx_k__smoothtype), 0, 0, 1, 1},
|
|
{&__pyx_n_s__square_sum, __pyx_k__square_sum, sizeof(__pyx_k__square_sum), 0, 0, 1, 1},
|
|
{&__pyx_n_s__src, __pyx_k__src, sizeof(__pyx_k__src), 0, 0, 1, 1},
|
|
{&__pyx_n_s__strides, __pyx_k__strides, sizeof(__pyx_k__strides), 0, 0, 1, 1},
|
|
{&__pyx_n_s__suboffsets, __pyx_k__suboffsets, sizeof(__pyx_k__suboffsets), 0, 0, 1, 1},
|
|
{&__pyx_n_s__threshold, __pyx_k__threshold, sizeof(__pyx_k__threshold), 0, 0, 1, 1},
|
|
{&__pyx_n_s__threshold1, __pyx_k__threshold1, sizeof(__pyx_k__threshold1), 0, 0, 1, 1},
|
|
{&__pyx_n_s__threshold2, __pyx_k__threshold2, sizeof(__pyx_k__threshold2), 0, 0, 1, 1},
|
|
{&__pyx_n_s__threshold_type, __pyx_k__threshold_type, sizeof(__pyx_k__threshold_type), 0, 0, 1, 1},
|
|
{&__pyx_n_s__tilted_sum, __pyx_k__tilted_sum, sizeof(__pyx_k__tilted_sum), 0, 0, 1, 1},
|
|
{&__pyx_n_s__type_num, __pyx_k__type_num, sizeof(__pyx_k__type_num), 0, 0, 1, 1},
|
|
{&__pyx_n_s__use_harris, __pyx_k__use_harris, sizeof(__pyx_k__use_harris), 0, 0, 1, 1},
|
|
{&__pyx_n_s__use_otsu, __pyx_k__use_otsu, sizeof(__pyx_k__use_otsu), 0, 0, 1, 1},
|
|
{&__pyx_n_s__val, __pyx_k__val, sizeof(__pyx_k__val), 0, 0, 1, 1},
|
|
{&__pyx_n_s__warpmat, __pyx_k__warpmat, sizeof(__pyx_k__warpmat), 0, 0, 1, 1},
|
|
{&__pyx_n_s__width, __pyx_k__width, sizeof(__pyx_k__width), 0, 0, 1, 1},
|
|
{&__pyx_n_s__win, __pyx_k__win, sizeof(__pyx_k__win), 0, 0, 1, 1},
|
|
{&__pyx_n_s__x, __pyx_k__x, sizeof(__pyx_k__x), 0, 0, 1, 1},
|
|
{&__pyx_n_s__xorder, __pyx_k__xorder, sizeof(__pyx_k__xorder), 0, 0, 1, 1},
|
|
{&__pyx_n_s__y, __pyx_k__y, sizeof(__pyx_k__y), 0, 0, 1, 1},
|
|
{&__pyx_n_s__yorder, __pyx_k__yorder, sizeof(__pyx_k__yorder), 0, 0, 1, 1},
|
|
{&__pyx_n_s__zero_zone, __pyx_k__zero_zone, sizeof(__pyx_k__zero_zone), 0, 0, 1, 1},
|
|
{0, 0, 0, 0, 0, 0, 0}
|
|
};
|
|
static int __Pyx_InitCachedBuiltins(void) {
|
|
__pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
return 0;
|
|
__pyx_L1_error:;
|
|
return -1;
|
|
}
|
|
|
|
static int __Pyx_InitGlobals(void) {
|
|
if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__pyx_int_17 = PyInt_FromLong(17); if (unlikely(!__pyx_int_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__pyx_int_18 = PyInt_FromLong(18); if (unlikely(!__pyx_int_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__pyx_int_19 = PyInt_FromLong(19); if (unlikely(!__pyx_int_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__pyx_int_24 = PyInt_FromLong(24); if (unlikely(!__pyx_int_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__pyx_int_25 = PyInt_FromLong(25); if (unlikely(!__pyx_int_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__pyx_int_26 = PyInt_FromLong(26); if (unlikely(!__pyx_int_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__pyx_int_27 = PyInt_FromLong(27); if (unlikely(!__pyx_int_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
return 0;
|
|
__pyx_L1_error:;
|
|
return -1;
|
|
}
|
|
|
|
#if PY_MAJOR_VERSION < 3
|
|
PyMODINIT_FUNC initopencv_cv(void); /*proto*/
|
|
PyMODINIT_FUNC initopencv_cv(void)
|
|
#else
|
|
PyMODINIT_FUNC PyInit_opencv_cv(void); /*proto*/
|
|
PyMODINIT_FUNC PyInit_opencv_cv(void)
|
|
#endif
|
|
{
|
|
PyObject *__pyx_t_1 = NULL;
|
|
PyObject *__pyx_t_2 = NULL;
|
|
PyObject *__pyx_t_3 = NULL;
|
|
int __pyx_t_4;
|
|
PyObject *__pyx_t_5 = NULL;
|
|
PyObject *__pyx_t_6 = NULL;
|
|
PyObject *__pyx_t_7 = NULL;
|
|
PyObject *__pyx_t_8 = NULL;
|
|
size_t __pyx_t_9;
|
|
int __pyx_t_10;
|
|
__pyx_init_filenames();
|
|
#ifdef CYTHON_REFNANNY
|
|
void* __pyx_refchk = NULL;
|
|
__Pyx_Refnanny = __Pyx_ImportRefcountAPI("refnanny");
|
|
if (!__Pyx_Refnanny) {
|
|
PyErr_Clear();
|
|
__Pyx_Refnanny = __Pyx_ImportRefcountAPI("Cython.Runtime.refnanny");
|
|
if (!__Pyx_Refnanny)
|
|
Py_FatalError("failed to import refnanny module");
|
|
}
|
|
__pyx_refchk = __Pyx_Refnanny->NewContext("PyMODINIT_FUNC PyInit_opencv_cv(void)", __LINE__, __FILE__);
|
|
#endif
|
|
__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
#if PY_MAJOR_VERSION < 3
|
|
__pyx_empty_bytes = PyString_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
#else
|
|
__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
#endif
|
|
/*--- Library function declarations ---*/
|
|
/*--- Threads initialization code ---*/
|
|
#if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
|
|
#ifdef WITH_THREAD /* Python build with threading support? */
|
|
PyEval_InitThreads();
|
|
#endif
|
|
#endif
|
|
/*--- Module creation code ---*/
|
|
#if PY_MAJOR_VERSION < 3
|
|
__pyx_m = Py_InitModule4(__Pyx_NAMESTR("opencv_cv"), __pyx_methods, 0, 0, PYTHON_API_VERSION);
|
|
#else
|
|
__pyx_m = PyModule_Create(&__pyx_moduledef);
|
|
#endif
|
|
if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
#if PY_MAJOR_VERSION < 3
|
|
Py_INCREF(__pyx_m);
|
|
#endif
|
|
__pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
|
|
if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
/*--- Initialize various global constants etc. ---*/
|
|
if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__pyx_module_is_main_scikits__image__opencv__opencv_cv) {
|
|
if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
}
|
|
/*--- Builtin init code ---*/
|
|
if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
/*--- Global init code ---*/
|
|
/*--- Function export code ---*/
|
|
/*--- Type init code ---*/
|
|
/*--- Type import code ---*/
|
|
__pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr)); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject)); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject)); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject)); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject)); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
/*--- Function import code ---*/
|
|
__pyx_t_1 = __Pyx_ImportModule("scikits.image.opencv.opencv_backend"); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__Pyx_ImportFunction(__pyx_t_1, "populate_iplimage", (void (**)(void))&__pyx_f_7scikits_5image_6opencv_14opencv_backend_populate_iplimage, "void (PyArrayObject *, __pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__Pyx_ImportFunction(__pyx_t_1, "cvmat_ptr_from_iplimage", (void (**)(void))&__pyx_f_7scikits_5image_6opencv_14opencv_backend_cvmat_ptr_from_iplimage, "struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvMat *(__pyx_t_7scikits_5image_6opencv_11opencv_type_IplImage *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__Pyx_ImportFunction(__pyx_t_1, "validate_array", (void (**)(void))&__pyx_f_7scikits_5image_6opencv_14opencv_backend_validate_array, "int (PyArrayObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__Pyx_ImportFunction(__pyx_t_1, "assert_dtype", (void (**)(void))&__pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_dtype, "int (PyArrayObject *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__Pyx_ImportFunction(__pyx_t_1, "assert_ndims", (void (**)(void))&__pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_ndims, "int (PyArrayObject *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__Pyx_ImportFunction(__pyx_t_1, "assert_nchannels", (void (**)(void))&__pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_nchannels, "int (PyArrayObject *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__Pyx_ImportFunction(__pyx_t_1, "assert_same_dtype", (void (**)(void))&__pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_same_dtype, "int (PyArrayObject *, PyArrayObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__Pyx_ImportFunction(__pyx_t_1, "assert_same_shape", (void (**)(void))&__pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_same_shape, "int (PyArrayObject *, PyArrayObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__Pyx_ImportFunction(__pyx_t_1, "assert_same_width_and_height", (void (**)(void))&__pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_same_width_and_height, "int (PyArrayObject *, PyArrayObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__Pyx_ImportFunction(__pyx_t_1, "assert_like", (void (**)(void))&__pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_like, "int (PyArrayObject *, PyArrayObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__Pyx_ImportFunction(__pyx_t_1, "assert_not_sharing_data", (void (**)(void))&__pyx_f_7scikits_5image_6opencv_14opencv_backend_assert_not_sharing_data, "int (PyArrayObject *, PyArrayObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__Pyx_ImportFunction(__pyx_t_1, "new_array", (void (**)(void))&__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array, "PyArrayObject *(int, npy_intp *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__Pyx_ImportFunction(__pyx_t_1, "new_array_like", (void (**)(void))&__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like, "PyArrayObject *(PyArrayObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__Pyx_ImportFunction(__pyx_t_1, "new_array_like_diff_dtype", (void (**)(void))&__pyx_f_7scikits_5image_6opencv_14opencv_backend_new_array_like_diff_dtype, "PyArrayObject *(PyArrayObject *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__Pyx_ImportFunction(__pyx_t_1, "get_array_nbytes", (void (**)(void))&__pyx_f_7scikits_5image_6opencv_14opencv_backend_get_array_nbytes, "npy_intp (PyArrayObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__Pyx_ImportFunction(__pyx_t_1, "clone_array_shape", (void (**)(void))&__pyx_f_7scikits_5image_6opencv_14opencv_backend_clone_array_shape, "npy_intp *(PyArrayObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__Pyx_ImportFunction(__pyx_t_1, "array_as_cvPoint2D32f_ptr", (void (**)(void))&__pyx_f_7scikits_5image_6opencv_14opencv_backend_array_as_cvPoint2D32f_ptr, "struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvPoint2D32f *(PyArrayObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__Pyx_ImportFunction(__pyx_t_1, "get_cvTermCriteria", (void (**)(void))&__pyx_f_7scikits_5image_6opencv_14opencv_backend_get_cvTermCriteria, "struct __pyx_t_7scikits_5image_6opencv_11opencv_type_CvTermCriteria (int, double)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__Pyx_ImportFunction(__pyx_t_1, "get_IplConvKernel_ptr_from_array", (void (**)(void))&__pyx_f_7scikits_5image_6opencv_14opencv_backend_get_IplConvKernel_ptr_from_array, "__pyx_t_7scikits_5image_6opencv_11opencv_type_IplConvKernel *(PyArrayObject *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (__Pyx_ImportFunction(__pyx_t_1, "free_IplConvKernel", (void (**)(void))&__pyx_f_7scikits_5image_6opencv_14opencv_backend_free_IplConvKernel, "void (__pyx_t_7scikits_5image_6opencv_11opencv_type_IplConvKernel *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
/*--- Execution code ---*/
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1
|
|
* import ctypes # <<<<<<<<<<<<<<
|
|
* import numpy as np
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__ctypes), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ctypes, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2
|
|
* import ctypes
|
|
* import numpy as np # <<<<<<<<<<<<<<
|
|
*
|
|
* cimport numpy as np
|
|
*/
|
|
__pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":8
|
|
* from stdlib cimport *
|
|
* from opencv_type cimport *
|
|
* from opencv_backend import * # <<<<<<<<<<<<<<
|
|
* from opencv_backend cimport *
|
|
* from opencv_constants import *
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(((PyObject *)__pyx_n_s_52));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s_52));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_n_s_52));
|
|
__pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__opencv_backend), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
if (__pyx_import_star(__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":10
|
|
* from opencv_backend import *
|
|
* from opencv_backend cimport *
|
|
* from opencv_constants import * # <<<<<<<<<<<<<<
|
|
*
|
|
* from opencv_constants import *
|
|
*/
|
|
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
__Pyx_INCREF(((PyObject *)__pyx_n_s_52));
|
|
PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s_52));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_n_s_52));
|
|
__pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__opencv_constants), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
if (__pyx_import_star(__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":12
|
|
* from opencv_constants import *
|
|
*
|
|
* from opencv_constants import * # <<<<<<<<<<<<<<
|
|
* from opencv_cv import *
|
|
*
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(((PyObject *)__pyx_n_s_52));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s_52));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_n_s_52));
|
|
__pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__opencv_constants), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
if (__pyx_import_star(__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":13
|
|
*
|
|
* from opencv_constants import *
|
|
* from opencv_cv import * # <<<<<<<<<<<<<<
|
|
*
|
|
* from _libimport import cv
|
|
*/
|
|
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
__Pyx_INCREF(((PyObject *)__pyx_n_s_52));
|
|
PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s_52));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_n_s_52));
|
|
__pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__opencv_cv), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
if (__pyx_import_star(__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":15
|
|
* from opencv_cv import *
|
|
*
|
|
* from _libimport import cv # <<<<<<<<<<<<<<
|
|
* from _utilities import cvdoc
|
|
*
|
|
*/
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(((PyObject *)__pyx_n_s__cv));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__cv));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__cv));
|
|
__pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s___libimport), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
__pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__cv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cv, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":16
|
|
*
|
|
* from _libimport import cv
|
|
* from _utilities import cvdoc # <<<<<<<<<<<<<<
|
|
*
|
|
* if cv is None:
|
|
*/
|
|
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
__Pyx_INCREF(((PyObject *)__pyx_n_s__cvdoc));
|
|
PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__cvdoc));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_n_s__cvdoc));
|
|
__pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s___utilities), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
__pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvdoc, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":18
|
|
* from _utilities import cvdoc
|
|
*
|
|
* if cv is None: # <<<<<<<<<<<<<<
|
|
* raise RuntimeError("Could not load libcv")
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_4 = (__pyx_t_2 == Py_None);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (__pyx_t_4) {
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":19
|
|
*
|
|
* if cv is None:
|
|
* raise RuntimeError("Could not load libcv") # <<<<<<<<<<<<<<
|
|
*
|
|
* # setup numpy tables for this module
|
|
*/
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_INCREF(((PyObject *)__pyx_kp_s_53));
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_53));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_53));
|
|
__pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_Raise(__pyx_t_3, 0, 0);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
goto __pyx_L2;
|
|
}
|
|
__pyx_L2:;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":22
|
|
*
|
|
* # setup numpy tables for this module
|
|
* np.import_array() # <<<<<<<<<<<<<<
|
|
*
|
|
* #-------------------------------------------------------------------------------
|
|
*/
|
|
import_array();
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":35
|
|
* # out type is always the same as in type
|
|
*
|
|
* _cvtcolor_dict = {CV_BGR2BGRA: [3, 4, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_RGB2RGBA: [3, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGRA2BGR: [4, 3, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR2BGRA); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_7, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_7, 1, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_t_8));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_8));
|
|
__pyx_t_8 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_7)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":36
|
|
*
|
|
* _cvtcolor_dict = {CV_BGR2BGRA: [3, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGB2RGBA: [3, 4, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_BGRA2BGR: [4, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGBA2RGB: [4, 3, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_RGB2RGBA); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_t_5));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_5));
|
|
__pyx_t_5 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_7, ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":37
|
|
* _cvtcolor_dict = {CV_BGR2BGRA: [3, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGB2RGBA: [3, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGRA2BGR: [4, 3, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_RGBA2RGB: [4, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGR2RGBA: [3, 4, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGRA2BGR); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_t_2));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":38
|
|
* CV_RGB2RGBA: [3, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGRA2BGR: [4, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGBA2RGB: [4, 3, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_BGR2RGBA: [3, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGB2BGRA: [3, 4, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_RGBA2RGB); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
|
|
PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_7));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_7));
|
|
__pyx_t_7 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_8, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":39
|
|
* CV_BGRA2BGR: [4, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGBA2RGB: [4, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGR2RGBA: [3, 4, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_RGB2BGRA: [3, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGBA2BGR: [4, 3, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR2RGBA); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_7);
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":40
|
|
* CV_RGBA2RGB: [4, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGR2RGBA: [3, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGB2BGRA: [3, 4, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_RGBA2BGR: [4, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGRA2RGB: [4, 3, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_RGB2BGRA); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_7, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_7, 1, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_t_8));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_8));
|
|
__pyx_t_8 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_7)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":41
|
|
* CV_BGR2RGBA: [3, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGB2BGRA: [3, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGBA2BGR: [4, 3, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_BGRA2RGB: [4, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGR2RGB: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_RGBA2BGR); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_t_5));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_5));
|
|
__pyx_t_5 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_7, ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":42
|
|
* CV_RGB2BGRA: [3, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGBA2BGR: [4, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGRA2RGB: [4, 3, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_BGR2RGB: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGB2BGR: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGRA2RGB); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_t_2));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":43
|
|
* CV_RGBA2BGR: [4, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGRA2RGB: [4, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGR2RGB: [3, 3, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_RGB2BGR: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGRA2RGBA: [4, 4, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR2RGB); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
|
|
PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_7));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_7));
|
|
__pyx_t_7 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_8, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":44
|
|
* CV_BGRA2RGB: [4, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGR2RGB: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGB2BGR: [3, 3, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_BGRA2RGBA: [4, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGBA2BGRA: [4, 4, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_RGB2BGR); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_7);
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":45
|
|
* CV_BGR2RGB: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGB2BGR: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGRA2RGBA: [4, 4, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_RGBA2BGRA: [4, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGR2GRAY: [3, 1, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGRA2RGBA); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_7, 0, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_7, 1, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_t_8));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_8));
|
|
__pyx_t_8 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_7)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":46
|
|
* CV_RGB2BGR: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGRA2RGBA: [4, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGBA2BGRA: [4, 4, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_BGR2GRAY: [3, 1, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGB2GRAY: [3, 1, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_RGBA2BGRA); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_t_5));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_5));
|
|
__pyx_t_5 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_7, ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":47
|
|
* CV_BGRA2RGBA: [4, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGBA2BGRA: [4, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGR2GRAY: [3, 1, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_RGB2GRAY: [3, 1, [UINT8, UINT16, FLOAT32]],
|
|
* CV_GRAY2BGR: [1, 3, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR2GRAY); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_t_2));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":48
|
|
* CV_RGBA2BGRA: [4, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGR2GRAY: [3, 1, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGB2GRAY: [3, 1, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_GRAY2BGR: [1, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_GRAY2RGB: [1, 3, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_RGB2GRAY); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
|
|
PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_7));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_7));
|
|
__pyx_t_7 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_8, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":49
|
|
* CV_BGR2GRAY: [3, 1, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGB2GRAY: [3, 1, [UINT8, UINT16, FLOAT32]],
|
|
* CV_GRAY2BGR: [1, 3, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_GRAY2RGB: [1, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_GRAY2BGRA: [1, 4, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_GRAY2BGR); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_7);
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":50
|
|
* CV_RGB2GRAY: [3, 1, [UINT8, UINT16, FLOAT32]],
|
|
* CV_GRAY2BGR: [1, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_GRAY2RGB: [1, 3, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_GRAY2BGRA: [1, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_GRAY2RGBA: [1, 4, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_GRAY2RGB); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_7, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_7, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_t_8));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_8));
|
|
__pyx_t_8 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_7)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":51
|
|
* CV_GRAY2BGR: [1, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_GRAY2RGB: [1, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_GRAY2BGRA: [1, 4, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_GRAY2RGBA: [1, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGRA2GRAY: [4, 1, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_GRAY2BGRA); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_t_5));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_5));
|
|
__pyx_t_5 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_7, ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":52
|
|
* CV_GRAY2RGB: [1, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_GRAY2BGRA: [1, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_GRAY2RGBA: [1, 4, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_BGRA2GRAY: [4, 1, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGBA2GRAY: [4, 1, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_GRAY2RGBA); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_t_2));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":53
|
|
* CV_GRAY2BGRA: [1, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_GRAY2RGBA: [1, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGRA2GRAY: [4, 1, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_RGBA2GRAY: [4, 1, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGR2BGR565: [3, 2, [UINT8]],
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGRA2GRAY); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
|
|
PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_7));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_7));
|
|
__pyx_t_7 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_8, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":54
|
|
* CV_GRAY2RGBA: [1, 4, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGRA2GRAY: [4, 1, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGBA2GRAY: [4, 1, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_BGR2BGR565: [3, 2, [UINT8]],
|
|
* CV_RGB2BGR565: [3, 2, [UINT8]],
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_RGBA2GRAY); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_7);
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":55
|
|
* CV_BGRA2GRAY: [4, 1, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGBA2GRAY: [4, 1, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGR2BGR565: [3, 2, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_RGB2BGR565: [3, 2, [UINT8]],
|
|
* CV_BGR5652BGR: [2, 3, [UINT8]],
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR2BGR565); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":56
|
|
* CV_RGBA2GRAY: [4, 1, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGR2BGR565: [3, 2, [UINT8]],
|
|
* CV_RGB2BGR565: [3, 2, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BGR5652BGR: [2, 3, [UINT8]],
|
|
* CV_BGR5652RGB: [2, 3, [UINT8]],
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_RGB2BGR565); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":57
|
|
* CV_BGR2BGR565: [3, 2, [UINT8]],
|
|
* CV_RGB2BGR565: [3, 2, [UINT8]],
|
|
* CV_BGR5652BGR: [2, 3, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BGR5652RGB: [2, 3, [UINT8]],
|
|
* CV_BGRA2BGR565: [4, 2, [UINT8]],
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR5652BGR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":58
|
|
* CV_RGB2BGR565: [3, 2, [UINT8]],
|
|
* CV_BGR5652BGR: [2, 3, [UINT8]],
|
|
* CV_BGR5652RGB: [2, 3, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BGRA2BGR565: [4, 2, [UINT8]],
|
|
* CV_RGBA2BGR565: [4, 2, [UINT8]],
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR5652RGB); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":59
|
|
* CV_BGR5652BGR: [2, 3, [UINT8]],
|
|
* CV_BGR5652RGB: [2, 3, [UINT8]],
|
|
* CV_BGRA2BGR565: [4, 2, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_RGBA2BGR565: [4, 2, [UINT8]],
|
|
* CV_BGR5652BGRA: [2, 4, [UINT8]],
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGRA2BGR565); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":60
|
|
* CV_BGR5652RGB: [2, 3, [UINT8]],
|
|
* CV_BGRA2BGR565: [4, 2, [UINT8]],
|
|
* CV_RGBA2BGR565: [4, 2, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BGR5652BGRA: [2, 4, [UINT8]],
|
|
* CV_BGR5652RGBA: [2, 4, [UINT8]],
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_RGBA2BGR565); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":61
|
|
* CV_BGRA2BGR565: [4, 2, [UINT8]],
|
|
* CV_RGBA2BGR565: [4, 2, [UINT8]],
|
|
* CV_BGR5652BGRA: [2, 4, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BGR5652RGBA: [2, 4, [UINT8]],
|
|
* CV_GRAY2BGR565: [1, 2, [UINT8]],
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR5652BGRA); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":62
|
|
* CV_RGBA2BGR565: [4, 2, [UINT8]],
|
|
* CV_BGR5652BGRA: [2, 4, [UINT8]],
|
|
* CV_BGR5652RGBA: [2, 4, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_GRAY2BGR565: [1, 2, [UINT8]],
|
|
* CV_BGR5652GRAY: [2, 1, [UINT8]],
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR5652RGBA); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":63
|
|
* CV_BGR5652BGRA: [2, 4, [UINT8]],
|
|
* CV_BGR5652RGBA: [2, 4, [UINT8]],
|
|
* CV_GRAY2BGR565: [1, 2, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BGR5652GRAY: [2, 1, [UINT8]],
|
|
* CV_BGR2BGR555: [3, 2, [UINT8]],
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_GRAY2BGR565); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":64
|
|
* CV_BGR5652RGBA: [2, 4, [UINT8]],
|
|
* CV_GRAY2BGR565: [1, 2, [UINT8]],
|
|
* CV_BGR5652GRAY: [2, 1, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BGR2BGR555: [3, 2, [UINT8]],
|
|
* CV_RGB2BGR555: [3, 2, [UINT8]],
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR5652GRAY); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":65
|
|
* CV_GRAY2BGR565: [1, 2, [UINT8]],
|
|
* CV_BGR5652GRAY: [2, 1, [UINT8]],
|
|
* CV_BGR2BGR555: [3, 2, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_RGB2BGR555: [3, 2, [UINT8]],
|
|
* CV_BGR5552BGR: [2, 3, [UINT8]],
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR2BGR555); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":66
|
|
* CV_BGR5652GRAY: [2, 1, [UINT8]],
|
|
* CV_BGR2BGR555: [3, 2, [UINT8]],
|
|
* CV_RGB2BGR555: [3, 2, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BGR5552BGR: [2, 3, [UINT8]],
|
|
* CV_BGR5552RGB: [2, 3, [UINT8]],
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_RGB2BGR555); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":67
|
|
* CV_BGR2BGR555: [3, 2, [UINT8]],
|
|
* CV_RGB2BGR555: [3, 2, [UINT8]],
|
|
* CV_BGR5552BGR: [2, 3, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BGR5552RGB: [2, 3, [UINT8]],
|
|
* CV_BGRA2BGR555: [4, 2, [UINT8]],
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR5552BGR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":68
|
|
* CV_RGB2BGR555: [3, 2, [UINT8]],
|
|
* CV_BGR5552BGR: [2, 3, [UINT8]],
|
|
* CV_BGR5552RGB: [2, 3, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BGRA2BGR555: [4, 2, [UINT8]],
|
|
* CV_RGBA2BGR555: [4, 2, [UINT8]],
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR5552RGB); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":69
|
|
* CV_BGR5552BGR: [2, 3, [UINT8]],
|
|
* CV_BGR5552RGB: [2, 3, [UINT8]],
|
|
* CV_BGRA2BGR555: [4, 2, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_RGBA2BGR555: [4, 2, [UINT8]],
|
|
* CV_BGR5552BGRA: [2, 4, [UINT8]],
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGRA2BGR555); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":70
|
|
* CV_BGR5552RGB: [2, 3, [UINT8]],
|
|
* CV_BGRA2BGR555: [4, 2, [UINT8]],
|
|
* CV_RGBA2BGR555: [4, 2, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BGR5552BGRA: [2, 4, [UINT8]],
|
|
* CV_BGR5552RGBA: [2, 4, [UINT8]],
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_RGBA2BGR555); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":71
|
|
* CV_BGRA2BGR555: [4, 2, [UINT8]],
|
|
* CV_RGBA2BGR555: [4, 2, [UINT8]],
|
|
* CV_BGR5552BGRA: [2, 4, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BGR5552RGBA: [2, 4, [UINT8]],
|
|
* CV_GRAY2BGR555: [1, 2, [UINT8]],
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR5552BGRA); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":72
|
|
* CV_RGBA2BGR555: [4, 2, [UINT8]],
|
|
* CV_BGR5552BGRA: [2, 4, [UINT8]],
|
|
* CV_BGR5552RGBA: [2, 4, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_GRAY2BGR555: [1, 2, [UINT8]],
|
|
* CV_BGR5552GRAY: [2, 1, [UINT8]],
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR5552RGBA); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
__Pyx_INCREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_4);
|
|
__Pyx_GIVEREF(__pyx_int_4);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":73
|
|
* CV_BGR5552BGRA: [2, 4, [UINT8]],
|
|
* CV_BGR5552RGBA: [2, 4, [UINT8]],
|
|
* CV_GRAY2BGR555: [1, 2, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BGR5552GRAY: [2, 1, [UINT8]],
|
|
* CV_BGR2XYZ: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_GRAY2BGR555); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":74
|
|
* CV_BGR5552RGBA: [2, 4, [UINT8]],
|
|
* CV_GRAY2BGR555: [1, 2, [UINT8]],
|
|
* CV_BGR5552GRAY: [2, 1, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BGR2XYZ: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGB2XYZ: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR5552GRAY); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_2);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_2);
|
|
__Pyx_GIVEREF(__pyx_int_2);
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":75
|
|
* CV_GRAY2BGR555: [1, 2, [UINT8]],
|
|
* CV_BGR5552GRAY: [2, 1, [UINT8]],
|
|
* CV_BGR2XYZ: [3, 3, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_RGB2XYZ: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_XYZ2BGR: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR2XYZ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_7, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_7, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_t_8));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_8));
|
|
__pyx_t_8 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_7)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":76
|
|
* CV_BGR5552GRAY: [2, 1, [UINT8]],
|
|
* CV_BGR2XYZ: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGB2XYZ: [3, 3, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_XYZ2BGR: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_XYZ2RGB: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_RGB2XYZ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_t_5));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_5));
|
|
__pyx_t_5 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_7, ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":77
|
|
* CV_BGR2XYZ: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGB2XYZ: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_XYZ2BGR: [3, 3, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_XYZ2RGB: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGR2YCrCb: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_XYZ2BGR); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_t_2));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":78
|
|
* CV_RGB2XYZ: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_XYZ2BGR: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_XYZ2RGB: [3, 3, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_BGR2YCrCb: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGB2YCrCb: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_XYZ2RGB); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
|
|
PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_7));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_7));
|
|
__pyx_t_7 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_8, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":79
|
|
* CV_XYZ2BGR: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_XYZ2RGB: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGR2YCrCb: [3, 3, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_RGB2YCrCb: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_YCrCb2BGR: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR2YCrCb); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_7);
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":80
|
|
* CV_XYZ2RGB: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGR2YCrCb: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGB2YCrCb: [3, 3, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_YCrCb2BGR: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_YCrCb2RGB: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_RGB2YCrCb); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_7, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_7, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_t_8));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_8));
|
|
__pyx_t_8 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_7)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":81
|
|
* CV_BGR2YCrCb: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_RGB2YCrCb: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_YCrCb2BGR: [3, 3, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_YCrCb2RGB: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGR2HSV: [3, 3, [UINT8, FLOAT32]],
|
|
*/
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_YCrCb2BGR); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_t_5));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_5));
|
|
__pyx_t_5 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_7, ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":82
|
|
* CV_RGB2YCrCb: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_YCrCb2BGR: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_YCrCb2RGB: [3, 3, [UINT8, UINT16, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_BGR2HSV: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_RGB2HSV: [3, 3, [UINT8, FLOAT32]],
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_YCrCb2RGB); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_7);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT16); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
|
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_7 = 0;
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_t_2));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":83
|
|
* CV_YCrCb2BGR: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_YCrCb2RGB: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGR2HSV: [3, 3, [UINT8, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_RGB2HSV: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_BGR2Lab: [3, 3, [UINT8, FLOAT32]],
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR2HSV); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_5));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_5));
|
|
__pyx_t_5 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_8, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":84
|
|
* CV_YCrCb2RGB: [3, 3, [UINT8, UINT16, FLOAT32]],
|
|
* CV_BGR2HSV: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_RGB2HSV: [3, 3, [UINT8, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_BGR2Lab: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_RGB2Lab: [3, 3, [UINT8, FLOAT32]],
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_RGB2HSV); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":85
|
|
* CV_BGR2HSV: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_RGB2HSV: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_BGR2Lab: [3, 3, [UINT8, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_RGB2Lab: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_BayerBG2BGR: [1, 3, [UINT8]],
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR2Lab); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_t_8));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_8));
|
|
__pyx_t_8 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":86
|
|
* CV_RGB2HSV: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_BGR2Lab: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_RGB2Lab: [3, 3, [UINT8, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_BayerBG2BGR: [1, 3, [UINT8]],
|
|
* CV_BayerGB2BGR: [1, 3, [UINT8]],
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_RGB2Lab); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_t_2));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":87
|
|
* CV_BGR2Lab: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_RGB2Lab: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_BayerBG2BGR: [1, 3, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BayerGB2BGR: [1, 3, [UINT8]],
|
|
* CV_BayerRG2BGR: [1, 3, [UINT8]],
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BayerBG2BGR); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_t_2));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_8, ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":88
|
|
* CV_RGB2Lab: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_BayerBG2BGR: [1, 3, [UINT8]],
|
|
* CV_BayerGB2BGR: [1, 3, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BayerRG2BGR: [1, 3, [UINT8]],
|
|
* CV_BayerGR2BGR: [1, 3, [UINT8]],
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BayerGB2BGR); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_t_2));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":89
|
|
* CV_BayerBG2BGR: [1, 3, [UINT8]],
|
|
* CV_BayerGB2BGR: [1, 3, [UINT8]],
|
|
* CV_BayerRG2BGR: [1, 3, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BayerGR2BGR: [1, 3, [UINT8]],
|
|
* CV_BayerBG2RGB: [1, 3, [UINT8]],
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BayerRG2BGR); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_t_2));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_8, ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":90
|
|
* CV_BayerGB2BGR: [1, 3, [UINT8]],
|
|
* CV_BayerRG2BGR: [1, 3, [UINT8]],
|
|
* CV_BayerGR2BGR: [1, 3, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BayerBG2RGB: [1, 3, [UINT8]],
|
|
* CV_BayerGB2RGB: [1, 3, [UINT8]],
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BayerGR2BGR); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_t_2));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":91
|
|
* CV_BayerRG2BGR: [1, 3, [UINT8]],
|
|
* CV_BayerGR2BGR: [1, 3, [UINT8]],
|
|
* CV_BayerBG2RGB: [1, 3, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BayerGB2RGB: [1, 3, [UINT8]],
|
|
* CV_BayerRG2RGB: [1, 3, [UINT8]],
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BayerBG2RGB); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_t_2));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_8, ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":92
|
|
* CV_BayerGR2BGR: [1, 3, [UINT8]],
|
|
* CV_BayerBG2RGB: [1, 3, [UINT8]],
|
|
* CV_BayerGB2RGB: [1, 3, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BayerRG2RGB: [1, 3, [UINT8]],
|
|
* CV_BayerGR2RGB: [1, 3, [UINT8]],
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BayerGB2RGB); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_t_2));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":93
|
|
* CV_BayerBG2RGB: [1, 3, [UINT8]],
|
|
* CV_BayerGB2RGB: [1, 3, [UINT8]],
|
|
* CV_BayerRG2RGB: [1, 3, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BayerGR2RGB: [1, 3, [UINT8]],
|
|
* CV_BGR2Luv: [3, 3, [UINT8, FLOAT32]],
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BayerRG2RGB); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_t_2));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_8, ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":94
|
|
* CV_BayerGB2RGB: [1, 3, [UINT8]],
|
|
* CV_BayerRG2RGB: [1, 3, [UINT8]],
|
|
* CV_BayerGR2RGB: [1, 3, [UINT8]], # <<<<<<<<<<<<<<
|
|
* CV_BGR2Luv: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_RGB2Luv: [3, 3, [UINT8, FLOAT32]],
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BayerGR2RGB); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
__Pyx_INCREF(__pyx_int_1);
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_1);
|
|
__Pyx_GIVEREF(__pyx_int_1);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_t_2));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":95
|
|
* CV_BayerRG2RGB: [1, 3, [UINT8]],
|
|
* CV_BayerGR2RGB: [1, 3, [UINT8]],
|
|
* CV_BGR2Luv: [3, 3, [UINT8, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_RGB2Luv: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_BGR2HLS: [3, 3, [UINT8, FLOAT32]],
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR2Luv); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_5));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_5));
|
|
__pyx_t_5 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_8, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":96
|
|
* CV_BayerGR2RGB: [1, 3, [UINT8]],
|
|
* CV_BGR2Luv: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_RGB2Luv: [3, 3, [UINT8, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_BGR2HLS: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_RGB2HLS: [3, 3, [UINT8, FLOAT32]],
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_RGB2Luv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":97
|
|
* CV_BGR2Luv: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_RGB2Luv: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_BGR2HLS: [3, 3, [UINT8, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_RGB2HLS: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_HSV2BGR: [3, 3, [UINT8, FLOAT32]],
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_BGR2HLS); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_t_8));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_8));
|
|
__pyx_t_8 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":98
|
|
* CV_RGB2Luv: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_BGR2HLS: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_RGB2HLS: [3, 3, [UINT8, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_HSV2BGR: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_HSV2RGB: [3, 3, [UINT8, FLOAT32]],
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_RGB2HLS); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_t_2));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":99
|
|
* CV_BGR2HLS: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_RGB2HLS: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_HSV2BGR: [3, 3, [UINT8, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_HSV2RGB: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_Lab2BGR: [3, 3, [UINT8, FLOAT32]],
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_HSV2BGR); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_5));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_5));
|
|
__pyx_t_5 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_8, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":100
|
|
* CV_RGB2HLS: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_HSV2BGR: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_HSV2RGB: [3, 3, [UINT8, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_Lab2BGR: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_Lab2RGB: [3, 3, [UINT8, FLOAT32]],
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_HSV2RGB); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":101
|
|
* CV_HSV2BGR: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_HSV2RGB: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_Lab2BGR: [3, 3, [UINT8, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_Lab2RGB: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_Luv2BGR: [3, 3, [UINT8, FLOAT32]],
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_Lab2BGR); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_t_8));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_8));
|
|
__pyx_t_8 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":102
|
|
* CV_HSV2RGB: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_Lab2BGR: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_Lab2RGB: [3, 3, [UINT8, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_Luv2BGR: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_Luv2RGB: [3, 3, [UINT8, FLOAT32]],
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_Lab2RGB); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_t_2));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":103
|
|
* CV_Lab2BGR: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_Lab2RGB: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_Luv2BGR: [3, 3, [UINT8, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_Luv2RGB: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_HLS2BGR: [3, 3, [UINT8, FLOAT32]],
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_Luv2BGR); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_t_5));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_5));
|
|
__pyx_t_5 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_8, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":104
|
|
* CV_Lab2RGB: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_Luv2BGR: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_Luv2RGB: [3, 3, [UINT8, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_HLS2BGR: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_HLS2RGB: [3, 3, [UINT8, FLOAT32]]}
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_Luv2RGB); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_6));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_6));
|
|
__pyx_t_6 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":105
|
|
* CV_Luv2BGR: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_Luv2RGB: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_HLS2BGR: [3, 3, [UINT8, FLOAT32]], # <<<<<<<<<<<<<<
|
|
* CV_HLS2RGB: [3, 3, [UINT8, FLOAT32]]}
|
|
*
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_HLS2BGR); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_6, 2, ((PyObject *)__pyx_t_8));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_8));
|
|
__pyx_t_8 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_t_6)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":106
|
|
* CV_Luv2RGB: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_HLS2BGR: [3, 3, [UINT8, FLOAT32]],
|
|
* CV_HLS2RGB: [3, 3, [UINT8, FLOAT32]]} # <<<<<<<<<<<<<<
|
|
*
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_HLS2RGB); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__UINT8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__FLOAT32); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
__Pyx_INCREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_3);
|
|
__Pyx_GIVEREF(__pyx_int_3);
|
|
PyList_SET_ITEM(__pyx_t_8, 2, ((PyObject *)__pyx_t_2));
|
|
__Pyx_GIVEREF(((PyObject *)__pyx_t_2));
|
|
__pyx_t_2 = 0;
|
|
if (PyDict_SetItem(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_t_8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s___cvtcolor_dict, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":116
|
|
* ctypedef void (*cvSobelPtr)(IplImage*, IplImage*, int, int, int)
|
|
* cdef cvSobelPtr c_cvSobel
|
|
* c_cvSobel = (<cvSobelPtr*><size_t>ctypes.addressof(cv.cvSobel))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvLaplace
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_8 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__addressof); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__cvSobel); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_6); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvSobel = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvSobelPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":121
|
|
* ctypedef void (*cvLaplacePtr)(IplImage*, IplImage*, int)
|
|
* cdef cvLaplacePtr c_cvLaplace
|
|
* c_cvLaplace = (<cvLaplacePtr*><size_t>ctypes.addressof(cv.cvLaplace))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvCanny
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_3 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__addressof); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__cvLaplace); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_8); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvLaplace = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvLaplacePtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":126
|
|
* ctypedef void (*cvCannyPtr)(IplImage*, IplImage*, double, double, int)
|
|
* cdef cvCannyPtr c_cvCanny
|
|
* c_cvCanny = (<cvCannyPtr*><size_t>ctypes.addressof(cv.cvCanny))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvPreCornerDetect
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__addressof); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_3 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__cvCanny); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_3 = PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvCanny = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvCannyPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":132
|
|
* cdef cvPreCorneDetectPtr c_cvPreCornerDetect
|
|
* c_cvPreCornerDetect = (<cvPreCorneDetectPtr*><size_t>
|
|
* ctypes.addressof(cv.cvPreCornerDetect))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvCornerEigenValsAndVecs
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_8 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__addressof); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__cvPreCornerDetect); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_6); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvPreCornerDetect = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvPreCorneDetectPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":138
|
|
* cdef cvCornerEigenValsAndVecsPtr c_cvCornerEigenValsAndVecs
|
|
* c_cvCornerEigenValsAndVecs = (<cvCornerEigenValsAndVecsPtr*><size_t>
|
|
* ctypes.addressof(cv.cvCornerEigenValsAndVecs))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvCornerMinEigenVal
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_3 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__addressof); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s_54); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_8); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvCornerEigenValsAndVecs = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvCornerEigenValsAndVecsPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":144
|
|
* cdef cvCornerMinEigenValPtr c_cvCornerMinEigenVal
|
|
* c_cvCornerMinEigenVal = (<cvCornerMinEigenValPtr*><size_t>
|
|
* ctypes.addressof(cv.cvCornerMinEigenVal))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvCornerHarris
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__addressof); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_3 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__cvCornerMinEigenVal); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_3 = PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvCornerMinEigenVal = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvCornerMinEigenValPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":150
|
|
* cdef cvCornerHarrisPtr c_cvCornerHarris
|
|
* c_cvCornerHarris = (<cvCornerHarrisPtr*><size_t>
|
|
* ctypes.addressof(cv.cvCornerHarris))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvFindCornerSubPix
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_8 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__addressof); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__cvCornerHarris); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_6); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvCornerHarris = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvCornerHarrisPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":157
|
|
* cdef cvFindCornerSubPixPtr c_cvFindCornerSubPix
|
|
* c_cvFindCornerSubPix = (<cvFindCornerSubPixPtr*>
|
|
* <size_t>ctypes.addressof(cv.cvFindCornerSubPix))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvGoodFeaturesToTrack
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_3 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__addressof); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__cvFindCornerSubPix); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_8); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvFindCornerSubPix = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvFindCornerSubPixPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":165
|
|
* cdef cvGoodFeaturesToTrackPtr c_cvGoodFeaturesToTrack
|
|
* c_cvGoodFeaturesToTrack = (<cvGoodFeaturesToTrackPtr*><size_t>
|
|
* ctypes.addressof(cv.cvGoodFeaturesToTrack))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvGetRectSubPix
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__addressof); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_3 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s_55); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_3 = PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvGoodFeaturesToTrack = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvGoodFeaturesToTrackPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":171
|
|
* cdef cvGetRectSubPixPtr c_cvGetRectSubPix
|
|
* c_cvGetRectSubPix = (<cvGetRectSubPixPtr*><size_t>
|
|
* ctypes.addressof(cv.cvGetRectSubPix))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvGetQuadrangleSubPix
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_8 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__addressof); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__cvGetRectSubPix); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_6); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvGetRectSubPix = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvGetRectSubPixPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":177
|
|
* cdef cvGetQuadrangleSubPixPtr c_cvGetQuadrangleSubPix
|
|
* c_cvGetQuadrangleSubPix = (<cvGetQuadrangleSubPixPtr*><size_t>
|
|
* ctypes.addressof(cv.cvGetQuadrangleSubPix))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvResize
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_3 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__addressof); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s_56); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_8); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvGetQuadrangleSubPix = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvGetQuadrangleSubPixPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":182
|
|
* ctypedef void (*cvResizePtr)(IplImage*, IplImage*, int)
|
|
* cdef cvResizePtr c_cvResize
|
|
* c_cvResize = (<cvResizePtr*><size_t>ctypes.addressof(cv.cvResize))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvWarpAffine
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__addressof); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_3 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__cvResize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_3 = PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvResize = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvResizePtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":188
|
|
* cdef cvWarpAffinePtr c_cvWarpAffine
|
|
* c_cvWarpAffine = (<cvWarpAffinePtr*><size_t>
|
|
* ctypes.addressof(cv.cvWarpAffine))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvWarpPerspective
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_8 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__addressof); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__cvWarpAffine); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_6); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvWarpAffine = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvWarpAffinePtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":195
|
|
* cdef cvWarpPerspectivePtr c_cvWarpPerspective
|
|
* c_cvWarpPerspective = (<cvWarpPerspectivePtr*><size_t>
|
|
* ctypes.addressof(cv.cvWarpPerspective))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvLogPolar
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_3 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__addressof); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__cvWarpPerspective); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_8); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvWarpPerspective = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvWarpPerspectivePtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":200
|
|
* ctypedef void (*cvLogPolarPtr)(IplImage*, IplImage*, CvPoint2D32f, double, int)
|
|
* cdef cvLogPolarPtr c_cvLogPolar
|
|
* c_cvLogPolar = (<cvLogPolarPtr*><size_t>ctypes.addressof(cv.cvLogPolar))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvErode
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__addressof); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_3 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__cvLogPolar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_3 = PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvLogPolar = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvLogPolarPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":205
|
|
* ctypedef void (*cvErodePtr)(IplImage*, IplImage*, IplConvKernel*, int)
|
|
* cdef cvErodePtr c_cvErode
|
|
* c_cvErode = (<cvErodePtr*><size_t>ctypes.addressof(cv.cvErode))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvDilate
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_8 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__addressof); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__cvErode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_6); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvErode = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvErodePtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":210
|
|
* ctypedef void (*cvDilatePtr)(IplImage*, IplImage*, IplConvKernel*, int)
|
|
* cdef cvDilatePtr c_cvDilate
|
|
* c_cvDilate = (<cvDilatePtr*><size_t>ctypes.addressof(cv.cvDilate))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvMorphologyEx
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_3 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__addressof); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__cvDilate); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_8); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvDilate = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvDilatePtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":217
|
|
* cdef cvMorphologyExPtr c_cvMorphologyEx
|
|
* c_cvMorphologyEx = (<cvMorphologyExPtr*><size_t>
|
|
* ctypes.addressof(cv.cvMorphologyEx))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvSmooth
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__addressof); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_3 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__cvMorphologyEx); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_3 = PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvMorphologyEx = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvMorphologyExPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":223
|
|
* int, double, double)
|
|
* cdef cvSmoothPtr c_cvSmooth
|
|
* c_cvSmooth = (<cvSmoothPtr*><size_t>ctypes.addressof(cv.cvSmooth))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvFilter2D
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_8 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__addressof); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__cvSmooth); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_6); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvSmooth = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvSmoothPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":228
|
|
* ctypedef void (*cvFilter2DPtr)(IplImage*, IplImage*, CvMat*, CvPoint)
|
|
* cdef cvFilter2DPtr c_cvFilter2D
|
|
* c_cvFilter2D = (<cvFilter2DPtr*><size_t>ctypes.addressof(cv.cvFilter2D))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvIntegral
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_3 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__addressof); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__cvFilter2D); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_8); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvFilter2D = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvFilter2DPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":233
|
|
* ctypedef void (*cvIntegralPtr)(IplImage*, IplImage*, IplImage*, IplImage*)
|
|
* cdef cvIntegralPtr c_cvIntegral
|
|
* c_cvIntegral = (<cvIntegralPtr*><size_t>ctypes.addressof(cv.cvIntegral))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvCvtColor
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__addressof); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_3 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__cvIntegral); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_3 = PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvIntegral = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvIntegralPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":238
|
|
* ctypedef void (*cvCvtColorPtr)(IplImage*, IplImage*, int)
|
|
* cdef cvCvtColorPtr c_cvCvtColor
|
|
* c_cvCvtColor = (<cvCvtColorPtr*><size_t>ctypes.addressof(cv.cvCvtColor))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvThreshold
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_8 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__addressof); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__cvCvtColor); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_6); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvCvtColor = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvCvtColorPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":243
|
|
* ctypedef double (*cvThresholdPtr)(IplImage*, IplImage*, double, double, int)
|
|
* cdef cvThresholdPtr c_cvThreshold
|
|
* c_cvThreshold = (<cvThresholdPtr*><size_t>ctypes.addressof(cv.cvThreshold))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvAdaptiveThreshold
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_3 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__addressof); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__cvThreshold); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_8); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvThreshold = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvThresholdPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":250
|
|
* cdef cvAdaptiveThresholdPtr c_cvAdaptiveThreshold
|
|
* c_cvAdaptiveThreshold = (<cvAdaptiveThresholdPtr*><size_t>
|
|
* ctypes.addressof(cv.cvAdaptiveThreshold))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvPyrDown
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__addressof); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_3 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__cvAdaptiveThreshold); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_3 = PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvAdaptiveThreshold = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvAdaptiveThresholdPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":255
|
|
* ctypedef void (*cvPyrDownPtr)(IplImage*, IplImage*, int)
|
|
* cdef cvPyrDownPtr c_cvPyrDown
|
|
* c_cvPyrDown = (<cvPyrDownPtr*><size_t>ctypes.addressof(cv.cvPyrDown))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvPyrUp
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_8 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__addressof); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__cvPyrDown); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_6); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvPyrDown = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvPyrDownPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":260
|
|
* ctypedef void (*cvPyrUpPtr)(IplImage*, IplImage*, int)
|
|
* cdef cvPyrUpPtr c_cvPyrUp
|
|
* c_cvPyrUp = (<cvPyrUpPtr*><size_t>ctypes.addressof(cv.cvPyrUp))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvCalibrateCamera2
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_3 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__addressof); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__cvPyrUp); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_8); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvPyrUp = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvPyrUpPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":267
|
|
* cdef cvCalibrateCamera2Ptr c_cvCalibrateCamera2
|
|
* c_cvCalibrateCamera2 = (<cvCalibrateCamera2Ptr*>
|
|
* <size_t>ctypes.addressof(cv.cvCalibrateCamera2))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvFindChessboardCorners
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__addressof); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_3 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__cvCalibrateCamera2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_3 = PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvCalibrateCamera2 = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvCalibrateCamera2Ptr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":274
|
|
* cdef cvFindChessboardCornersPtr c_cvFindChessboardCorners
|
|
* c_cvFindChessboardCorners = (<cvFindChessboardCornersPtr*><size_t>
|
|
* ctypes.addressof(cv.cvFindChessboardCorners))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* # cvDrawChessboardCorners
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_8 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__addressof); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s_57); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_6); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvFindChessboardCorners = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvFindChessboardCornersPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":281
|
|
* cdef cvDrawChessboardCornersPtr c_cvDrawChessboardCorners
|
|
* c_cvDrawChessboardCorners = (<cvDrawChessboardCornersPtr*><size_t>
|
|
* ctypes.addressof(cv.cvDrawChessboardCorners))[0] # <<<<<<<<<<<<<<
|
|
*
|
|
* #-------------------------------------------------------------------------------
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__ctypes); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_3 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__addressof); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__cv); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s_58); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_9 = __Pyx_PyInt_AsSize_t(__pyx_t_8); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_v_7scikits_5image_6opencv_9opencv_cv_c_cvDrawChessboardCorners = (((__pyx_t_7scikits_5image_6opencv_9opencv_cv_cvDrawChessboardCornersPtr *)((size_t)__pyx_t_9))[0]);
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":291
|
|
* #--------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvSobel(src, xorder=1, yorder=0, aperture_size=3)
|
|
*
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_59)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":312
|
|
* A new which is the result of applying the Sobel
|
|
* operator to src.''')
|
|
* def cvSobel(np.ndarray src, int xorder=1, int yorder=0, # <<<<<<<<<<<<<<
|
|
* int aperture_size=3):
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvSobel); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvSobel, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":344
|
|
* #----------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvLaplace(src, aperture_size=3)
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_60)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":361
|
|
* A new which is the result of applying the Laplace
|
|
* operator to src.''')
|
|
* def cvLaplace(np.ndarray src, int aperture_size=3): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvLaplace); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvLaplace, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":392
|
|
* #--------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvCanny(src, threshold1=10, threshold2=50, aperture_size=3)
|
|
*
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_61)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":413
|
|
* A new which is the result of applying Canny
|
|
* edge detection to src.''')
|
|
* def cvCanny(np.ndarray src, double threshold1=10, double threshold2=50, # <<<<<<<<<<<<<<
|
|
* int aperture_size=3):
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvCanny); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvCanny, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":440
|
|
* #------------------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvPreCornerDetect(src, aperture_size=3)
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_62)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":456
|
|
* out : ndarray
|
|
* A new array of the corner candidates.''')
|
|
* def cvPreCornerDetect(np.ndarray src, int aperture_size=3): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvPreCornerDetect); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvPreCornerDetect, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":482
|
|
* #-------------------------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvCornerEigenValsAndVecs(src, block_size=3, aperture_size=3)
|
|
*
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_63)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":505
|
|
* Where height and width are the same as that
|
|
* of src.''')
|
|
* def cvCornerEigenValsAndVecs(np.ndarray src, int block_size=3, # <<<<<<<<<<<<<<
|
|
* int aperture_size=3):
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s_54); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_54, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":536
|
|
* #--------------------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvCornerMinEigenVal(src, block_size=3, aperture_size=3)
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_64)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":556
|
|
* out : ndarray
|
|
* A new array of the eigenvalues.''')
|
|
* def cvCornerMinEigenVal(np.ndarray src, int block_size=3, # <<<<<<<<<<<<<<
|
|
* int aperture_size=3):
|
|
*
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvCornerMinEigenVal); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvCornerMinEigenVal, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":583
|
|
* #---------------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvCornerHarris(src, block_size=3, aperture_size=3, k=0.04)
|
|
*
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_65)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":613
|
|
* to the output image. Corners in the image can be found as the
|
|
* local maxima of the output image.''')
|
|
* def cvCornerHarris(np.ndarray src, int block_size=3, int aperture_size=3, # <<<<<<<<<<<<<<
|
|
* double k=0.04):
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvCornerHarris); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvCornerHarris, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":672
|
|
* None. The array 'corners' is modified in place.''')
|
|
* def cvFindCornerSubPix(np.ndarray src, np.ndarray corners, win,
|
|
* zero_zone=(-1, -1), int iterations=0, # <<<<<<<<<<<<<<
|
|
* double epsilon=1e-5):
|
|
*
|
|
*/
|
|
__pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_INCREF(__pyx_int_neg_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_neg_1);
|
|
__Pyx_GIVEREF(__pyx_int_neg_1);
|
|
__Pyx_INCREF(__pyx_int_neg_1);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_neg_1);
|
|
__Pyx_GIVEREF(__pyx_int_neg_1);
|
|
__pyx_k_2 = __pyx_t_6;
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":640
|
|
* #-------------------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvFindCornerSubPix(src, corners, win, zero_zone=(-1, -1), iterations=0, epsilon=1e-5)
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_66)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":671
|
|
* -------
|
|
* None. The array 'corners' is modified in place.''')
|
|
* def cvFindCornerSubPix(np.ndarray src, np.ndarray corners, win, # <<<<<<<<<<<<<<
|
|
* zero_zone=(-1, -1), int iterations=0,
|
|
* double epsilon=1e-5):
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvFindCornerSubPix); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvFindCornerSubPix, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":716
|
|
* #----------------------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvGoodFeaturesToTrack(src, corner_count, quality_level, min_distance, block_size=3, use_harris=0, k=0.04)
|
|
*
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_67)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":756
|
|
* algorithm. It also insures that features are distanced
|
|
* from one another by at least min_distance.''')
|
|
* def cvGoodFeaturesToTrack(np.ndarray src, int corner_count, # <<<<<<<<<<<<<<
|
|
* double quality_level, double min_distance,
|
|
* int block_size=3, int use_harris=0, double k=0.04):
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s_55); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_55, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":801
|
|
* #----------------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvGetRectSubPix(src, size, center)
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_68)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":829
|
|
* may extend beyond the image. Border replication is used
|
|
* to fill in missing pixels.''')
|
|
* def cvGetRectSubPix(np.ndarray src, size, center): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvGetRectSubPix); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvGetRectSubPix, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":893
|
|
* and should be used unless specific feature of that
|
|
* function are required.''')
|
|
* def cvGetQuadrangleSubPix(np.ndarray src, np.ndarray warpmat, float_out=False): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_8 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_k_5 = __pyx_t_8;
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":859
|
|
* #----------------------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvGetQuadrangleSubPix(src, warpmat, float_out=False)
|
|
*
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_69)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":893
|
|
* and should be used unless specific feature of that
|
|
* function are required.''')
|
|
* def cvGetQuadrangleSubPix(np.ndarray src, np.ndarray warpmat, float_out=False): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s_56); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_56, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":957
|
|
* out : ndarray
|
|
* The resized image.''')
|
|
* def cvResize(np.ndarray src, size, int method=CV_INTER_LINEAR): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_INTER_LINEAR); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_k_7 = __pyx_t_10;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":934
|
|
* #---------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvResize(src, size, method=CV_INTER_LINEAR)
|
|
*
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
|
|
if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_70)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":957
|
|
* out : ndarray
|
|
* The resized image.''')
|
|
* def cvResize(np.ndarray src, size, int method=CV_INTER_LINEAR): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvResize); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvResize, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1037
|
|
* features of this function are needed.''')
|
|
* def cvWarpAffine(np.ndarray src, np.ndarray warpmat,
|
|
* int flag=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS, # <<<<<<<<<<<<<<
|
|
* fillval=(0., 0., 0., 0.)):
|
|
*
|
|
*/
|
|
__pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_INTER_LINEAR); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s_71); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_3 = PyNumber_Add(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_k_11 = __pyx_t_10;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1038
|
|
* def cvWarpAffine(np.ndarray src, np.ndarray warpmat,
|
|
* int flag=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS,
|
|
* fillval=(0., 0., 0., 0.)): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_3 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_6 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_8 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_k_10 = __pyx_t_5;
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
__pyx_t_5 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":992
|
|
* #-------------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvWarpAffine(src, warpmat, flag=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS, fillval=(0., 0., 0., 0.))
|
|
*
|
|
*/
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_72)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_8 = PyEval_CallObjectWithKeywords(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1036
|
|
* and that function should be used instead, unless specific
|
|
* features of this function are needed.''')
|
|
* def cvWarpAffine(np.ndarray src, np.ndarray warpmat, # <<<<<<<<<<<<<<
|
|
* int flag=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS,
|
|
* fillval=(0., 0., 0., 0.)):
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvWarpAffine); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvWarpAffine, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1124
|
|
* the inverse transform from warpmat.''')
|
|
* def cvWarpPerspective(np.ndarray src, np.ndarray warpmat,
|
|
* int flag=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS, # <<<<<<<<<<<<<<
|
|
* fillval=(0., 0., 0., 0.)):
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_INTER_LINEAR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s_71); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_8 = PyNumber_Add(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
__pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_8); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
__pyx_k_15 = __pyx_t_10;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1125
|
|
* def cvWarpPerspective(np.ndarray src, np.ndarray warpmat,
|
|
* int flag=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS,
|
|
* fillval=(0., 0., 0., 0.)): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_8 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_8);
|
|
__pyx_t_5 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_5);
|
|
__pyx_t_2 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_6 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8);
|
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
|
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_8 = 0;
|
|
__pyx_t_5 = 0;
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_6 = 0;
|
|
__pyx_k_14 = __pyx_t_3;
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1083
|
|
* #------------------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvWarpPerspective(src, warpmat, flag=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS, fillval=(0., 0., 0., 0.))
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_73)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1123
|
|
* directly for pixel interpolation. Otherwise, the function finds
|
|
* the inverse transform from warpmat.''')
|
|
* def cvWarpPerspective(np.ndarray src, np.ndarray warpmat, # <<<<<<<<<<<<<<
|
|
* int flag=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS,
|
|
* fillval=(0., 0., 0., 0.)):
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvWarpPerspective); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
|
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
__pyx_t_6 = 0;
|
|
__pyx_t_6 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvWarpPerspective, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1211
|
|
* for object tracking and so forth.''')
|
|
* def cvLogPolar(np.ndarray src, center, double M,
|
|
* int flag=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_INTER_LINEAR); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_71); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyNumber_Add(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_k_17 = __pyx_t_10;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1168
|
|
* #-----------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvLogPolar(src, center, M, flag=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS)
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_74)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1210
|
|
* for fast scale and rotation-invariant template matching,
|
|
* for object tracking and so forth.''')
|
|
* def cvLogPolar(np.ndarray src, center, double M, # <<<<<<<<<<<<<<
|
|
* int flag=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS):
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvLogPolar); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_3 = PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvLogPolar, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1270
|
|
* Otherwise, this function returns None.''')
|
|
* def cvErode(np.ndarray src, np.ndarray element=None, int iterations=1,
|
|
* anchor=None, in_place=False): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_k_19 = __pyx_t_3;
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1240
|
|
* #--------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvErode(src, element=None, iterations=1, anchor=None, in_place=False)
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_75)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1269
|
|
* An new array is returned only if in_place=False.
|
|
* Otherwise, this function returns None.''')
|
|
* def cvErode(np.ndarray src, np.ndarray element=None, int iterations=1, # <<<<<<<<<<<<<<
|
|
* anchor=None, in_place=False):
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvErode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvErode, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1336
|
|
* Otherwise, this function returns None.''')
|
|
* def cvDilate(np.ndarray src, np.ndarray element=None, int iterations=1,
|
|
* anchor=None, in_place=False): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_k_20 = __pyx_t_2;
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1306
|
|
* #---------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvDilate(src, element=None, iterations=1, anchor=None, in_place=False)
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_76)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1335
|
|
* An new array is returned only if in_place=False.
|
|
* Otherwise, this function returns None.''')
|
|
* def cvDilate(np.ndarray src, np.ndarray element=None, int iterations=1, # <<<<<<<<<<<<<<
|
|
* anchor=None, in_place=False):
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvDilate); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_3 = PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvDilate, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1409
|
|
* Otherwise, this function returns None.''')
|
|
* def cvMorphologyEx(np.ndarray src, np.ndarray element, int operation,
|
|
* int iterations=1, anchor=None, in_place=False): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_k_21 = __pyx_t_3;
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1372
|
|
* #---------------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvMorphologyEx(src, element, operation, iterations=1, anchor=None, in_place=False)
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_77)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1408
|
|
* An new array is returned only if in_place=False.
|
|
* Otherwise, this function returns None.''')
|
|
* def cvMorphologyEx(np.ndarray src, np.ndarray element, int operation, # <<<<<<<<<<<<<<
|
|
* int iterations=1, anchor=None, in_place=False):
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvMorphologyEx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvMorphologyEx, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1541
|
|
* Using standard sigma for small kernels (3x3 to 7x7)
|
|
* gives better speed.''')
|
|
* def cvSmooth(np.ndarray src, int smoothtype=CV_GAUSSIAN, int param1=3, # <<<<<<<<<<<<<<
|
|
* int param2=0, double param3=0, double param4=0,
|
|
* bool in_place=False):
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_GAUSSIAN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_k_24 = __pyx_t_10;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1543
|
|
* def cvSmooth(np.ndarray src, int smoothtype=CV_GAUSSIAN, int param1=3,
|
|
* int param2=0, double param3=0, double param4=0,
|
|
* bool in_place=False): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
if (!(likely(PyBool_Check(__pyx_t_2)) || (__pyx_t_2) == Py_None || (PyErr_Format(PyExc_TypeError, "Expected bool, got %s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_k_23 = ((PyObject *)__pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1462
|
|
* #---------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvSmooth(src, smoothtype=CV_GAUSSIAN, param1=3, param2=0, param3=0., param4=0., in_place=False)
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_78)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1541
|
|
* Using standard sigma for small kernels (3x3 to 7x7)
|
|
* gives better speed.''')
|
|
* def cvSmooth(np.ndarray src, int smoothtype=CV_GAUSSIAN, int param1=3, # <<<<<<<<<<<<<<
|
|
* int param2=0, double param3=0, double param4=0,
|
|
* bool in_place=False):
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvSmooth); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_3 = PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvSmooth, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1634
|
|
* whether it will faster to do the convolution in the spatial
|
|
* or the frequency domain, and behaves accordingly.''')
|
|
* def cvFilter2D(np.ndarray src, np.ndarray kernel, anchor=None, in_place=False): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_k_26 = __pyx_t_3;
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1605
|
|
* #-----------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvFilter2D(src, kernel, anchor=None, in_place=False)
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_79)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1634
|
|
* whether it will faster to do the convolution in the spatial
|
|
* or the frequency domain, and behaves accordingly.''')
|
|
* def cvFilter2D(np.ndarray src, np.ndarray kernel, anchor=None, in_place=False): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvFilter2D); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvFilter2D, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1707
|
|
* out3: the titled sum image,
|
|
* or any combination of these two.''')
|
|
* def cvIntegral(np.ndarray src, square_sum=False, tilted_sum=False): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_k_29 = __pyx_t_2;
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_k_30 = __pyx_t_2;
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1685
|
|
* #-----------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvIntegral(src, square_sum=False, titled_sum=False)
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_80)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1707
|
|
* out3: the titled sum image,
|
|
* or any combination of these two.''')
|
|
* def cvIntegral(np.ndarray src, square_sum=False, tilted_sum=False): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvIntegral); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_3 = PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvIntegral, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1766
|
|
* #-----------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvCvtColor(src, code)
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_81)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1809
|
|
* See the OpenCV documentation for more details
|
|
* about the specific color conversions.''')
|
|
* def cvCvtColor(np.ndarray src, int code): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvCvtColor); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvCvtColor, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1890
|
|
* just the thresholded image is returned.''')
|
|
* def cvThreshold(np.ndarray src, double threshold, double max_value=255,
|
|
* int threshold_type=CV_THRESH_BINARY, use_otsu=False): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_THRESH_BINARY); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__pyx_k_33 = __pyx_t_10;
|
|
__pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_k_32 = __pyx_t_2;
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1858
|
|
* #------------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvThreshold(src, threshold, max_value=255, threshold_type=CV_THRESH_BINARY, use_otsu=False)
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_82)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1889
|
|
* returned in addition to the thresholded image. Otherwise
|
|
* just the thresholded image is returned.''')
|
|
* def cvThreshold(np.ndarray src, double threshold, double max_value=255, # <<<<<<<<<<<<<<
|
|
* int threshold_type=CV_THRESH_BINARY, use_otsu=False):
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvThreshold); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_3 = PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvThreshold, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1950
|
|
* The thresholded image.''')
|
|
* def cvAdaptiveThreshold(np.ndarray src, double max_value,
|
|
* int adaptive_method=CV_ADAPTIVE_THRESH_MEAN_C, # <<<<<<<<<<<<<<
|
|
* int threshold_type=CV_THRESH_BINARY,
|
|
* int block_size=3, double param1=5):
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_36); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_k_34 = __pyx_t_10;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1951
|
|
* def cvAdaptiveThreshold(np.ndarray src, double max_value,
|
|
* int adaptive_method=CV_ADAPTIVE_THRESH_MEAN_C,
|
|
* int threshold_type=CV_THRESH_BINARY, # <<<<<<<<<<<<<<
|
|
* int block_size=3, double param1=5):
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__CV_THRESH_BINARY); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_k_35 = __pyx_t_10;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1920
|
|
* #--------------------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvAdaptiveThreshold(src, max_value, adaptive_method=CV_ADAPTIVE_THRESH_MEAN_C, threshold_type=CV_THRESH_BINARY, block_size=3, param1=5)
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_83)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1949
|
|
* out : ndarray
|
|
* The thresholded image.''')
|
|
* def cvAdaptiveThreshold(np.ndarray src, double max_value, # <<<<<<<<<<<<<<
|
|
* int adaptive_method=CV_ADAPTIVE_THRESH_MEAN_C,
|
|
* int threshold_type=CV_THRESH_BINARY,
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvAdaptiveThreshold); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvAdaptiveThreshold, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":1986
|
|
* #----------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvPyrDown(src)
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_84)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2000
|
|
* Downsampled image half the size of the original
|
|
* in each dimension.''')
|
|
* def cvPyrDown(np.ndarray src): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvPyrDown); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_3 = PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvPyrDown, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2028
|
|
* #--------
|
|
*
|
|
* @cvdoc(package='cv', group='image', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvPyrUp(src)
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__image)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_85)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2042
|
|
* Upsampled image twice the size of the original
|
|
* in each dimension.''')
|
|
* def cvPyrUp(np.ndarray src): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvPyrUp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvPyrUp, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2070
|
|
* #-------------------
|
|
*
|
|
* @cvdoc(package='cv', group='calibration', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvCalibrateCamera2(object_points, image_points, point_counts, image_size)
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__calibration)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_86)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2094
|
|
* Intrinsics is the 3x3 camera instrinsics matrix.
|
|
* Distortion is the 5-vector of distortion coefficients.''')
|
|
* def cvCalibrateCamera2(np.ndarray object_points, np.ndarray image_points, # <<<<<<<<<<<<<<
|
|
* np.ndarray point_counts, image_size):
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvCalibrateCamera2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_3 = PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cvCalibrateCamera2, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2190
|
|
* An nx2 array of the corners found.''')
|
|
* def cvFindChessboardCorners(np.ndarray src, pattern_size,
|
|
* int flag=CV_CALIB_CB_ADAPTIVE_THRESH): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_87); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__pyx_k_42 = __pyx_t_10;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2162
|
|
* #------------------------
|
|
*
|
|
* @cvdoc(package='cv', group='calibration', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvFindChessboardCorners(src, pattern_size, flag=CV_CALIB_CB_ADAPTIVE_THRESH)
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__calibration)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_88)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2189
|
|
* out : ndarray Nx2
|
|
* An nx2 array of the corners found.''')
|
|
* def cvFindChessboardCorners(np.ndarray src, pattern_size, # <<<<<<<<<<<<<<
|
|
* int flag=CV_CALIB_CB_ADAPTIVE_THRESH):
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_57); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
__pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_57, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2248
|
|
* the corners drawn into it.''')
|
|
* def cvDrawChessboardCorners(np.ndarray src, pattern_size, np.ndarray corners,
|
|
* in_place=False): # <<<<<<<<<<<<<<
|
|
*
|
|
* validate_array(src)
|
|
*/
|
|
__pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_k_43 = __pyx_t_2;
|
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
__pyx_t_2 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2223
|
|
* #------------------------
|
|
*
|
|
* @cvdoc(package='cv', group='calibration', doc=\ # <<<<<<<<<<<<<<
|
|
* '''cvDrawChessboardCorners(src, pattern_size, corners, in_place=False)
|
|
*
|
|
*/
|
|
__pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__cvdoc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
__pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__package), ((PyObject *)__pyx_n_s__cv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__group), ((PyObject *)__pyx_kp_s__calibration)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__doc), ((PyObject *)__pyx_kp_s_89)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_6);
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/src/scikits.image/scikits/image/opencv/opencv_cv.pyx":2247
|
|
* Otherwise, the function returns a new image with
|
|
* the corners drawn into it.''')
|
|
* def cvDrawChessboardCorners(np.ndarray src, pattern_size, np.ndarray corners, # <<<<<<<<<<<<<<
|
|
* in_place=False):
|
|
*
|
|
*/
|
|
__pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_58); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_2);
|
|
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
|
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
__pyx_t_3 = 0;
|
|
__pyx_t_3 = PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_GOTREF(__pyx_t_3);
|
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_58, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
|
|
/* "/Users/stefan/lib/python2.6/site-packages/Cython/Includes/python_mem.pxd":1
|
|
* cdef extern from "Python.h": # <<<<<<<<<<<<<<
|
|
*
|
|
* #####################################################################
|
|
*/
|
|
goto __pyx_L0;
|
|
__pyx_L1_error:;
|
|
__Pyx_XDECREF(__pyx_t_1);
|
|
__Pyx_XDECREF(__pyx_t_2);
|
|
__Pyx_XDECREF(__pyx_t_3);
|
|
__Pyx_XDECREF(__pyx_t_5);
|
|
__Pyx_XDECREF(__pyx_t_6);
|
|
__Pyx_XDECREF(__pyx_t_7);
|
|
__Pyx_XDECREF(__pyx_t_8);
|
|
if (__pyx_m) {
|
|
__Pyx_AddTraceback("init scikits.image.opencv.opencv_cv");
|
|
Py_DECREF(__pyx_m); __pyx_m = 0;
|
|
} else if (!PyErr_Occurred()) {
|
|
PyErr_SetString(PyExc_ImportError, "init scikits.image.opencv.opencv_cv");
|
|
}
|
|
__pyx_L0:;
|
|
__Pyx_FinishRefcountContext();
|
|
#if PY_MAJOR_VERSION < 3
|
|
return;
|
|
#else
|
|
return __pyx_m;
|
|
#endif
|
|
}
|
|
|
|
static const char *__pyx_filenames[] = {
|
|
"opencv_cv.pyx",
|
|
"numpy.pxd",
|
|
};
|
|
|
|
/* Runtime support code */
|
|
|
|
static void __pyx_init_filenames(void) {
|
|
__pyx_f = __pyx_filenames;
|
|
}
|
|
|
|
static void __Pyx_RaiseDoubleKeywordsError(
|
|
const char* func_name,
|
|
PyObject* kw_name)
|
|
{
|
|
PyErr_Format(PyExc_TypeError,
|
|
#if PY_MAJOR_VERSION >= 3
|
|
"%s() got multiple values for keyword argument '%U'", func_name, kw_name);
|
|
#else
|
|
"%s() got multiple values for keyword argument '%s'", func_name,
|
|
PyString_AS_STRING(kw_name));
|
|
#endif
|
|
}
|
|
|
|
static void __Pyx_RaiseArgtupleInvalid(
|
|
const char* func_name,
|
|
int exact,
|
|
Py_ssize_t num_min,
|
|
Py_ssize_t num_max,
|
|
Py_ssize_t num_found)
|
|
{
|
|
Py_ssize_t num_expected;
|
|
const char *number, *more_or_less;
|
|
|
|
if (num_found < num_min) {
|
|
num_expected = num_min;
|
|
more_or_less = "at least";
|
|
} else {
|
|
num_expected = num_max;
|
|
more_or_less = "at most";
|
|
}
|
|
if (exact) {
|
|
more_or_less = "exactly";
|
|
}
|
|
number = (num_expected == 1) ? "" : "s";
|
|
PyErr_Format(PyExc_TypeError,
|
|
#if PY_VERSION_HEX < 0x02050000
|
|
"%s() takes %s %d positional argument%s (%d given)",
|
|
#else
|
|
"%s() takes %s %zd positional argument%s (%zd given)",
|
|
#endif
|
|
func_name, more_or_less, num_expected, number, num_found);
|
|
}
|
|
|
|
static int __Pyx_ParseOptionalKeywords(
|
|
PyObject *kwds,
|
|
PyObject **argnames[],
|
|
PyObject *kwds2,
|
|
PyObject *values[],
|
|
Py_ssize_t num_pos_args,
|
|
const char* function_name)
|
|
{
|
|
PyObject *key = 0, *value = 0;
|
|
Py_ssize_t pos = 0;
|
|
PyObject*** name;
|
|
PyObject*** first_kw_arg = argnames + num_pos_args;
|
|
|
|
while (PyDict_Next(kwds, &pos, &key, &value)) {
|
|
name = first_kw_arg;
|
|
while (*name && (**name != key)) name++;
|
|
if (*name) {
|
|
values[name-argnames] = value;
|
|
} else {
|
|
#if PY_MAJOR_VERSION < 3
|
|
if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
|
|
#else
|
|
if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) {
|
|
#endif
|
|
goto invalid_keyword_type;
|
|
} else {
|
|
for (name = first_kw_arg; *name; name++) {
|
|
#if PY_MAJOR_VERSION >= 3
|
|
if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
|
|
PyUnicode_Compare(**name, key) == 0) break;
|
|
#else
|
|
if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
|
|
_PyString_Eq(**name, key)) break;
|
|
#endif
|
|
}
|
|
if (*name) {
|
|
values[name-argnames] = value;
|
|
} else {
|
|
/* unexpected keyword found */
|
|
for (name=argnames; name != first_kw_arg; name++) {
|
|
if (**name == key) goto arg_passed_twice;
|
|
#if PY_MAJOR_VERSION >= 3
|
|
if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
|
|
PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
|
|
#else
|
|
if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
|
|
_PyString_Eq(**name, key)) goto arg_passed_twice;
|
|
#endif
|
|
}
|
|
if (kwds2) {
|
|
if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
|
|
} else {
|
|
goto invalid_keyword;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return 0;
|
|
arg_passed_twice:
|
|
__Pyx_RaiseDoubleKeywordsError(function_name, **name);
|
|
goto bad;
|
|
invalid_keyword_type:
|
|
PyErr_Format(PyExc_TypeError,
|
|
"%s() keywords must be strings", function_name);
|
|
goto bad;
|
|
invalid_keyword:
|
|
PyErr_Format(PyExc_TypeError,
|
|
#if PY_MAJOR_VERSION < 3
|
|
"%s() got an unexpected keyword argument '%s'",
|
|
function_name, PyString_AsString(key));
|
|
#else
|
|
"%s() got an unexpected keyword argument '%U'",
|
|
function_name, key);
|
|
#endif
|
|
bad:
|
|
return -1;
|
|
}
|
|
|
|
|
|
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
|
|
PyObject *tmp_type, *tmp_value, *tmp_tb;
|
|
PyThreadState *tstate = PyThreadState_GET();
|
|
*type = tstate->curexc_type;
|
|
*value = tstate->curexc_value;
|
|
*tb = tstate->curexc_traceback;
|
|
tstate->curexc_type = 0;
|
|
tstate->curexc_value = 0;
|
|
tstate->curexc_traceback = 0;
|
|
PyErr_NormalizeException(type, value, tb);
|
|
if (PyErr_Occurred())
|
|
goto bad;
|
|
Py_INCREF(*type);
|
|
Py_INCREF(*value);
|
|
Py_INCREF(*tb);
|
|
tmp_type = tstate->exc_type;
|
|
tmp_value = tstate->exc_value;
|
|
tmp_tb = tstate->exc_traceback;
|
|
tstate->exc_type = *type;
|
|
tstate->exc_value = *value;
|
|
tstate->exc_traceback = *tb;
|
|
/* Make sure tstate is in a consistent state when we XDECREF
|
|
these objects (XDECREF may run arbitrary code). */
|
|
Py_XDECREF(tmp_type);
|
|
Py_XDECREF(tmp_value);
|
|
Py_XDECREF(tmp_tb);
|
|
return 0;
|
|
bad:
|
|
Py_XDECREF(*type);
|
|
Py_XDECREF(*value);
|
|
Py_XDECREF(*tb);
|
|
return -1;
|
|
}
|
|
|
|
|
|
static INLINE long __Pyx_mod_long(long a, long b) {
|
|
long r = a % b;
|
|
r += ((r != 0) & ((r ^ b) < 0)) * b;
|
|
return r;
|
|
}
|
|
|
|
static INLINE long __Pyx_div_long(long a, long b) {
|
|
long q = a / b;
|
|
long r = a - q*b;
|
|
q -= ((r != 0) & ((r ^ b) < 0));
|
|
return q;
|
|
}
|
|
|
|
static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
|
|
if (!type) {
|
|
PyErr_Format(PyExc_SystemError, "Missing type object");
|
|
return 0;
|
|
}
|
|
if (obj == Py_None || PyObject_TypeCheck(obj, type))
|
|
return 1;
|
|
PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s",
|
|
Py_TYPE(obj)->tp_name, type->tp_name);
|
|
return 0;
|
|
}
|
|
|
|
static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
|
|
PyErr_Format(PyExc_ValueError,
|
|
#if PY_VERSION_HEX < 0x02050000
|
|
"need more than %d value%s to unpack", (int)index,
|
|
#else
|
|
"need more than %zd value%s to unpack", index,
|
|
#endif
|
|
(index == 1) ? "" : "s");
|
|
}
|
|
|
|
static INLINE void __Pyx_RaiseTooManyValuesError(void) {
|
|
PyErr_SetString(PyExc_ValueError, "too many values to unpack");
|
|
}
|
|
|
|
static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) {
|
|
PyObject *item;
|
|
if (!(item = PyIter_Next(iter))) {
|
|
if (!PyErr_Occurred()) {
|
|
__Pyx_RaiseNeedMoreValuesError(index);
|
|
}
|
|
}
|
|
return item;
|
|
}
|
|
|
|
static int __Pyx_EndUnpack(PyObject *iter) {
|
|
PyObject *item;
|
|
if ((item = PyIter_Next(iter))) {
|
|
Py_DECREF(item);
|
|
__Pyx_RaiseTooManyValuesError();
|
|
return -1;
|
|
}
|
|
else if (!PyErr_Occurred())
|
|
return 0;
|
|
else
|
|
return -1;
|
|
}
|
|
|
|
static INLINE void __Pyx_RaiseNoneNotIterableError(void) {
|
|
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
|
|
}
|
|
|
|
static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
|
|
if (t == Py_None) {
|
|
__Pyx_RaiseNoneNotIterableError();
|
|
} else if (PyTuple_GET_SIZE(t) < index) {
|
|
__Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
|
|
} else {
|
|
__Pyx_RaiseTooManyValuesError();
|
|
}
|
|
}
|
|
|
|
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
|
|
const char *name, int exact)
|
|
{
|
|
if (!type) {
|
|
PyErr_Format(PyExc_SystemError, "Missing type object");
|
|
return 0;
|
|
}
|
|
if (none_allowed && obj == Py_None) return 1;
|
|
else if (exact) {
|
|
if (Py_TYPE(obj) == type) return 1;
|
|
}
|
|
else {
|
|
if (PyObject_TypeCheck(obj, type)) return 1;
|
|
}
|
|
PyErr_Format(PyExc_TypeError,
|
|
"Argument '%s' has incorrect type (expected %s, got %s)",
|
|
name, type->tp_name, Py_TYPE(obj)->tp_name);
|
|
return 0;
|
|
}
|
|
|
|
static INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
|
|
PyThreadState *tstate = PyThreadState_GET();
|
|
*type = tstate->exc_type;
|
|
*value = tstate->exc_value;
|
|
*tb = tstate->exc_traceback;
|
|
Py_XINCREF(*type);
|
|
Py_XINCREF(*value);
|
|
Py_XINCREF(*tb);
|
|
}
|
|
|
|
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
|
|
PyObject *tmp_type, *tmp_value, *tmp_tb;
|
|
PyThreadState *tstate = PyThreadState_GET();
|
|
tmp_type = tstate->exc_type;
|
|
tmp_value = tstate->exc_value;
|
|
tmp_tb = tstate->exc_traceback;
|
|
tstate->exc_type = type;
|
|
tstate->exc_value = value;
|
|
tstate->exc_traceback = tb;
|
|
Py_XDECREF(tmp_type);
|
|
Py_XDECREF(tmp_value);
|
|
Py_XDECREF(tmp_tb);
|
|
}
|
|
|
|
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
|
|
PyObject *__import__ = 0;
|
|
PyObject *empty_list = 0;
|
|
PyObject *module = 0;
|
|
PyObject *global_dict = 0;
|
|
PyObject *empty_dict = 0;
|
|
PyObject *list;
|
|
__import__ = __Pyx_GetAttrString(__pyx_b, "__import__");
|
|
if (!__import__)
|
|
goto bad;
|
|
if (from_list)
|
|
list = from_list;
|
|
else {
|
|
empty_list = PyList_New(0);
|
|
if (!empty_list)
|
|
goto bad;
|
|
list = empty_list;
|
|
}
|
|
global_dict = PyModule_GetDict(__pyx_m);
|
|
if (!global_dict)
|
|
goto bad;
|
|
empty_dict = PyDict_New();
|
|
if (!empty_dict)
|
|
goto bad;
|
|
module = PyObject_CallFunctionObjArgs(__import__,
|
|
name, global_dict, empty_dict, list, NULL);
|
|
bad:
|
|
Py_XDECREF(empty_list);
|
|
Py_XDECREF(__import__);
|
|
Py_XDECREF(empty_dict);
|
|
return module;
|
|
}
|
|
|
|
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
|
|
PyObject *result;
|
|
result = PyObject_GetAttr(dict, name);
|
|
if (!result)
|
|
PyErr_SetObject(PyExc_NameError, name);
|
|
return result;
|
|
}
|
|
|
|
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
|
|
Py_XINCREF(type);
|
|
Py_XINCREF(value);
|
|
Py_XINCREF(tb);
|
|
/* First, check the traceback argument, replacing None with NULL. */
|
|
if (tb == Py_None) {
|
|
Py_DECREF(tb);
|
|
tb = 0;
|
|
}
|
|
else if (tb != NULL && !PyTraceBack_Check(tb)) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"raise: arg 3 must be a traceback or None");
|
|
goto raise_error;
|
|
}
|
|
/* Next, replace a missing value with None */
|
|
if (value == NULL) {
|
|
value = Py_None;
|
|
Py_INCREF(value);
|
|
}
|
|
#if PY_VERSION_HEX < 0x02050000
|
|
if (!PyClass_Check(type))
|
|
#else
|
|
if (!PyType_Check(type))
|
|
#endif
|
|
{
|
|
/* Raising an instance. The value should be a dummy. */
|
|
if (value != Py_None) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"instance exception may not have a separate value");
|
|
goto raise_error;
|
|
}
|
|
/* Normalize to raise <class>, <instance> */
|
|
Py_DECREF(value);
|
|
value = type;
|
|
#if PY_VERSION_HEX < 0x02050000
|
|
if (PyInstance_Check(type)) {
|
|
type = (PyObject*) ((PyInstanceObject*)type)->in_class;
|
|
Py_INCREF(type);
|
|
}
|
|
else {
|
|
type = 0;
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"raise: exception must be an old-style class or instance");
|
|
goto raise_error;
|
|
}
|
|
#else
|
|
type = (PyObject*) Py_TYPE(type);
|
|
Py_INCREF(type);
|
|
if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"raise: exception class must be a subclass of BaseException");
|
|
goto raise_error;
|
|
}
|
|
#endif
|
|
}
|
|
__Pyx_ErrRestore(type, value, tb);
|
|
return;
|
|
raise_error:
|
|
Py_XDECREF(value);
|
|
Py_XDECREF(type);
|
|
Py_XDECREF(tb);
|
|
return;
|
|
}
|
|
|
|
static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
|
|
PyObject *tmp_type, *tmp_value, *tmp_tb;
|
|
PyThreadState *tstate = PyThreadState_GET();
|
|
|
|
#if PY_MAJOR_VERSION >= 3
|
|
/* Note: this is a temporary work-around to prevent crashes in Python 3.0 */
|
|
if ((tstate->exc_type != NULL) & (tstate->exc_type != Py_None)) {
|
|
tmp_type = tstate->exc_type;
|
|
tmp_value = tstate->exc_value;
|
|
tmp_tb = tstate->exc_traceback;
|
|
PyErr_NormalizeException(&type, &value, &tb);
|
|
PyErr_NormalizeException(&tmp_type, &tmp_value, &tmp_tb);
|
|
tstate->exc_type = 0;
|
|
tstate->exc_value = 0;
|
|
tstate->exc_traceback = 0;
|
|
PyException_SetContext(value, tmp_value);
|
|
Py_DECREF(tmp_type);
|
|
Py_XDECREF(tmp_tb);
|
|
}
|
|
#endif
|
|
|
|
tmp_type = tstate->curexc_type;
|
|
tmp_value = tstate->curexc_value;
|
|
tmp_tb = tstate->curexc_traceback;
|
|
tstate->curexc_type = type;
|
|
tstate->curexc_value = value;
|
|
tstate->curexc_traceback = tb;
|
|
Py_XDECREF(tmp_type);
|
|
Py_XDECREF(tmp_value);
|
|
Py_XDECREF(tmp_tb);
|
|
}
|
|
|
|
static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
|
|
PyThreadState *tstate = PyThreadState_GET();
|
|
*type = tstate->curexc_type;
|
|
*value = tstate->curexc_value;
|
|
*tb = tstate->curexc_traceback;
|
|
|
|
tstate->curexc_type = 0;
|
|
tstate->curexc_value = 0;
|
|
tstate->curexc_traceback = 0;
|
|
}
|
|
|
|
|
|
static INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp val) {
|
|
/**/ if (sizeof(npy_intp) < sizeof(long))
|
|
return PyInt_FromLong((long)val);
|
|
else if (sizeof(npy_intp) == sizeof(long))
|
|
return (((npy_intp)-1) < ((npy_intp)0)) ?
|
|
PyInt_FromLong((long)val) :
|
|
PyLong_FromUnsignedLong((unsigned long)val);
|
|
else /* (sizeof(npy_intp) > sizeof(long)) */
|
|
return (((npy_intp)-1) < ((npy_intp)0)) ?
|
|
PyLong_FromLongLong((PY_LONG_LONG)val) :
|
|
PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
|
|
}
|
|
|
|
static INLINE npy_intp __Pyx_PyInt_from_py_npy_intp(PyObject* x) {
|
|
/**/ if (sizeof(npy_intp) == sizeof(char))
|
|
return (((npy_intp)-1) < ((npy_intp)0)) ?
|
|
(npy_intp)__Pyx_PyInt_AsSignedChar(x) :
|
|
(npy_intp)__Pyx_PyInt_AsUnsignedChar(x);
|
|
else if (sizeof(npy_intp) == sizeof(short))
|
|
return (((npy_intp)-1) < ((npy_intp)0)) ?
|
|
(npy_intp)__Pyx_PyInt_AsSignedShort(x) :
|
|
(npy_intp)__Pyx_PyInt_AsUnsignedShort(x);
|
|
else if (sizeof(npy_intp) == sizeof(int))
|
|
return (((npy_intp)-1) < ((npy_intp)0)) ?
|
|
(npy_intp)__Pyx_PyInt_AsSignedInt(x) :
|
|
(npy_intp)__Pyx_PyInt_AsUnsignedInt(x);
|
|
else if (sizeof(npy_intp) == sizeof(long))
|
|
return (((npy_intp)-1) < ((npy_intp)0)) ?
|
|
(npy_intp)__Pyx_PyInt_AsSignedLong(x) :
|
|
(npy_intp)__Pyx_PyInt_AsUnsignedLong(x);
|
|
else if (sizeof(npy_intp) == sizeof(PY_LONG_LONG))
|
|
return (((npy_intp)-1) < ((npy_intp)0)) ?
|
|
(npy_intp)__Pyx_PyInt_AsSignedLongLong(x) :
|
|
(npy_intp)__Pyx_PyInt_AsUnsignedLongLong(x);
|
|
#if 0
|
|
else if (sizeof(npy_intp) > sizeof(short) &&
|
|
sizeof(npy_intp) < sizeof(int)) /* __int32 ILP64 ? */
|
|
return (((npy_intp)-1) < ((npy_intp)0)) ?
|
|
(npy_intp)__Pyx_PyInt_AsSignedInt(x) :
|
|
(npy_intp)__Pyx_PyInt_AsUnsignedInt(x);
|
|
#endif
|
|
PyErr_SetString(PyExc_TypeError, "npy_intp");
|
|
return (npy_intp)-1;
|
|
}
|
|
|
|
#if PY_MAJOR_VERSION < 3
|
|
static PyObject *__Pyx_GetStdout(void) {
|
|
PyObject *f = PySys_GetObject((char *)"stdout");
|
|
if (!f) {
|
|
PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
|
|
}
|
|
return f;
|
|
}
|
|
|
|
static int __Pyx_Print(PyObject *arg_tuple, int newline) {
|
|
PyObject *f;
|
|
PyObject* v;
|
|
int i;
|
|
|
|
if (!(f = __Pyx_GetStdout()))
|
|
return -1;
|
|
for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
|
|
if (PyFile_SoftSpace(f, 1)) {
|
|
if (PyFile_WriteString(" ", f) < 0)
|
|
return -1;
|
|
}
|
|
v = PyTuple_GET_ITEM(arg_tuple, i);
|
|
if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
|
|
return -1;
|
|
if (PyString_Check(v)) {
|
|
char *s = PyString_AsString(v);
|
|
Py_ssize_t len = PyString_Size(v);
|
|
if (len > 0 &&
|
|
isspace(Py_CHARMASK(s[len-1])) &&
|
|
s[len-1] != ' ')
|
|
PyFile_SoftSpace(f, 0);
|
|
}
|
|
}
|
|
if (newline) {
|
|
if (PyFile_WriteString("\n", f) < 0)
|
|
return -1;
|
|
PyFile_SoftSpace(f, 0);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
#else /* Python 3 has a print function */
|
|
|
|
static int __Pyx_Print(PyObject *arg_tuple, int newline) {
|
|
PyObject* kwargs = 0;
|
|
PyObject* result = 0;
|
|
PyObject* end_string;
|
|
if (!__pyx_print) {
|
|
__pyx_print = __Pyx_GetAttrString(__pyx_b, "print");
|
|
if (!__pyx_print)
|
|
return -1;
|
|
}
|
|
if (!newline) {
|
|
if (!__pyx_print_kwargs) {
|
|
__pyx_print_kwargs = PyDict_New();
|
|
if (!__pyx_print_kwargs)
|
|
return -1;
|
|
end_string = PyUnicode_FromStringAndSize(" ", 1);
|
|
if (!end_string)
|
|
return -1;
|
|
if (PyDict_SetItemString(__pyx_print_kwargs, "end", end_string) < 0) {
|
|
Py_DECREF(end_string);
|
|
return -1;
|
|
}
|
|
Py_DECREF(end_string);
|
|
}
|
|
kwargs = __pyx_print_kwargs;
|
|
}
|
|
result = PyObject_Call(__pyx_print, arg_tuple, kwargs);
|
|
if (!result)
|
|
return -1;
|
|
Py_DECREF(result);
|
|
return 0;
|
|
}
|
|
|
|
#endif
|
|
|
|
#if PY_MAJOR_VERSION < 3
|
|
|
|
static int __Pyx_PrintOne(PyObject *o) {
|
|
PyObject *f;
|
|
if (!(f = __Pyx_GetStdout()))
|
|
return -1;
|
|
if (PyFile_SoftSpace(f, 0)) {
|
|
if (PyFile_WriteString(" ", f) < 0)
|
|
return -1;
|
|
}
|
|
if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0)
|
|
return -1;
|
|
if (PyFile_WriteString("\n", f) < 0)
|
|
return -1;
|
|
return 0;
|
|
/* the line below is just to avoid compiler
|
|
* compiler warnings about unused functions */
|
|
return __Pyx_Print(NULL, 0);
|
|
}
|
|
|
|
#else /* Python 3 has a print function */
|
|
|
|
static int __Pyx_PrintOne(PyObject *o) {
|
|
int res;
|
|
PyObject* arg_tuple = PyTuple_New(1);
|
|
if (unlikely(!arg_tuple))
|
|
return -1;
|
|
Py_INCREF(o);
|
|
PyTuple_SET_ITEM(arg_tuple, 0, o);
|
|
res = __Pyx_Print(arg_tuple, 1);
|
|
Py_DECREF(arg_tuple);
|
|
return res;
|
|
}
|
|
|
|
#endif
|
|
|
|
#if CYTHON_CCOMPLEX
|
|
#ifdef __cplusplus
|
|
static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
|
|
return ::std::complex< float >(x, y);
|
|
}
|
|
#else
|
|
static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
|
|
return x + y*(__pyx_t_float_complex)_Complex_I;
|
|
}
|
|
#endif
|
|
#else
|
|
static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
|
|
__pyx_t_float_complex z;
|
|
z.real = x;
|
|
z.imag = y;
|
|
return z;
|
|
}
|
|
#endif
|
|
|
|
#if CYTHON_CCOMPLEX
|
|
#else
|
|
static INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
|
|
return (a.real == b.real) && (a.imag == b.imag);
|
|
}
|
|
static INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
|
|
__pyx_t_float_complex z;
|
|
z.real = a.real + b.real;
|
|
z.imag = a.imag + b.imag;
|
|
return z;
|
|
}
|
|
static INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) {
|
|
__pyx_t_float_complex z;
|
|
z.real = a.real - b.real;
|
|
z.imag = a.imag - b.imag;
|
|
return z;
|
|
}
|
|
static INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
|
|
__pyx_t_float_complex z;
|
|
z.real = a.real * b.real - a.imag * b.imag;
|
|
z.imag = a.real * b.imag + a.imag * b.real;
|
|
return z;
|
|
}
|
|
static INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
|
|
__pyx_t_float_complex z;
|
|
float denom = b.real * b.real + b.imag * b.imag;
|
|
z.real = (a.real * b.real + a.imag * b.imag) / denom;
|
|
z.imag = (a.imag * b.real - a.real * b.imag) / denom;
|
|
return z;
|
|
}
|
|
static INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) {
|
|
__pyx_t_float_complex z;
|
|
z.real = -a.real;
|
|
z.imag = -a.imag;
|
|
return z;
|
|
}
|
|
static INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) {
|
|
return (a.real == 0) && (a.imag == 0);
|
|
}
|
|
static INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) {
|
|
__pyx_t_float_complex z;
|
|
z.real = a.real;
|
|
z.imag = -a.imag;
|
|
return z;
|
|
}
|
|
/*
|
|
static INLINE float __Pyx_c_absf(__pyx_t_float_complex z) {
|
|
#if HAVE_HYPOT
|
|
return hypotf(z.real, z.imag);
|
|
#else
|
|
return sqrtf(z.real*z.real + z.imag*z.imag);
|
|
#endif
|
|
}
|
|
*/
|
|
#endif
|
|
|
|
#if CYTHON_CCOMPLEX
|
|
#ifdef __cplusplus
|
|
static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
|
|
return ::std::complex< double >(x, y);
|
|
}
|
|
#else
|
|
static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
|
|
return x + y*(__pyx_t_double_complex)_Complex_I;
|
|
}
|
|
#endif
|
|
#else
|
|
static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
|
|
__pyx_t_double_complex z;
|
|
z.real = x;
|
|
z.imag = y;
|
|
return z;
|
|
}
|
|
#endif
|
|
|
|
#if CYTHON_CCOMPLEX
|
|
#else
|
|
static INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) {
|
|
return (a.real == b.real) && (a.imag == b.imag);
|
|
}
|
|
static INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) {
|
|
__pyx_t_double_complex z;
|
|
z.real = a.real + b.real;
|
|
z.imag = a.imag + b.imag;
|
|
return z;
|
|
}
|
|
static INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) {
|
|
__pyx_t_double_complex z;
|
|
z.real = a.real - b.real;
|
|
z.imag = a.imag - b.imag;
|
|
return z;
|
|
}
|
|
static INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) {
|
|
__pyx_t_double_complex z;
|
|
z.real = a.real * b.real - a.imag * b.imag;
|
|
z.imag = a.real * b.imag + a.imag * b.real;
|
|
return z;
|
|
}
|
|
static INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) {
|
|
__pyx_t_double_complex z;
|
|
double denom = b.real * b.real + b.imag * b.imag;
|
|
z.real = (a.real * b.real + a.imag * b.imag) / denom;
|
|
z.imag = (a.imag * b.real - a.real * b.imag) / denom;
|
|
return z;
|
|
}
|
|
static INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) {
|
|
__pyx_t_double_complex z;
|
|
z.real = -a.real;
|
|
z.imag = -a.imag;
|
|
return z;
|
|
}
|
|
static INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) {
|
|
return (a.real == 0) && (a.imag == 0);
|
|
}
|
|
static INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) {
|
|
__pyx_t_double_complex z;
|
|
z.real = a.real;
|
|
z.imag = -a.imag;
|
|
return z;
|
|
}
|
|
/*
|
|
static INLINE double __Pyx_c_abs(__pyx_t_double_complex z) {
|
|
#if HAVE_HYPOT
|
|
return hypot(z.real, z.imag);
|
|
#else
|
|
return sqrt(z.real*z.real + z.imag*z.imag);
|
|
#endif
|
|
}
|
|
*/
|
|
#endif
|
|
|
|
#if CYTHON_CCOMPLEX
|
|
#ifdef __cplusplus
|
|
static INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
|
|
return ::std::complex< long double >(x, y);
|
|
}
|
|
#else
|
|
static INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
|
|
return x + y*(__pyx_t_long_double_complex)_Complex_I;
|
|
}
|
|
#endif
|
|
#else
|
|
static INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
|
|
__pyx_t_long_double_complex z;
|
|
z.real = x;
|
|
z.imag = y;
|
|
return z;
|
|
}
|
|
#endif
|
|
|
|
#if CYTHON_CCOMPLEX
|
|
#else
|
|
static INLINE int __Pyx_c_eql(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
|
|
return (a.real == b.real) && (a.imag == b.imag);
|
|
}
|
|
static INLINE __pyx_t_long_double_complex __Pyx_c_suml(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
|
|
__pyx_t_long_double_complex z;
|
|
z.real = a.real + b.real;
|
|
z.imag = a.imag + b.imag;
|
|
return z;
|
|
}
|
|
static INLINE __pyx_t_long_double_complex __Pyx_c_diffl(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
|
|
__pyx_t_long_double_complex z;
|
|
z.real = a.real - b.real;
|
|
z.imag = a.imag - b.imag;
|
|
return z;
|
|
}
|
|
static INLINE __pyx_t_long_double_complex __Pyx_c_prodl(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
|
|
__pyx_t_long_double_complex z;
|
|
z.real = a.real * b.real - a.imag * b.imag;
|
|
z.imag = a.real * b.imag + a.imag * b.real;
|
|
return z;
|
|
}
|
|
static INLINE __pyx_t_long_double_complex __Pyx_c_quotl(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
|
|
__pyx_t_long_double_complex z;
|
|
long double denom = b.real * b.real + b.imag * b.imag;
|
|
z.real = (a.real * b.real + a.imag * b.imag) / denom;
|
|
z.imag = (a.imag * b.real - a.real * b.imag) / denom;
|
|
return z;
|
|
}
|
|
static INLINE __pyx_t_long_double_complex __Pyx_c_negl(__pyx_t_long_double_complex a) {
|
|
__pyx_t_long_double_complex z;
|
|
z.real = -a.real;
|
|
z.imag = -a.imag;
|
|
return z;
|
|
}
|
|
static INLINE int __Pyx_c_is_zerol(__pyx_t_long_double_complex a) {
|
|
return (a.real == 0) && (a.imag == 0);
|
|
}
|
|
static INLINE __pyx_t_long_double_complex __Pyx_c_conjl(__pyx_t_long_double_complex a) {
|
|
__pyx_t_long_double_complex z;
|
|
z.real = a.real;
|
|
z.imag = -a.imag;
|
|
return z;
|
|
}
|
|
/*
|
|
static INLINE long double __Pyx_c_absl(__pyx_t_long_double_complex z) {
|
|
#if HAVE_HYPOT
|
|
return hypotl(z.real, z.imag);
|
|
#else
|
|
return sqrtl(z.real*z.real + z.imag*z.imag);
|
|
#endif
|
|
}
|
|
*/
|
|
#endif
|
|
|
|
static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
|
|
if (sizeof(unsigned char) < sizeof(long)) {
|
|
long val = __Pyx_PyInt_AsLong(x);
|
|
if (unlikely(val != (long)(unsigned char)val)) {
|
|
if (!unlikely(val == -1 && PyErr_Occurred())) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
(((unsigned char)-1) > ((unsigned char)0) && unlikely(val < 0)) ?
|
|
"can't convert negative value to unsigned char" :
|
|
"value too large to convert to unsigned char");
|
|
}
|
|
return (unsigned char)-1;
|
|
}
|
|
return (unsigned char)val;
|
|
}
|
|
return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
|
|
}
|
|
|
|
static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
|
|
if (sizeof(unsigned short) < sizeof(long)) {
|
|
long val = __Pyx_PyInt_AsLong(x);
|
|
if (unlikely(val != (long)(unsigned short)val)) {
|
|
if (!unlikely(val == -1 && PyErr_Occurred())) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
(((unsigned short)-1) > ((unsigned short)0) && unlikely(val < 0)) ?
|
|
"can't convert negative value to unsigned short" :
|
|
"value too large to convert to unsigned short");
|
|
}
|
|
return (unsigned short)-1;
|
|
}
|
|
return (unsigned short)val;
|
|
}
|
|
return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
|
|
}
|
|
|
|
static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
|
|
if (sizeof(unsigned int) < sizeof(long)) {
|
|
long val = __Pyx_PyInt_AsLong(x);
|
|
if (unlikely(val != (long)(unsigned int)val)) {
|
|
if (!unlikely(val == -1 && PyErr_Occurred())) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
(((unsigned int)-1) > ((unsigned int)0) && unlikely(val < 0)) ?
|
|
"can't convert negative value to unsigned int" :
|
|
"value too large to convert to unsigned int");
|
|
}
|
|
return (unsigned int)-1;
|
|
}
|
|
return (unsigned int)val;
|
|
}
|
|
return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
|
|
}
|
|
|
|
static INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
|
|
if (sizeof(char) < sizeof(long)) {
|
|
long val = __Pyx_PyInt_AsLong(x);
|
|
if (unlikely(val != (long)(char)val)) {
|
|
if (!unlikely(val == -1 && PyErr_Occurred())) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
(((char)-1) > ((char)0) && unlikely(val < 0)) ?
|
|
"can't convert negative value to char" :
|
|
"value too large to convert to char");
|
|
}
|
|
return (char)-1;
|
|
}
|
|
return (char)val;
|
|
}
|
|
return (char)__Pyx_PyInt_AsLong(x);
|
|
}
|
|
|
|
static INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
|
|
if (sizeof(short) < sizeof(long)) {
|
|
long val = __Pyx_PyInt_AsLong(x);
|
|
if (unlikely(val != (long)(short)val)) {
|
|
if (!unlikely(val == -1 && PyErr_Occurred())) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
(((short)-1) > ((short)0) && unlikely(val < 0)) ?
|
|
"can't convert negative value to short" :
|
|
"value too large to convert to short");
|
|
}
|
|
return (short)-1;
|
|
}
|
|
return (short)val;
|
|
}
|
|
return (short)__Pyx_PyInt_AsLong(x);
|
|
}
|
|
|
|
static INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
|
|
if (sizeof(int) < sizeof(long)) {
|
|
long val = __Pyx_PyInt_AsLong(x);
|
|
if (unlikely(val != (long)(int)val)) {
|
|
if (!unlikely(val == -1 && PyErr_Occurred())) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
(((int)-1) > ((int)0) && unlikely(val < 0)) ?
|
|
"can't convert negative value to int" :
|
|
"value too large to convert to int");
|
|
}
|
|
return (int)-1;
|
|
}
|
|
return (int)val;
|
|
}
|
|
return (int)__Pyx_PyInt_AsLong(x);
|
|
}
|
|
|
|
static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
|
|
if (sizeof(signed char) < sizeof(long)) {
|
|
long val = __Pyx_PyInt_AsLong(x);
|
|
if (unlikely(val != (long)(signed char)val)) {
|
|
if (!unlikely(val == -1 && PyErr_Occurred())) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
(((signed char)-1) > ((signed char)0) && unlikely(val < 0)) ?
|
|
"can't convert negative value to signed char" :
|
|
"value too large to convert to signed char");
|
|
}
|
|
return (signed char)-1;
|
|
}
|
|
return (signed char)val;
|
|
}
|
|
return (signed char)__Pyx_PyInt_AsSignedLong(x);
|
|
}
|
|
|
|
static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
|
|
if (sizeof(signed short) < sizeof(long)) {
|
|
long val = __Pyx_PyInt_AsLong(x);
|
|
if (unlikely(val != (long)(signed short)val)) {
|
|
if (!unlikely(val == -1 && PyErr_Occurred())) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
(((signed short)-1) > ((signed short)0) && unlikely(val < 0)) ?
|
|
"can't convert negative value to signed short" :
|
|
"value too large to convert to signed short");
|
|
}
|
|
return (signed short)-1;
|
|
}
|
|
return (signed short)val;
|
|
}
|
|
return (signed short)__Pyx_PyInt_AsSignedLong(x);
|
|
}
|
|
|
|
static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
|
|
if (sizeof(signed int) < sizeof(long)) {
|
|
long val = __Pyx_PyInt_AsLong(x);
|
|
if (unlikely(val != (long)(signed int)val)) {
|
|
if (!unlikely(val == -1 && PyErr_Occurred())) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
(((signed int)-1) > ((signed int)0) && unlikely(val < 0)) ?
|
|
"can't convert negative value to signed int" :
|
|
"value too large to convert to signed int");
|
|
}
|
|
return (signed int)-1;
|
|
}
|
|
return (signed int)val;
|
|
}
|
|
return (signed int)__Pyx_PyInt_AsSignedLong(x);
|
|
}
|
|
|
|
static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
|
|
#if PY_VERSION_HEX < 0x03000000
|
|
if (likely(PyInt_Check(x))) {
|
|
long val = PyInt_AS_LONG(x);
|
|
if (((unsigned long)-1) > ((unsigned long)0) && unlikely(val < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to unsigned long");
|
|
return (unsigned long)-1;
|
|
}
|
|
return (unsigned long)val;
|
|
} else
|
|
#endif
|
|
if (likely(PyLong_Check(x))) {
|
|
if (((unsigned long)-1) > ((unsigned long)0) && unlikely(Py_SIZE(x) < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to unsigned long");
|
|
return (unsigned long)-1;
|
|
}
|
|
return (((unsigned long)-1) < ((unsigned long)0)) ?
|
|
PyLong_AsLong(x) :
|
|
PyLong_AsUnsignedLong(x);
|
|
} else {
|
|
unsigned long val;
|
|
PyObject *tmp = __Pyx_PyNumber_Int(x);
|
|
if (!tmp) return (unsigned long)-1;
|
|
val = __Pyx_PyInt_AsUnsignedLong(tmp);
|
|
Py_DECREF(tmp);
|
|
return val;
|
|
}
|
|
}
|
|
|
|
static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
|
|
#if PY_VERSION_HEX < 0x03000000
|
|
if (likely(PyInt_Check(x))) {
|
|
long val = PyInt_AS_LONG(x);
|
|
if (((unsigned PY_LONG_LONG)-1) > ((unsigned PY_LONG_LONG)0) && unlikely(val < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to unsigned PY_LONG_LONG");
|
|
return (unsigned PY_LONG_LONG)-1;
|
|
}
|
|
return (unsigned PY_LONG_LONG)val;
|
|
} else
|
|
#endif
|
|
if (likely(PyLong_Check(x))) {
|
|
if (((unsigned PY_LONG_LONG)-1) > ((unsigned PY_LONG_LONG)0) && unlikely(Py_SIZE(x) < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to unsigned PY_LONG_LONG");
|
|
return (unsigned PY_LONG_LONG)-1;
|
|
}
|
|
return (((unsigned PY_LONG_LONG)-1) < ((unsigned PY_LONG_LONG)0)) ?
|
|
PyLong_AsLongLong(x) :
|
|
PyLong_AsUnsignedLongLong(x);
|
|
} else {
|
|
unsigned PY_LONG_LONG val;
|
|
PyObject *tmp = __Pyx_PyNumber_Int(x);
|
|
if (!tmp) return (unsigned PY_LONG_LONG)-1;
|
|
val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
|
|
Py_DECREF(tmp);
|
|
return val;
|
|
}
|
|
}
|
|
|
|
static INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
|
|
#if PY_VERSION_HEX < 0x03000000
|
|
if (likely(PyInt_Check(x))) {
|
|
long val = PyInt_AS_LONG(x);
|
|
if (((long)-1) > ((long)0) && unlikely(val < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to long");
|
|
return (long)-1;
|
|
}
|
|
return (long)val;
|
|
} else
|
|
#endif
|
|
if (likely(PyLong_Check(x))) {
|
|
if (((long)-1) > ((long)0) && unlikely(Py_SIZE(x) < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to long");
|
|
return (long)-1;
|
|
}
|
|
return (((long)-1) < ((long)0)) ?
|
|
PyLong_AsLong(x) :
|
|
PyLong_AsUnsignedLong(x);
|
|
} else {
|
|
long val;
|
|
PyObject *tmp = __Pyx_PyNumber_Int(x);
|
|
if (!tmp) return (long)-1;
|
|
val = __Pyx_PyInt_AsLong(tmp);
|
|
Py_DECREF(tmp);
|
|
return val;
|
|
}
|
|
}
|
|
|
|
static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
|
|
#if PY_VERSION_HEX < 0x03000000
|
|
if (likely(PyInt_Check(x))) {
|
|
long val = PyInt_AS_LONG(x);
|
|
if (((PY_LONG_LONG)-1) > ((PY_LONG_LONG)0) && unlikely(val < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to PY_LONG_LONG");
|
|
return (PY_LONG_LONG)-1;
|
|
}
|
|
return (PY_LONG_LONG)val;
|
|
} else
|
|
#endif
|
|
if (likely(PyLong_Check(x))) {
|
|
if (((PY_LONG_LONG)-1) > ((PY_LONG_LONG)0) && unlikely(Py_SIZE(x) < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to PY_LONG_LONG");
|
|
return (PY_LONG_LONG)-1;
|
|
}
|
|
return (((PY_LONG_LONG)-1) < ((PY_LONG_LONG)0)) ?
|
|
PyLong_AsLongLong(x) :
|
|
PyLong_AsUnsignedLongLong(x);
|
|
} else {
|
|
PY_LONG_LONG val;
|
|
PyObject *tmp = __Pyx_PyNumber_Int(x);
|
|
if (!tmp) return (PY_LONG_LONG)-1;
|
|
val = __Pyx_PyInt_AsLongLong(tmp);
|
|
Py_DECREF(tmp);
|
|
return val;
|
|
}
|
|
}
|
|
|
|
static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
|
|
#if PY_VERSION_HEX < 0x03000000
|
|
if (likely(PyInt_Check(x))) {
|
|
long val = PyInt_AS_LONG(x);
|
|
if (((signed long)-1) > ((signed long)0) && unlikely(val < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to signed long");
|
|
return (signed long)-1;
|
|
}
|
|
return (signed long)val;
|
|
} else
|
|
#endif
|
|
if (likely(PyLong_Check(x))) {
|
|
if (((signed long)-1) > ((signed long)0) && unlikely(Py_SIZE(x) < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to signed long");
|
|
return (signed long)-1;
|
|
}
|
|
return (((signed long)-1) < ((signed long)0)) ?
|
|
PyLong_AsLong(x) :
|
|
PyLong_AsUnsignedLong(x);
|
|
} else {
|
|
signed long val;
|
|
PyObject *tmp = __Pyx_PyNumber_Int(x);
|
|
if (!tmp) return (signed long)-1;
|
|
val = __Pyx_PyInt_AsSignedLong(tmp);
|
|
Py_DECREF(tmp);
|
|
return val;
|
|
}
|
|
}
|
|
|
|
static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
|
|
#if PY_VERSION_HEX < 0x03000000
|
|
if (likely(PyInt_Check(x))) {
|
|
long val = PyInt_AS_LONG(x);
|
|
if (((signed PY_LONG_LONG)-1) > ((signed PY_LONG_LONG)0) && unlikely(val < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to signed PY_LONG_LONG");
|
|
return (signed PY_LONG_LONG)-1;
|
|
}
|
|
return (signed PY_LONG_LONG)val;
|
|
} else
|
|
#endif
|
|
if (likely(PyLong_Check(x))) {
|
|
if (((signed PY_LONG_LONG)-1) > ((signed PY_LONG_LONG)0) && unlikely(Py_SIZE(x) < 0)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"can't convert negative value to signed PY_LONG_LONG");
|
|
return (signed PY_LONG_LONG)-1;
|
|
}
|
|
return (((signed PY_LONG_LONG)-1) < ((signed PY_LONG_LONG)0)) ?
|
|
PyLong_AsLongLong(x) :
|
|
PyLong_AsUnsignedLongLong(x);
|
|
} else {
|
|
signed PY_LONG_LONG val;
|
|
PyObject *tmp = __Pyx_PyNumber_Int(x);
|
|
if (!tmp) return (signed PY_LONG_LONG)-1;
|
|
val = __Pyx_PyInt_AsSignedLongLong(tmp);
|
|
Py_DECREF(tmp);
|
|
return val;
|
|
}
|
|
}
|
|
|
|
static INLINE int __Pyx_StrEq(const char *s1, const char *s2) {
|
|
while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
|
|
return *s1 == *s2;
|
|
}
|
|
|
|
#ifndef __PYX_HAVE_RT_ImportType
|
|
#define __PYX_HAVE_RT_ImportType
|
|
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
|
|
long size)
|
|
{
|
|
PyObject *py_module = 0;
|
|
PyObject *result = 0;
|
|
PyObject *py_name = 0;
|
|
|
|
py_module = __Pyx_ImportModule(module_name);
|
|
if (!py_module)
|
|
goto bad;
|
|
#if PY_MAJOR_VERSION < 3
|
|
py_name = PyString_FromString(class_name);
|
|
#else
|
|
py_name = PyUnicode_FromString(class_name);
|
|
#endif
|
|
if (!py_name)
|
|
goto bad;
|
|
result = PyObject_GetAttr(py_module, py_name);
|
|
Py_DECREF(py_name);
|
|
py_name = 0;
|
|
Py_DECREF(py_module);
|
|
py_module = 0;
|
|
if (!result)
|
|
goto bad;
|
|
if (!PyType_Check(result)) {
|
|
PyErr_Format(PyExc_TypeError,
|
|
"%s.%s is not a type object",
|
|
module_name, class_name);
|
|
goto bad;
|
|
}
|
|
if (((PyTypeObject *)result)->tp_basicsize != size) {
|
|
PyErr_Format(PyExc_ValueError,
|
|
"%s.%s does not appear to be the correct type object",
|
|
module_name, class_name);
|
|
goto bad;
|
|
}
|
|
return (PyTypeObject *)result;
|
|
bad:
|
|
Py_XDECREF(py_module);
|
|
Py_XDECREF(result);
|
|
return 0;
|
|
}
|
|
#endif
|
|
|
|
#ifndef __PYX_HAVE_RT_ImportModule
|
|
#define __PYX_HAVE_RT_ImportModule
|
|
static PyObject *__Pyx_ImportModule(const char *name) {
|
|
PyObject *py_name = 0;
|
|
PyObject *py_module = 0;
|
|
|
|
#if PY_MAJOR_VERSION < 3
|
|
py_name = PyString_FromString(name);
|
|
#else
|
|
py_name = PyUnicode_FromString(name);
|
|
#endif
|
|
if (!py_name)
|
|
goto bad;
|
|
py_module = PyImport_Import(py_name);
|
|
Py_DECREF(py_name);
|
|
return py_module;
|
|
bad:
|
|
Py_XDECREF(py_name);
|
|
return 0;
|
|
}
|
|
#endif
|
|
|
|
#ifndef __PYX_HAVE_RT_ImportFunction
|
|
#define __PYX_HAVE_RT_ImportFunction
|
|
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
|
|
#if PY_VERSION_HEX < 0x02050000
|
|
char *api = (char *)"__pyx_capi__";
|
|
#else
|
|
const char *api = "__pyx_capi__";
|
|
#endif
|
|
PyObject *d = 0;
|
|
PyObject *cobj = 0;
|
|
const char *desc;
|
|
const char *s1, *s2;
|
|
union {
|
|
void (*fp)(void);
|
|
void *p;
|
|
} tmp;
|
|
|
|
d = PyObject_GetAttrString(module, api);
|
|
if (!d)
|
|
goto bad;
|
|
cobj = PyDict_GetItemString(d, funcname);
|
|
if (!cobj) {
|
|
PyErr_Format(PyExc_ImportError,
|
|
"%s does not export expected C function %s",
|
|
PyModule_GetName(module), funcname);
|
|
goto bad;
|
|
}
|
|
desc = (const char *)PyCObject_GetDesc(cobj);
|
|
if (!desc)
|
|
goto bad;
|
|
s1 = desc; s2 = sig;
|
|
while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
|
|
if (*s1 != *s2) {
|
|
PyErr_Format(PyExc_TypeError,
|
|
"C function %s.%s has wrong signature (expected %s, got %s)",
|
|
PyModule_GetName(module), funcname, sig, desc);
|
|
goto bad;
|
|
}
|
|
tmp.p = PyCObject_AsVoidPtr(cobj);
|
|
*f = tmp.fp;
|
|
Py_DECREF(d);
|
|
return 0;
|
|
bad:
|
|
Py_XDECREF(d);
|
|
return -1;
|
|
}
|
|
#endif
|
|
|
|
#include "compile.h"
|
|
#include "frameobject.h"
|
|
#include "traceback.h"
|
|
|
|
static void __Pyx_AddTraceback(const char *funcname) {
|
|
PyObject *py_srcfile = 0;
|
|
PyObject *py_funcname = 0;
|
|
PyObject *py_globals = 0;
|
|
PyCodeObject *py_code = 0;
|
|
PyFrameObject *py_frame = 0;
|
|
|
|
#if PY_MAJOR_VERSION < 3
|
|
py_srcfile = PyString_FromString(__pyx_filename);
|
|
#else
|
|
py_srcfile = PyUnicode_FromString(__pyx_filename);
|
|
#endif
|
|
if (!py_srcfile) goto bad;
|
|
if (__pyx_clineno) {
|
|
#if PY_MAJOR_VERSION < 3
|
|
py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
|
|
#else
|
|
py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
|
|
#endif
|
|
}
|
|
else {
|
|
#if PY_MAJOR_VERSION < 3
|
|
py_funcname = PyString_FromString(funcname);
|
|
#else
|
|
py_funcname = PyUnicode_FromString(funcname);
|
|
#endif
|
|
}
|
|
if (!py_funcname) goto bad;
|
|
py_globals = PyModule_GetDict(__pyx_m);
|
|
if (!py_globals) goto bad;
|
|
py_code = PyCode_New(
|
|
0, /*int argcount,*/
|
|
#if PY_MAJOR_VERSION >= 3
|
|
0, /*int kwonlyargcount,*/
|
|
#endif
|
|
0, /*int nlocals,*/
|
|
0, /*int stacksize,*/
|
|
0, /*int flags,*/
|
|
__pyx_empty_bytes, /*PyObject *code,*/
|
|
__pyx_empty_tuple, /*PyObject *consts,*/
|
|
__pyx_empty_tuple, /*PyObject *names,*/
|
|
__pyx_empty_tuple, /*PyObject *varnames,*/
|
|
__pyx_empty_tuple, /*PyObject *freevars,*/
|
|
__pyx_empty_tuple, /*PyObject *cellvars,*/
|
|
py_srcfile, /*PyObject *filename,*/
|
|
py_funcname, /*PyObject *name,*/
|
|
__pyx_lineno, /*int firstlineno,*/
|
|
__pyx_empty_bytes /*PyObject *lnotab*/
|
|
);
|
|
if (!py_code) goto bad;
|
|
py_frame = PyFrame_New(
|
|
PyThreadState_GET(), /*PyThreadState *tstate,*/
|
|
py_code, /*PyCodeObject *code,*/
|
|
py_globals, /*PyObject *globals,*/
|
|
0 /*PyObject *locals*/
|
|
);
|
|
if (!py_frame) goto bad;
|
|
py_frame->f_lineno = __pyx_lineno;
|
|
PyTraceBack_Here(py_frame);
|
|
bad:
|
|
Py_XDECREF(py_srcfile);
|
|
Py_XDECREF(py_funcname);
|
|
Py_XDECREF(py_code);
|
|
Py_XDECREF(py_frame);
|
|
}
|
|
|
|
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
|
|
while (t->p) {
|
|
#if PY_MAJOR_VERSION < 3
|
|
if (t->is_unicode) {
|
|
*t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
|
|
} else if (t->intern) {
|
|
*t->p = PyString_InternFromString(t->s);
|
|
} else {
|
|
*t->p = PyString_FromStringAndSize(t->s, t->n - 1);
|
|
}
|
|
#else /* Python 3+ has unicode identifiers */
|
|
if (t->is_unicode | t->is_str) {
|
|
if (t->intern) {
|
|
*t->p = PyUnicode_InternFromString(t->s);
|
|
} else if (t->encoding) {
|
|
*t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
|
|
} else {
|
|
*t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
|
|
}
|
|
} else {
|
|
*t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
|
|
}
|
|
#endif
|
|
if (!*t->p)
|
|
return -1;
|
|
++t;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
/* Type Conversion Functions */
|
|
|
|
static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
|
|
if (x == Py_True) return 1;
|
|
else if ((x == Py_False) | (x == Py_None)) return 0;
|
|
else return PyObject_IsTrue(x);
|
|
}
|
|
|
|
static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
|
|
PyNumberMethods *m;
|
|
const char *name = NULL;
|
|
PyObject *res = NULL;
|
|
#if PY_VERSION_HEX < 0x03000000
|
|
if (PyInt_Check(x) || PyLong_Check(x))
|
|
#else
|
|
if (PyLong_Check(x))
|
|
#endif
|
|
return Py_INCREF(x), x;
|
|
m = Py_TYPE(x)->tp_as_number;
|
|
#if PY_VERSION_HEX < 0x03000000
|
|
if (m && m->nb_int) {
|
|
name = "int";
|
|
res = PyNumber_Int(x);
|
|
}
|
|
else if (m && m->nb_long) {
|
|
name = "long";
|
|
res = PyNumber_Long(x);
|
|
}
|
|
#else
|
|
if (m && m->nb_int) {
|
|
name = "int";
|
|
res = PyNumber_Long(x);
|
|
}
|
|
#endif
|
|
if (res) {
|
|
#if PY_VERSION_HEX < 0x03000000
|
|
if (!PyInt_Check(res) && !PyLong_Check(res)) {
|
|
#else
|
|
if (!PyLong_Check(res)) {
|
|
#endif
|
|
PyErr_Format(PyExc_TypeError,
|
|
"__%s__ returned non-%s (type %.200s)",
|
|
name, name, Py_TYPE(res)->tp_name);
|
|
Py_DECREF(res);
|
|
return NULL;
|
|
}
|
|
}
|
|
else if (!PyErr_Occurred()) {
|
|
PyErr_SetString(PyExc_TypeError,
|
|
"an integer is required");
|
|
}
|
|
return res;
|
|
}
|
|
|
|
static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
|
|
Py_ssize_t ival;
|
|
PyObject* x = PyNumber_Index(b);
|
|
if (!x) return -1;
|
|
ival = PyInt_AsSsize_t(x);
|
|
Py_DECREF(x);
|
|
return ival;
|
|
}
|
|
|
|
static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
|
|
#if PY_VERSION_HEX < 0x02050000
|
|
if (ival <= LONG_MAX)
|
|
return PyInt_FromLong((long)ival);
|
|
else {
|
|
unsigned char *bytes = (unsigned char *) &ival;
|
|
int one = 1; int little = (int)*(unsigned char*)&one;
|
|
return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
|
|
}
|
|
#else
|
|
return PyInt_FromSize_t(ival);
|
|
#endif
|
|
}
|
|
|
|
static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
|
|
unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
|
|
if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
|
|
return (size_t)-1;
|
|
} else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
|
|
PyErr_SetString(PyExc_OverflowError,
|
|
"value too large to convert to size_t");
|
|
return (size_t)-1;
|
|
}
|
|
return (size_t)val;
|
|
}
|
|
|
|
|
|
#endif /* Py_PYTHON_H */
|