Update docs
authorAndrey Kamaev <andrey.kamaev@itseez.com>
Wed, 3 Apr 2013 08:29:48 +0000 (12:29 +0400)
committerAndrey Kamaev <andrey.kamaev@itseez.com>
Wed, 3 Apr 2013 10:10:03 +0000 (14:10 +0400)
doc/check_docs2.py
modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst
modules/core/doc/basic_structures.rst
modules/core/doc/operations_on_arrays.rst
modules/video/doc/motion_analysis_and_object_tracking.rst

index 963c7ff..6446edb 100755 (executable)
@@ -83,11 +83,15 @@ def get_cv2_object(name):
     elif name == "DescriptorExtractor":
         return cv2.DescriptorExtractor_create("ORB"), name
     elif name == "BackgroundSubtractor":
-        return cv2.BackgroundSubtractorMOG(), name
+        return cv2.createBackgroundSubtractorMOG(), name
     elif name == "StatModel":
         return cv2.KNearest(), name
     else:
-        return getattr(cv2, name)(), name
+        try:
+            obj = getattr(cv2, name)()
+        except AttributeError:
+            obj = getattr(cv2, "create" + name)()
+        return obj, name
 
 def compareSignatures(f, s):
     # function names
index 1c2e537..63305bf 100644 (file)
@@ -1178,7 +1178,7 @@ Computes disparity map for the specified stereo pair
 
 .. ocv:function:: void StereoMatcher::compute( InputArray left, InputArray right, OutputArray disparity )
 
-.. ocv:pyfunction:: cv2.StereoBM.compute(left, right[, disparity[, disptype]]) -> disparity
+.. ocv:pyfunction:: cv2.StereoBM.compute(left, right[, disparity]) -> disparity
 
     :param left: Left 8-bit single-channel image.
 
@@ -1200,7 +1200,7 @@ Creates StereoBM object
 
 .. ocv:function:: Ptr<StereoBM> createStereoBM(int numDisparities=0, int blockSize=21)
 
-.. ocv:pyfunction:: cv2.createStereoBM([numDisparities[, blockSize]]) -> <StereoBM object>
+.. ocv:pyfunction:: cv2.createStereoBM([numDisparities[, blockSize]]) -> retval
 
     :param numDisparities: the disparity search range. For each pixel algorithm will find the best disparity from 0 (default minimum disparity) to ``numDisparities``. The search range can then be shifted by changing the minimum disparity.
 
@@ -1231,7 +1231,7 @@ Creates StereoSGBM object
 
 .. ocv:function:: Ptr<StereoSGBM> createStereoSGBM( int minDisparity, int numDisparities, int blockSize, int P1=0, int P2=0, int disp12MaxDiff=0, int preFilterCap=0, int uniquenessRatio=0, int speckleWindowSize=0, int speckleRange=0, int mode=StereoSGBM::MODE_SGBM)
 
-.. ocv:pyfunction:: cv2.StereoSGBM([minDisparity, numDisparities, blockSize[, P1[, P2[, disp12MaxDiff[, preFilterCap[, uniquenessRatio[, speckleWindowSize[, speckleRange[, mode]]]]]]]]]) -> <StereoSGBM object>
+.. ocv:pyfunction:: cv2.createStereoSGBM(minDisparity, numDisparities, blockSize[, P1[, P2[, disp12MaxDiff[, preFilterCap[, uniquenessRatio[, speckleWindowSize[, speckleRange[, mode]]]]]]]]) -> retval
 
     :param minDisparity: Minimum possible disparity value. Normally, it is zero but sometimes rectification algorithms can shift images, so this parameter needs to be adjusted accordingly.
 
index de6ecfb..6632fb1 100644 (file)
@@ -175,7 +175,6 @@ The class represents rotated (i.e. not up-right) rectangles on a plane. Each rec
 
     .. ocv:function:: RotatedRect::RotatedRect()
     .. ocv:function:: RotatedRect::RotatedRect(const Point2f& center, const Size2f& size, float angle)
-    .. ocv:function:: RotatedRect::RotatedRect(const CvBox2D& box)
 
         :param center: The rectangle mass center.
         :param size: Width and height of the rectangle.
@@ -184,7 +183,6 @@ The class represents rotated (i.e. not up-right) rectangles on a plane. Each rec
 
     .. ocv:function:: void RotatedRect::points( Point2f pts[] ) const
     .. ocv:function:: Rect RotatedRect::boundingRect() const
-    .. ocv:function:: RotatedRect::operator CvBox2D() const
 
         :param pts: The points array for storing rectangle vertices.
 
@@ -229,8 +227,6 @@ The constructors.
 
 .. ocv:function:: TermCriteria::TermCriteria(int type, int maxCount, double epsilon)
 
-.. ocv:function:: TermCriteria::TermCriteria(const CvTermCriteria& criteria)
-
     :param type: The type of termination criteria: ``TermCriteria::COUNT``, ``TermCriteria::EPS`` or ``TermCriteria::COUNT`` + ``TermCriteria::EPS``.
 
     :param maxCount: The maximum number of iterations or elements to compute.
