From f28496c62832eb2e73bfe45caf4fd21caedc9029 Mon Sep 17 00:00:00 2001 From: StevenPuttemans Date: Fri, 2 Aug 2013 14:05:08 +0200 Subject: [PATCH] Added sample links in documentation for python2, ocl and gpu --- .../doc/camera_calibration_and_3d_reconstruction.rst | 9 +++++++++ modules/contrib/doc/facerec/facerec_api.rst | 2 ++ modules/core/doc/clustering.rst | 2 ++ modules/core/doc/operations_on_arrays.rst | 3 +++ .../features2d/doc/feature_detection_and_description.rst | 4 ++++ modules/features2d/doc/object_categorization.rst | 6 +++++- .../gpu/doc/camera_calibration_and_3d_reconstruction.rst | 6 +++++- modules/gpu/doc/image_filtering.rst | 2 ++ modules/gpu/doc/image_processing.rst | 4 ++++ modules/gpu/doc/object_detection.rst | 6 ++++++ modules/gpu/doc/video.rst | 15 ++++++++++++++- .../highgui/doc/reading_and_writing_images_and_video.rst | 5 +++++ modules/imgproc/doc/feature_detection.rst | 4 ++++ modules/imgproc/doc/filtering.rst | 8 ++++++++ modules/imgproc/doc/histograms.rst | 3 +++ modules/imgproc/doc/miscellaneous_transformations.rst | 10 +++++++++- modules/imgproc/doc/object_detection.rst | 3 +++ .../doc/structural_analysis_and_shape_descriptors.rst | 6 ++++++ modules/legacy/doc/expectation_maximization.rst | 2 ++ modules/legacy/doc/feature_detection_and_description.rst | 2 ++ modules/ml/doc/k_nearest_neighbors.rst | 8 +++++++- modules/ml/doc/support_vector_machines.rst | 6 ++++++ modules/nonfree/doc/feature_detection.rst | 9 ++++++++- modules/objdetect/doc/cascade_classification.rst | 4 ++++ modules/ocl/doc/feature_detection_and_description.rst | 2 ++ modules/ocl/doc/image_processing.rst | 3 +++ modules/ocl/doc/object_detection.rst | 4 ++++ modules/photo/doc/inpainting.rst | 4 +++- modules/video/doc/motion_analysis_and_object_tracking.rst | 9 +++++++++ 29 files changed, 144 insertions(+), 7 deletions(-) diff --git a/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst b/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst index 886ac6f..b4c4563 100644 --- a/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst +++ b/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst @@ -114,6 +114,8 @@ The functions below use the above model to do the following: * : A calibration example on stereo calibration can be found at opencv_source_code/samples/cpp/stereo_calib.cpp * : A calibration example on stereo matching can be found at opencv_source_code/samples/cpp/stereo_match.cpp + * : PYTHON : A camera calibration sample can be found at opencv_source_code/samples/python2/calibrate.py + calibrateCamera --------------- Finds the camera intrinsic and extrinsic parameters from several views of a calibration pattern. @@ -586,7 +588,9 @@ Finds an object pose from 3D-2D point correspondences. The function estimates the object pose given a set of object points, their corresponding image projections, as well as the camera matrix and the distortion coefficients. +.. Sample code:: + * : An example of how to use solvePNP for planar augmented reality can be found at opencv_source_code/samples/python2/plane_ar.py solvePnPRansac ------------------ @@ -1082,6 +1086,9 @@ Class for computing stereo correspondence using the block matching algorithm. :: The class is a C++ wrapper for the associated functions. In particular, :ocv:funcx:`StereoBM::operator()` is the wrapper for :ocv:cfunc:`cvFindStereoCorrespondenceBM`. +.. Sample code: + + * : OCL : An example for using the stereoBM matching algorithm can be found at opencv_source_code/samples/ocl/stereo_match.cpp StereoBM::StereoBM ------------------ @@ -1181,7 +1188,9 @@ The class implements the modified H. Hirschmuller algorithm [HH08]_ that differs * Some pre- and post- processing steps from K. Konolige algorithm :ocv:funcx:`StereoBM::operator()` are included, for example: pre-filtering (``CV_STEREO_BM_XSOBEL`` type) and post-filtering (uniqueness check, quadratic interpolation and speckle filtering). +.. Sample code:: + * : PYTHON : An example illustrating the use of the StereoSGBM matching algorithm can be found at opencv_source_code/samples/python2/stereo_match.py StereoSGBM::StereoSGBM -------------------------- diff --git a/modules/contrib/doc/facerec/facerec_api.rst b/modules/contrib/doc/facerec/facerec_api.rst index af3901f..74bb014 100644 --- a/modules/contrib/doc/facerec/facerec_api.rst +++ b/modules/contrib/doc/facerec/facerec_api.rst @@ -7,6 +7,8 @@ FaceRecognizer * : An example using the FaceRecognizer class can be found at opencv_source_code/samples/cpp/facerec_demo.cpp + * : PYTHON : An example using the FaceRecognizer class can be found at opencv_source_code/samples/python2/facerec_demo.py + FaceRecognizer -------------- diff --git a/modules/core/doc/clustering.rst b/modules/core/doc/clustering.rst index d770043..ae12451 100644 --- a/modules/core/doc/clustering.rst +++ b/modules/core/doc/clustering.rst @@ -70,6 +70,8 @@ attempts to 1, initialize labels each time using a custom algorithm, pass them w * : An example on K-means clustering can be found at opencv_source_code/samples/cpp/kmeans.cpp + * : PYTHON : An example on K-means clustering can be found at opencv_source_code/samples/python2/kmeans.py + partition ------------- Splits an element set into equivalency classes. diff --git a/modules/core/doc/operations_on_arrays.rst b/modules/core/doc/operations_on_arrays.rst index f4815bd..b33637d 100644 --- a/modules/core/doc/operations_on_arrays.rst +++ b/modules/core/doc/operations_on_arrays.rst @@ -1001,6 +1001,9 @@ All of the above improvements have been implemented in :ocv:func:`matchTemplate` * : An example using the discrete fourier transform can be found at opencv_source_code/samples/cpp/dft.cpp + * : PYTHON : An example using the dft functionality to perform Wiener deconvolution can be found at opencv_source/samples/python2/deconvolution.py + * : PYTHON : An example rearranging the quadrants of a Fourier image can be found at opencv_source/samples/python2/dft.py + divide ------ diff --git a/modules/features2d/doc/feature_detection_and_description.rst b/modules/features2d/doc/feature_detection_and_description.rst index 9690f88..286c0cc 100644 --- a/modules/features2d/doc/feature_detection_and_description.rst +++ b/modules/features2d/doc/feature_detection_and_description.rst @@ -55,6 +55,10 @@ Maximally stable extremal region extractor. :: The class encapsulates all the parameters of the MSER extraction algorithm (see http://en.wikipedia.org/wiki/Maximally_stable_extremal_regions). Also see http://code.opencv.org/projects/opencv/wiki/MSER for useful comments and parameters description. +.. Sample code:: + + * : PYTHON : A complete example showing the use of the MSER detector can be found at opencv_source_code/samples/python2/mser.py + ORB --- diff --git a/modules/features2d/doc/object_categorization.rst b/modules/features2d/doc/object_categorization.rst index 3212b6a..a7db53e 100644 --- a/modules/features2d/doc/object_categorization.rst +++ b/modules/features2d/doc/object_categorization.rst @@ -5,7 +5,11 @@ Object Categorization This section describes approaches based on local 2D features and used to categorize objects. -.. Sample code:: A complete Bag-Of-Words sample can be found at opencv_source_code/samples/cpp/bagofwords_classification.cpp +.. Sample code:: + + * : A complete Bag-Of-Words sample can be found at opencv_source_code/samples/cpp/bagofwords_classification.cpp + + * : PYTHON : An example using the features2D framework to perform object categorization can be found at opencv_source_code/samples/python2/find_obj.py BOWTrainer ---------- diff --git a/modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst b/modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst index 587c253..c0ad590 100644 --- a/modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst +++ b/modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst @@ -44,8 +44,12 @@ The class also performs pre- and post-filtering steps: Sobel pre-filtering (if ` This means that the input left image is low textured. +.. Sample code:: - + * : A basic stereo matching example can be found at opencv_source_code/samples/gpu/stereo_match.cpp + * : A stereo matching example using several GPU's can be found at opencv_source_code/samples/gpu/stereo_multi.cpp + * : A stereo matching example using several GPU's and driver API can be found at opencv_source_code/samples/gpu/driver_api_stereo_multi.cpp + gpu::StereoBM_GPU::StereoBM_GPU ----------------------------------- Enables :ocv:class:`gpu::StereoBM_GPU` constructors. diff --git a/modules/gpu/doc/image_filtering.rst b/modules/gpu/doc/image_filtering.rst index 348a425..82de72a 100644 --- a/modules/gpu/doc/image_filtering.rst +++ b/modules/gpu/doc/image_filtering.rst @@ -5,7 +5,9 @@ Image Filtering Functions and classes described in this section are used to perform various linear or non-linear filtering operations on 2D images. +.. Sample code:: + * : An example containing all basic morphology operators like erode and dilate can be found at opencv_source_code/samples/gpu/morphology.cpp gpu::BaseRowFilter_GPU ---------------------- diff --git a/modules/gpu/doc/image_processing.rst b/modules/gpu/doc/image_processing.rst index 0b32540..ba702ba 100644 --- a/modules/gpu/doc/image_processing.rst +++ b/modules/gpu/doc/image_processing.rst @@ -966,7 +966,9 @@ Composites two images using alpha opacity values contained in each image. :param stream: Stream for the asynchronous version. +.. Sample code:: + * : An example demonstrating the use of alphaComp can be found at opencv_source_code/samples/gpu/alpha_comp.cpp gpu::Canny ------------------- @@ -1028,7 +1030,9 @@ Finds lines in a binary image using the classical Hough transform. .. seealso:: :ocv:func:`HoughLines` +.. Sample code:: + * : An example using the Hough lines detector can be found at opencv_source_code/samples/gpu/houghlines.cpp gpu::HoughLinesDownload ----------------------- diff --git a/modules/gpu/doc/object_detection.rst b/modules/gpu/doc/object_detection.rst index c7986fa..56cbd96 100644 --- a/modules/gpu/doc/object_detection.rst +++ b/modules/gpu/doc/object_detection.rst @@ -65,6 +65,9 @@ Interfaces of all methods are kept similar to the ``CPU HOG`` descriptor and det .. Sample code:: * : An example applying the HOG descriptor for people detection can be found at opencv_source_code/samples/cpp/peopledetect.cpp + * : A GPU example applying the HOG descriptor for people detection can be found at opencv_source_code/samples/gpu/hog.cpp + + * : PYTHON : An example applying the HOG descriptor for people detection can be found at opencv_source_code/samples/python2/peopledetect.py gpu::HOGDescriptor::HOGDescriptor ------------------------------------- @@ -232,7 +235,10 @@ Cascade classifier class used for object detection. Supports HAAR and LBP cascad Size getClassifierSize() const; }; +.. Sample code:: + * : A cascade classifier example can be found at opencv_source_code/samples/gpu/cascadeclassifier.cpp + * : A Nvidea API specific cascade classifier example can be found at opencv_source_code/samples/gpu/cascadeclassifier_nvidia_api.cpp gpu::CascadeClassifier_GPU::CascadeClassifier_GPU ----------------------------------------------------- diff --git a/modules/gpu/doc/video.rst b/modules/gpu/doc/video.rst index 284bb17..31cfff2 100644 --- a/modules/gpu/doc/video.rst +++ b/modules/gpu/doc/video.rst @@ -3,8 +3,11 @@ Video Analysis .. highlight:: cpp +.. Sample code:: - + * : A general optical flow example can be found at opencv_source_code/samples/gpu/optical_flow.cpp + * : A feneral optical flow example using the nvidia API can be found at opencv_source_code/samples/gpu/opticalflow_nvidia_api.cpp + gpu::BroxOpticalFlow -------------------- .. ocv:class:: gpu::BroxOpticalFlow @@ -44,7 +47,9 @@ Class computing the optical flow for two images using Brox et al Optical Flow al GpuMat buf; }; +.. Sample code:: + * : An example illustrating the Brox et al optical flow algorithm can be found at opencv_source_code/samples/gpu/brox_optical_flow.cpp gpu::GoodFeaturesToTrackDetector_GPU ------------------------------------ @@ -213,7 +218,9 @@ The class can calculate an optical flow for a sparse feature set or dense optica .. seealso:: :ocv:func:`calcOpticalFlowPyrLK` +.. Sample code:: + * : An example of the Lucas Kanade optical flow algorithm can be found at opencv_source_code/samples/gpu/pyrlk_optical_flow.cpp gpu::PyrLKOpticalFlow::sparse ----------------------------- @@ -418,7 +425,9 @@ The class discriminates between foreground and background pixels by building and .. seealso:: :ocv:class:`BackgroundSubtractorMOG` +.. Sample code:: + * : An example on gaussian mixture based background/foreground segmantation can be found at opencv_source_code/samples/gpu/bgfg_segm.cpp gpu::MOG_GPU::MOG_GPU --------------------- @@ -697,7 +706,9 @@ The class uses H264 video codec. .. note:: Currently only Windows platform is supported. +.. Sample code:: + * : An example on how to use the videoWriter class can be found at opencv_source_code/samples/gpu/video_writer.cpp gpu::VideoWriter_GPU::VideoWriter_GPU ------------------------------------- @@ -910,7 +921,9 @@ Class for reading video from files. .. note:: Currently only Windows and Linux platforms are supported. +.. Sample code:: + * : An example on how to use the videoReader class can be found at opencv_source_code/samples/gpu/video_reader.cpp gpu::VideoReader_GPU::Codec --------------------------- diff --git a/modules/highgui/doc/reading_and_writing_images_and_video.rst b/modules/highgui/doc/reading_and_writing_images_and_video.rst index 3b96124..7898386 100644 --- a/modules/highgui/doc/reading_and_writing_images_and_video.rst +++ b/modules/highgui/doc/reading_and_writing_images_and_video.rst @@ -229,6 +229,11 @@ The class provides C++ API for capturing video from cameras or for reading video * : A basic sample on using the VideoCapture interface can be found at opencv_source_code/samples/cpp/starter_video.cpp * : Another basic video processing sample can be found at opencv_source_code/samples/cpp/video_dmtx.cpp + * : PYTHON : A basic sample on using the VideoCapture interface can be found at opencv_source_code/samples/python2/video.py + * : PYTHON : basic video processing sample can be found at opencv_source_code/samples/python2/video_dmtx.py + * : PYTHON : A multi threaded video processing sample can be found at opencv_source_code/samples/python2/video_threaded.py + + VideoCapture::VideoCapture ------------------------------ VideoCapture constructors. diff --git a/modules/imgproc/doc/feature_detection.rst b/modules/imgproc/doc/feature_detection.rst index 1122cef..254e790 100644 --- a/modules/imgproc/doc/feature_detection.rst +++ b/modules/imgproc/doc/feature_detection.rst @@ -36,6 +36,8 @@ http://en.wikipedia.org/wiki/Canny_edge_detector * : An example on using the canny edge detector can be found at opencv_source_code/samples/cpp/edge.cpp + * : PYTHON : An example on using the canny edge detector can be found at opencv_source_code/samples/cpp/edge.py + cornerEigenValsAndVecs ---------------------- Calculates eigenvalues and eigenvectors of image blocks for corner detection. @@ -87,7 +89,9 @@ The output of the function can be used for robust edge or corner detection. :ocv:func:`cornerHarris`, :ocv:func:`preCornerDetect` +.. Sample code:: + * : PYTHON : An example on how to use eigenvectors and eigenvalues to estimate image texture flow direction can be found at opencv_source_code/samples/python2/texture_flow.py cornerHarris ------------ diff --git a/modules/imgproc/doc/filtering.rst b/modules/imgproc/doc/filtering.rst index 4265d94..d23af60 100755 --- a/modules/imgproc/doc/filtering.rst +++ b/modules/imgproc/doc/filtering.rst @@ -22,6 +22,10 @@ OpenCV enables you to specify the extrapolation method. For details, see the fun * BORDER_CONSTANT: iiiiii|abcdefgh|iiiiiii with some specified 'i' */ +.. Sample code:: + + * : PYTHON : A complete example illustrating different morphological operations like erode/dilate, open/close, blackhat/tophat ... can be found at opencv_source_code/samples/python2/morphology.py + BaseColumnFilter ---------------- .. ocv:class:: BaseColumnFilter @@ -1361,6 +1365,10 @@ Upsamples an image and then blurs it. The function performs the upsampling step of the Gaussian pyramid construction, though it can actually be used to construct the Laplacian pyramid. First, it upsamples the source image by injecting even zero rows and columns and then convolves the result with the same kernel as in :ocv:func:`pyrDown` multiplied by 4. +.. Sample code:: + + * : PYTHON : An example of Laplacian Pyramid construction and merging can be found at opencv_source_code/samples/python2/lappyr.py + pyrMeanShiftFiltering --------------------- diff --git a/modules/imgproc/doc/histograms.rst b/modules/imgproc/doc/histograms.rst index 7ac4d47..d436b3c 100644 --- a/modules/imgproc/doc/histograms.rst +++ b/modules/imgproc/doc/histograms.rst @@ -103,6 +103,9 @@ input arrays at the same location. The sample below shows how to compute a 2D Hu * : An example for creating histograms of an image can be found at opencv_source_code/samples/cpp/demhist.cpp + * : PYTHON : An example for creating color histograms can be found at opencv_source/samples/python2/color_histogram.py + * : PYTHON : An example illustrating RGB and grayscale histogram plotting can be found at opencv_source/samples/python2/hist.py + calcBackProject ------------------- diff --git a/modules/imgproc/doc/miscellaneous_transformations.rst b/modules/imgproc/doc/miscellaneous_transformations.rst index c84a53d..305706a 100644 --- a/modules/imgproc/doc/miscellaneous_transformations.rst +++ b/modules/imgproc/doc/miscellaneous_transformations.rst @@ -485,6 +485,8 @@ Currently, the second variant can use only the approximate distance transform al * : An example on using the distance transform can be found at opencv_source_code/samples/cpp/distrans.cpp + * : PYTHON : An example on using the distance transform can be found at opencv_source/samples/python2/distrans.py + floodFill --------- Fills a connected component with the given color. @@ -592,6 +594,8 @@ Use these functions to either mark a connected component with the specified colo * : An example using the FloodFill technique can be found at opencv_source_code/samples/cpp/ffilldemo.cpp + * : PYTHON : An example using the FloodFill technique can be found at opencv_source_code/samples/python2/floodfill.cpp + integral -------- Calculates the integral of an image. @@ -758,6 +762,8 @@ Visual demonstration and usage example of the function can be found in the OpenC * : An example using the watershed algorithm can be found at opencv_source_code/samples/cpp/watershed.cpp + * : PYTHON : An example using the watershed algorithm can be found at opencv_source_code/samples/python2/watershed.py + grabCut ------- Runs the GrabCut algorithm. @@ -807,4 +813,6 @@ See the sample ``grabcut.cpp`` to learn how to use the function. .. Sample code:: - * : An example using the GrabCut algorithm can be found at opencv_source_code/samples/cpp/grabcut.cpp \ No newline at end of file + * : An example using the GrabCut algorithm can be found at opencv_source_code/samples/cpp/grabcut.cpp + + * : PYTHON : An example using the GrabCut algorithm can be found at opencv_source_code/samples/python2/grabcut.py \ No newline at end of file diff --git a/modules/imgproc/doc/object_detection.rst b/modules/imgproc/doc/object_detection.rst index c6231a0..d9c43d3 100644 --- a/modules/imgproc/doc/object_detection.rst +++ b/modules/imgproc/doc/object_detection.rst @@ -74,3 +74,6 @@ image patch: After the function finishes the comparison, the best matches can be found as global minimums (when ``CV_TM_SQDIFF`` was used) or maximums (when ``CV_TM_CCORR`` or ``CV_TM_CCOEFF`` was used) using the :ocv:func:`minMaxLoc` function. In case of a color image, template summation in the numerator and each sum in the denominator is done over all of the channels and separate mean values are used for each channel. That is, the function can take a color template and a color image. The result will still be a single-channel image, which is easier to analyze. +.. Sample code:: + + * : PYTHON : An example on how to match mouse selected regions in an image can be found at opencv_source_code/samples/python2/mouse_and_match.py \ No newline at end of file diff --git a/modules/imgproc/doc/structural_analysis_and_shape_descriptors.rst b/modules/imgproc/doc/structural_analysis_and_shape_descriptors.rst index 3912abe..0f4eaf8 100644 --- a/modules/imgproc/doc/structural_analysis_and_shape_descriptors.rst +++ b/modules/imgproc/doc/structural_analysis_and_shape_descriptors.rst @@ -171,6 +171,8 @@ The function retrieves contours from the binary image using the algorithm * : An example using the findContour functionality can be found at opencv_source_code/samples/cpp/contours2.cpp * : An example using findContours to clean up a background segmentation result at opencv_source_code/samples/cpp/segment_objects.cpp + * : PYTHON : An example using the findContour functionality can be found at opencv_source/samples/python2/contours.py + * : PYTHON : An example of detecting squares in an image can be found at opencv_source/samples/python2/squares.py drawContours ---------------- @@ -257,6 +259,8 @@ The function draws contour outlines in the image if * : An example using the drawContour functionality can be found at opencv_source_code/samples/cpp/contours2.cpp * : An example using drawContours to clean up a background segmentation result at opencv_source_code/samples/cpp/segment_objects.cpp + * : PYTHON : An example using the drawContour functionality can be found at opencv_source/samples/python2/contours.py + approxPolyDP ---------------- Approximates a polygonal curve(s) with the specified precision. @@ -562,7 +566,9 @@ http://en.wikipedia.org/wiki/M-estimator :math:`w_i` are adjusted to be inversely proportional to :math:`\rho(r_i)` . +.. Sample code: + * : PYTHON : An example of robust line fitting can be found at opencv_source_code/samples/python2/fitline.py isContourConvex ------------------- diff --git a/modules/legacy/doc/expectation_maximization.rst b/modules/legacy/doc/expectation_maximization.rst index aac622a..5aff6c2 100644 --- a/modules/legacy/doc/expectation_maximization.rst +++ b/modules/legacy/doc/expectation_maximization.rst @@ -9,6 +9,8 @@ This section describes obsolete ``C`` interface of EM algorithm. Details of the * : An example on using the Expectation Maximalization algorithm can be found at opencv_source_code/samples/cpp/em.cpp + * : PYTHON : An example using Expectation Maximalization for Gaussian Mixing can be found at opencv_source_code/samples/python2/gaussian_mix.py + CvEMParams ---------- diff --git a/modules/legacy/doc/feature_detection_and_description.rst b/modules/legacy/doc/feature_detection_and_description.rst index 4dfabfb..a12ccc9 100644 --- a/modules/legacy/doc/feature_detection_and_description.rst +++ b/modules/legacy/doc/feature_detection_and_description.rst @@ -75,7 +75,9 @@ Class containing a base structure for ``RTreeClassifier``. :: void estimateQuantPercForPosteriors(float perc[2]); }; +.. Sample code:: + * : PYTHON : An example using Randomized Tree training for letter recognition can be found at opencv_source_code/samples/python2/letter_recog.py RandomizedTree::train ------------------------- diff --git a/modules/ml/doc/k_nearest_neighbors.rst b/modules/ml/doc/k_nearest_neighbors.rst index 739f52d..11f1917 100644 --- a/modules/ml/doc/k_nearest_neighbors.rst +++ b/modules/ml/doc/k_nearest_neighbors.rst @@ -9,7 +9,13 @@ CvKNearest ---------- .. ocv:class:: CvKNearest : public CvStatModel -The class implements K-Nearest Neighbors model as described in the beginning of this section. +The class implements K-Nearest Neighbors model as described in the beginning of this section. + +.. Sample code:: + + * : PYTHON : An example of digit recognition using KNearest can be found at opencv_source/samples/python2/digits.py + * : PYTHON : An example of grid search digit recognition using KNearest can be found at opencv_source/samples/python2/digits_adjust.py + * : PYTHON : An example of video digit recognition using KNearest can be found at opencv_source/samples/python2/digits_video.py CvKNearest::CvKNearest ---------------------- diff --git a/modules/ml/doc/support_vector_machines.rst b/modules/ml/doc/support_vector_machines.rst index b0d23ae..e1196e9 100644 --- a/modules/ml/doc/support_vector_machines.rst +++ b/modules/ml/doc/support_vector_machines.rst @@ -150,6 +150,12 @@ CvSVM Support Vector Machines. +.. Sample code:: + + * : PYTHON : An example of digit recognition using SVM can be found at opencv_source/samples/python2/digits.py + * : PYTHON : An example of grid search digit recognition using SVM can be found at opencv_source/samples/python2/digits_adjust.py + * : PYTHON : An example of video digit recognition using SVM can be found at opencv_source/samples/python2/digits_video.py + CvSVM::CvSVM ------------ Default and training constructors. diff --git a/modules/nonfree/doc/feature_detection.rst b/modules/nonfree/doc/feature_detection.rst index 526aba5..ed513f3 100644 --- a/modules/nonfree/doc/feature_detection.rst +++ b/modules/nonfree/doc/feature_detection.rst @@ -234,6 +234,9 @@ The class ``SURF_GPU`` uses some buffers and provides access to it. All buffers .. seealso:: :ocv:class:`SURF` +.. Sample code:: + + * : An example for using the SURF keypoint matcher on GPU can be found at opencv_source_code/samples/gpu/surf_keypoint_matcher.cpp ocl::SURF_OCL ------------- @@ -331,4 +334,8 @@ The ``descriptors`` matrix is :math:`\texttt{nFeatures} \times \texttt{descripto The class ``SURF_OCL`` uses some buffers and provides access to it. All buffers can be safely released between function calls. -.. seealso:: :ocv:class:`SURF` \ No newline at end of file +.. seealso:: :ocv:class:`SURF` + +.. Sample code:: + + * : OCL : An example of the SURF detector can be found at opencv_source_code/samples/ocl/surf_matcher.cpp \ No newline at end of file diff --git a/modules/objdetect/doc/cascade_classification.rst b/modules/objdetect/doc/cascade_classification.rst index eb07a6c..d814787 100644 --- a/modules/objdetect/doc/cascade_classification.rst +++ b/modules/objdetect/doc/cascade_classification.rst @@ -215,6 +215,10 @@ Detects objects of different sizes in the input image. The detected objects are The function is parallelized with the TBB library. +.. Sample code:: + + * : PYTHON : A face detection example using cascade classifiers can be found at opencv_source_code/samples/python2/facedetect.py + CascadeClassifier::setImage ------------------------------- diff --git a/modules/ocl/doc/feature_detection_and_description.rst b/modules/ocl/doc/feature_detection_and_description.rst index d4fd6e6..bd40c36 100644 --- a/modules/ocl/doc/feature_detection_and_description.rst +++ b/modules/ocl/doc/feature_detection_and_description.rst @@ -363,7 +363,9 @@ The class implements Histogram of Oriented Gradients ([Dalal2005]_) object detec Interfaces of all methods are kept similar to the ``CPU HOG`` descriptor and detector analogues as much as possible. +.. Sample code:: + * : OCL : An example using the HOG descriptor can be found at opencv_source_code/samples/ocl/hog.cpp ocl::HOGDescriptor::HOGDescriptor ------------------------------------- diff --git a/modules/ocl/doc/image_processing.rst b/modules/ocl/doc/image_processing.rst index 94712e0..9cb1ebe 100644 --- a/modules/ocl/doc/image_processing.rst +++ b/modules/ocl/doc/image_processing.rst @@ -257,7 +257,10 @@ The class can calculate an optical flow for a sparse feature set or dense optica .. seealso:: :ocv:func:`calcOpticalFlowPyrLK` +.. Sample code:: + * : OCL : An example the Lucas Kanade optical flow pyramid method can be found at opencv_source_code/samples/ocl/pyrlk_optical_flow.cpp + * : OCL : An example for square detection can be found at opencv_source_code/samples/ocl/squares.cpp ocl::PyrLKOpticalFlow::sparse ----------------------------- diff --git a/modules/ocl/doc/object_detection.rst b/modules/ocl/doc/object_detection.rst index 17eb62d..247a21b 100644 --- a/modules/ocl/doc/object_detection.rst +++ b/modules/ocl/doc/object_detection.rst @@ -20,6 +20,10 @@ Cascade classifier class used for object detection. Supports HAAR cascade classi CvSize maxSize = cvSize(0, 0)); }; +.. Sample code:: + + * : OCL : A face detection example using cascade classifiers can be found at opencv_source_code/samples/ocl/facedetect.cpp + ocl::OclCascadeClassifier::oclHaarDetectObjects ------------------------------------------------------ Returns the detected objects by a list of rectangles diff --git a/modules/photo/doc/inpainting.rst b/modules/photo/doc/inpainting.rst index 2f7a899..07c665a 100644 --- a/modules/photo/doc/inpainting.rst +++ b/modules/photo/doc/inpainting.rst @@ -34,4 +34,6 @@ for more details. .. Sample code:: - * : An example using the inpainting technique can be found at opencv_source_code/samples/cpp/inpaint.cpp \ No newline at end of file + * : An example using the inpainting technique can be found at opencv_source_code/samples/cpp/inpaint.cpp + + * : PYTHON : An example using the inpainting technique can be found at opencv_source_code/samples/python2/inpaint.py \ No newline at end of file diff --git a/modules/video/doc/motion_analysis_and_object_tracking.rst b/modules/video/doc/motion_analysis_and_object_tracking.rst index 4b32321..db93494 100644 --- a/modules/video/doc/motion_analysis_and_object_tracking.rst +++ b/modules/video/doc/motion_analysis_and_object_tracking.rst @@ -46,6 +46,9 @@ The function implements a sparse iterative version of the Lucas-Kanade optical f * : An example using the Lucas-Kanade optical flow algorithm can be found at opencv_source_code/samples/cpp/lkdemo.cpp + * : PYTHON : An example using the Lucas-Kanade optical flow algorithm can be found at opencv_source_code/samples/python2/lk_track.py + * : PYTHON : An example using the Lucas-Kanade tracker for homography matching can be found at opencv_source_code/samples/python2/lk_homography.py + buildOpticalFlowPyramid ----------------------- Constructs the image pyramid which can be passed to :ocv:func:`calcOpticalFlowPyrLK`. @@ -117,6 +120,8 @@ The function finds an optical flow for each ``prev`` pixel using the [Farneback2 * : An example using the optical flow algorithm described by Gunnar Farneback can be found at opencv_source_code/samples/cpp/fback.cpp + * : PYTHON : An example using the optical flow algorithm described by Gunnar Farneback can be found at opencv_source_code/samples/python2/opt_flow.py + estimateRigidTransform -------------------------- Computes an optimal affine transformation between two 2D point sets. @@ -234,7 +239,9 @@ In fact, :ocv:func:`fastAtan2` and :ocv:func:`phase` are used so that the computed angle is measured in degrees and covers the full range 0..360. Also, the ``mask`` is filled to indicate pixels where the computed angle is valid. +.. Sample code:: + * : PYTHON : An example on how to perform a motion template technique can be found at opencv_source_code/samples/python2/motempl.py calcGlobalOrientation ------------------------- @@ -320,7 +327,9 @@ First, it finds an object center using See the OpenCV sample ``camshiftdemo.c`` that tracks colored objects. +.. Sample code:: + * : PYTHON : A sample explaining the camshift tracking algorithm can be found at opencv_source_code/samples/python2/camshift.py meanShift --------- -- 2.7.4