diff --git a/doc/ocv.py b/doc/ocv.py index a2f026630a..285ab0edeb 100644 --- a/doc/ocv.py +++ b/doc/ocv.py @@ -302,9 +302,10 @@ _visibility_re = re.compile(r'\b(public|private|protected)\b') _operator_re = re.compile(r'''(?x) \[\s*\] | \(\s*\) + | (<<|>>)=? | [!<>=/*%+|&^-]=? | \+\+ | -- - | (<<|>>)=? | ~ | && | \| | \|\| + | ~ | && | \| | \|\| | ->\*? | \, ''') @@ -560,6 +561,18 @@ class ConstDefExpr(WrappingDefExpr): def __unicode__(self): return (self.prefix and u'const %s' or u'%s const') % self.typename + +class ConstTemplateDefExpr(WrappingDefExpr): + + def __init__(self, typename, prefix=False): + WrappingDefExpr.__init__(self, typename) + self.prefix = prefix + + def get_id(self): + return self.typename.get_id() + u'C' + + def __unicode__(self): + return (self.prefix and u'const %s' or u'%s const') % self.typename class CastOpDefExpr(PrimaryDefExpr): @@ -933,9 +946,11 @@ class DefinitionParser(object): else: rv = PathDefExpr(result) is_const = self._peek_const(modifiers) + if is_const: + rv = ConstDefExpr(rv, prefix=True) if modifiers: rv = ModifierDefExpr(rv, modifiers) - return self._attach_crefptr(rv, is_const) + return self._attach_crefptr(rv, False) def _parse_default_expr(self): self.skip_ws() @@ -1136,7 +1151,7 @@ class OCVObject(ObjectDescription): theid = sig#obj.get_id() theid = re.sub(r" +", " ", theid) theid = re.sub(r"=[^,()]+\([^)]*?\)[^,)]*(,|\))", "\\1", theid) - theid = re.sub(r"=[^,)]+(,|\))", "\\1", theid) + theid = re.sub(r"=\w*[^,)(]+(,|\))", "\\1", theid) theid = theid.replace("( ", "(").replace(" )", ")") name = unicode(sigobj.name) if theid not in self.state.document.ids: @@ -1149,6 +1164,8 @@ class OCVObject(ObjectDescription): #(self.env.docname, self.objtype, theid)) self.env.domaindata['ocv']['objects'].setdefault(theid, (self.env.docname, self.objtype, theid)) + self.env.domaindata['ocv']['objects2'].setdefault(name, + (self.env.docname, self.objtype, theid)) indextext = self.get_index_text(name) if indextext: @@ -1192,33 +1209,32 @@ class OCVObject(ObjectDescription): class OCVClassObject(OCVObject): + object_annotation = "class " + object_long_name = "class" + + def attach_modifiers(self, node, obj): + if obj.visibility != 'public': + node += addnodes.desc_annotation(obj.visibility, + obj.visibility) + node += nodes.Text(' ') + if obj.static: + node += addnodes.desc_annotation('static', 'static') + node += nodes.Text(' ') def get_index_text(self, name): - return _('%s (C++ class)') % name + return _('%s (C++ %s)') % (name, self.__class__.object_long_name) def parse_definition(self, parser): return parser.parse_class() def describe_signature(self, signode, cls): - #self.attach_modifiers(signode, cls) - #signode += addnodes.desc_annotation('class ', 'class ') - #self.attach_name(signode, cls.name) - pass - -class OCVStructObject(OCVObject): - - def get_index_text(self, name): - return _('%s (C structure)') % name - - def parse_definition(self, parser): - return parser.parse_class() - - def describe_signature(self, signode, cls): - #self.attach_modifiers(signode, cls) - #signode += addnodes.desc_annotation('class ', 'class ') - #self.attach_name(signode, cls.name) - pass + self.attach_modifiers(signode, cls) + signode += addnodes.desc_annotation(self.__class__.object_annotation, self.__class__.object_annotation) + self.attach_name(signode, cls.name) +class OCVStructObject(OCVClassObject): + object_annotation = "struct " + object_long_name = "structure" class OCVTypeObject(OCVObject): @@ -1238,9 +1254,7 @@ class OCVTypeObject(OCVObject): signode += nodes.Text(' ') self.attach_name(signode, obj.name) - class OCVMemberObject(OCVObject): - ismember = True def get_index_text(self, name): @@ -1259,7 +1273,6 @@ class OCVMemberObject(OCVObject): if obj.value is not None: signode += nodes.Text(u' = ' + obj.value) - class OCVFunctionObject(OCVObject): def attach_function(self, node, func): @@ -1406,9 +1419,9 @@ class OCVDomain(Domain): 'func' : OCVXRefRole(fix_parens=True), 'funcx' : OCVXRefRole(), 'cfunc' : OCVXRefRole(fix_parens=True), - 'cfunc' : OCVXRefRole(), + 'cfuncx' : OCVXRefRole(), 'jfunc' : OCVXRefRole(fix_parens=True), - 'jfunc' : OCVXRefRole(), + 'jfuncx' : OCVXRefRole(), 'pyfunc' : OCVPyXRefRole(), 'pyoldfunc' : OCVPyXRefRole(), 'member': OCVXRefRole(), @@ -1417,6 +1430,10 @@ class OCVDomain(Domain): initial_data = { 'objects': {}, # fullname -> docname, objtype } + + def __init__(self, env): + Domain.__init__(self, env) + self.data['objects2'] = {} def clear_doc(self, docname): for fullname, (fn, _, _) in self.data['objects'].items(): @@ -1427,13 +1444,28 @@ class OCVDomain(Domain): typ, target, node, contnode): def _create_refnode(expr): name = unicode(expr) - if name not in self.data['objects']: + if "type" in self.objtypes_for_role(typ): return None - obj = self.data['objects'][name] + if "cfunction" in self.objtypes_for_role(typ): + if not name.startswith(u'cv'): + name = u'cv' + name + dict = self.data['objects'] + if name not in dict: + dict = self.data['objects2'] + if name not in dict: + refdoc = node.get('refdoc', fromdocname) + env.warn(refdoc, 'unresolved reference: %r - %r' % (target, typ), node.line) + return None + obj = dict[name] if obj[1] not in self.objtypes_for_role(typ): return None + title = obj[2] + if "class" in self.objtypes_for_role(typ): + title = u"class " + title + elif "struct" in self.objtypes_for_role(typ): + title = u"struct " + title return make_refnode(builder, fromdocname, obj[0], obj[2], - contnode, name) + contnode, title) parser = DefinitionParser(target) try: @@ -1443,7 +1475,7 @@ class OCVDomain(Domain): raise DefinitionError('') except DefinitionError: refdoc = node.get('refdoc', fromdocname) - env.warn(refdoc, 'unparseable1 C++ definition: %r' % target, + env.warn(refdoc, 'unparseable C++ definition: %r' % target, node.line) return None diff --git a/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst b/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst index a83c7017b2..4d4c130c6d 100644 --- a/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst +++ b/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst @@ -184,7 +184,7 @@ The function returns the final re-projection error. .. seealso:: - :ocv:func:`FindChessboardCorners`, + :ocv:func:`findChessboardCorners`, :ocv:func:`solvePnP`, :ocv:func:`initCameraMatrix2D`, :ocv:func:`stereoCalibrate`, @@ -272,7 +272,7 @@ For points in an image of a stereo pair, computes the corresponding epilines in :param whichImage: Index of the image (1 or 2) that contains the ``points`` . - :param F: Fundamental matrix that can be estimated using :ocv:func:`findFundamentalMat` or :ocv:func:`StereoRectify` . + :param F: Fundamental matrix that can be estimated using :ocv:func:`findFundamentalMat` or :ocv:func:`stereoRectify` . :param lines: Output vector of the epipolar lines corresponding to the points in the other image. Each line :math:`ax + by + c=0` is encoded by 3 numbers :math:`(a, b, c)` . @@ -435,7 +435,7 @@ Finds the positions of internal corners of the chessboard. * **CV_CALIB_CB_ADAPTIVE_THRESH** Use adaptive thresholding to convert the image to black and white, rather than a fixed threshold level (computed from the average image brightness). - * **CV_CALIB_CB_NORMALIZE_IMAGE** Normalize the image gamma with :ocv:func:`EqualizeHist` before applying fixed or adaptive thresholding. + * **CV_CALIB_CB_NORMALIZE_IMAGE** Normalize the image gamma with :ocv:func:`equalizeHist` before applying fixed or adaptive thresholding. * **CV_CALIB_CB_FILTER_QUADS** Use additional criteria (like contour area, perimeter, square-like shape) to filter out false quads extracted at the contour retrieval stage. @@ -628,9 +628,9 @@ the found fundamental matrix. Normally just one matrix is found. But in case of :math:`9 \times 3` matrix that stores all 3 matrices sequentially). The calculated fundamental matrix may be passed further to -:ocv:func:`ComputeCorrespondEpilines` that finds the epipolar lines +:ocv:func:`computeCorrespondEpilines` that finds the epipolar lines corresponding to the specified points. It can also be passed to -:ocv:func:`StereoRectifyUncalibrated` to compute the rectification transformation. :: +:ocv:func:`stereoRectifyUncalibrated` to compute the rectification transformation. :: // Example. Estimation of fundamental matrix using the RANSAC algorithm int point_count = 100; @@ -726,11 +726,11 @@ Homography matrix is determined up to a scale. Thus, it is normalized so that .. seealso:: - :ocv:func:`GetAffineTransform`, - :ocv:func:`GetPerspectiveTransform`, - :ocv:func:`EstimateRigidMotion`, - :ocv:func:`WarpPerspective`, - :ocv:func:`PerspectiveTransform` + :ocv:func:`getAffineTransform`, + :ocv:func:`getPerspectiveTransform`, + :ocv:func:`estimateRigidTransform`, + :ocv:func:`warpPerspective`, + :ocv:func:`perspectiveTransform` estimateAffine3D @@ -800,7 +800,7 @@ Returns the new camera matrix based on the free scaling parameter. :param newImageSize: Image size after rectification. By default,it is set to ``imageSize`` . - :param validPixROI: Optional output rectangle that outlines all-good-pixels region in the undistorted image. See ``roi1, roi2`` description in :ocv:func:`StereoRectify` . + :param validPixROI: Optional output rectangle that outlines all-good-pixels region in the undistorted image. See ``roi1, roi2`` description in :ocv:func:`stereoRectify` . :param centerPrincipalPoint: Optional flag that indicates whether in the new camera matrix the principal point should be at the image center or not. By default, the principal point is chosen to best fit a subset of the source image (determined by ``alpha``) to the corrected image. @@ -919,9 +919,9 @@ Reprojects a disparity image to 3D space. :param _3dImage: Output 3-channel floating-point image of the same size as ``disparity`` . Each element of ``_3dImage(x,y)`` contains 3D coordinates of the point ``(x,y)`` computed from the disparity map. - :param Q: :math:`4 \times 4` perspective transformation matrix that can be obtained with :ocv:func:`StereoRectify` . + :param Q: :math:`4 \times 4` perspective transformation matrix that can be obtained with :ocv:func:`stereoRectify`. - :param handleMissingValues: Indicates, whether the function should handle missing values (i.e. points where the disparity was not computed). If ``handleMissingValues=true``, then pixels with the minimal disparity that corresponds to the outliers (see :ocv:func:`StereoBM::operator()` ) are transformed to 3D points with a very large Z value (currently set to 10000). + :param handleMissingValues: Indicates, whether the function should handle missing values (i.e. points where the disparity was not computed). If ``handleMissingValues=true``, then pixels with the minimal disparity that corresponds to the outliers (see :ocv:funcx:`StereoBM::operator()` ) are transformed to 3D points with a very large Z value (currently set to 10000). :param ddepth: The optional output array depth. If it is ``-1``, the output image will have ``CV_32F`` depth. ``ddepth`` can also be set to ``CV_16S``, ``CV_32S`` or ``CV_32F``. @@ -933,8 +933,8 @@ The function transforms a single-channel disparity map to a 3-channel image repr The matrix ``Q`` can be an arbitrary :math:`4 \times 4` matrix (for example, the one computed by -:ocv:func:`StereoRectify`). To reproject a sparse set of points {(x,y,d),...} to 3D space, use -:ocv:func:`PerspectiveTransform` . +:ocv:func:`stereoRectify`). To reproject a sparse set of points {(x,y,d),...} to 3D space, use +:ocv:func:`perspectiveTransform` . @@ -962,7 +962,7 @@ Computes an RQ decomposition of 3x3 matrices. :param Qz: Optional output 3x3 rotation matrix around z-axis. The function computes a RQ decomposition using the given rotations. This function is used in -:ocv:func:`DecomposeProjectionMatrix` to decompose the left 3x3 submatrix of a projection matrix into a camera and a rotation matrix. +:ocv:func:`decomposeProjectionMatrix` to decompose the left 3x3 submatrix of a projection matrix into a camera and a rotation matrix. It optionally returns three rotation matrices, one for each axis, and the three Euler angles (as the return value) @@ -1036,12 +1036,12 @@ Class for computing stereo correspondence using the block matching algorithm. :: Ptr state; }; -The class is a C++ wrapper for the associated functions. In particular, ``StereoBM::operator()`` is the wrapper for -:ocv:func:`StereoBM::operator()`. +The class is a C++ wrapper for the associated functions. In particular, :ocv:funcx:`StereoBM::operator()` is the wrapper for +:ocv:cfunc:`cvFindStereoCorrespondenceBM`. StereoBM::StereoBM ---------------------- +------------------ The constructors. .. ocv:function:: StereoBM::StereoBM() @@ -1137,7 +1137,7 @@ The class implements the modified H. Hirschmuller algorithm HH08 that differs fr * Mutual information cost function is not implemented. Instead, a simpler Birchfield-Tomasi sub-pixel metric from BT96 is used. Though, the color images are supported as well. - * Some pre- and post- processing steps from K. Konolige algorithm :ocv:func:`StereoBM::operator()` are included, for example: pre-filtering (``CV_STEREO_BM_XSOBEL`` type) and post-filtering (uniqueness check, quadratic interpolation and speckle filtering). + * 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). @@ -1401,7 +1401,7 @@ Computes a rectification transform for an uncalibrated stereo camera. :param threshold: Optional threshold used to filter out the outliers. If the parameter is greater than zero, all the point pairs that do not comply with the epipolar geometry (that is, the points for which :math:`|\texttt{points2[i]}^T*\texttt{F}*\texttt{points1[i]}|>\texttt{threshold}` ) are rejected prior to computing the homographies. Otherwise,all the points are considered inliers. The function computes the rectification transformations without knowing intrinsic parameters of the cameras and their relative position in the space, which explains the suffix "uncalibrated". Another related difference from -:ocv:func:`StereoRectify` is that the function outputs not the rectification transformations in the object (3D) space, but the planar perspective transformations encoded by the homography matrices ``H1`` and ``H2`` . The function implements the algorithm +:ocv:func:`stereoRectify` is that the function outputs not the rectification transformations in the object (3D) space, but the planar perspective transformations encoded by the homography matrices ``H1`` and ``H2`` . The function implements the algorithm [Hartley99]_. .. note:: diff --git a/modules/core/doc/basic_structures.rst b/modules/core/doc/basic_structures.rst index 208554c0d5..49e7ae2eac 100644 --- a/modules/core/doc/basic_structures.rst +++ b/modules/core/doc/basic_structures.rst @@ -246,7 +246,7 @@ Template class for short numerical vectors, a partial case of :ocv:class:`Matx`: typedef Vec Vec4d; typedef Vec Vec6d; -It is possible to convert ``Vec`` to/from ``Point_``, ``Vec`` to/from ``Point3_`` , and ``Vec`` to ``CvScalar`` or :ocv:class:`Scalar`. Use ``operator[]`` to access the elements of ``Vec``. +It is possible to convert ``Vec`` to/from ``Point_``, ``Vec`` to/from ``Point3_`` , and ``Vec`` to :ocv:struct:`CvScalar` or :ocv:class:`Scalar_`. Use ``operator[]`` to access the elements of ``Vec``. All the expected vector operations are also implemented: @@ -1517,11 +1517,11 @@ The method is used in quite a few of OpenCV functions. The point is that element This approach, while being very simple, can boost the performance of a simple element-operation by 10-20 percents, especially if the image is rather small and the operation is quite simple. Another OpenCV idiom in this function, a call of -:ocv:func:`Mat::create` for the destination array, that allocates the destination array unless it already has the proper size and type. And while the newly allocated arrays are always continuous, you still need to check the destination array because :ocv:func:`create` does not always allocate a new matrix. +:ocv:func:`Mat::create` for the destination array, that allocates the destination array unless it already has the proper size and type. And while the newly allocated arrays are always continuous, you still need to check the destination array because :ocv:func:`Mat::create` does not always allocate a new matrix. Mat::elemSize ------------------ +------------- Returns the matrix element size in bytes. .. ocv:function:: size_t Mat::elemSize() const @@ -1530,7 +1530,7 @@ The method returns the matrix element size in bytes. For example, if the matrix Mat::elemSize1 ------------------- +-------------- Returns the size of each matrix element channel in bytes. .. ocv:function:: size_t Mat::elemSize1() const @@ -1539,7 +1539,7 @@ The method returns the matrix element channel size in bytes, that is, it ignores Mat::type -------------- +--------- Returns the type of a matrix element. .. ocv:function:: int Mat::type() const @@ -1622,7 +1622,7 @@ Returns a pointer to the specified matrix row. :param i: A 0-based row index. The methods return ``uchar*`` or typed pointer to the specified matrix row. See the sample in -:ocv:func:`Mat::isContinuous` () to know how to use these methods. +:ocv:func:`Mat::isContinuous` to know how to use these methods. Mat::at diff --git a/modules/core/doc/drawing_functions.rst b/modules/core/doc/drawing_functions.rst index 26edd8cfe5..6c966694a9 100644 --- a/modules/core/doc/drawing_functions.rst +++ b/modules/core/doc/drawing_functions.rst @@ -6,7 +6,7 @@ Drawing Functions Drawing functions work with matrices/images of arbitrary depth. The boundaries of the shapes can be rendered with antialiasing (implemented only for 8-bit images for now). All the functions include the parameter ``color`` that uses an RGB value (that may be constructed -with ``CV_RGB`` or the :ocv:class:`Scalar` constructor +with ``CV_RGB`` or the :ocv:class:`Scalar_` constructor ) for color images and brightness for grayscale images. For color images, the channel ordering is normally *Blue, Green, Red*. diff --git a/modules/core/doc/dynamic_structures.rst b/modules/core/doc/dynamic_structures.rst index de4f19bab9..ef646c2613 100644 --- a/modules/core/doc/dynamic_structures.rst +++ b/modules/core/doc/dynamic_structures.rst @@ -1,5 +1,5 @@ Dynamic Structures -================== +================== .. highlight:: c @@ -43,7 +43,7 @@ The buffer is put in the end of already allocated space in the ``top`` memory bl If there are no more free blocks, a new block is allocated (or borrowed from the parent, see :ocv:cfunc:`CreateChildMemStorage`) and added to the end of list. Thus, the storage behaves as a stack with ``bottom`` indicating bottom of the stack and the pair (``top``, ``free_space``) indicating top of the stack. The stack top may be saved via :ocv:cfunc:`SaveMemStoragePos`, restored via -:ocv:cfunc:`RestoreMemStoragePos`, or reset via :ocv:cfunc:`ClearStorage`. +:ocv:cfunc:`RestoreMemStoragePos`, or reset via :ocv:cfunc:`ClearMemStorage`. CvMemBlock ---------- @@ -112,27 +112,31 @@ CvSlice .. ocv:struct:: CvSlice -A sequence slice. In C++ interface the class :ocv:class:`Range` should be used instead. + A sequence slice. In C++ interface the class :ocv:class:`Range` should be used instead. - .. ocv:member: int start_index + .. ocv:member:: int start_index - inclusive start index of the sequence slice + inclusive start index of the sequence slice - .. ocv:member: int end_index + .. ocv:member:: int end_index - exclusive end index of the sequence slice + exclusive end index of the sequence slice + +There are helper functions to construct the slice and to compute its length: + +.. ocv:cfunction:: CvSlice cvSlice( int start, int end ) + +:: -There are helper functions to construct the slice and to compute its length: :: - - inline CvSlice cvSlice( int start, int end ); #define CV_WHOLE_SEQ_END_INDEX 0x3fffffff #define CV_WHOLE_SEQ cvSlice(0, CV_WHOLE_SEQ_END_INDEX) - - /* calculates the sequence slice length */ - int cvSliceLength( CvSlice slice, const CvSeq* seq ); .. +.. ocv:cfunction:: int cvSliceLength( CvSlice slice, const CvSeq* seq ) + + Calculates the sequence slice length + Some of functions that operate on sequences take a ``CvSlice slice`` parameter that is often set to the whole sequence (CV_WHOLE_SEQ) by default. Either of the ``start_index`` and ``end_index`` may be negative or exceed the sequence length. If they are equal, the slice is considered empty (i.e., contains no elements). Because sequences are treated as circular structures, the slice may select a few elements in the end of a sequence followed by a few elements at the beginning of the sequence. For example, ``cvSlice(-2, 3)`` in the case of a 10-element sequence will select a 5-element slice, containing the pre-last (8th), last (9th), the very first (0th), second (1th) and third (2nd) elements. The functions normalize the slice argument in the following way: @@ -452,17 +456,17 @@ Finds an edge in a graph. .. ocv:cfunction:: CvGraphEdge* cvFindGraphEdge( const CvGraph* graph, int start_idx, int end_idx ) -:: - - #define cvGraphFindEdge cvFindGraphEdge - -.. - :param graph: Graph :param start_idx: Index of the starting vertex of the edge :param end_idx: Index of the ending vertex of the edge. For an unoriented graph, the order of the vertex parameters does not matter. + +:: + + #define cvGraphFindEdge cvFindGraphEdge + +.. The function finds the graph edge connecting two specified vertices and returns a pointer to it or NULL if the edge does not exist. @@ -472,17 +476,17 @@ Finds an edge in a graph by using its pointer. .. ocv:cfunction:: CvGraphEdge* cvFindGraphEdgeByPtr( const CvGraph* graph, const CvGraphVtx* startVtx, const CvGraphVtx* endVtx ) -:: - - #define cvGraphFindEdgeByPtr cvFindGraphEdgeByPtr - -.. - :param graph: Graph :param startVtx: Pointer to the starting vertex of the edge :param endVtx: Pointer to the ending vertex of the edge. For an unoriented graph, the order of the vertex parameters does not matter. + +:: + + #define cvGraphFindEdgeByPtr cvFindGraphEdgeByPtr + +.. The function finds the graph edge connecting two specified vertices and returns pointer to it or NULL if the edge does not exists. @@ -521,15 +525,16 @@ Returns a pointer to a sequence element according to its index. .. ocv:cfunction:: char* cvGetSeqElem( const CvSeq* seq, int index ) + :param seq: Sequence + + :param index: Index of element + :: #define CV_GET_SEQ_ELEM( TYPE, seq, index ) (TYPE*)cvGetSeqElem( (CvSeq*)(seq), (index) ) .. - :param seq: Sequence - - :param index: Index of element The function finds the element with the given index in the sequence and returns the pointer to it. If the element @@ -841,6 +846,12 @@ Allocates a text string in a storage block. .. ocv:cfunction:: CvString cvMemStorageAllocString(CvMemStorage* storage, const char* ptr, int len=-1) + :param storage: Memory storage + + :param ptr: The string + + :param len: Length of the string (not counting the ending ``NUL`` ) . If the parameter is negative, the function computes the length. + :: typedef struct CvString @@ -852,12 +863,6 @@ Allocates a text string in a storage block. .. - :param storage: Memory storage - - :param ptr: The string - - :param len: Length of the string (not counting the ending ``NUL`` ) . If the parameter is negative, the function computes the length. - The function creates copy of the string in memory storage. It returns the structure that contains user-passed or computed length of the string and pointer to the copied string. @@ -1256,6 +1261,12 @@ Sorts sequence element using the specified comparison function. .. ocv:cfunction:: void cvSeqSort( CvSeq* seq, CvCmpFunc func, void* userdata=NULL ) + :param seq: The sequence to sort + + :param func: The comparison function that returns a negative, zero, or positive value depending on the relationships among the elements (see the above declaration and the example below) - a similar function is used by ``qsort`` from C runline except that in the latter, ``userdata`` is not used + + :param userdata: The user parameter passed to the compasion function; helps to avoid global variables in some cases + :: /* a < b ? -1 : a > b ? 1 : 0 */ @@ -1263,12 +1274,6 @@ Sorts sequence element using the specified comparison function. .. - :param seq: The sequence to sort - - :param func: The comparison function that returns a negative, zero, or positive value depending on the relationships among the elements (see the above declaration and the example below) - a similar function is used by ``qsort`` from C runline except that in the latter, ``userdata`` is not used - - :param userdata: The user parameter passed to the compasion function; helps to avoid global variables in some cases - The function sorts the sequence in-place using the specified criteria. Below is an example of using this function: :: diff --git a/modules/core/doc/old_basic_structures.rst b/modules/core/doc/old_basic_structures.rst index d0bc05fc79..790de4f342 100644 --- a/modules/core/doc/old_basic_structures.rst +++ b/modules/core/doc/old_basic_structures.rst @@ -671,7 +671,7 @@ Creates a matrix header but does not allocate the matrix data. :param type: Type of the matrix elements, see :ocv:cfunc:`CreateMat` -The function allocates a new matrix header and returns a pointer to it. The matrix data can then be allocated using :ocv:cfunc:`CreateData` or set explicitly to user-allocated data via :ocv:func:`SetData`. +The function allocates a new matrix header and returns a pointer to it. The matrix data can then be allocated using :ocv:cfunc:`CreateData` or set explicitly to user-allocated data via :ocv:cfunc:`SetData`. CreateMatND ----------- @@ -719,7 +719,7 @@ Creates sparse array. :param type: Type of array elements. The same as for CvMat The function allocates a multi-dimensional sparse array. Initially the array contain no elements, that is -:ocv:cfunc:`GetPtrND` and other related functions will return 0 for every index. +:ocv:cfunc:`PtrND` and other related functions will return 0 for every index. CrossProduct @@ -935,7 +935,7 @@ The function returns a matrix header for the input array that can be a matrix - The function provides an easy way to handle both types of arrays - ``IplImage`` and ``CvMat`` using the same code. Input array must have non-zero data pointer, otherwise the function will report an error. -.. seealso:: :ocv:cfunc:`GetImage`, :ocv:cfunc:`GetMatND`, :ocv:func:`cvarrToMat`. +.. seealso:: :ocv:cfunc:`GetImage`, :ocv:func:`cvarrToMat`. .. note:: If the input array is ``IplImage`` with planar data layout and COI set, the function returns the pointer to the selected plane and ``COI == 0``. This feature allows user to process ``IplImage`` strctures with planar data layout, even though OpenCV does not support such images. @@ -1250,13 +1250,15 @@ The functions return a pointer to a specific array element. Number of array dime The functions can be used for sparse arrays as well - if the requested node does not exist they create it and set it to zero. All these as well as other functions accessing array elements ( -:ocv:cfunc:`Get` +:ocv:cfunc:`GetND` , -:ocv:cfunc:`GetReal` +:ocv:cfunc:`GetRealND` , :ocv:cfunc:`Set` , -:ocv:cfunc:`SetReal` +:ocv:cfunc:`SetND` +, +:ocv:cfunc:`SetRealND` ) raise an error in case if the element index is out of range. diff --git a/modules/core/doc/old_xml_yaml_persistence.rst b/modules/core/doc/old_xml_yaml_persistence.rst index 9fcf593868..53643374fd 100644 --- a/modules/core/doc/old_xml_yaml_persistence.rst +++ b/modules/core/doc/old_xml_yaml_persistence.rst @@ -681,7 +681,7 @@ Starts writing a new structure. following the structure name (see the example in :ocv:struct:`CvFileStorage` description). Mainly it is used with user objects. When the storage is read, the encoded type name is used to determine the object type - (see :ocv:struct:`CvTypeInfo` and :ocv:cfunc:`FindTypeInfo` ). + (see :ocv:struct:`CvTypeInfo` and :ocv:cfunc:`FindType` ). :param attributes: This parameter is not used in the current implementation diff --git a/modules/core/doc/operations_on_arrays.rst b/modules/core/doc/operations_on_arrays.rst index 227ee810ca..7019e74fd7 100644 --- a/modules/core/doc/operations_on_arrays.rst +++ b/modules/core/doc/operations_on_arrays.rst @@ -695,18 +695,17 @@ Normally, the function is used to convert an old-style 2D array ( ``CvMatND`` using an arbitrary element-wise function. The last parameter, ``coiMode`` , specifies how to deal with an image with COI set. By default, it is 0 and the function reports an error when an image with COI comes in. And ``coiMode=1`` means that no error is signalled. You have to check COI presence and handle it manually. The modern structures, such as -:ocv:func:`Mat` and -:ocv:func:`MatND` do not support COI natively. To process an individual channel of a new-style array, you need either to organize a loop over the array (for example, using matrix iterators) where the channel of interest will be processed, or extract the COI using +:ocv:class:`Mat` and +``MatND`` do not support COI natively. To process an individual channel of a new-style array, you need either to organize a loop over the array (for example, using matrix iterators) where the channel of interest will be processed, or extract the COI using :ocv:func:`mixChannels` (for new-style arrays) or :ocv:func:`extractImageCOI` (for old-style arrays), process this individual channel, and insert it back to the destination array if needed (using -:ocv:func:`mixChannel` or +:ocv:func:`mixChannels` or :ocv:func:`insertImageCOI` , respectively). .. seealso:: - :c:func:`cvGetImage`, - :c:func:`cvGetMat`, - :c:func:`cvGetMatND`, + :ocv:cfunc:`cvGetImage`, + :ocv:cfunc:`cvGetMat`, :ocv:func:`extractImageCOI`, :ocv:func:`insertImageCOI`, :ocv:func:`mixChannels` @@ -1606,7 +1605,7 @@ Calculates an average (mean) of array elements. .. ocv:cfunction:: CvScalar cvAvg(const CvArr* src, const CvArr* mask=NULL) .. ocv:pyoldfunction:: cv.Avg(src, mask=None)-> CvScalar - :param src: Source array that should have from 1 to 4 channels so that the result can be stored in :ocv:func:`Scalar` . + :param src: Source array that should have from 1 to 4 channels so that the result can be stored in :ocv:class:`Scalar_` . :param mask: Optional operation mask. @@ -1638,7 +1637,7 @@ Calculates a mean and standard deviation of array elements. .. ocv:cfunction:: void cvAvgSdv(const CvArr* src, CvScalar* mean, CvScalar* stdDev, const CvArr* mask=NULL) .. ocv:pyoldfunction:: cv.AvgSdv(src, mask=None)-> (mean, stdDev) - :param src: Source array that should have from 1 to 4 channels so that the results can be stored in :ocv:func:`Scalar` 's. + :param src: Source array that should have from 1 to 4 channels so that the results can be stored in :ocv:class:`Scalar_` 's. :param mean: Output parameter: computed mean value. @@ -1786,11 +1785,11 @@ Finds the global minimum and maximum in a whole array or sub-array. :param mask: Optional mask used to select a sub-array. -The functions ``ninMaxLoc`` find the minimum and maximum element values and their positions. The extremums are searched across the whole array or, +The functions ``minMaxLoc`` find the minimum and maximum element values and their positions. The extremums are searched across the whole array or, if ``mask`` is not an empty array, in the specified array region. The functions do not work with multi-channel arrays. If you need to find minimum or maximum elements across all the channels, use -:ocv:func:`reshape` first to reinterpret the array as single-channel. Or you may extract the particular channel using either +:ocv:func:`Mat::reshape` first to reinterpret the array as single-channel. Or you may extract the particular channel using either :ocv:func:`extractImageCOI` , or :ocv:func:`mixChannels` , or :ocv:func:`split` . @@ -1806,7 +1805,7 @@ In case of a sparse matrix, the minimum is found among non-zero elements only. :ocv:func:`extractImageCOI`, :ocv:func:`mixChannels`, :ocv:func:`split`, - :ocv:func:`reshape` + :ocv:func:`Mat::reshape` @@ -1931,7 +1930,7 @@ For a not-per-element matrix product, see .. seealso:: :ocv:func:`add`, - :ocv:func:`substract`, + :ocv:func:`subtract`, :ocv:func:`divide`, :ref:`MatrixExpressions`, :ocv:func:`scaleAdd`, @@ -2174,7 +2173,7 @@ PCA constructors :param maxComponents: Maximum number of components that PCA should retain. By default, all the components are retained. The default constructor initializes an empty PCA structure. The second constructor initializes the structure and calls -:ocv:func:`PCA::operator()` . +:ocv:funcx:`PCA::operator()` . @@ -2530,7 +2529,7 @@ Fills arrays with random numbers. .. ocv:function:: void RNG::fill( InputOutputArray mat, int distType, InputArray a, InputArray b ) - :param mat: 2D or N-dimensional matrix. Currently matrices with more than 4 channels are not supported by the methods. Use :ocv:func:`reshape` as a possible workaround. + :param mat: 2D or N-dimensional matrix. Currently matrices with more than 4 channels are not supported by the methods. Use :ocv:func:`Mat::reshape` as a possible workaround. :param distType: Distribution type, ``RNG::UNIFORM`` or ``RNG::NORMAL`` . @@ -3116,7 +3115,7 @@ The constructors. * **SVD::FULL_UV** When the matrix is not square, by default the algorithm produces ``u`` and ``vt`` matrices of sufficiently large size for the further ``A`` reconstruction. If, however, ``FULL_UV`` flag is specified, ``u`` and ``vt`` will be full-size square orthogonal matrices. The first constructor initializes an empty ``SVD`` structure. The second constructor initializes an empty ``SVD`` structure and then calls -:ocv:func:`SVD::operator()` . +:ocv:funcx:`SVD::operator()` . SVD::operator () diff --git a/modules/core/doc/xml_yaml_persistence.rst b/modules/core/doc/xml_yaml_persistence.rst index 93532e43d6..be8030913a 100644 --- a/modules/core/doc/xml_yaml_persistence.rst +++ b/modules/core/doc/xml_yaml_persistence.rst @@ -10,7 +10,7 @@ You can store and then restore various OpenCV data structures to/from XML (http: (http://www.yaml.org) formats. Also, it is possible store and load arbitrarily complex data structures, which include OpenCV data structures, as well as primitive data types (integer and floating-point numbers and text strings) as their elements. Use the following procedure to write something to XML or YAML: - #. Create new :ocv:class:`FileStorage` and open it for writing. It can be done with a single call to :ocv:func:`FileStorage::FileStorage` constructor that takes a filename, or you can use the default constructor and then call :ocv:class:`FileStorage::open`. Format of the file (XML or YAML) is determined from the filename extension (".xml" and ".yml"/".yaml", respectively) + #. Create new :ocv:class:`FileStorage` and open it for writing. It can be done with a single call to :ocv:func:`FileStorage::FileStorage` constructor that takes a filename, or you can use the default constructor and then call :ocv:func:`FileStorage::open`. Format of the file (XML or YAML) is determined from the filename extension (".xml" and ".yml"/".yaml", respectively) #. Write all the data you want using the streaming operator ``>>``, just like in the case of STL streams. #. Close the file using :ocv:func:`FileStorage::release`. ``FileStorage`` destructor also closes the file. diff --git a/modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst b/modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst index 8ec9c4bc18..97359b5256 100644 --- a/modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst +++ b/modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst @@ -358,7 +358,7 @@ FlannBasedMatcher ----------------- .. ocv:class:: FlannBasedMatcher -Flann-based descriptor matcher. This matcher trains :ocv:func:`flann::Index` on a train descriptor collection and calls its nearest search methods to find the best matches. So, this matcher may be faster when matching a large train collection than the brute force matcher. ``FlannBasedMatcher`` does not support masking permissible matches of descriptor sets because ``flann::Index`` does not support this. :: +Flann-based descriptor matcher. This matcher trains :ocv:class:`flann::Index_` on a train descriptor collection and calls its nearest search methods to find the best matches. So, this matcher may be faster when matching a large train collection than the brute force matcher. ``FlannBasedMatcher`` does not support masking permissible matches of descriptor sets because ``flann::Index`` does not support this. :: class FlannBasedMatcher : public DescriptorMatcher { diff --git a/modules/features2d/doc/common_interfaces_of_feature_detectors.rst b/modules/features2d/doc/common_interfaces_of_feature_detectors.rst index 5be705308f..ab33f144a1 100644 --- a/modules/features2d/doc/common_interfaces_of_feature_detectors.rst +++ b/modules/features2d/doc/common_interfaces_of_feature_detectors.rst @@ -144,8 +144,10 @@ The following detector types are supported: * ``"SURF"`` -- :ocv:class:`SurfFeatureDetector` * ``"ORB"`` -- :ocv:class:`OrbFeatureDetector` * ``"MSER"`` -- :ocv:class:`MserFeatureDetector` -* ``"GFTT"`` -- :ocv:class:`GfttFeatureDetector` -* ``"HARRIS"`` -- :ocv:class:`HarrisFeatureDetector` +* ``"GFTT"`` -- :ocv:class:`GoodFeaturesToTrackDetector` +* ``"HARRIS"`` -- :ocv:class:`GoodFeaturesToTrackDetector` with Harris detector enabled +* ``"Dense"`` -- :ocv:class:`DenseFeatureDetector` +* ``"SimpleBlob"`` -- :ocv:class:`SimpleBlobDetector` Also a combined format is supported: feature detector adapter name ( ``"Grid"`` -- :ocv:class:`GridAdaptedFeatureDetector`, ``"Pyramid"`` -- @@ -587,30 +589,3 @@ SurfAdjuster SurfAdjuster(); ... }; - -FeatureDetector ---------------- -.. ocv:class:: FeatureDetector - -Abstract base class for 2D image feature detectors. :: - - class CV_EXPORTS FeatureDetector - { - public: - virtual ~FeatureDetector(); - - void detect( const Mat& image, vector& keypoints, - const Mat& mask=Mat() ) const; - - void detect( const vector& images, - vector >& keypoints, - const vector& masks=vector() ) const; - - virtual void read(const FileNode&); - virtual void write(FileStorage&) const; - - static Ptr create( const string& detectorType ); - - protected: - ... - }; diff --git a/modules/flann/doc/flann_fast_approximate_nearest_neighbor_search.rst b/modules/flann/doc/flann_fast_approximate_nearest_neighbor_search.rst index 5819c02bd3..771e897a0b 100644 --- a/modules/flann/doc/flann_fast_approximate_nearest_neighbor_search.rst +++ b/modules/flann/doc/flann_fast_approximate_nearest_neighbor_search.rst @@ -10,7 +10,7 @@ This section documents OpenCV's interface to the FLANN library. FLANN (Fast Libr flann::Index\_ ----------------- -.. ocv:class:: cv::flann::Index_ +.. ocv:class:: flann::Index_ The FLANN nearest neighbor index class. This class is templated with the type of elements for which the index is built. diff --git a/modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst b/modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst index 423f7233b7..0e285624c0 100644 --- a/modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst +++ b/modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst @@ -193,7 +193,7 @@ gpu::StereoBeliefPropagation::StereoBeliefPropagation For more details, see [Felzenszwalb2006]_. -By default, :ocv:class:`StereoBeliefPropagation` uses floating-point arithmetics and the ``CV_32FC1`` type for messages. But it can also use fixed-point arithmetics and the ``CV_16SC1`` message type for better performance. To avoid an overflow in this case, the parameters must satisfy the following requirement: +By default, :ocv:class:`gpu::StereoBeliefPropagation` uses floating-point arithmetics and the ``CV_32FC1`` type for messages. But it can also use fixed-point arithmetics and the ``CV_16SC1`` message type for better performance. To avoid an overflow in this case, the parameters must satisfy the following requirement: .. math:: diff --git a/modules/gpu/doc/data_structures.rst b/modules/gpu/doc/data_structures.rst index dd22f472f8..b9fea4fba1 100644 --- a/modules/gpu/doc/data_structures.rst +++ b/modules/gpu/doc/data_structures.rst @@ -48,7 +48,7 @@ gpu::PtrStep\_ .. ocv:class:: gpu::PtrStep\_ Structure similar to -:ocv:class:`DevMem2D_` but containing only a pointer and row step. Width and height fields are excluded due to performance reasons. The structure is intended for internal use or for users who write device code. +:ocv:class:`gpu::DevMem2D_` but containing only a pointer and row step. Width and height fields are excluded due to performance reasons. The structure is intended for internal use or for users who write device code. :: template struct PtrStep_ @@ -79,7 +79,7 @@ gpu::PtrElemStrp\_ .. ocv:class:: gpu::PtrElemStrp\_ Structure similar to -:ocv:class:`DevMem2D_` but containing only a pointer and a row step in elements. Width and height fields are excluded due to performance reasons. This class can only be constructed if ``sizeof(T)`` is a multiple of 256. The structure is intended for internal use or for users who write device code. +:ocv:class:`gpu::DevMem2D_` but containing only a pointer and a row step in elements. Width and height fields are excluded due to performance reasons. This class can only be constructed if ``sizeof(T)`` is a multiple of 256. The structure is intended for internal use or for users who write device code. :: template struct PtrElemStep_ : public PtrStep_ @@ -97,7 +97,7 @@ gpu::GpuMat .. ocv:class:: gpu::GpuMat Base storage class for GPU memory with reference counting. Its interface matches the -:c:type:`Mat` interface with the following limitations: +:ocv:class:`Mat` interface with the following limitations: * no arbitrary dimensions support (only 2D) diff --git a/modules/gpu/doc/image_filtering.rst b/modules/gpu/doc/image_filtering.rst index 9b5521d310..e912287fa3 100644 --- a/modules/gpu/doc/image_filtering.rst +++ b/modules/gpu/doc/image_filtering.rst @@ -240,7 +240,7 @@ gpu::boxFilter :param anchor: Anchor point. The default value ``Point(-1, -1)`` means that the anchor is at the kernel center. - .. note:: This filter does not check out-of-border accesses, so only a proper sub-matrix of a bigger matrix has to be passed to it. +.. note:: This filter does not check out-of-border accesses, so only a proper sub-matrix of a bigger matrix has to be passed to it. .. seealso:: :ocv:func:`boxFilter` @@ -541,7 +541,7 @@ gpu::sepFilter2D gpu::createDerivFilter_GPU ------------------------------ -.. ocv:function:: Ptr createDerivFilter_GPU(int srcType, int dstType, int dx, int dy, int ksize, int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1) +.. ocv:function:: Ptr gpu::createDerivFilter_GPU(int srcType, int dstType, int dx, int dy, int ksize, int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1) Creates a filter engine for the generalized Sobel operator. diff --git a/modules/gpu/doc/image_processing.rst b/modules/gpu/doc/image_processing.rst index 60c2e4d6f5..235c4ffc3e 100644 --- a/modules/gpu/doc/image_processing.rst +++ b/modules/gpu/doc/image_processing.rst @@ -278,12 +278,12 @@ gpu::ConvolveBuf::ConvolveBuf .. ocv:function:: ConvolveBuf::ConvolveBuf() Constructs an empty buffer that is properly resized after the first call of the - :ocv:func:`convolve` function. + :ocv:func:`gpu::convolve` function. .. ocv:function:: ConvolveBuf::ConvolveBuf(Size image_size, Size templ_size) Constructs a buffer for the - :ocv:func:`convolve` function with respective arguments. + :ocv:func:`gpu::convolve` function with respective arguments. diff --git a/modules/gpu/doc/initalization_and_information.rst b/modules/gpu/doc/initalization_and_information.rst index 1308cec5f3..52e7cf7c5a 100644 --- a/modules/gpu/doc/initalization_and_information.rst +++ b/modules/gpu/doc/initalization_and_information.rst @@ -7,7 +7,7 @@ Initalization and Information gpu::getCudaEnabledDeviceCount ---------------------------------- -.. ocv:function:: int getCudaEnabledDeviceCount() +.. ocv:function:: int gpu::getCudaEnabledDeviceCount() Returns the number of installed CUDA-enabled devices. Use this function before any other GPU functions calls. If OpenCV is compiled without GPU support, this function returns 0. @@ -15,7 +15,7 @@ gpu::getCudaEnabledDeviceCount gpu::setDevice ------------------ -.. ocv:function:: void setDevice(int device) +.. ocv:function:: void gpu::setDevice(int device) Sets a device and initializes it for the current thread. If the call of this function is omitted, a default device is initialized at the fist GPU usage. @@ -25,7 +25,7 @@ gpu::setDevice gpu::getDevice ------------------ -.. ocv:function:: int getDevice() +.. ocv:function:: int gpu::getDevice() Returns the current device index set by ``{gpu::getDevice}`` or initialized by default. diff --git a/modules/gpu/doc/introduction.rst b/modules/gpu/doc/introduction.rst index 2d2da7fe4a..36bb97119f 100644 --- a/modules/gpu/doc/introduction.rst +++ b/modules/gpu/doc/introduction.rst @@ -15,7 +15,7 @@ The GPU module depends on the CUDA Toolkit and NVIDIA Performance Primitives lib The OpenCV GPU module is designed for ease of use and does not require any knowledge of CUDA. Though, such a knowledge will certainly be useful to handle non-trivial cases or achieve the highest performance. It is helpful to understand the cost of various operations, what the GPU does, what the preferred data formats are, and so on. The GPU module is an effective instrument for quick implementation of GPU-accelerated computer vision algorithms. However, if your algorithm involves many simple operations, then, for the best possible performance, you may still need to write your own kernels to avoid extra write and read operations on the intermediate results. To enable CUDA support, configure OpenCV using ``CMake`` with ``WITH_CUDA=ON`` . When the flag is set and if CUDA is installed, the full-featured OpenCV GPU module is built. Otherwise, the module is still built but at runtime all functions from the module throw -:ocv:func:`Exception` with ``CV_GpuNotSupported`` error code, except for +:ocv:class:`Exception` with ``CV_GpuNotSupported`` error code, except for :ocv:func:`gpu::getCudaEnabledDeviceCount()`. The latter function returns zero GPU count in this case. Building OpenCV without CUDA support does not perform device code compilation, so it does not require the CUDA Toolkit installed. Therefore, using the :ocv:func:`gpu::getCudaEnabledDeviceCount()` function, you can implement a high-level algorithm that will detect GPU presence at runtime and choose an appropriate implementation (CPU or GPU) accordingly. 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 44e74b4cea..1d97ad1ac0 100644 --- a/modules/highgui/doc/reading_and_writing_images_and_video.rst +++ b/modules/highgui/doc/reading_and_writing_images_and_video.rst @@ -205,7 +205,7 @@ Open video file or a capturing device for video capturing :param device: id of the opened video capturing device (i.e. a camera index). -The methods first call :ocv:cfunc:`VideoCapture::release` to close the already opened file or camera. +The methods first call :ocv:func:`VideoCapture::release` to close the already opened file or camera. VideoCapture::isOpened diff --git a/modules/imgproc/doc/feature_detection.rst b/modules/imgproc/doc/feature_detection.rst index 4b8b251215..d29d06e2cf 100644 --- a/modules/imgproc/doc/feature_detection.rst +++ b/modules/imgproc/doc/feature_detection.rst @@ -273,9 +273,9 @@ The function can be used to initialize a point-based tracker of an object. :ocv:func:`cornerMinEigenVal`, :ocv:func:`cornerHarris`, :ocv:func:`calcOpticalFlowPyrLK`, - :ocv:func:`estimateRigidMotion`, - :ocv:func:`PlanarObjectDetector`, - :ocv:func:`OneWayDescriptor` + :ocv:func:`estimateRigidTransform`, + :ocv:class:`PlanarObjectDetector`, + :ocv:class:`OneWayDescriptor` diff --git a/modules/imgproc/doc/filtering.rst b/modules/imgproc/doc/filtering.rst index ec50c6d14a..d7c545ec93 100644 --- a/modules/imgproc/doc/filtering.rst +++ b/modules/imgproc/doc/filtering.rst @@ -51,13 +51,13 @@ The class ``BaseColumnFilter`` is a base class for filtering data using single-c where :math:`F` is a filtering function but, as it is represented as a class, it can produce any side effects, memorize previously processed data, and so on. The class only defines an interface and is not used directly. Instead, there are several functions in OpenCV (and you can add more) that return pointers to the derived classes that implement specific filtering operations. Those pointers are then passed to the -:ocv:func:`FilterEngine` constructor. While the filtering operation interface uses the ``uchar`` type, a particular implementation is not limited to 8-bit data. +:ocv:class:`FilterEngine` constructor. While the filtering operation interface uses the ``uchar`` type, a particular implementation is not limited to 8-bit data. .. seealso:: - :ocv:func:`BaseRowFilter`, - :ocv:func:`BaseFilter`, - :ocv:func:`FilterEngine`, + :ocv:class:`BaseRowFilter`, + :ocv:class:`BaseFilter`, + :ocv:class:`FilterEngine`, :ocv:func:`getColumnSumFilter`, :ocv:func:`getLinearColumnFilter`, :ocv:func:`getMorphologyColumnFilter` @@ -101,13 +101,13 @@ The class ``BaseFilter`` is a base class for filtering data using 2D kernels. Fi where :math:`F` is a filtering function. The class only defines an interface and is not used directly. Instead, there are several functions in OpenCV (and you can add more) that return pointers to the derived classes that implement specific filtering operations. Those pointers are then passed to the -:ocv:func:`FilterEngine` constructor. While the filtering operation interface uses the ``uchar`` type, a particular implementation is not limited to 8-bit data. +:ocv:class:`FilterEngine` constructor. While the filtering operation interface uses the ``uchar`` type, a particular implementation is not limited to 8-bit data. .. seealso:: - :ocv:func:`BaseColumnFilter`, - :ocv:func:`BaseRowFilter`, - :ocv:func:`FilterEngine`, + :ocv:class:`BaseColumnFilter`, + :ocv:class:`BaseRowFilter`, + :ocv:class:`FilterEngine`, :ocv:func:`getLinearFilter`, :ocv:func:`getMorphologyFilter` @@ -143,13 +143,13 @@ The class ``BaseRowFilter`` is a base class for filtering data using single-row where :math:`F` is a filtering function. The class only defines an interface and is not used directly. Instead, there are several functions in OpenCV (and you can add more) that return pointers to the derived classes that implement specific filtering operations. Those pointers are then passed to the -:ocv:func:`FilterEngine` constructor. While the filtering operation interface uses the ``uchar`` type, a particular implementation is not limited to 8-bit data. +:ocv:class:`FilterEngine` constructor. While the filtering operation interface uses the ``uchar`` type, a particular implementation is not limited to 8-bit data. .. seealso:: - :ocv:func:`BaseColumnFilter`, - :ocv:func:`Filter`, - :ocv:func:`FilterEngine`, + :ocv:class:`BaseColumnFilter`, + :ocv:class:`BaseFilter`, + :ocv:class:`FilterEngine`, :ocv:func:`getLinearRowFilter`, :ocv:func:`getMorphologyRowFilter`, :ocv:func:`getRowSumFilter` @@ -347,7 +347,7 @@ Unlike the earlier versions of OpenCV, now the filtering operations fully suppor Explore the data types. As it was mentioned in the -:ocv:func:`BaseFilter` description, the specific filters can process data of any type, despite that ``Base*Filter::operator()`` only takes ``uchar`` pointers and no information about the actual types. To make it all work, the following rules are used: +:ocv:class:`BaseFilter` description, the specific filters can process data of any type, despite that ``Base*Filter::operator()`` only takes ``uchar`` pointers and no information about the actual types. To make it all work, the following rules are used: * In case of separable filtering, ``FilterEngine::rowFilter`` is applied first. It transforms the input image data (of type ``srcType`` ) to the intermediate results stored in the internal buffers (of type ``bufType`` ). Then, these intermediate results are processed as @@ -359,9 +359,9 @@ Explore the data types. As it was mentioned in the .. seealso:: - :ocv:func:`BaseColumnFilter`, - :ocv:func:`BaseFilter`, - :ocv:func:`BaseRowFilter`, + :ocv:class:`BaseColumnFilter`, + :ocv:class:`BaseFilter`, + :ocv:class:`BaseRowFilter`, :ocv:func:`createBoxFilter`, :ocv:func:`createDerivFilter`, :ocv:func:`createGaussianFilter`, @@ -457,12 +457,12 @@ The function computes and returns the coordinate of a donor pixel corresponding Normally, the function is not called directly. It is used inside -:ocv:func:`FilterEngine` and +:ocv:class:`FilterEngine` and :ocv:func:`copyMakeBorder` to compute tables for quick extrapolation. .. seealso:: - :ocv:func:`FilterEngine`, + :ocv:class:`FilterEngine`, :ocv:func:`copyMakeBorder` @@ -558,7 +558,7 @@ Forms a border around an image. :param value: Border value if ``borderType==BORDER_CONSTANT`` . The function copies the source image into the middle of the destination image. The areas to the left, to the right, above and below the copied source image will be filled with extrapolated pixels. This is not what -:ocv:func:`FilterEngine` or filtering functions based on it do (they extrapolate pixels on-fly), but what other more complex functions, including your own, may do to simplify image boundary handling. +:ocv:class:`FilterEngine` or filtering functions based on it do (they extrapolate pixels on-fly), but what other more complex functions, including your own, may do to simplify image boundary handling. The function supports the mode when ``src`` is already in the middle of ``dst`` . In this case, the function does not copy ``src`` itself but simply constructs the border, for example: :: @@ -611,7 +611,7 @@ Returns a box filter engine. The function is a convenience function that retrieves the horizontal sum primitive filter with :ocv:func:`getRowSumFilter` , vertical sum filter with :ocv:func:`getColumnSumFilter` , constructs new -:ocv:func:`FilterEngine` , and passes both of the primitive filters there. The constructed filter engine can be used for image filtering with normalized or unnormalized box filter. +:ocv:class:`FilterEngine` , and passes both of the primitive filters there. The constructed filter engine can be used for image filtering with normalized or unnormalized box filter. The function itself is used by :ocv:func:`blur` and @@ -619,7 +619,7 @@ The function itself is used by .. seealso:: - :ocv:func:`FilterEngine`, + :ocv:class:`FilterEngine`, :ocv:func:`blur`, :ocv:func:`boxFilter` @@ -677,7 +677,7 @@ Returns an engine for smoothing images with the Gaussian filter. The function :ocv:func:`createGaussianFilter` computes Gaussian kernel coefficients and then returns a separable linear filter for that kernel. The function is used by :ocv:func:`GaussianBlur` . Note that while the function takes just one data type, both for input and output, you can pass this limitation by calling :ocv:func:`getGaussianKernel` and then -:ocv:func:`createSeparableFilter` directly. +:ocv:func:`createSeparableLinearFilter` directly. .. seealso:: @@ -714,12 +714,12 @@ Creates a non-separable linear filter engine. :param borderValue: Border vaule used in case of a constant border. The function returns a pointer to a 2D linear filter for the specified kernel, the source array type, and the destination array type. The function is a higher-level function that calls ``getLinearFilter`` and passes the retrieved 2D filter to the -:ocv:func:`FilterEngine` constructor. +:ocv:class:`FilterEngine` constructor. .. seealso:: :ocv:func:`createSeparableLinearFilter`, - :ocv:func:`FilterEngine`, + :ocv:class:`FilterEngine`, :ocv:func:`filter2D` @@ -766,7 +766,7 @@ Note that :ocv:func:`erode`, :ocv:func:`dilate`, :ocv:func:`morphologyEx`, - :ocv:func:`FilterEngine` + :ocv:class:`FilterEngine` createSeparableLinearFilter @@ -807,13 +807,13 @@ The functions construct primitive separable linear filtering operations or a fil :ocv:func:`createSeparableLinearFilter` or even higher-level :ocv:func:`sepFilter2D` . The function :ocv:func:`createMorphologyFilter` is smart enough to figure out the ``symmetryType`` for each of the two kernels, the intermediate ``bufType`` and, if filtering can be done in integer arithmetics, the number of ``bits`` to encode the filter coefficients. If it does not work for you, it is possible to call ``getLinearColumnFilter``,``getLinearRowFilter`` directly and then pass them to the -:ocv:func:`FilterEngine` constructor. +:ocv:class:`FilterEngine` constructor. .. seealso:: :ocv:func:`sepFilter2D`, :ocv:func:`createLinearFilter`, - :ocv:func:`FilterEngine`, + :ocv:class:`FilterEngine`, :ocv:func:`getKernelType` @@ -880,7 +880,7 @@ Erodes an image by using a specific structuring element. :param borderType: Pixel extrapolation method. See :ocv:func:`borderInterpolate` for details. - :param borderValue: Border value in case of a constant border. The default value has a special meaning. See :ocv:func:`createMorphoogyFilter` for details. + :param borderValue: Border value in case of a constant border. The default value has a special meaning. See :ocv:func:`createMorphologyFilter` for details. The function erodes the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the minimum is taken: @@ -1183,7 +1183,7 @@ Performs advanced morphological transformations. :param borderType: Pixel extrapolation method. See :ocv:func:`borderInterpolate` for details. - :param borderValue: Border value in case of a constant border. The default value has a special meaning. See :ocv:func:`createMorphoogyFilter` for details. + :param borderValue: Border value in case of a constant border. The default value has a special meaning. See :ocv:func:`createMorphologyFilter` for details. The function can perform advanced morphological transformations using an erosion and dilation as basic operations. @@ -1456,7 +1456,7 @@ Smooths the image in one of several ways. The function smooths an image using one of several methods. Every of the methods has some features and restrictions listed below: - * Blur with no scaling works with single-channel images only and supports accumulation of 8-bit to 16-bit format (similar to :ocv:func:`Sobel` and :ocv:func:`Laplace`) and 32-bit floating point to 32-bit floating-point format. + * Blur with no scaling works with single-channel images only and supports accumulation of 8-bit to 16-bit format (similar to :ocv:func:`Sobel` and :ocv:func:`Laplacian`) and 32-bit floating point to 32-bit floating-point format. * Simple blur and Gaussian blur support 1- or 3-channel, 8-bit and 32-bit floating point images. These two methods can process images in-place. diff --git a/modules/imgproc/doc/geometric_transformations.rst b/modules/imgproc/doc/geometric_transformations.rst index ad92359772..2d82fee266 100644 --- a/modules/imgproc/doc/geometric_transformations.rst +++ b/modules/imgproc/doc/geometric_transformations.rst @@ -70,7 +70,7 @@ The function converts a pair of maps for .. seealso:: :ocv:func:`remap`, - :ocv:func:`undisort`, + :ocv:func:`undistort`, :ocv:func:`initUndistortRectifyMap` diff --git a/modules/imgproc/doc/histograms.rst b/modules/imgproc/doc/histograms.rst index 98fb76ff14..43769eab7d 100644 --- a/modules/imgproc/doc/histograms.rst +++ b/modules/imgproc/doc/histograms.rst @@ -143,7 +143,7 @@ The functions ``calcBackProject`` calculate the back project of the histogram. T Find connected components in the resulting picture and choose, for example, the largest component. This is an approximate algorithm of the -:ocv:func:`CAMShift` color object tracker. +:ocv:func:`CamShift` color object tracker. .. seealso:: :ocv:func:`calcHist` .. _compareHist: @@ -315,7 +315,7 @@ Locates a template within an image by using a histogram comparison. :param factor: Normalization factor for histograms that affects the normalization scale of the destination image. Pass 1 if not sure. -The function calculates the back projection by comparing histograms of the source image patches with the given histogram. The function is similar to :ocv:func:`MatchTemplate`, but instead of comparing the raster patch with all its possible positions within the search window, the function ``CalcBackProjectPatch`` compares histograms. See the algorithm diagram below: +The function calculates the back projection by comparing histograms of the source image patches with the given histogram. The function is similar to :ocv:func:`matchTemplate`, but instead of comparing the raster patch with all its possible positions within the search window, the function ``CalcBackProjectPatch`` compares histograms. See the algorithm diagram below: .. image:: pics/backprojectpatch.png diff --git a/modules/ml/doc/boosting.rst b/modules/ml/doc/boosting.rst index a8d368da67..27264e447d 100644 --- a/modules/ml/doc/boosting.rst +++ b/modules/ml/doc/boosting.rst @@ -142,7 +142,7 @@ Default and training constructors. .. ocv:function:: CvBoost::CvBoost( const Mat& trainData, int tflag, const Mat& responses, const Mat& varIdx=Mat(), const Mat& sampleIdx=Mat(), const Mat& varType=Mat(), const Mat& missingDataMask=Mat(), CvBoostParams params=CvBoostParams() ) -.. ocv:function::CvBoost::CvBoost( const CvMat* trainData, int tflag, const CvMat* responses, const CvMat* varIdx=0, const CvMat* sampleIdx=0, const CvMat* varType=0, const CvMat* missingDataMask=0, CvBoostParams params=CvBoostParams() ) +.. ocv:function:: CvBoost::CvBoost( const CvMat* trainData, int tflag, const CvMat* responses, const CvMat* varIdx=0, const CvMat* sampleIdx=0, const CvMat* varType=0, const CvMat* missingDataMask=0, CvBoostParams params=CvBoostParams() ) .. ocv:pyfunction:: cv2.Boost(trainData, tflag, responses[, varIdx[, sampleIdx[, varType[, missingDataMask[, params]]]]]) -> @@ -155,9 +155,9 @@ Trains a boosted tree classifier. .. ocv:function:: bool CvBoost::train( const Mat& trainData, int tflag, const Mat& responses, const Mat& varIdx=Mat(), const Mat& sampleIdx=Mat(), const Mat& varType=Mat(), const Mat& missingDataMask=Mat(), CvBoostParams params=CvBoostParams(), bool update=false ) -.. ocv:function::bool CvBoost::train( const CvMat* trainData, int tflag, const CvMat* responses, const CvMat* varIdx=0, const CvMat* sampleIdx=0, const CvMat* varType=0, const CvMat* missingDataMask=0, CvBoostParams params=CvBoostParams(), bool update=false ) +.. ocv:function:: bool CvBoost::train( const CvMat* trainData, int tflag, const CvMat* responses, const CvMat* varIdx=0, const CvMat* sampleIdx=0, const CvMat* varType=0, const CvMat* missingDataMask=0, CvBoostParams params=CvBoostParams(), bool update=false ) -.. ocv:function::bool CvBoost::train( CvMLData* data, CvBoostParams params=CvBoostParams(), bool update=false ) +.. ocv:function:: bool CvBoost::train( CvMLData* data, CvBoostParams params=CvBoostParams(), bool update=false ) .. ocv:pyfunction:: cv2.Boost.train(trainData, tflag, responses[, varIdx[, sampleIdx[, varType[, missingDataMask[, params[, update]]]]]]) -> retval @@ -171,7 +171,7 @@ Predicts a response for an input sample. .. ocv:function:: float CvBoost::predict( const Mat& sample, const Mat& missing=Mat(), const Range& slice=Range::all(), bool rawMode=false, bool returnSum=false ) const -.. ocv:function::float CvBoost::predict( const CvMat* sample, const CvMat* missing=0, CvMat* weak_responses=0, CvSlice slice=CV_WHOLE_SEQ, bool raw_mode=false, bool return_sum=false ) const +.. ocv:function:: float CvBoost::predict( const CvMat* sample, const CvMat* missing=0, CvMat* weak_responses=0, CvSlice slice=CV_WHOLE_SEQ, bool raw_mode=false, bool return_sum=false ) const .. ocv:pyfunction:: cv2.Boost.predict(sample[, missing[, slice[, rawMode[, returnSum]]]]) -> retval @@ -193,7 +193,7 @@ CvBoost::prune -------------- Removes the specified weak classifiers. -.. ocv:function::void CvBoost::prune( CvSlice slice ) +.. ocv:function:: void CvBoost::prune( CvSlice slice ) .. ocv:pyfunction:: cv2.Boost.prune(slice) -> None @@ -208,7 +208,7 @@ CvBoost::calc_error ------------------- Returns error of the boosted tree classifier. -.. ocv:function::float CvBoost::calc_error( CvMLData* _data, int type , std::vector *resp = 0 ) +.. ocv:function:: float CvBoost::calc_error( CvMLData* _data, int type , std::vector *resp = 0 ) The method is identical to :ocv:func:`CvDTree::calc_error` but uses the boosted tree classifier as predictor. @@ -217,7 +217,7 @@ CvBoost::get_weak_predictors ---------------------------- Returns the sequence of weak tree classifiers. -.. ocv:function::CvSeq* CvBoost::get_weak_predictors() +.. ocv:function:: CvSeq* CvBoost::get_weak_predictors() The method returns the sequence of weak classifiers. Each element of the sequence is a pointer to the :ocv:class:`CvBoostTree` class or to some of its derivatives. @@ -232,5 +232,5 @@ CvBoost::get_data ----------------- Returns used train data of the boosted tree classifier. -.. ocv:function::const CvDTreeTrainData* CvBoost::get_data() const +.. ocv:function:: const CvDTreeTrainData* CvBoost::get_data() const diff --git a/modules/ml/doc/decision_trees.rst b/modules/ml/doc/decision_trees.rst index 1c84e17e7e..7539b2b025 100644 --- a/modules/ml/doc/decision_trees.rst +++ b/modules/ml/doc/decision_trees.rst @@ -80,23 +80,21 @@ The structure represents a possible decision tree node split. It has public memb .. ocv:member:: int[] subset - Bit array indicating the value subset in case of split on a categorical variable. The rule is: + Bit array indicating the value subset in case of split on a categorical variable. The rule is: :: -:: + if var_value in subset + then next_node <- left + else next_node <- right - if var_value in subset - then next_node <- left - else next_node <- right - -.. ocv:member:: float ord.c +.. ocv:member:: float ord::c The threshold value in case of split on an ordered variable. The rule is: :: - if var_value < c + if var_value < ord.c then next_node<-left else next_node<-right -.. ocv:member:: int ord.split_point +.. ocv:member:: int ord::split_point Used internally by the training algorithm. @@ -225,11 +223,11 @@ Trains a decision tree. .. ocv:function:: bool CvDTree::train( const Mat& train_data, int tflag, const Mat& responses, const Mat& var_idx=Mat(), const Mat& sample_idx=Mat(), const Mat& var_type=Mat(), const Mat& missing_mask=Mat(), CvDTreeParams params=CvDTreeParams() ) -.. ocv:function::bool CvDTree::train( const CvMat* trainData, int tflag, const CvMat* responses, const CvMat* varIdx=0, const CvMat* sampleIdx=0, const CvMat* varType=0, const CvMat* missingDataMask=0, CvDTreeParams params=CvDTreeParams() ) +.. ocv:function:: bool CvDTree::train( const CvMat* trainData, int tflag, const CvMat* responses, const CvMat* varIdx=0, const CvMat* sampleIdx=0, const CvMat* varType=0, const CvMat* missingDataMask=0, CvDTreeParams params=CvDTreeParams() ) -.. ocv:function::bool CvDTree::train( CvMLData* trainData, CvDTreeParams params=CvDTreeParams() ) +.. ocv:function:: bool CvDTree::train( CvMLData* trainData, CvDTreeParams params=CvDTreeParams() ) -.. ocv:function::bool CvDTree::train( CvDTreeTrainData* trainData, const CvMat* subsampleIdx ) +.. ocv:function:: bool CvDTree::train( CvDTreeTrainData* trainData, const CvMat* subsampleIdx ) .. ocv:pyfunction:: cv2.DTree.train(trainData, tflag, responses[, varIdx[, sampleIdx[, varType[, missingDataMask[, params]]]]]) -> retval @@ -249,7 +247,7 @@ Returns the leaf node of a decision tree corresponding to the input vector. .. ocv:function:: CvDTreeNode* CvDTree::predict( const Mat& sample, const Mat& missingDataMask=Mat(), bool preprocessedInput=false ) const -.. ocv:function::CvDTreeNode* CvDTree::predict( const CvMat* sample, const CvMat* missingDataMask=0, bool preprocessedInput=false ) const +.. ocv:function:: CvDTreeNode* CvDTree::predict( const CvMat* sample, const CvMat* missingDataMask=0, bool preprocessedInput=false ) const .. ocv:pyfunction:: cv2.DTree.predict(sample[, missingDataMask[, preprocessedInput]]) -> retval @@ -267,7 +265,7 @@ CvDTree::calc_error ------------------- Returns error of the decision tree. -.. ocv:function::float CvDTree::calc_error( CvMLData* trainData, int type, std::vector *resp = 0 ) +.. ocv:function:: float CvDTree::calc_error( CvMLData* trainData, int type, std::vector *resp = 0 ) :param data: Data for the decision tree. @@ -288,7 +286,7 @@ Returns the variable importance array. .. ocv:function:: Mat CvDTree::getVarImportance() -.. ocv:function::const CvMat* CvDTree::get_var_importance() +.. ocv:function:: const CvMat* CvDTree::get_var_importance() .. ocv:pyfunction:: cv2.DTree.getVarImportance() -> importanceVector @@ -311,7 +309,7 @@ CvDTree::get_data ----------------- Returns used train data of the decision tree. -.. ocv:function::const CvDTreeTrainData* CvDTree::get_data() const +.. ocv:function:: const CvDTreeTrainData* CvDTree::get_data() const Example: building a tree for classifying mushrooms. See the ``mushroom.cpp`` sample that demonstrates how to build and use the decision tree. diff --git a/modules/ml/doc/expectation_maximization.rst b/modules/ml/doc/expectation_maximization.rst index 16ca6a7690..820583ac55 100644 --- a/modules/ml/doc/expectation_maximization.rst +++ b/modules/ml/doc/expectation_maximization.rst @@ -176,7 +176,7 @@ Unlike many of the ML models, EM is an unsupervised learning algorithm and it do :math:`\texttt{labels}_i=\texttt{arg max}_k(p_{i,k}), i=1..N` (indices of the most probable mixture component for each sample). The trained model can be used further for prediction, just like any other classifier. The trained model is similar to the -:ocv:class:`CvBayesClassifier`. +:ocv:class:`CvNormalBayesClassifier`. For an example of clustering random samples of the multi-Gaussian distribution using EM, see ``em.cpp`` sample in the OpenCV distribution. diff --git a/modules/ml/doc/gradient_boosted_trees.rst b/modules/ml/doc/gradient_boosted_trees.rst index e16a52653c..38e0481e58 100644 --- a/modules/ml/doc/gradient_boosted_trees.rst +++ b/modules/ml/doc/gradient_boosted_trees.rst @@ -161,7 +161,7 @@ Default and training constructors. .. ocv:function:: CvGBTrees::CvGBTrees( const Mat& trainData, int tflag, const Mat& responses, const Mat& varIdx=Mat(), const Mat& sampleIdx=Mat(), const Mat& varType=Mat(), const Mat& missingDataMask=Mat(), CvGBTreesParams params=CvGBTreesParams() ) -.. ocv:function::CvGBTrees::CvGBTrees( const CvMat* trainData, int tflag, const CvMat* responses, const CvMat* varIdx=0, const CvMat* sampleIdx=0, const CvMat* varType=0, const CvMat* missingDataMask=0, CvGBTreesParams params=CvGBTreesParams() ) +.. ocv:function:: CvGBTrees::CvGBTrees( const CvMat* trainData, int tflag, const CvMat* responses, const CvMat* varIdx=0, const CvMat* sampleIdx=0, const CvMat* varType=0, const CvMat* missingDataMask=0, CvGBTreesParams params=CvGBTreesParams() ) .. ocv:pyfunction:: cv2.GBTrees([trainData, tflag, responses[, varIdx[, sampleIdx[, varType[, missingDataMask[, params]]]]]]) -> @@ -173,9 +173,9 @@ Trains a Gradient boosted tree model. .. ocv:function:: bool CvGBTrees::train(const Mat& trainData, int tflag, const Mat& responses, const Mat& varIdx=Mat(), const Mat& sampleIdx=Mat(), const Mat& varType=Mat(), const Mat& missingDataMask=Mat(), CvGBTreesParams params=CvGBTreesParams(), bool update=false) -.. ocv:function::bool CvGBTrees::train( const CvMat* trainData, int tflag, const CvMat* responses, const CvMat* varIdx=0, const CvMat* sampleIdx=0, const CvMat* varType=0, const CvMat* missingDataMask=0, CvGBTreesParams params=CvGBTreesParams(), bool update=false ) +.. ocv:function:: bool CvGBTrees::train( const CvMat* trainData, int tflag, const CvMat* responses, const CvMat* varIdx=0, const CvMat* sampleIdx=0, const CvMat* varType=0, const CvMat* missingDataMask=0, CvGBTreesParams params=CvGBTreesParams(), bool update=false ) -.. ocv:function::bool CvGBTrees::train(CvMLData* data, CvGBTreesParams params=CvGBTreesParams(), bool update=false) +.. ocv:function:: bool CvGBTrees::train(CvMLData* data, CvGBTreesParams params=CvGBTreesParams(), bool update=false) .. ocv:pyfunction:: cv2.GBTrees.train(trainData, tflag, responses[, varIdx[, sampleIdx[, varType[, missingDataMask[, params[, update]]]]]]) -> retval @@ -200,7 +200,7 @@ Predicts a response for an input sample. .. ocv:function:: float CvGBTrees::predict(const Mat& sample, const Mat& missing=Mat(), const Range& slice = Range::all(), int k=-1) const -.. ocv:function::float CvGBTrees::predict( const CvMat* sample, const CvMat* missing=0, CvMat* weakResponses=0, CvSlice slice = CV_WHOLE_SEQ, int k=-1 ) const +.. ocv:function:: float CvGBTrees::predict( const CvMat* sample, const CvMat* missing=0, CvMat* weakResponses=0, CvSlice slice = CV_WHOLE_SEQ, int k=-1 ) const .. ocv:pyfunction:: cv2.GBTrees.predict(sample[, missing[, slice[, k]]]) -> retval @@ -232,7 +232,7 @@ Predicts a response for an input sample. The method predicts the response corresponding to the given sample (see :ref:`Predicting with GBT`). The result is either the class label or the estimated function value. The -:ocv:func:`predict` method enables using the parallel version of the GBT model +:ocv:func:`CvGBTrees::predict` method enables using the parallel version of the GBT model prediction if the OpenCV is built with the TBB library. In this case, predictions of single trees are computed in a parallel fashion. @@ -264,7 +264,7 @@ Calculates a training or testing error. :param resp: If non-zero, a vector of predictions on the corresponding data set is returned. -If the :ocv:class:`CvMLData` data is used to store the data set, :ocv:func:`calc_error` can be +If the :ocv:class:`CvMLData` data is used to store the data set, :ocv:func:`CvGBTrees::calc_error` can be used to get a training/testing error easily and (optionally) all predictions on the training/testing set. If the Intel* TBB* library is used, the error is computed in a parallel way, namely, predictions for different samples are computed at the same time. diff --git a/modules/ml/doc/k_nearest_neighbors.rst b/modules/ml/doc/k_nearest_neighbors.rst index d4f225f52c..40059d98ff 100644 --- a/modules/ml/doc/k_nearest_neighbors.rst +++ b/modules/ml/doc/k_nearest_neighbors.rst @@ -19,7 +19,7 @@ Default and training constructors. .. ocv:function:: CvKNearest::CvKNearest( const Mat& trainData, const Mat& responses, const Mat& sampleIdx=Mat(), bool isRegression=false, int max_k=32 ) -.. ocv:function::CvKNearest::CvKNearest( const CvMat* trainData, const CvMat* responses, const CvMat* sampleIdx=0, bool isRegression=false, int max_k=32 ) +.. ocv:function:: CvKNearest::CvKNearest( const CvMat* trainData, const CvMat* responses, const CvMat* sampleIdx=0, bool isRegression=false, int max_k=32 ) See :ocv:func:`CvKNearest::train` for additional parameters descriptions. @@ -29,7 +29,7 @@ Trains the model. .. ocv:function:: bool CvKNearest::train( const Mat& trainData, const Mat& responses, const Mat& sampleIdx=Mat(), bool isRegression=false, int maxK=32, bool updateBase=false ) -.. ocv:function::bool CvKNearest::train( const CvMat* trainData, const CvMat* responses, const CvMat* sampleIdx=0, bool is_regression=false, int maxK=32, bool updateBase=false ) +.. ocv:function:: bool CvKNearest::train( const CvMat* trainData, const CvMat* responses, const CvMat* sampleIdx=0, bool is_regression=false, int maxK=32, bool updateBase=false ) .. ocv:pyfunction:: cv2.KNearest.train(trainData, responses[, sampleIdx[, isRegression[, maxK[, updateBase]]]]) -> retval @@ -39,7 +39,7 @@ Trains the model. :param updateBase: Specifies whether the model is trained from scratch (``update_base=false``), or it is updated using the new training data (``update_base=true``). In the latter case, the parameter ``maxK`` must not be larger than the original value. -The method trains the K-Nearest model. It follows the conventions of the generic :ocv:func:`CvStataModel::train` approach with the following limitations: +The method trains the K-Nearest model. It follows the conventions of the generic :ocv:func:`CvStatModel::train` approach with the following limitations: * Only ``CV_ROW_SAMPLE`` data layout is supported. * Input variables are all ordered. @@ -54,7 +54,7 @@ Finds the neighbors and predicts responses for input vectors. .. ocv:function:: float CvKNearest::find_nearest( const Mat& samples, int k, Mat& results, Mat& neighborResponses, Mat& dists) const -.. ocv:function::float CvKNearest::find_nearest( const CvMat* samples, int k, CvMat* results=0, const float** neighbors=0, CvMat* neighborResponses=0, CvMat* dist=0 ) const +.. ocv:function:: float CvKNearest::find_nearest( const CvMat* samples, int k, CvMat* results=0, const float** neighbors=0, CvMat* neighborResponses=0, CvMat* dist=0 ) const .. ocv:pyfunction:: cv2.KNearest.find_nearest(samples, k[, results[, neighborResponses[, dists]]]) -> retval, results, neighborResponses, dists diff --git a/modules/ml/doc/neural_networks.rst b/modules/ml/doc/neural_networks.rst index ea5c8bcbb2..d08620da09 100644 --- a/modules/ml/doc/neural_networks.rst +++ b/modules/ml/doc/neural_networks.rst @@ -71,7 +71,7 @@ so the error on the test set usually starts increasing after the network size reaches a limit. Besides, the larger networks are trained much longer than the smaller ones, so it is reasonable to pre-process the data, using -:ocv:func:`PCA::operator()` or similar technique, and train a smaller network +:ocv:funcx:`PCA::operator()` or similar technique, and train a smaller network on only essential features. Another MPL feature is an inability to handle categorical @@ -182,7 +182,7 @@ The constructors. .. ocv:function:: CvANN_MLP::CvANN_MLP() -.. ocv:function::CvANN_MLP::CvANN_MLP( const CvMat* layerSizes, int activateFunc=CvANN_MLP::SIGMOID_SYM, double fparam1=0, double fparam2=0 ) +.. ocv:function:: CvANN_MLP::CvANN_MLP( const CvMat* layerSizes, int activateFunc=CvANN_MLP::SIGMOID_SYM, double fparam1=0, double fparam2=0 ) .. ocv:pyfunction:: cv2.ANN_MLP(layerSizes[, activateFunc[, fparam1[, fparam2]]]) -> @@ -194,7 +194,7 @@ Constructs MLP with the specified topology. .. ocv:function:: void CvANN_MLP::create( const Mat& layerSizes, int activateFunc=CvANN_MLP::SIGMOID_SYM, double fparam1=0, double fparam2=0 ) -.. ocv:function::void CvANN_MLP::create( const CvMat* layerSizes, int activateFunc=CvANN_MLP::SIGMOID_SYM, double fparam1=0, double fparam2=0 ) +.. ocv:function:: void CvANN_MLP::create( const CvMat* layerSizes, int activateFunc=CvANN_MLP::SIGMOID_SYM, double fparam1=0, double fparam2=0 ) .. ocv:pyfunction:: cv2.ANN_MLP.create(layerSizes[, activateFunc[, fparam1[, fparam2]]]) -> None @@ -212,7 +212,7 @@ Trains/updates MLP. .. ocv:function:: int CvANN_MLP::train( const Mat& inputs, const Mat& outputs, const Mat& sampleWeights, const Mat& sampleIdx=Mat(), CvANN_MLP_TrainParams params = CvANN_MLP_TrainParams(), int flags=0 ) -.. ocv:function::int CvANN_MLP::train( const CvMat* inputs, const CvMat* outputs, const CvMat* sampleWeights, const CvMat* sampleIdx=0, CvANN_MLP_TrainParams params = CvANN_MLP_TrainParams(), int flags=0 ) +.. ocv:function:: int CvANN_MLP::train( const CvMat* inputs, const CvMat* outputs, const CvMat* sampleWeights, const CvMat* sampleIdx=0, CvANN_MLP_TrainParams params = CvANN_MLP_TrainParams(), int flags=0 ) .. ocv:pyfunction:: cv2.ANN_MLP.train(inputs, outputs, sampleWeights[, sampleIdx[, params[, flags]]]) -> niterations @@ -242,7 +242,7 @@ Predicts responses for input samples. .. ocv:function:: float CvANN_MLP::predict( const Mat& inputs, Mat& outputs ) const -.. ocv:function::float CvANN_MLP::predict( const CvMat* inputs, CvMat* outputs ) const +.. ocv:function:: float CvANN_MLP::predict( const CvMat* inputs, CvMat* outputs ) const .. ocv:pyfunction:: cv2.ANN_MLP.predict(inputs, outputs) -> retval @@ -262,7 +262,7 @@ CvANN_MLP::get_layer_sizes -------------------------- Returns numbers of neurons in each layer of the MLP. -.. ocv:function::const CvMat* CvANN_MLP::get_layer_sizes() +.. ocv:function:: const CvMat* CvANN_MLP::get_layer_sizes() The method returns the integer vector specifying the number of neurons in each layer including the input and output layers of the MLP. diff --git a/modules/ml/doc/normal_bayes_classifier.rst b/modules/ml/doc/normal_bayes_classifier.rst index 42af24d1f6..6e21958623 100644 --- a/modules/ml/doc/normal_bayes_classifier.rst +++ b/modules/ml/doc/normal_bayes_classifier.rst @@ -23,7 +23,7 @@ Default and training constructors. .. ocv:function:: CvNormalBayesClassifier::CvNormalBayesClassifier( const Mat& trainData, const Mat& responses, const Mat& varIdx=Mat(), const Mat& sampleIdx=Mat() ) -.. ocv:function::CvNormalBayesClassifier::CvNormalBayesClassifier( const CvMat* trainData, const CvMat* responses, const CvMat* varIdx=0, const CvMat* sampleIdx=0 ) +.. ocv:function:: CvNormalBayesClassifier::CvNormalBayesClassifier( const CvMat* trainData, const CvMat* responses, const CvMat* varIdx=0, const CvMat* sampleIdx=0 ) .. ocv:pyfunction:: cv2.NormalBayesClassifier(trainData, responses[, varIdx[, sampleIdx]]) -> @@ -35,7 +35,7 @@ Trains the model. .. ocv:function:: bool CvNormalBayesClassifier::train( const Mat& trainData, const Mat& responses, const Mat& varIdx = Mat(), const Mat& sampleIdx=Mat(), bool update=false ) -.. ocv:function::bool CvNormalBayesClassifier::train( const CvMat* trainData, const CvMat* responses, const CvMat* varIdx = 0, const CvMat* sampleIdx=0, bool update=false ) +.. ocv:function:: bool CvNormalBayesClassifier::train( const CvMat* trainData, const CvMat* responses, const CvMat* varIdx = 0, const CvMat* sampleIdx=0, bool update=false ) .. ocv:pyfunction:: cv2.NormalBayesClassifier.train(trainData, responses[, varIdx[, sampleIdx[, update]]]) -> retval @@ -54,7 +54,7 @@ Predicts the response for sample(s). .. ocv:function:: float CvNormalBayesClassifier::predict( const Mat& samples, Mat* results=0 ) const -.. ocv:function::float CvNormalBayesClassifier::predict( const CvMat* samples, CvMat* results=0 ) const +.. ocv:function:: float CvNormalBayesClassifier::predict( const CvMat* samples, CvMat* results=0 ) const .. ocv:pyfunction:: cv2.NormalBayesClassifier.predict(samples) -> retval, results diff --git a/modules/ml/doc/random_trees.rst b/modules/ml/doc/random_trees.rst index 84a50c27db..e3f2f89f2d 100644 --- a/modules/ml/doc/random_trees.rst +++ b/modules/ml/doc/random_trees.rst @@ -98,9 +98,9 @@ Trains the Random Trees model. .. ocv:function:: bool CvRTrees::train( const Mat& trainData, int tflag, const Mat& responses, const Mat& varIdx=Mat(), const Mat& sampleIdx=Mat(), const Mat& varType=Mat(), const Mat& missingDataMask=Mat(), CvRTParams params=CvRTParams() ) -.. ocv:function::bool CvRTrees::train( const CvMat* trainData, int tflag, const CvMat* responses, const CvMat* varIdx=0, const CvMat* sampleIdx=0, const CvMat* varType=0, const CvMat* missingDataMask=0, CvRTParams params=CvRTParams() ) +.. ocv:function:: bool CvRTrees::train( const CvMat* trainData, int tflag, const CvMat* responses, const CvMat* varIdx=0, const CvMat* sampleIdx=0, const CvMat* varType=0, const CvMat* missingDataMask=0, CvRTParams params=CvRTParams() ) -.. ocv:function::bool CvRTrees::train( CvMLData* data, CvRTParams params=CvRTParams() ) +.. ocv:function:: bool CvRTrees::train( CvMLData* data, CvRTParams params=CvRTParams() ) .. ocv:pyfunction:: cv2.RTrees.train(trainData, tflag, responses[, varIdx[, sampleIdx[, varType[, missingDataMask[, params]]]]]) -> retval @@ -112,7 +112,7 @@ Predicts the output for an input sample. .. ocv:function:: double CvRTrees::predict( const Mat& sample, const Mat& missing=Mat() ) const -.. ocv:function::float CvRTrees::predict( const CvMat* sample, const CvMat* missing = 0 ) const +.. ocv:function:: float CvRTrees::predict( const CvMat* sample, const CvMat* missing = 0 ) const .. ocv:pyfunction:: cv2.RTrees.predict(sample[, missing]) -> retval @@ -129,7 +129,7 @@ Returns a fuzzy-predicted class label. .. ocv:function:: float CvRTrees::predict_prob( const cv::Mat& sample, const cv::Mat& missing = cv::Mat() ) const -.. ocv:function::float CvRTrees::predict_prob( const CvMat* sample, const CvMat* missing = 0 ) const +.. ocv:function:: float CvRTrees::predict_prob( const CvMat* sample, const CvMat* missing = 0 ) const .. ocv:pyfunction:: cv2.RTrees.predict_prob(sample[, missing]) -> retval @@ -146,7 +146,7 @@ Returns the variable importance array. .. ocv:function:: Mat CvRTrees::getVarImportance() -.. ocv:function::const CvMat* CvRTrees::get_var_importance() +.. ocv:function:: const CvMat* CvRTrees::get_var_importance() .. ocv:pyfunction:: cv2.RTrees.getVarImportance() -> importanceVector @@ -157,7 +157,7 @@ CvRTrees::get_proximity ----------------------- Retrieves the proximity measure between two training samples. -.. ocv:function::float CvRTrees::get_proximity( const CvMat* sample1, const CvMat* sample2, const CvMat* missing1 = 0, const CvMat* missing2 = 0 ) const +.. ocv:function:: float CvRTrees::get_proximity( const CvMat* sample1, const CvMat* sample2, const CvMat* missing1 = 0, const CvMat* missing2 = 0 ) const :param sample_1: The first sample. @@ -173,7 +173,7 @@ CvRTrees::calc_error -------------------- Returns error of the random forest. -.. ocv:function::float CvRTrees::calc_error( CvMLData* data, int type, std::vector *resp = 0 ) +.. ocv:function:: float CvRTrees::calc_error( CvMLData* data, int type, std::vector *resp = 0 ) The method is identical to :ocv:func:`CvDTree::calc_error` but uses the random forest as predictor. @@ -191,7 +191,7 @@ CvRTrees::get_rng ----------------- Returns the state of the used random number generator. -.. ocv:function::CvRNG* CvRTrees::get_rng() +.. ocv:function:: CvRNG* CvRTrees::get_rng() CvRTrees::get_tree_count diff --git a/modules/ml/doc/statistical_models.rst b/modules/ml/doc/statistical_models.rst index 8e2bb014dd..cb5465d216 100644 --- a/modules/ml/doc/statistical_models.rst +++ b/modules/ml/doc/statistical_models.rst @@ -120,7 +120,7 @@ Reads the model from the file storage. .. ocv:function:: void CvStatModel::read( CvFileStorage* storage, CvFileNode* node ) The method ``read`` restores the complete model state from the specified node of the file storage. Use the function -:ocv:func:`GetFileNodeByName` to locate the node. +:ocv:cfunc:`GetFileNodeByName` to locate the node. The previous model state is cleared by :ocv:func:`CvStatModel::clear`. diff --git a/modules/ml/doc/support_vector_machines.rst b/modules/ml/doc/support_vector_machines.rst index e0a54143be..1160da905e 100644 --- a/modules/ml/doc/support_vector_machines.rst +++ b/modules/ml/doc/support_vector_machines.rst @@ -158,7 +158,7 @@ Default and training constructors. .. ocv:function:: CvSVM::CvSVM( const Mat& trainData, const Mat& responses, const Mat& varIdx=Mat(), const Mat& sampleIdx=Mat(), CvSVMParams params=CvSVMParams() ) -.. ocv:function::CvSVM::CvSVM( const CvMat* trainData, const CvMat* responses, const CvMat* varIdx=0, const CvMat* sampleIdx=0, CvSVMParams params=CvSVMParams() ) +.. ocv:function:: CvSVM::CvSVM( const CvMat* trainData, const CvMat* responses, const CvMat* varIdx=0, const CvMat* sampleIdx=0, CvSVMParams params=CvSVMParams() ) .. ocv:pyfunction:: cv2.SVM(trainData, responses[, varIdx[, sampleIdx[, params]]]) -> @@ -170,7 +170,7 @@ Trains an SVM. .. ocv:function:: bool CvSVM::train( const Mat& trainData, const Mat& responses, const Mat& varIdx=Mat(), const Mat& sampleIdx=Mat(), CvSVMParams params=CvSVMParams() ) -.. ocv:function::bool CvSVM::train( const CvMat* trainData, const CvMat* responses, const CvMat* varIdx=0, const CvMat* sampleIdx=0, CvSVMParams params=CvSVMParams() ) +.. ocv:function:: bool CvSVM::train( const CvMat* trainData, const CvMat* responses, const CvMat* varIdx=0, const CvMat* sampleIdx=0, CvSVMParams params=CvSVMParams() ) .. ocv:pyfunction:: cv2.SVM.train(trainData, responses[, varIdx[, sampleIdx[, params]]]) -> retval @@ -194,7 +194,7 @@ Trains an SVM with optimal parameters. .. ocv:function:: bool CvSVM::train_auto( const Mat& trainData, const Mat& responses, const Mat& varIdx, const Mat& sampleIdx, CvSVMParams params, int k_fold = 10, CvParamGrid Cgrid = CvSVM::get_default_grid(CvSVM::C), CvParamGrid gammaGrid = CvSVM::get_default_grid(CvSVM::GAMMA), CvParamGrid pGrid = CvSVM::get_default_grid(CvSVM::P), CvParamGrid nuGrid = CvSVM::get_default_grid(CvSVM::NU), CvParamGrid coeffGrid = CvSVM::get_default_grid(CvSVM::COEF), CvParamGrid degreeGrid = CvSVM::get_default_grid(CvSVM::DEGREE), bool balanced=false) -.. ocv:function::bool CvSVM::train_auto( const CvMat* trainData, const CvMat* responses, const CvMat* varIdx, const CvMat* sampleIdx, CvSVMParams params, int kfold = 10, CvParamGrid Cgrid = get_default_grid(CvSVM::C), CvParamGrid gammaGrid = get_default_grid(CvSVM::GAMMA), CvParamGrid pGrid = get_default_grid(CvSVM::P), CvParamGrid nuGrid = get_default_grid(CvSVM::NU), CvParamGrid coeffGrid = get_default_grid(CvSVM::COEF), CvParamGrid degreeGrid = get_default_grid(CvSVM::DEGREE), bool balanced=false ) +.. ocv:function:: bool CvSVM::train_auto( const CvMat* trainData, const CvMat* responses, const CvMat* varIdx, const CvMat* sampleIdx, CvSVMParams params, int kfold = 10, CvParamGrid Cgrid = get_default_grid(CvSVM::C), CvParamGrid gammaGrid = get_default_grid(CvSVM::GAMMA), CvParamGrid pGrid = get_default_grid(CvSVM::P), CvParamGrid nuGrid = get_default_grid(CvSVM::NU), CvParamGrid coeffGrid = get_default_grid(CvSVM::COEF), CvParamGrid degreeGrid = get_default_grid(CvSVM::DEGREE), bool balanced=false ) .. ocv:pyfunction:: cv2.SVM.train_auto(trainData, responses, varIdx, sampleIdx, params[, k_fold[, Cgrid[, gammaGrid[, pGrid[, nuGrid[, coeffGrid[, degreeGrid[, balanced]]]]]]]]) -> retval @@ -226,9 +226,9 @@ Predicts the response for input sample(s). .. ocv:function:: float CvSVM::predict( const Mat& sample, bool returnDFVal=false ) const -.. ocv:function::float CvSVM::predict( const CvMat* sample, bool returnDFVal=false ) const +.. ocv:function:: float CvSVM::predict( const CvMat* sample, bool returnDFVal=false ) const -.. ocv:function::float CvSVM::predict( const CvMat* samples, CvMat* results ) const +.. ocv:function:: float CvSVM::predict( const CvMat* samples, CvMat* results ) const .. ocv:pyfunction:: cv2.SVM.predict(sample[, returnDFVal]) -> retval diff --git a/modules/video/doc/motion_analysis_and_object_tracking.rst b/modules/video/doc/motion_analysis_and_object_tracking.rst index 13cd9bb907..783623a7f0 100644 --- a/modules/video/doc/motion_analysis_and_object_tracking.rst +++ b/modules/video/doc/motion_analysis_and_object_tracking.rst @@ -283,7 +283,7 @@ The function calculates a gradient orientation at each pixel \texttt{orientation} (x,y)= \arctan{\frac{d\texttt{mhi}/dy}{d\texttt{mhi}/dx}} In fact, -:ocv:func:`fastArctan` and +: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. @@ -562,7 +562,7 @@ Updates the background model and returns the foreground mask .. ocv:function:: void BackgroundSubtractorMOG::operator()(InputArray image, OutputArray fgmask, double learningRate=0) -Parameters are the same as in ``BackgroundSubtractor::operator()`` +Parameters are the same as in :ocv:funcx:`BackgroundSubtractor::operator()` BackgroundSubtractorMOG2 @@ -573,39 +573,39 @@ Gaussian Mixture-based Backbround/Foreground Segmentation Algorithm. Here are important members of the class that control the algorithm, which you can set after constructing the class instance: - :ocv:member:: nmixtures + .. ocv:member:: int nmixtures Maximum allowed number of mixture comonents. Actual number is determined dynamically per pixel. - :ocv:member:: backgroundRatio + .. ocv:member:: float backgroundRatio Threshold defining whether the component is significant enough to be included into the background model ( corresponds to ``TB=1-cf`` from the paper??which paper??). ``cf=0.1 => TB=0.9`` is default. For ``alpha=0.001``, it means that the mode should exist for approximately 105 frames before it is considered foreground. - :ocv:member:: varThresholdGen + .. ocv:member:: float varThresholdGen Threshold for the squared Mahalanobis distance that helps decide when a sample is close to the existing components (corresponds to ``Tg``). If it is not close to any component, a new component is generated. ``3 sigma => Tg=3*3=9`` is default. A smaller ``Tg`` value generates more components. A higher ``Tg`` value may result in a small number of components but they can grow too large. - :ocv:member:: fVarInit + .. ocv:member:: float fVarInit Initial variance for the newly generated components. It affects the speed of adaptation. The parameter value is based on your estimate of the typical standard deviation from the images. OpenCV uses 15 as a reasonable value. - :ocv:member:: + .. ocv:member:: float fVarMin - fVarMin Parameter used to further control the variance. + Parameter used to further control the variance. - :ocv:member:: + .. ocv:member:: float fVarMax - fVarMax Parameter used to further control the variance. + Parameter used to further control the variance. - :ocv:member:: fCT + .. ocv:member:: float fCT Complexity reduction parameter. This parameter defines the number of samples needed to accept to prove the component exists. ``CT=0.05`` is a default value for all the samples. By setting ``CT=0`` you get an algorithm very similar to the standard Stauffer&Grimson algorithm. - :param nShadowDetection + .. ocv:member:: uchar nShadowDetection The value for marking shadow pixels in the output foreground mask. Default value is 127. - :param fTau + .. ocv:member:: float fTau Shadow threshold. The shadow is detected if the pixel is a darker version of the background. ``Tau`` is a threshold defining how much darker the shadow can be. ``Tau= 0.5`` means that if a pixel is more than twice darker then it is not shadow. See Prati,Mikic,Trivedi,Cucchiarra, *Detecting Moving Shadows...*, IEEE PAMI,2003. @@ -639,7 +639,7 @@ Updates the background model and computes the foreground mask .. ocv:function:: void BackgroundSubtractorMOG2::operator()(InputArray image, OutputArray fgmask, double learningRate=-1) - See :ocv:func:`BackgroundSubtractor::operator()`. + See :ocv:funcx:`BackgroundSubtractor::operator()`. BackgroundSubtractorMOG2::getBackgroundImage