Commit 92fd42e5 authored by Pavel Rojtberg's avatar Pavel Rojtberg

linemod: export Template::features for python

parent 7a35ae96
......@@ -80,7 +80,7 @@ struct CV_EXPORTS_W_SIMPLE Template
CV_PROP int width;
CV_PROP int height;
CV_PROP int pyramid_level;
std::vector<Feature> features; // FIXIT: CV_PROP
CV_PROP std::vector<Feature> features;
void read(const FileNode& fn);
void write(FileStorage& fs) const;
......
......@@ -27,6 +27,19 @@ template<> struct pyopencvVecConverter<linemod::Template>
}
};
template<> struct pyopencvVecConverter<linemod::Feature>
{
static bool to(PyObject* obj, std::vector<linemod::Feature>& value, const ArgInfo info)
{
return pyopencv_to_generic_vec(obj, value, info);
}
static PyObject* from(const std::vector<linemod::Feature>& value)
{
return pyopencv_from_generic_vec(value);
}
};
template<> struct pyopencvVecConverter<Ptr<linemod::Modality> >
{
static bool to(PyObject* obj, std::vector<Ptr<linemod::Modality> >& value, const ArgInfo info)
......@@ -42,5 +55,6 @@ template<> struct pyopencvVecConverter<Ptr<linemod::Modality> >
typedef std::vector<linemod::Match> vector_Match;
typedef std::vector<linemod::Template> vector_Template;
typedef std::vector<linemod::Feature> vector_Feature;
typedef std::vector<Ptr<linemod::Modality> > vector_Ptr_Modality;
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment