提交 d7a9b99b 编写于 作者: A Andrey Kamaev

Documentation: fixed references for C++ operators

上级 23c15d56
......@@ -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:
......
......@@ -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<CvStereoBMState> 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).
......
......@@ -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 ()
......
......@@ -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.
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册