From 75534a4828fbb1b7160b6af27c9aa68a1456dda5 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Mar 2014 14:23:10 +0100 Subject: [PATCH] Python typdef fixed. Reverted the example to MOG2. Not time to make the command line switch for now. --- modules/python/src2/cv2.cpp | 1 + modules/video/doc/motion_analysis_and_object_tracking.rst | 8 ++++---- samples/cpp/bgfg_segm.cpp | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/python/src2/cv2.cpp b/modules/python/src2/cv2.cpp index beb67b4c3b..9ab58e6f4a 100644 --- a/modules/python/src2/cv2.cpp +++ b/modules/python/src2/cv2.cpp @@ -134,6 +134,7 @@ typedef Ptr Ptr_DescriptorMatcher; typedef Ptr Ptr_BackgroundSubtractor; typedef Ptr Ptr_BackgroundSubtractorMOG; typedef Ptr Ptr_BackgroundSubtractorMOG2; +typedef Ptr Ptr_BackgroundSubtractorKNN; typedef Ptr Ptr_BackgroundSubtractorGMG; typedef Ptr Ptr_StereoMatcher; diff --git a/modules/video/doc/motion_analysis_and_object_tracking.rst b/modules/video/doc/motion_analysis_and_object_tracking.rst index e8ec3b3923..7d5d1d5be0 100644 --- a/modules/video/doc/motion_analysis_and_object_tracking.rst +++ b/modules/video/doc/motion_analysis_and_object_tracking.rst @@ -780,7 +780,7 @@ Sets the threshold on the squared distance BackgroundSubtractorKNN::getkNNSamples --------------------------------------------- -Returns the k in the kNN. K is the number of samples that need to be within dist2Threshold in order to decide that that pixel is matching the kNN background model. +Returns the number of neighbours, the k in the kNN. K is the number of samples that need to be within dist2Threshold in order to decide that that pixel is matching the kNN background model. .. ocv:function:: int BackgroundSubtractorKNN::getkNNSamples() const @@ -1108,9 +1108,9 @@ Releases all inner buffers. .. [Bradski98] Bradski, G.R. "Computer Vision Face Tracking for Use in a Perceptual User Interface", Intel, 1998 -.. [Bradski00] Davis, J.W. and Bradski, G.R. “Motion Segmentation and Pose Recognition with Motion History Gradients�, WACV00, 2000 +.. [Bradski00] Davis, J.W. and Bradski, G.R. "Motion Segmentation and Pose Recognition with Motion History Gradients", WACV00, 2000 -.. [Davis97] Davis, J.W. and Bobick, A.F. “The Representation and Recognition of Action Using Temporal Templates�, CVPR97, 1997 +.. [Davis97] Davis, J.W. and Bobick, A.F. "The Representation and Recognition of Action Using Temporal Templates", CVPR97, 1997 .. [EP08] Evangelidis, G.D. and Psarakis E.Z. "Parametric Image Alignment using Enhanced Correlation Coefficient Maximization", IEEE Transactions on PAMI, vol. 32, no. 10, 2008 @@ -1124,7 +1124,7 @@ Releases all inner buffers. .. [Lucas81] Lucas, B., and Kanade, T. An Iterative Image Registration Technique with an Application to Stereo Vision, Proc. of 7th International Joint Conference on Artificial Intelligence (IJCAI), pp. 674-679. -.. [Welch95] Greg Welch and Gary Bishop “An Introduction to the Kalman Filter�, 1995 +.. [Welch95] Greg Welch and Gary Bishop "An Introduction to the Kalman Filter", 1995 .. [Tao2012] Michael Tao, Jiamin Bai, Pushmeet Kohli and Sylvain Paris. SimpleFlow: A Non-iterative, Sublinear Optical Flow Algorithm. Computer Graphics Forum (Eurographics 2012) diff --git a/samples/cpp/bgfg_segm.cpp b/samples/cpp/bgfg_segm.cpp index de57ef3b82..a3d02009a7 100644 --- a/samples/cpp/bgfg_segm.cpp +++ b/samples/cpp/bgfg_segm.cpp @@ -52,7 +52,7 @@ int main(int argc, const char** argv) namedWindow("foreground image", WINDOW_NORMAL); namedWindow("mean background image", WINDOW_NORMAL); - Ptr bg_model = createBackgroundSubtractorKNN(); + Ptr bg_model = createBackgroundSubtractorMOG2(); Mat img, fgmask, fgimg;