mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-19 02:16:34 +08:00
linemod: export Template::features for python
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user