From 25c17b107ed9669b7cd9613a022fc47cc3a7afdc Mon Sep 17 00:00:00 2001 From: wxzs5 <790230517@qq.com> Date: Wed, 27 Dec 2017 11:57:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?Fix=20functions=E2=80=98=20class=20attribut?= =?UTF-8?q?ion=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../py_video/py_bg_subtraction/py_bg_subtraction.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/py_tutorials/py_video/py_bg_subtraction/py_bg_subtraction.markdown b/doc/py_tutorials/py_video/py_bg_subtraction/py_bg_subtraction.markdown index 2337154edd..e7f0e0c800 100644 --- a/doc/py_tutorials/py_video/py_bg_subtraction/py_bg_subtraction.markdown +++ b/doc/py_tutorials/py_video/py_bg_subtraction/py_bg_subtraction.markdown @@ -48,7 +48,7 @@ import cv2 as cv cap = cv.VideoCapture('vtest.avi') -fgbg = cv.createBackgroundSubtractorMOG() +fgbg = cv.bgsegm.createBackgroundSubtractorMOG() while(1): ret, frame = cap.read() @@ -125,7 +125,7 @@ import cv2 as cv cap = cv.VideoCapture('vtest.avi') kernel = cv.getStructuringElement(cv.MORPH_ELLIPSE,(3,3)) -fgbg = cv.createBackgroundSubtractorGMG() +fgbg = cv.bgsegm.createBackgroundSubtractorGMG() while(1): ret, frame = cap.read() From 0a4b1b8d68aa794fe30f445a481032b4c6ebd2b8 Mon Sep 17 00:00:00 2001 From: wxzs5 <790230517@qq.com> Date: Wed, 27 Dec 2017 11:57:58 +0800 Subject: [PATCH 2/2] Use class' method to set attribute value --- .../py_feature2d/py_surf_intro/py_surf_intro.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/py_tutorials/py_feature2d/py_surf_intro/py_surf_intro.markdown b/doc/py_tutorials/py_feature2d/py_surf_intro/py_surf_intro.markdown index 10288cad7e..e14fac5773 100644 --- a/doc/py_tutorials/py_feature2d/py_surf_intro/py_surf_intro.markdown +++ b/doc/py_tutorials/py_feature2d/py_surf_intro/py_surf_intro.markdown @@ -147,7 +147,7 @@ Finally we check the descriptor size and change it to 128 if it is only 64-dim. False # So we make it to True to get 128-dim descriptors. ->>> surf.extended = True +>>> surf.setExtended(True) >>> kp, des = surf.detectAndCompute(img,None) >>> print( surf.descriptorSize() ) 128