Skip to content

Commit 383a006

Browse files
committed
Merge pull request #1606 from paroj:lmpy
2 parents 2aaa67a + 92fd42e commit 383a006

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

modules/rgbd/include/opencv2/rgbd/linemod.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ struct CV_EXPORTS_W_SIMPLE Template
8080
CV_PROP int width;
8181
CV_PROP int height;
8282
CV_PROP int pyramid_level;
83-
std::vector<Feature> features; // FIXIT: CV_PROP
83+
CV_PROP std::vector<Feature> features;
8484

8585
void read(const FileNode& fn);
8686
void write(FileStorage& fs) const;

modules/rgbd/misc/python/pyopencv_linemod.hpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,19 @@ template<> struct pyopencvVecConverter<linemod::Template>
2727
}
2828
};
2929

30+
template<> struct pyopencvVecConverter<linemod::Feature>
31+
{
32+
static bool to(PyObject* obj, std::vector<linemod::Feature>& value, const ArgInfo info)
33+
{
34+
return pyopencv_to_generic_vec(obj, value, info);
35+
}
36+
37+
static PyObject* from(const std::vector<linemod::Feature>& value)
38+
{
39+
return pyopencv_from_generic_vec(value);
40+
}
41+
};
42+
3043
template<> struct pyopencvVecConverter<Ptr<linemod::Modality> >
3144
{
3245
static bool to(PyObject* obj, std::vector<Ptr<linemod::Modality> >& value, const ArgInfo info)
@@ -42,5 +55,6 @@ template<> struct pyopencvVecConverter<Ptr<linemod::Modality> >
4255

4356
typedef std::vector<linemod::Match> vector_Match;
4457
typedef std::vector<linemod::Template> vector_Template;
58+
typedef std::vector<linemod::Feature> vector_Feature;
4559
typedef std::vector<Ptr<linemod::Modality> > vector_Ptr_Modality;
4660
#endif

0 commit comments

Comments
 (0)