Merge pull request #509 from taka-no-me:fix_docs_master

pull/406/merge
Andrey Kamaev 12 years ago committed by OpenCV Buildbot
commit 0ccdc5b4af
  1. 10
      doc/check_docs2.py
  2. 2
      doc/tutorials/imgproc/histograms/back_projection/back_projection.rst
  3. 2
      doc/tutorials/introduction/how_to_write_a_tutorial/how_to_write_a_tutorial.rst
  4. 86
      modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst
  5. 10
      modules/core/doc/command_line_parser.rst
  6. 2
      modules/core/doc/operations_on_arrays.rst
  7. 3
      modules/features2d/doc/feature_detection_and_description.rst
  8. 6
      modules/gpu/doc/image_processing.rst
  9. 4
      modules/gpu/doc/object_detection.rst
  10. 4
      modules/gpu/include/opencv2/gpu/gpu.hpp
  11. 2
      modules/java/generator/rst_parser.py
  12. 74
      modules/softcascade/doc/softcascade_detector.rst
  13. 64
      modules/softcascade/doc/softcascade_training.rst
  14. 46
      modules/videostab/doc/global_motion.rst

@ -38,7 +38,7 @@ doc_signatures_whitelist = [
"CvArr", "CvFileStorage", "CvArr", "CvFileStorage",
# other # other
"InputArray", "OutputArray", "InputArray", "OutputArray",
] + ["CvSubdiv2D", "CvQuadEdge2D", "CvSubdiv2DPoint", "cvDrawContours"] ]
defines = ["cvGraphEdgeIdx", "cvFree", "CV_Assert", "cvSqrt", "cvGetGraphVtx", "cvGraphVtxIdx", defines = ["cvGraphEdgeIdx", "cvFree", "CV_Assert", "cvSqrt", "cvGetGraphVtx", "cvGraphVtxIdx",
"cvCaptureFromFile", "cvCaptureFromCAM", "cvCalcBackProjectPatch", "cvCalcBackProject", "cvCaptureFromFile", "cvCaptureFromCAM", "cvCalcBackProjectPatch", "cvCalcBackProject",
@ -156,9 +156,10 @@ def formatSignature(s):
argtype = re.sub(r"\s+(\*|&)$", "\\1", arg[0]) argtype = re.sub(r"\s+(\*|&)$", "\\1", arg[0])
bidx = argtype.find('[') bidx = argtype.find('[')
if bidx < 0: if bidx < 0:
_str += argtype + " " _str += argtype
else: else:
_srt += argtype[:bidx] _str += argtype[:bidx]
_str += " "
if arg[1]: if arg[1]:
_str += arg[1] _str += arg[1]
else: else:
@ -326,6 +327,7 @@ def process_module(module, path):
flookup[fn[0]] = flookup_entry flookup[fn[0]] = flookup_entry
if do_python_crosscheck: if do_python_crosscheck:
pyclsnamespaces = ["cv." + x[3:].replace(".", "_") for x in clsnamespaces]
for name, doc in rst.iteritems(): for name, doc in rst.iteritems():
decls = doc.get("decls") decls = doc.get("decls")
if not decls: if not decls:
@ -394,7 +396,7 @@ def process_module(module, path):
pname = signature[1][4:signature[1].find('(')] pname = signature[1][4:signature[1].find('(')]
cvname = "cv." + pname cvname = "cv." + pname
parent = None parent = None
for cl in clsnamespaces: for cl in pyclsnamespaces:
if cvname.startswith(cl + "."): if cvname.startswith(cl + "."):
if cl.startswith(parent or ""): if cl.startswith(parent or ""):
parent = cl parent = cl

@ -94,7 +94,7 @@ Code
* Loads an image * Loads an image
* Convert the original to HSV format and separate only *Hue* channel to be used for the Histogram (using the OpenCV function :mix_channels:`mixChannels <>`) * Convert the original to HSV format and separate only *Hue* channel to be used for the Histogram (using the OpenCV function :mix_channels:`mixChannels <>`)
* Let the user to enter the number of bins to be used in the calculation of the histogram. * Let the user to enter the number of bins to be used in the calculation of the histogram.
* Calculate the histogram (and update it if the bins change) and the backprojection of the same image. * Calculate the histogram (and update it if the bins change) and the backprojection of the same image.
* Display the backprojection and the histogram in windows. * Display the backprojection and the histogram in windows.
* **Downloadable code**: * **Downloadable code**:

File diff suppressed because one or more lines are too long

@ -685,35 +685,35 @@ findEssentialMat
------------------ ------------------
Calculates an essential matrix from the corresponding points in two images. Calculates an essential matrix from the corresponding points in two images.
.. ocv:function:: Mat findEssentialMat( InputArray points1, InputArray points2, double focal = 1.0, Point2d pp = Point2d(0, 0), int method = FM_RANSAC, double prob = 0.999, double threshold = 1.0, OutputArray mask = noArray() ) .. ocv:function:: Mat findEssentialMat( InputArray points1, InputArray points2, double focal=1.0, Point2d pp=Point2d(0, 0), int method=CV_RANSAC, double prob=0.999, double threshold=1.0, OutputArray mask=noArray() )
:param points1: Array of ``N`` ``(N >= 5)`` 2D points from the first image. The point coordinates should be floating-point (single or double precision). :param points1: Array of ``N`` ``(N >= 5)`` 2D points from the first image. The point coordinates should be floating-point (single or double precision).
:param points2: Array of the second image points of the same size and format as ``points1`` . :param points2: Array of the second image points of the same size and format as ``points1`` .
:param focal: focal length of the camera. Note that this function assumes that ``points1`` and ``points2`` are feature points from cameras with same focal length and principle point. :param focal: focal length of the camera. Note that this function assumes that ``points1`` and ``points2`` are feature points from cameras with same focal length and principle point.
:param pp: principle point of the camera. :param pp: principle point of the camera.
:param method: Method for computing a fundamental matrix. :param method: Method for computing a fundamental matrix.
* **CV_RANSAC** for the RANSAC algorithm. * **CV_RANSAC** for the RANSAC algorithm.
* **CV_LMEDS** for the LMedS algorithm. * **CV_LMEDS** for the LMedS algorithm.
:param threshold: Parameter used for RANSAC. It is the maximum distance from a point to an epipolar line in pixels, beyond which the point is considered an outlier and is not used for computing the final fundamental matrix. It can be set to something like 1-3, depending on the accuracy of the point localization, image resolution, and the image noise. :param threshold: Parameter used for RANSAC. It is the maximum distance from a point to an epipolar line in pixels, beyond which the point is considered an outlier and is not used for computing the final fundamental matrix. It can be set to something like 1-3, depending on the accuracy of the point localization, image resolution, and the image noise.
:param prob: Parameter used for the RANSAC or LMedS methods only. It specifies a desirable level of confidence (probability) that the estimated matrix is correct. :param prob: Parameter used for the RANSAC or LMedS methods only. It specifies a desirable level of confidence (probability) that the estimated matrix is correct.
:param mask: Output array of N elements, every element of which is set to 0 for outliers and to 1 for the other points. The array is computed only in the RANSAC and LMedS methods. :param mask: Output array of N elements, every element of which is set to 0 for outliers and to 1 for the other points. The array is computed only in the RANSAC and LMedS methods.
This function estimates essential matrix based on an implementation of five-point algorithm [Nister03]_ [SteweniusCFS]_. This function estimates essential matrix based on an implementation of five-point algorithm [Nister03]_ [SteweniusCFS]_.
The epipolar geometry is described by the following equation: The epipolar geometry is described by the following equation:
.. math:: .. math::
[p_2; 1]^T K^T E K [p_1; 1] = 0 \\ [p_2; 1]^T K^T E K [p_1; 1] = 0 \\
K = K =
\begin{bmatrix} \begin{bmatrix}
f & 0 & x_{pp} \\ f & 0 & x_{pp} \\
0 & f & y_{pp} \\ 0 & f & y_{pp} \\
@ -724,60 +724,60 @@ where
:math:`E` is an essential matrix, :math:`E` is an essential matrix,
:math:`p_1` and :math:`p_1` and
:math:`p_2` are corresponding points in the first and the second images, respectively. :math:`p_2` are corresponding points in the first and the second images, respectively.
The result of this function may be passed further to ``decomposeEssentialMat()`` or ``recoverPose()`` to recover the relative pose between cameras. The result of this function may be passed further to ``decomposeEssentialMat()`` or ``recoverPose()`` to recover the relative pose between cameras.
decomposeEssentialMat decomposeEssentialMat
------------------------- -------------------------
Decompose an essential matrix to possible rotations and translation. Decompose an essential matrix to possible rotations and translation.
.. ocv:function:: void decomposeEssentialMat( InputArray E, OutputArray R1, OutputArray R2, OutputArray t ) .. ocv:function:: void decomposeEssentialMat( InputArray E, OutputArray R1, OutputArray R2, OutputArray t )
:param E: The input essential matrix. :param E: The input essential matrix.
:param R1: One possible rotation matrix. :param R1: One possible rotation matrix.
:param R2: Another possible rotation matrix. :param R2: Another possible rotation matrix.
:param t: One possible translation. :param t: One possible translation.
This function decompose an essential matrix ``E`` using svd decomposition [HartleyZ00]_. Generally 4 possible poses exists for a given ``E``. This function decompose an essential matrix ``E`` using svd decomposition [HartleyZ00]_. Generally 4 possible poses exists for a given ``E``.
They are They are
:math:`[R_1, t]`, :math:`[R_1, t]`,
:math:`[R_1, -t]`, :math:`[R_1, -t]`,
:math:`[R_2, t]`, :math:`[R_2, t]`,
:math:`[R_2, -t]`. :math:`[R_2, -t]`.
recoverPose recoverPose
--------------- ---------------
Recover relative camera rotation and translation from an estimated essential matrix and the corresponding points in two images, using cheirality check. Recover relative camera rotation and translation from an estimated essential matrix and the corresponding points in two images, using cheirality check.
Returns the number of inliers which pass the check. Returns the number of inliers which pass the check.
.. ocv:function:: int recoverPose( InputArray E, InputArray points1, InputArray points2, OutputArray R, OutputArray t, double focal = 1.0, Point2d pp = Point2d(0, 0), InputOutputArray mask = noArray()) .. ocv:function:: int recoverPose( InputArray E, InputArray points1, InputArray points2, OutputArray R, OutputArray t, double focal = 1.0, Point2d pp = Point2d(0, 0), InputOutputArray mask = noArray())
:param E: The input essential matrix. :param E: The input essential matrix.
:param points1: Array of ``N`` 2D points from the first image. The point coordinates should be floating-point (single or double precision). :param points1: Array of ``N`` 2D points from the first image. The point coordinates should be floating-point (single or double precision).
:param points2: Array of the second image points of the same size and format as ``points1`` . :param points2: Array of the second image points of the same size and format as ``points1`` .
:param R: Recovered relative rotation. :param R: Recovered relative rotation.
:param t: Recoverd relative translation. :param t: Recoverd relative translation.
:param focal: Focal length of the camera. Note that this function assumes that ``points1`` and ``points2`` are feature points from cameras with same focal length and principle point. :param focal: Focal length of the camera. Note that this function assumes that ``points1`` and ``points2`` are feature points from cameras with same focal length and principle point.
:param pp: Principle point of the camera. :param pp: Principle point of the camera.
:param mask: Input/output mask for inliers in ``points1`` and ``points2``. :param mask: Input/output mask for inliers in ``points1`` and ``points2``.
If it is not empty, then it marks inliers in ``points1`` and ``points2`` for then given essential matrix ``E``. If it is not empty, then it marks inliers in ``points1`` and ``points2`` for then given essential matrix ``E``.
Only these inliers will be used to recover pose. Only these inliers will be used to recover pose.
In the output mask only inliers which pass the cheirality check. In the output mask only inliers which pass the cheirality check.
This function decomposes an essential matrix using ``decomposeEssentialMat()`` and then verifies possible pose hypotheses by doing cheirality check.
The cheirality check basically means that the triangulated 3D points should have positive depth. Some details can be found from [Nister03]_.
This function can be used to process output ``E`` and ``mask`` from ``findEssentialMat()``. This function decomposes an essential matrix using ``decomposeEssentialMat()`` and then verifies possible pose hypotheses by doing cheirality check.
The cheirality check basically means that the triangulated 3D points should have positive depth. Some details can be found from [Nister03]_.
This function can be used to process output ``E`` and ``mask`` from ``findEssentialMat()``.
In this scenario, ``points1`` and ``points2`` are the same input for ``findEssentialMat()``. :: In this scenario, ``points1`` and ``points2`` are the same input for ``findEssentialMat()``. ::
// Example. Estimation of fundamental matrix using the RANSAC algorithm // Example. Estimation of fundamental matrix using the RANSAC algorithm
@ -792,14 +792,14 @@ In this scenario, ``points1`` and ``points2`` are the same input for ``findEssen
points2[i] = ...; points2[i] = ...;
} }
double focal = 1.0; double focal = 1.0;
cv::Point2d pp(0.0, 0.0); cv::Point2d pp(0.0, 0.0);
Mat E, R, t, mask; Mat E, R, t, mask;
E = findEssentialMat(points1, points2, focal, pp, CV_RANSAC, 0.999, 1.0, mask); E = findEssentialMat(points1, points2, focal, pp, CV_RANSAC, 0.999, 1.0, mask);
recoverPose(E, points1, points2, R, t, focal, pp, mask); recoverPose(E, points1, points2, R, t, focal, pp, mask);
findHomography findHomography
------------------ ------------------
@ -1593,11 +1593,11 @@ The function reconstructs 3-dimensional points (in homogeneous coordinates) by u
.. [Hartley99] Hartley, R.I., Theory and Practice of Projective Rectification. IJCV 35 2, pp 115-127 (1999) .. [Hartley99] Hartley, R.I., Theory and Practice of Projective Rectification. IJCV 35 2, pp 115-127 (1999)
.. [HartleyZ00] Hartley, R. and Zisserman, A. Multiple View Geomtry in Computer Vision, Cambridge University Press, 2000. .. [HartleyZ00] Hartley, R. and Zisserman, A. Multiple View Geomtry in Computer Vision, Cambridge University Press, 2000.
.. [HH08] Hirschmuller, H. Stereo Processing by Semiglobal Matching and Mutual Information, PAMI(30), No. 2, February 2008, pp. 328-341. .. [HH08] Hirschmuller, H. Stereo Processing by Semiglobal Matching and Mutual Information, PAMI(30), No. 2, February 2008, pp. 328-341.
.. [Nister03] Nistér, D. An efficient solution to the five-point relative pose problem, CVPR 2003. .. [Nister03] Nistér, D. An efficient solution to the five-point relative pose problem, CVPR 2003.
.. [SteweniusCFS] Stewénius, H., Calibrated Fivepoint solver. http://www.vis.uky.edu/~stewe/FIVEPOINT/ .. [SteweniusCFS] Stewénius, H., Calibrated Fivepoint solver. http://www.vis.uky.edu/~stewe/FIVEPOINT/