@@ -239,11 +235,6 @@ The constructors.
 
     :param criteria: Termination criteria in the deprecated ``CvTermCriteria`` format.
 
-TermCriteria::operator CvTermCriteria
--------------------------------------
-Converts to the deprecated ``CvTermCriteria`` format.
-
-.. ocv:function:: TermCriteria::operator CvTermCriteria() const
 
 Matx
 ----
@@ -429,13 +420,14 @@ The keypoint constructors
 
 DMatch
 ------
-.. ocv:struct:: DMatch
+.. ocv:class:: DMatch
 
 Class for matching keypoint descriptors: query descriptor index,
 train descriptor index, train image index, and distance between descriptors. ::
 
-    struct DMatch
+    class DMatch
     {
+    public:
         DMatch() : queryIdx(-1), trainIdx(-1), imgIdx(-1),
                    distance(std::numeric_limits<float>::max()) {}
         DMatch( int _queryIdx, int _trainIdx, float _distance ) :
@@ -1000,10 +992,6 @@ Various Mat constructors
 
 .. ocv:function:: Mat::Mat(const Mat& m, const Rect& roi)
 
-.. ocv:function:: Mat::Mat(const CvMat* m, bool copyData=false)
-
-.. ocv:function:: Mat::Mat(const IplImage* img, bool copyData=false)
-
 .. ocv:function:: template<typename T, int n> explicit Mat::Mat(const Vec<T, n>& vec, bool copyData=true)
 
 .. ocv:function:: template<typename T, int m, int n> explicit Mat::Mat(const Matx<T, m, n>& vec, bool copyData=true)
@@ -1641,33 +1629,6 @@ The operators make a new header for the specified sub-array of ``*this`` . They
 :ocv:func:`Mat::colRange` . For example, ``A(Range(0, 10), Range::all())`` is equivalent to ``A.rowRange(0, 10)`` . Similarly to all of the above, the operators are O(1) operations, that is, no matrix data is copied.
 
 
-Mat::operator CvMat
--------------------
-Creates the ``CvMat`` header for the matrix.
-
-.. ocv:function:: Mat::operator CvMat() const
-
-
-The operator creates the ``CvMat`` header for the matrix without copying the underlying data. The reference counter is not taken into account by this operation. Thus, you should make sure than the original matrix is not deallocated while the ``CvMat`` header is used. The operator is useful for intermixing the new and the old OpenCV API's, for example: ::
-
-    Mat img(Size(320, 240), CV_8UC3);
-    ...
-
-    CvMat cvimg = img;
-    mycvOldFunc( &cvimg, ...);
-
-
-where ``mycvOldFunc`` is a function written to work with OpenCV 1.x data structures.
-
-
-Mat::operator IplImage
-----------------------
-Creates the ``IplImage`` header for the matrix.
-
-.. ocv:function:: Mat::operator IplImage() const
-
-The operator creates the ``IplImage`` header for the matrix without copying the underlying data. You should make sure than the original matrix is not deallocated while the ``IplImage`` header is used. Similarly to ``Mat::operator CvMat`` , the operator is useful for intermixing the new and the old OpenCV API's.
-
 Mat::total
 ----------
 Returns the total number of array elements.
@@ -2242,7 +2203,6 @@ Various SparseMat constructors.
 .. ocv:function:: SparseMat::SparseMat( int dims, const int* _sizes, int _type )
 .. ocv:function:: SparseMat::SparseMat( const SparseMat& m )
 .. ocv:function:: SparseMat::SparseMat( const Mat& m )
-.. ocv:function:: SparseMat::SparseMat( const CvSparseMat* m )
 
 
     :param m: Source matrix for copy constructor. If m is dense matrix (ocv:class:`Mat`) then it will be converted to sparse representation.
index d1e7bc7..e31677d 100644 (file)
@@ -1838,7 +1838,7 @@ minMaxIdx
 ---------
 Finds the global minimum and maximum in an array
 
-.. ocv:function:: void minMaxIdx(InputArray src, double* minVal, double* maxVal, int* minIdx=0, int* maxIdx=0, InputArray mask=noArray())
+.. ocv:function:: void minMaxIdx(InputArray src, double* minVal, double* maxVal = 0, int* minIdx=0, int* maxIdx=0, InputArray mask=noArray())
 
     :param src: input single-channel array.
 
index ef82e33..5226c70 100644 (file)
@@ -530,7 +530,7 @@ Creates mixture-of-gaussian background subtractor
 
 .. ocv:function:: Ptr<BackgroundSubtractorMOG> createBackgroundSubtractorMOG(int history=200, int nmixtures=5, double backgroundRatio=0.7, double noiseSigma=0)
 
-.. ocv:pyfunction:: cv2.createBackgroundSubtractorMOG([history, nmixtures, backgroundRatio, noiseSigma]) -> <BackgroundSubtractorMOG object>
+.. ocv:pyfunction:: cv2.createBackgroundSubtractorMOG([history[, nmixtures[, backgroundRatio[, noiseSigma]]]]) -> retval
 
     :param history: Length of the history.