* : 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.
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
------------------
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
------------------
* 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
--------------------------
* : 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
--------------
* : 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.
* : 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
------
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
---
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
----------
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.
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
----------------------
: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
-------------------
.. 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
-----------------------
.. 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
-------------------------------------
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
-----------------------------------------------------
.. 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
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
------------------------------------
.. 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
-----------------------------
.. 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
---------------------
.. 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
-------------------------------------
.. 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
---------------------------
* : 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.
* : 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.
: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
------------
* 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
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
---------------------
* : 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
-------------------
* : 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.
* : 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.
* : 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.
.. 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
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
* : 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
----------------
* : 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.
: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
-------------------
* : 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
----------
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
-------------------------
----------
.. 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
----------------------
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.
.. 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
-------------
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
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
-------------------------------
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
-------------------------------------
.. 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
-----------------------------
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
.. 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
* : 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`.
* : 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.
: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
-------------------------
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
---------