mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
improved look of the generated PDF and html docs; started merging reference manuals
This commit is contained in:
+11
-4
@@ -271,7 +271,7 @@ tt.descname {
|
||||
color: {{ theme_headtext_color }}
|
||||
background-color: #ecf0f3;
|
||||
padding: 0 1px 0 1px;
|
||||
font-size: 1.6em;
|
||||
font-size: 1.4em;
|
||||
}
|
||||
|
||||
div.math p {
|
||||
@@ -281,17 +281,24 @@ div.math p {
|
||||
|
||||
dl.function > dt:first-child {
|
||||
margin-bottom: 7px;
|
||||
background-color: #ecf0f3;
|
||||
}
|
||||
|
||||
dl.cfunction > dt:first-child {
|
||||
margin-bottom: 7px;
|
||||
background-color: #ecf0f3;
|
||||
color: #8080B0;
|
||||
}
|
||||
|
||||
dl.pyfunction > dt:first-child {
|
||||
margin-bottom: 7px;
|
||||
background-color: #ecf0f3;
|
||||
}
|
||||
|
||||
dl.pyoldfunction > dt:first-child {
|
||||
margin-bottom: 7px;
|
||||
color: #8080B0;
|
||||
}
|
||||
|
||||
dl.jfunction > dt:first-child {
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
|
||||
table.field-list {
|
||||
|
||||
+8
-2
@@ -170,7 +170,7 @@ htmlhelp_basename = 'opencv'
|
||||
|
||||
# OpenCV docs use some custom LaTeX macros in the formulae. Make sure we include the definitions
|
||||
pngmath_latex_preamble = r"""
|
||||
\usepackage{amssymb}\usepackage{amsmath}\usepackage{bbm}
|
||||
\usepackage{euler}\usepackage{amssymb}\usepackage{amsmath}\usepackage{bbm}
|
||||
\newcommand{\matTT}[9]{
|
||||
\[
|
||||
\left|\begin{array}{ccc}
|
||||
@@ -237,7 +237,13 @@ latex_documents = [
|
||||
u'', 'manual'),
|
||||
]
|
||||
|
||||
latex_elements = {'preamble': '\usepackage{mymath}\usepackage{amssymb}\usepackage{amsmath}\usepackage{bbm}\setcounter{secnumdepth}{1}'}
|
||||
preamble ="""
|
||||
\usepackage{euler}
|
||||
\usepackage[scaled=0.85]{beramono}
|
||||
\usepackage{mymath}\usepackage{amssymb}\usepackage{amsmath}\usepackage{bbm}\setcounter{secnumdepth}{1}
|
||||
"""
|
||||
|
||||
latex_elements = {'preamble': preamble}
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
|
||||
+31
-4
@@ -243,12 +243,13 @@ class OCVPyModulelevel(OCVPyObject):
|
||||
"""
|
||||
Description of an object on module level (functions, data).
|
||||
"""
|
||||
directive_prefix = 'py'
|
||||
|
||||
def needs_arglist(self):
|
||||
return self.objtype == 'pyfunction'
|
||||
return self.objtype == self.__class__.directive_prefix + 'function'
|
||||
|
||||
def get_index_text(self, modname, name_cls):
|
||||
if self.objtype == 'pyfunction':
|
||||
if self.objtype == self.__class__.directive_prefix + 'function':
|
||||
if not modname:
|
||||
fname = name_cls[0]
|
||||
if not fname.startswith("cv") and not fname.startswith("cv2"):
|
||||
@@ -265,6 +266,10 @@ class OCVPyModulelevel(OCVPyObject):
|
||||
else:
|
||||
return ''
|
||||
|
||||
class OCVPyOldModulelevel(OCVPyModulelevel):
|
||||
directive_prefix = 'pyold'
|
||||
pass
|
||||
|
||||
class OCVPyXRefRole(XRefRole):
|
||||
def process_link(self, env, refnode, has_explicit_title, title, target):
|
||||
refnode['ocv:module'] = env.temp_data.get('ocv:module')
|
||||
@@ -1075,6 +1080,8 @@ class DefinitionParser(object):
|
||||
class OCVObject(ObjectDescription):
|
||||
"""Description of a C++ language object."""
|
||||
|
||||
langname = "C++"
|
||||
|
||||
doc_field_types = [
|
||||
TypedField('parameter', label=l_('Parameters'),
|
||||
names=('param', 'parameter', 'arg', 'argument'),
|
||||
@@ -1104,7 +1111,8 @@ class OCVObject(ObjectDescription):
|
||||
node += pnode
|
||||
|
||||
def attach_modifiers(self, node, obj):
|
||||
node += nodes.strong("C++:", "C++:")
|
||||
lname = self.__class__.langname
|
||||
node += nodes.strong(lname + ":", lname + ":")
|
||||
node += addnodes.desc_name(" ", " ")
|
||||
if obj.visibility != 'public':
|
||||
node += addnodes.desc_annotation(obj.visibility,
|
||||
@@ -1259,7 +1267,8 @@ class OCVFunctionObject(OCVObject):
|
||||
node += addnodes.desc_addname(' = 0', ' = 0')
|
||||
|
||||
def get_index_text(self, name):
|
||||
return _('%s (C++ function)') % name
|
||||
lname = self.__class__.langname
|
||||
return _('%s (%s function)') % (name, lname)
|
||||
|
||||
def parse_definition(self, parser):
|
||||
return parser.parse_function()
|
||||
@@ -1322,6 +1331,13 @@ class OCVXRefRole(XRefRole):
|
||||
return title, target
|
||||
|
||||
|
||||
class OCVCFunctionObject(OCVFunctionObject):
|
||||
langname = "C"
|
||||
|
||||
class OCVJavaFunctionObject(OCVFunctionObject):
|
||||
langname = "Java"
|
||||
|
||||
|
||||
class OCVDomain(Domain):
|
||||
"""OpenCV C++ language domain."""
|
||||
name = 'ocv'
|
||||
@@ -1329,7 +1345,10 @@ class OCVDomain(Domain):
|
||||
object_types = {
|
||||
'class': ObjType(l_('class'), 'class'),
|
||||
'function': ObjType(l_('function'), 'func', 'funcx'),
|
||||
'cfunction': ObjType(l_('cfunction'), 'cfunc', 'cfuncx'),
|
||||
'jfunction': ObjType(l_('jfunction'), 'jfunc', 'jfuncx'),
|
||||
'pyfunction': ObjType(l_('pyfunction'), 'pyfunc'),
|
||||
'pyoldfunction': ObjType(l_('pyoldfunction'), 'pyoldfunc'),
|
||||
'member': ObjType(l_('member'), 'member'),
|
||||
'type': ObjType(l_('type'), 'type')
|
||||
}
|
||||
@@ -1337,7 +1356,10 @@ class OCVDomain(Domain):
|
||||
directives = {
|
||||
'class': OCVClassObject,
|
||||
'function': OCVFunctionObject,
|
||||
'cfunction': OCVCFunctionObject,
|
||||
'jfunction': OCVJavaFunctionObject,
|
||||
'pyfunction': OCVPyModulelevel,
|
||||
'pyoldfunction': OCVPyOldModulelevel,
|
||||
'member': OCVMemberObject,
|
||||
'type': OCVTypeObject,
|
||||
'namespace': OCVCurrentNamespace
|
||||
@@ -1346,7 +1368,12 @@ class OCVDomain(Domain):
|
||||
'class': OCVXRefRole(),
|
||||
'func' : OCVXRefRole(fix_parens=True),
|
||||
'funcx' : OCVXRefRole(),
|
||||
'cfunc' : OCVXRefRole(fix_parens=True),
|
||||
'cfunc' : OCVXRefRole(),
|
||||
'jfunc' : OCVXRefRole(fix_parens=True),
|
||||
'jfunc' : OCVXRefRole(),
|
||||
'pyfunc' : OCVPyXRefRole(),
|
||||
'pyoldfunc' : OCVPyXRefRole(),
|
||||
'member': OCVXRefRole(),
|
||||
'type': OCVXRefRole()
|
||||
}
|
||||
|
||||
@@ -31,6 +31,16 @@ Computes the per-element absolute difference between two arrays or between an ar
|
||||
|
||||
.. ocv:function:: void absdiff(InputArray src1, InputArray src2, OutputArray dst)
|
||||
|
||||
.. ocv:pyfunction:: cv2.absdiff(src1, src2, [dst=None]) -> dst
|
||||
|
||||
.. ocv:pyoldfunction:: cv.AbsDiff(src1, src2, dst) -> None
|
||||
|
||||
.. ocv:pyoldfunction:: cv.AbsDiffS(src1, src2, dst) -> None
|
||||
|
||||
.. ocv:cfunction:: void cvAbsDiff(const CvArr* src1, const CvArr* src2, CvArr* dst)
|
||||
|
||||
.. ocv:cfunction:: void cvAbsDiffS(const CvArr* src1, CvScalar src2, CvArr* dst)
|
||||
|
||||
:param src1: First input array or a scalar.
|
||||
|
||||
:param src2: Second input array or a scalar.
|
||||
|
||||
@@ -52,7 +52,7 @@ Different variants of boosting are known as Discrete Adaboost, Real AdaBoost, Lo
|
||||
3.3. Set :math:`w_i \Leftarrow w_i exp[c_m 1_{(y_i \neq f_m(x_i))}], i = 1,2,...,N,` and renormalize so that :math:`\Sigma i w_i = 1` .
|
||||
|
||||
|
||||
#. Classify new samples *x* using the formula: :math:`\sign (\Sigma m = 1M c_m f_m(x))` .
|
||||
#. Classify new samples *x* using the formula: :math:`\textrm{sign} (\Sigma m = 1M c_m f_m(x))` .
|
||||
|
||||
|
||||
.. note:: Similar to the classical boosting methods, the current implementation supports two-class classifiers only. For M
|
||||
|
||||
Reference in New Issue
Block a user