Merge pull request #1606 from paroj:lmpy

pull/1611/head^2
Alexander Alekhin 7 years ago
commit 383a0061c4
  1. 2
      modules/rgbd/include/opencv2/rgbd/linemod.hpp
  2. 14
      modules/rgbd/misc/python/pyopencv_linemod.hpp

@ -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

Loading…
Cancel
Save