Index: src1/gen.py =================================================================== --- src1/gen.py (révision 5170) +++ src1/gen.py (copie de travail) @@ -84,6 +84,7 @@ 'CvKalman*', 'CvVideoWriter*', 'CvContourTree*', +'CvFeatureTree*', 'CvFont', 'CvFont*', 'CvHaarClassifierCascade*', @@ -259,6 +260,7 @@ 'CvSeqOfCvSURFPoint*', 'CvSeqOfCvSURFDescriptor*', 'CvContourTree*', + 'CvFeatureTree*', 'IplConvKernel*', 'IplImage*', 'CvMat*', Index: src1/api =================================================================== --- src1/api (révision 5170) +++ src1/api (copie de travail) @@ -841,6 +841,27 @@ CvMemStorage storage CvStarDetectorParams params cvStarDetectorParams() +# FeatureTree +CreateKDTree CvFeatureTree* + CvMat desc +CreateSpillTree CvFeatureTree* + CvMat raw_data + int naive 50 + double rho 0.7 + double tau 0.1 +FindFeatures + CvFeatureTree* tr + CvMat query_points + CvMat indices + CvMat dist + int k + int emax 20 +FindFeaturesBoxed int + CvFeatureTree* tr + CvMat bounds_min + CvMat bounds_max + CvMat results + # Sampling, Interpolation and Geometrical Transforms GetRectSubPix CvArr src Index: src1/cv.cpp =================================================================== --- src1/cv.cpp (révision 5170) +++ src1/cv.cpp (copie de travail) @@ -106,6 +106,11 @@ CvContourTree *a; }; +struct cvfeaturetree_t { + PyObject_HEAD + CvFeatureTree *a; +}; + struct cvrng_t { PyObject_HEAD CvRNG a; @@ -1058,6 +1063,20 @@ /************************************************************************/ +/* cvfeaturetree */ + +static PyTypeObject cvfeaturetree_Type = { + PyObject_HEAD_INIT(&PyType_Type) + 0, /*size*/ + MODULESTR".cvfeaturetree", /*name*/ + sizeof(cvfeaturetree_t), /*basicsize*/ +}; + +static void cvfeaturetree_specials(void) { } + + +/************************************************************************/ + /* cvsubdiv2dedge */ static PyTypeObject cvsubdiv2dedge_Type = { @@ -2137,6 +2156,17 @@ } }*/ +static int convert_to_CvFeatureTreePTR(PyObject *o, CvFeatureTree** dst, const char *name = "no_name") +{ + if (PyType_IsSubtype(o->ob_type, &cvfeaturetree_Type)) { + (*dst) = ((cvfeaturetree_t*)o)->a; + return 1; + } else { + (*dst) = NULL; + return failmsg("Expected CvFeatureTree for argument '%s'", name); + } +} + static int convert_to_CvRNGPTR(PyObject *o, CvRNG** dst, const char *name = "no_name") { if (PyType_IsSubtype(o->ob_type, &cvrng_Type)) { @@ -2614,6 +2644,13 @@ return (PyObject*)m; }*/ +static PyObject *FROM_CvFeatureTreePTR(CvFeatureTree *r) +{ + cvfeaturetree_t *m = PyObject_NEW(cvfeaturetree_t, &cvfeaturetree_Type); + m->a = r; + return (PyObject*)m; +} + static PyObject *FROM_generic(generic r) { CvTypeInfo* t = cvTypeOf(r); @@ -4025,6 +4062,7 @@ cvSetErrMode(CV_ErrModeParent); MKTYPE(cvcontourtree); + MKTYPE(cvfeaturetree); MKTYPE(cvfont); MKTYPE(cvhistogram); MKTYPE(cvlineiterator);