@ -4,24 +4,24 @@ Command Line Parser
.. highlight:: cpp .. highlight:: cpp
CommandLineParser CommandLineParser
-------- -----------------
.. ocv:class:: CommandLineParser .. ocv:class:: CommandLineParser
The CommandLineParser class is designed for command line arguments parsing The CommandLineParser class is designed for command line arguments parsing
.. ocv:function:: CommandLineParser::CommandLineParser(int argc, const char * const argv[], const std::string keys) .. ocv:function:: CommandLineParser::CommandLineParser( int argc, const char* const argv[], const string& keys )
:param argc: :param argc:
:param argv: :param argv:
:param keys: :param keys:
.. ocv:function:: T CommandLineParser::get<T>(const std::string& name, bool space_delete = true) .. ocv:function:: template<typename T> T CommandLineParser::get<T>(const std::string& name, bool space_delete = true)
:param name: :param name:
:param space_delete: :param space_delete:
.. ocv:function:: T CommandLineParser::get<T>(int index, bool space_delete = true) .. ocv:function:: template<typename T> T CommandLineParser::get<T>(int index, bool space_delete = true)
:param index: :param index:
:param space_delete: :param space_delete:
@ -33,7 +33,7 @@ The CommandLineParser class is designed for command line arguments parsing
.. ocv:function:: bool CommandLineParser::check() .. ocv:function:: bool CommandLineParser::check()
.. ocv:function:: void CommandLineParser::about(std::string message) .. ocv:function:: void CommandLineParser::about( const string& message )
:param message: :param message:

@ -692,7 +692,7 @@ cvarrToMat
---------- ----------
Converts ``CvMat``, ``IplImage`` , or ``CvMatND`` to ``Mat``. Converts ``CvMat``, ``IplImage`` , or ``CvMatND`` to ``Mat``.
.. ocv:function:: Mat cvarrToMat( const CvArr* arr, bool copyData=false, bool allowND=true, int coiMode=0 ) .. ocv:function:: Mat cvarrToMat( const CvArr* arr, bool copyData=false, bool allowND=true, int coiMode=0, AutoBuffer<double>* buf=0 )
:param arr: input ``CvMat``, ``IplImage`` , or ``CvMatND``. :param arr: input ``CvMat``, ``IplImage`` , or ``CvMatND``.

@ -7,7 +7,8 @@ FAST
---- ----
Detects corners using the FAST algorithm Detects corners using the FAST algorithm
.. ocv:function:: void FAST( InputArray image, vector<KeyPoint>& keypoints, int threshold, bool nonmaxSupression=true, type=FastFeatureDetector::TYPE_9_16 ) .. ocv:function:: void FAST( InputArray image, vector<KeyPoint>& keypoints, int threshold, bool nonmaxSupression=true )
.. ocv:function:: void FAST( InputArray image, vector<KeyPoint>& keypoints, int threshold, bool nonmaxSupression, int type )
:param image: grayscale image where keypoints (corners) are detected. :param image: grayscale image where keypoints (corners) are detected.

