int type;
};
-struct cvcapture_t {
- PyObject_HEAD
- CvCapture *a;
-};
-
typedef IplImage ROIplImage;
struct cvmoments_t {
/************************************************************************/
-/* cvcapture */
-
-static void cvcapture_dealloc(PyObject *self)
-{
- cvcapture_t *pi = (cvcapture_t*)self;
- cvReleaseCapture(&(pi->a));
- PyObject_Del(self);
-}
-
-static PyTypeObject cvcapture_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
- 0, /*size*/
- MODULESTR".cvcapture", /*name*/
- sizeof(cvcapture_t), /*basicsize*/
-};
-
-static void cvcapture_specials(void)
-{
- cvcapture_Type.tp_dealloc = cvcapture_dealloc;
-}
-
-/************************************************************************/
-
/* cvmoments */
static PyTypeObject cvmoments_Type = {
return 1;
}
-static int convert_to_CvCapturePTR(PyObject *o, CvCapture** dst, const char *name = "no_name")
-{
- if (PyType_IsSubtype(o->ob_type, &cvcapture_Type)) {
- *dst = ((cvcapture_t*)o)->a;
- return 1;
- } else {
- (*dst) = (CvCapture*)NULL;
- return failmsg("Expected CvCapture for argument '%s'", name);
- }
-}
-
static int convert_to_CvMomentsPTR(PyObject *o, CvMoments** dst, const char *name = "no_name")
{
if (PyType_IsSubtype(o->ob_type, &cvmoments_Type)) {
return pr;
}
-static PyObject *FROM_CvCapturePTR(CvCapture *r)
-{
- cvcapture_t *c = PyObject_NEW(cvcapture_t, &cvcapture_Type);
- c->a = r;
- return (PyObject*)c;
-}
-
typedef CvPoint2D32f CvPoint2D32f_4[4];
static PyObject *FROM_CvPoint2D32f_4(CvPoint2D32f* r)
{
cvSetErrMode(CV_ErrModeParent);
- MKTYPE(cvcapture);
MKTYPE(cvcontourtree);
MKTYPE(cvfont);
MKTYPE(cvhaarclassifiercascade);