diff --git a/doc/ocv.py b/doc/ocv.py index 59d072b8ccae6ff954d8a31e04a84b564d70fddd..285ab0edeb0c97b4d263de156776e6e0013bd618 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*\) + | (<<|>>)=? | [!<>=/*%+|&^-]=? | \+\+ | -- - | (<<|>>)=? | ~ | && | \| | \|\| + | ~ | && | \| | \|\| | ->\*? | \, ''') @@ -1150,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: @@ -1418,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(), @@ -1458,8 +1459,13 @@ class OCVDomain(Domain): 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: diff --git a/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst b/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst index 0cf8100cb9f64dca1e94ac1a2fccddecd8bc1207..4d4c130c6db376a15103682d6ab6515a2f2becb4 100644 --- a/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst +++ b/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst @@ -921,7 +921,7 @@ Reprojects a disparity image to 3D space. :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``. @@ -1036,7 +1036,7 @@ Class for computing stereo correspondence using the block matching algorithm. :: Ptr state; }; -The class is a C++ wrapper for the associated functions. In particular, :ocv:func:`StereoBM::operator()` is the wrapper for +The class is a C++ wrapper for the associated functions. In particular, :ocv:funcx:`StereoBM::operator()` is the wrapper for :ocv:cfunc:`cvFindStereoCorrespondenceBM`. @@ -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). diff --git a/modules/core/doc/operations_on_arrays.rst b/modules/core/doc/operations_on_arrays.rst index 4e77428b5f3aa95b08c32415d824674519a72820..7019e74fd7032a75833ff748828b380fe0d5f2aa 100644 --- a/modules/core/doc/operations_on_arrays.rst +++ b/modules/core/doc/operations_on_arrays.rst @@ -2173,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()` . @@ -3115,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/ml/doc/decision_trees.rst b/modules/ml/doc/decision_trees.rst index e3d789b099a6c0654c1f60fa6afcafd67d92d5dd..7539b2b0254fead6f22cd0091613141e4ee6a097 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. diff --git a/modules/ml/doc/neural_networks.rst b/modules/ml/doc/neural_networks.rst index 68b7b843ab664268a24ca6b6f61003a1082c97c0..d08620da09f9fc4a8595c39c21c128cb55b24b65 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 diff --git a/modules/video/doc/motion_analysis_and_object_tracking.rst b/modules/video/doc/motion_analysis_and_object_tracking.rst index 512c2cb904f95f6bf1ac53c5b4001edde0200b1b..783623a7f0c8b90c42085f80790ed123800444f6 100644 --- a/modules/video/doc/motion_analysis_and_object_tracking.rst +++ b/modules/video/doc/motion_analysis_and_object_tracking.rst @@ -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 @@ -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