@ -703,14 +703,10 @@ Calculates histogram for one channel 8-bit image.
.. ocv:function:: void gpu::calcHist(const GpuMat& src, GpuMat& hist, Stream& stream = Stream::Null()) .. ocv:function:: void gpu::calcHist(const GpuMat& src, GpuMat& hist, Stream& stream = Stream::Null())
.. ocv:function:: void gpu::calcHist(const GpuMat& src, GpuMat& hist, GpuMat& buf, Stream& stream = Stream::Null())
:param src: Source image. :param src: Source image.
:param hist: Destination histogram with one row, 256 columns, and the ``CV_32SC1`` type. :param hist: Destination histogram with one row, 256 columns, and the ``CV_32SC1`` type.
:param buf: Optional buffer to avoid extra memory allocations (for many calls with the same sizes).
:param stream: Stream for the asynchronous version. :param stream: Stream for the asynchronous version.
@ -721,8 +717,6 @@ Equalizes the histogram of a grayscale image.
.. ocv:function:: void gpu::equalizeHist(const GpuMat& src, GpuMat& dst, Stream& stream = Stream::Null()) .. ocv:function:: void gpu::equalizeHist(const GpuMat& src, GpuMat& dst, Stream& stream = Stream::Null())
.. ocv:function:: void gpu::equalizeHist(const GpuMat& src, GpuMat& dst, GpuMat& hist, Stream& stream = Stream::Null())
.. ocv:function:: void gpu::equalizeHist(const GpuMat& src, GpuMat& dst, GpuMat& hist, GpuMat& buf, Stream& stream = Stream::Null()) .. ocv:function:: void gpu::equalizeHist(const GpuMat& src, GpuMat& dst, GpuMat& hist, GpuMat& buf, Stream& stream = Stream::Null())
:param src: Source image. :param src: Source image.

