Skip to content

Commit 18b98a5

Browse files
authored
Merge pull request #3357 from berak/patch-2
Update xfeatures2d.hpp
2 parents 0da7255 + 6fb484c commit 18b98a5

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

modules/xfeatures2d/include/opencv2/xfeatures2d.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ class CV_EXPORTS_W MSDDetector : public Feature2D {
282282

283283
public:
284284

285-
static Ptr<MSDDetector> create(int m_patch_radius = 3, int m_search_area_radius = 5,
285+
CV_WRAP static Ptr<MSDDetector> create(int m_patch_radius = 3, int m_search_area_radius = 5,
286286
int m_nms_radius = 5, int m_nms_scale_radius = 0, float m_th_saliency = 250.0f, int m_kNN = 4,
287287
float m_scale_factor = 1.25f, int m_n_scales = -1, bool m_compute_orientation = false);
288288
};
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env python
2+
3+
# Python 2/3 compatibility
4+
from __future__ import print_function
5+
6+
import os
7+
import numpy as np
8+
import cv2 as cv
9+
10+
from tests_common import NewOpenCVTests
11+
12+
class MSDDetector_test(NewOpenCVTests):
13+
14+
def test_create(self):
15+
16+
msd = cv.xfeatures2d.MSDDetector_create()
17+
self.assertFalse(msd is None)
18+
19+
img1 = np.zeros((100, 100, 3), dtype=np.uint8)
20+
kp1_ = msd.detect(img1, None)
21+
22+
23+
if __name__ == '__main__':
24+
NewOpenCVTests.bootstrap()

0 commit comments

Comments
 (0)