@ -220,10 +220,6 @@ After each weak classifier evaluation, the sample trace at the point :math:`t` i
The sample has been rejected if it fall rejection threshold. So stageless cascade allows to reject not-object sample as soon as possible. Another meaning of the sample trace is a confidence with that sample recognized as desired object. At each :math:`t` that confidence depend on all previous weak classifier. This feature of soft cascade is resulted in more accurate detection. The original formulation of soft cascade can be found in [BJ05]_. The sample has been rejected if it fall rejection threshold. So stageless cascade allows to reject not-object sample as soon as possible. Another meaning of the sample trace is a confidence with that sample recognized as desired object. At each :math:`t` that confidence depend on all previous weak classifier. This feature of soft cascade is resulted in more accurate detection. The original formulation of soft cascade can be found in [BJ05]_.
.. [BJ05] Lubomir Bourdev and Jonathan Brandt. tRobust Object Detection Via Soft Cascade. IEEE CVPR, 2005.
.. [BMTG12] Rodrigo Benenson, Markus Mathias, Radu Timofte and Luc Van Gool. Pedestrian detection at 100 frames per second. IEEE CVPR, 2012.
gpu::SCascade gpu::SCascade
----------------------------------------------- -----------------------------------------------
.. ocv:class:: gpu::SCascade : public Algorithm .. ocv:class:: gpu::SCascade : public Algorithm

@ -881,7 +881,7 @@ CV_EXPORTS void HoughCirclesDownload(const GpuMat& d_circles, OutputArray h_circ
//! finds arbitrary template in the grayscale image using Generalized Hough Transform //! finds arbitrary template in the grayscale image using Generalized Hough Transform
//! Ballard, D.H. (1981). Generalizing the Hough transform to detect arbitrary shapes. Pattern Recognition 13 (2): 111-122. //! Ballard, D.H. (1981). Generalizing the Hough transform to detect arbitrary shapes. Pattern Recognition 13 (2): 111-122.
//! Guil, N., González-Linares, J.M. and Zapata, E.L. (1999). Bidimensional shape detection using an invariant approach. Pattern Recognition 32 (6): 1025-1038. //! Guil, N., González-Linares, J.M. and Zapata, E.L. (1999). Bidimensional shape detection using an invariant approach. Pattern Recognition 32 (6): 1025-1038.
class CV_EXPORTS GeneralizedHough_GPU : public Algorithm class CV_EXPORTS GeneralizedHough_GPU : public cv::Algorithm
{ {
public: public:
static Ptr<GeneralizedHough_GPU> create(int method); static Ptr<GeneralizedHough_GPU> create(int method);
@ -1554,7 +1554,7 @@ protected:
}; };
// Implementation of soft (stage-less) cascaded detector. // Implementation of soft (stage-less) cascaded detector.
class CV_EXPORTS SCascade : public Algorithm class CV_EXPORTS SCascade : public cv::Algorithm
{ {
public: public:

@ -1,7 +1,7 @@
#/usr/bin/env python #/usr/bin/env python
import os, sys, re, string, fnmatch import os, sys, re, string, fnmatch
allmodules = ["core", "flann", "imgproc", "ml", "highgui", "video", "features2d", "calib3d", "objdetect", "legacy", "contrib", "gpu", "androidcamera", "java", "python", "stitching", "ts", "photo", "nonfree", "videostab", "ocl"] allmodules = ["core", "flann", "imgproc", "ml", "highgui", "video", "features2d", "calib3d", "objdetect", "legacy", "contrib", "gpu", "androidcamera", "java", "python", "stitching", "ts", "photo", "nonfree", "videostab", "ocl", "softcascade"]
verbose = False verbose = False
show_warnings = True show_warnings = True
show_errors = True show_errors = True

@ -25,37 +25,37 @@ The sample has been rejected if it fall rejection threshold. So stageless cascad
.. [BMTG12] Rodrigo Benenson, Markus Mathias, Radu Timofte and Luc Van Gool. Pedestrian detection at 100 frames per second. IEEE CVPR, 2012. .. [BMTG12] Rodrigo Benenson, Markus Mathias, Radu Timofte and Luc Van Gool. Pedestrian detection at 100 frames per second. IEEE CVPR, 2012.
Detector softcascade::Detector
------------------- ---------------------
.. ocv:class:: Detector .. ocv:class:: softcascade::Detector : public Algorithm
Implementation of soft (stageless) cascaded detector. :: Implementation of soft (stageless) cascaded detector. ::
class CV_EXPORTS_W Detector : public Algorithm class Detector : public Algorithm
{ {
public: public:
enum { NO_REJECT = 1, DOLLAR = 2, /*PASCAL = 4,*/ DEFAULT = NO_REJECT}; enum { NO_REJECT = 1, DOLLAR = 2, /*PASCAL = 4,*/ DEFAULT = NO_REJECT};
CV_WRAP Detector(double minScale = 0.4, double maxScale = 5., int scales = 55, int rejCriteria = 1); Detector(double minScale = 0.4, double maxScale = 5., int scales = 55, int rejCriteria = 1);
CV_WRAP virtual ~Detector(); virtual ~Detector();
cv::AlgorithmInfo* info() const; cv::AlgorithmInfo* info() const;
CV_WRAP virtual bool load(const FileNode& fileNode); virtual bool load(const FileNode& fileNode);
CV_WRAP virtual void read(const FileNode& fileNode); virtual void read(const FileNode& fileNode);
virtual void detect(InputArray image, InputArray rois, std::vector<Detection>& objects) const; virtual void detect(InputArray image, InputArray rois, std::vector<Detection>& objects) const;
CV_WRAP virtual void detect(InputArray image, InputArray rois, CV_OUT OutputArray rects, CV_OUT OutputArray confs) const; virtual void detect(InputArray image, InputArray rois, CV_OUT OutputArray rects, CV_OUT OutputArray confs) const;
} }
Detector::Detector softcascade::Detector::Detector
---------------------------------------- ----------------------------------------
An empty cascade will be created. An empty cascade will be created.
.. ocv:function:: Detector::Detector(float minScale = 0.4f, float maxScale = 5.f, int scales = 55, int rejCriteria = 1) .. ocv:function:: softcascade::Detector::Detector( double minScale=0.4, double maxScale=5., int scales=55, int rejCriteria=1 )
.. ocv:pyfunction:: cv2.Detector.Detector(minScale[, maxScale[, scales[, rejCriteria]]]) -> cascade .. ocv:pyfunction:: cv2.softcascade_Detector([minScale[, maxScale[, scales[, rejCriteria]]]]) -> <softcascade_Detector object>
:param minScale: a minimum scale relative to the original size of the image on which cascade will be applied. :param minScale: a minimum scale relative to the original size of the image on which cascade will be applied.
@ -67,35 +67,35 @@ An empty cascade will be created.
Detector::~Detector softcascade::Detector::~Detector
----------------------------------------- -----------------------------------------
Destructor for Detector. Destructor for Detector.
.. ocv:function:: Detector::~Detector() .. ocv:function:: softcascade::Detector::~Detector()
Detector::load softcascade::Detector::load
-------------------------- ---------------------------
Load cascade from FileNode. Load cascade from FileNode.
.. ocv:function:: bool Detector::load(const FileNode& fileNode) .. ocv:function:: bool softcascade::Detector::load(const FileNode& fileNode)
.. ocv:pyfunction:: cv2.Detector.load(fileNode) .. ocv:pyfunction:: cv2.softcascade_Detector.load(fileNode) -> retval
:param fileNode: File node from which the soft cascade are read. :param fileNode: File node from which the soft cascade are read.
Detector::detect softcascade::Detector::detect
--------------------------- -----------------------------
Apply cascade to an input frame and return the vector of Detection objects. Apply cascade to an input frame and return the vector of Detection objects.
.. ocv:function:: void Detector::detect(InputArray image, InputArray rois, std::vector<Detection>& objects) const .. ocv:function:: void softcascade::Detector::detect(InputArray image, InputArray rois, std::vector<Detection>& objects) const
.. ocv:function:: void Detector::detect(InputArray image, InputArray rois, OutputArray rects, OutputArray confs) const .. ocv:function:: void softcascade::Detector::detect(InputArray image, InputArray rois, OutputArray rects, OutputArray confs) const
.. ocv:pyfunction:: cv2.Detector.detect(image, rois) -> (rects, confs) .. ocv:pyfunction:: cv2.softcascade_Detector.detect(image, rois[, rects[, confs]]) -> rects, confs
:param image: a frame on which detector will be applied. :param image: a frame on which detector will be applied.
@ -108,37 +108,39 @@ Apply cascade to an input frame and return the vector of Detection objects.
:param confs: an output array of confidence for detected objects. i-th bounding rectangle corresponds i-th confidence. :param confs: an output array of confidence for detected objects. i-th bounding rectangle corresponds i-th confidence.
ChannelFeatureBuilder softcascade::ChannelFeatureBuilder
--------------------- ----------------------------------
.. ocv:class:: ChannelFeatureBuilder .. ocv:class:: softcascade::ChannelFeatureBuilder : public Algorithm
Public interface for of soft (stageless) cascaded detector. :: Public interface for of soft (stageless) cascaded detector. ::
class CV_EXPORTS_W ChannelFeatureBuilder : public Algorithm class ChannelFeatureBuilder : public Algorithm
{ {
public: public:
virtual ~ChannelFeatureBuilder(); virtual ~ChannelFeatureBuilder();
CV_WRAP_AS(compute) virtual void operator()(InputArray src, CV_OUT OutputArray channels) const = 0; virtual void operator()(InputArray src, CV_OUT OutputArray channels) const = 0;
CV_WRAP static cv::Ptr<ChannelFeatureBuilder> create(); static cv::Ptr<ChannelFeatureBuilder> create();
}; };
ChannelFeatureBuilder:~ChannelFeatureBuilder softcascade::ChannelFeatureBuilder:~ChannelFeatureBuilder
-------------------------------------------- ---------------------------------------------------------
Destructor for ChannelFeatureBuilder. Destructor for ChannelFeatureBuilder.
.. ocv:function:: ChannelFeatureBuilder::~ChannelFeatureBuilder() .. ocv:function:: softcascade::ChannelFeatureBuilder::~ChannelFeatureBuilder()
.. ocv:pyfunction:: cv2.softcascade_ChannelFeatureBuilder_create() -> retval
ChannelFeatureBuilder::operator() softcascade::ChannelFeatureBuilder::operator()
--------------------------------- ----------------------------------------------
Create channel feature integrals for input image. Create channel feature integrals for input image.
.. ocv:function:: void ChannelFeatureBuilder::operator()(InputArray src, OutputArray channels) const .. ocv:function:: void softcascade::ChannelFeatureBuilder::operator()(InputArray src, OutputArray channels) const
.. ocv:pyfunction:: cv2.ChannelFeatureBuilder.compute(src, channels) -> None .. ocv:pyfunction:: cv2.softcascade_ChannelFeatureBuilder.compute(src, channels) -> None
:param src source frame :param src source frame

@ -7,13 +7,13 @@ Soft Cascade Detector Training
-------------------------------------------- --------------------------------------------
Octave softcascade::Octave
----------------- -------------------
.. ocv:class:: Octave .. ocv:class:: softcascade::Octave : public Algorithm
Public interface for soft cascade training algorithm. :: Public interface for soft cascade training algorithm. ::
class CV_EXPORTS Octave : public Algorithm class Octave : public Algorithm
{ {
public: public:
@ -37,17 +37,17 @@ Public interface for soft cascade training algorithm. ::
Octave::~Octave softcascade::Octave::~Octave
--------------------------------------- ---------------------------------------
Destructor for Octave. Destructor for Octave.
.. ocv:function:: Octave::~Octave() .. ocv:function:: softcascade::Octave::~Octave()
Octave::train softcascade::Octave::train
------------------------ --------------------------
.. ocv:function:: bool Octave::train(const Dataset* dataset, const FeaturePool* pool, int weaks, int treeDepth) .. ocv:function:: bool softcascade::Octave::train(const Dataset* dataset, const FeaturePool* pool, int weaks, int treeDepth)
:param dataset an object that allows communicate for training set. :param dataset an object that allows communicate for training set.
@ -59,19 +59,19 @@ Octave::train
Octave::setRejectThresholds softcascade::Octave::setRejectThresholds
-------------------------------------- ----------------------------------------
.. ocv:function:: void Octave::setRejectThresholds(OutputArray thresholds) .. ocv:function:: void softcascade::Octave::setRejectThresholds(OutputArray thresholds)
:param thresholds an output array of resulted rejection vector. Have same size as number of trained stages. :param thresholds an output array of resulted rejection vector. Have same size as number of trained stages.
Octave::write softcascade::Octave::write
------------------------ --------------------------
.. ocv:function:: void Octave::train(cv::FileStorage &fs, const FeaturePool* pool, InputArray thresholds) const .. ocv:function:: void softcascade::Octave::train(cv::FileStorage &fs, const FeaturePool* pool, InputArray thresholds) const
.. ocv:function:: void Octave::train( CvFileStorage* fs, string name) const .. ocv:function:: void softcascade::Octave::train( CvFileStorage* fs, string name) const
:param fs an output file storage to store trained detector. :param fs an output file storage to store trained detector.
@ -82,13 +82,13 @@ Octave::write
:param name a name of root node for trained detector. :param name a name of root node for trained detector.
FeaturePool softcascade::FeaturePool
----------- ------------------------
.. ocv:class:: FeaturePool .. ocv:class:: softcascade::FeaturePool
Public interface for feature pool. This is a hight level abstraction for training random feature pool. :: Public interface for feature pool. This is a hight level abstraction for training random feature pool. ::
class CV_EXPORTS FeaturePool class FeaturePool
{ {
public: public:
@ -99,42 +99,42 @@ Public interface for feature pool. This is a hight level abstraction for trainin
}; };
FeaturePool::size softcascade::FeaturePool::size
----------------- ------------------------------
Returns size of feature pool. Returns size of feature pool.
.. ocv:function:: int FeaturePool::size() const .. ocv:function:: int softcascade::FeaturePool::size() const
FeaturePool::~FeaturePool softcascade::FeaturePool::~FeaturePool
------------------------- --------------------------------------
FeaturePool destructor. FeaturePool destructor.
.. ocv:function:: int FeaturePool::~FeaturePool() .. ocv:function:: softcascade::FeaturePool::~FeaturePool()
FeaturePool::write softcascade::FeaturePool::write
------------------ -------------------------------
Write specified feature from feature pool to file storage. Write specified feature from feature pool to file storage.
.. ocv:function:: void FeaturePool::write( cv::FileStorage& fs, int index) const .. ocv:function:: void softcascade::FeaturePool::write( cv::FileStorage& fs, int index) const
:param fs an output file storage to store feature. :param fs an output file storage to store feature.
:param index an index of feature that should be stored. :param index an index of feature that should be stored.
FeaturePool::apply softcascade::FeaturePool::apply
------------------ -------------------------------
Compute feature on integral channel image. Compute feature on integral channel image.
.. ocv:function:: float FeaturePool::apply(int fi, int si, const Mat& channels) const .. ocv:function:: float softcascade::FeaturePool::apply(int fi, int si, const Mat& channels) const
:param fi an index of feature that should be computed. :param fi an index of feature that should be computed.

@ -7,22 +7,18 @@ The video stabilization module contains a set of functions and classes for globa
videostab::MotionModel videostab::MotionModel
---------------------- ----------------------
Describes motion model between two point clouds. Describes motion model between two point clouds.
:: .. ocv:enum:: videostab::MotionModel
enum MotionModel .. ocv:emember:: MM_TRANSLATION = 0
{ .. ocv:emember:: MM_TRANSLATION_AND_SCALE = 1
MM_TRANSLATION = 0, .. ocv:emember:: MM_ROTATION = 2
MM_TRANSLATION_AND_SCALE = 1, .. ocv:emember:: MM_RIGID = 3
MM_ROTATION = 2, .. ocv:emember:: MM_SIMILARITY = 4
MM_RIGID = 3, .. ocv:emember:: MM_AFFINE = 5
MM_SIMILARITY = 4, .. ocv:emember:: MM_HOMOGRAPHY = 6
MM_AFFINE = 5, .. ocv:emember:: MM_UNKNOWN = 7
MM_HOMOGRAPHY = 6,
MM_UNKNOWN = 7
};
videostab::RansacParams videostab::RansacParams
@ -34,7 +30,7 @@ Describes RANSAC method parameters.
:: ::
struct CV_EXPORTS RansacParams struct RansacParams
{ {
int size; // subset size int size; // subset size
float thresh; // max error to classify as inlier float thresh; // max error to classify as inlier
@ -87,7 +83,7 @@ videostab::RansacParams::default2dMotion
.. ocv:function:: static RansacParams videostab::RansacParams::default2dMotion(MotionModel model) .. ocv:function:: static RansacParams videostab::RansacParams::default2dMotion(MotionModel model)
:param model: Motion model. See :ocv:class:`videostab::MotionModel`. :param model: Motion model. See :ocv:enum:`videostab::MotionModel`.
:return: Default RANSAC method parameters for the given motion model. :return: Default RANSAC method parameters for the given motion model.
@ -123,9 +119,9 @@ Estimates best global motion between two 2D point clouds robustly (using RANSAC
:param points1: Destination set of 2D points (``32F``). :param points1: Destination set of 2D points (``32F``).
:param model: Motion model. See :ocv:class:`videostab::MotionModel`. :param model: Motion model. See :ocv:enum:`videostab::MotionModel`.
:param params: RANSAC method parameters. See :ocv:class:`videostab::RansacParams`. :param params: RANSAC method parameters. See :ocv:struct:`videostab::RansacParams`.
:param rmse: Final root-mean-square error. :param rmse: Final root-mean-square error.
@ -157,7 +153,7 @@ Base class for all global motion estimation methods.
:: ::
class CV_EXPORTS MotionEstimatorBase class MotionEstimatorBase
{ {
public: public:
virtual ~MotionEstimatorBase(); virtual ~MotionEstimatorBase();
@ -176,16 +172,16 @@ Sets motion model.
.. ocv:function:: void videostab::MotionEstimatorBase::setMotionModel(MotionModel val) .. ocv:function:: void videostab::MotionEstimatorBase::setMotionModel(MotionModel val)
:param val: Motion model. See :ocv:class:`videostab::MotionModel`. :param val: Motion model. See :ocv:enum:`videostab::MotionModel`.
videostab::MotionEstimatorBase::motionModel videostab::MotionEstimatorBase::motionModel
---------------------------------------------- -------------------------------------------
.. ocv:function:: MotionModel videostab::MotionEstimatorBase::motionModel() const .. ocv:function:: MotionModel videostab::MotionEstimatorBase::motionModel() const
:return: Motion model. See :ocv:class:`videostab::MotionModel`. :return: Motion model. See :ocv:enum:`videostab::MotionModel`.
videostab::MotionEstimatorBase::estimate videostab::MotionEstimatorBase::estimate
@ -213,7 +209,7 @@ Describes a robust RANSAC-based global 2D motion estimation method which minimiz
:: ::
class CV_EXPORTS MotionEstimatorRansacL2 : public MotionEstimatorBase class MotionEstimatorRansacL2 : public MotionEstimatorBase
{ {
public: public:
MotionEstimatorRansacL2(MotionModel model = MM_AFFINE); MotionEstimatorRansacL2(MotionModel model = MM_AFFINE);
@ -239,7 +235,7 @@ Describes a global 2D motion estimation method which minimizes L1 error.
:: ::
class CV_EXPORTS MotionEstimatorL1 : public MotionEstimatorBase class MotionEstimatorL1 : public MotionEstimatorBase
{ {
public: public:
MotionEstimatorL1(MotionModel model = MM_AFFINE); MotionEstimatorL1(MotionModel model = MM_AFFINE);
@ -257,7 +253,7 @@ Base class for global 2D motion estimation methods which take frames as input.
:: ::
class CV_EXPORTS ImageMotionEstimatorBase class ImageMotionEstimatorBase
{ {
public: public:
virtual ~ImageMotionEstimatorBase(); virtual ~ImageMotionEstimatorBase();
@ -278,7 +274,7 @@ Describes a global 2D motion estimation method which uses keypoints detection an
:: ::
class CV_EXPORTS KeypointBasedMotionEstimator : public ImageMotionEstimatorBase class KeypointBasedMotionEstimator : public ImageMotionEstimatorBase
{ {
public: public:
KeypointBasedMotionEstimator(Ptr<MotionEstimatorBase> estimator); KeypointBasedMotionEstimator(Ptr<MotionEstimatorBase> estimator);

Loading…
Cancel
Save