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

Updated rst configuration to read OpenCV version from sources; fixed several sphinx' warnings

上级 1956f32a
......@@ -11,7 +11,7 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
import sys, os, re
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
......@@ -47,11 +47,16 @@ copyright = u'2011, opencv dev team'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
version_file = open("../modules/core/include/opencv2/core/version.hpp", "rt").read()
version_major = re.search("^W*#\W*define\W+CV_MAJOR_VERSION\W+(\d+)\W*$", version_file, re.MULTILINE).group(1)
version_minor = re.search("^W*#\W*define\W+CV_MINOR_VERSION\W+(\d+)\W*$", version_file, re.MULTILINE).group(1)
version_patch = re.search("^W*#\W*define\W+CV_SUBMINOR_VERSION\W+(\d+)\W*$", version_file, re.MULTILINE).group(1)
# The short X.Y version.
version = '2.3'
version = version_major + '.' + version_minor
# The full version, including alpha/beta/rc tags.
release = '2.3.2'
release = version_major + '.' + version_minor + '.' + version_patch
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
......@@ -20,7 +20,7 @@ Note that ``opencv_traincascade`` application can use TBB for multi-threading. T
Also there are some auxilary utilities related to the training.
* ``opencv_createsamples`` is used to prepare a training dataset of positive and test samples. ``opencv_createsamples`` produces dataset of positive samples in a format that is supported by both ``opencv_haartraining`` and ``opencv_traincascade`` applications. The output is a file with *.vec extension, it is a binary format which contains images.
* ``opencv_createsamples`` is used to prepare a training dataset of positive and test samples. ``opencv_createsamples`` produces dataset of positive samples in a format that is supported by both ``opencv_haartraining`` and ``opencv_traincascade`` applications. The output is a file with \*.vec extension, it is a binary format which contains images.
* ``opencv_performance`` may be used to evaluate the quality of classifiers, but for trained by ``opencv_haartraining`` only. It takes a collection of marked up images, runs the classifier and reports the performance, i.e. number of found objects, number of missed objects, number of false alarms and other information.
......
......@@ -606,7 +606,7 @@ Downloads matrices obtained via :ocv:func:`gpu::BruteForceMatcher_GPU::radiusMat
.. ocv:function:: void gpu::BruteForceMatcher_GPU::radiusMatchDownload(const GpuMat& trainIdx, const GpuMat& distance, const GpuMat& nMatches, std::vector< std::vector<DMatch> >&matches, bool compactResult = false)
.. ocv:function:: void gpu::BruteForceMatcher_GPU::radiusMatchDownload(const GpuMat& trainIdx, const GpuMat& imgIdx, const GpuMat& distance, const GpuMat& nMatches, std::vector< std::vector<DMatch> >& matches, bool compactResult = false);
.. ocv:function:: void gpu::BruteForceMatcher_GPU::radiusMatchDownload(const GpuMat& trainIdx, const GpuMat& imgIdx, const GpuMat& distance, const GpuMat& nMatches, std::vector< std::vector<DMatch> >& matches, bool compactResult = false)
If ``compactResult`` is ``true`` , the ``matches`` vector does not contain matches for fully masked-out query descriptors.
......
......@@ -324,7 +324,7 @@ gpu::remap
--------------
Applies a generic geometrical transformation to an image.
.. ocv:function:: void gpu::remap(const GpuMat& src, GpuMat& dst, const GpuMat& xmap, const GpuMat& ymap, int interpolation, int borderMode = BORDER_CONSTANT, const Scalar& borderValue = Scalar(), Stream& stream = Stream::Null()
.. ocv:function:: void gpu::remap(const GpuMat& src, GpuMat& dst, const GpuMat& xmap, const GpuMat& ymap, int interpolation, int borderMode = BORDER_CONSTANT, const Scalar& borderValue = Scalar(), Stream& stream = Stream::Null())
:param src: Source image.
......@@ -678,7 +678,7 @@ Equalizes the histogram of a grayscale image.
gpu::buildWarpPlaneMaps
-------------------
-----------------------
Builds plane warping maps.
.. ocv:function:: void gpu::buildWarpPlaneMaps(Size src_size, Rect dst_roi, const Mat& R, double f, double s, double dist, GpuMat& map_x, GpuMat& map_y, Stream& stream = Stream::Null())
......@@ -688,7 +688,7 @@ Builds plane warping maps.
gpu::buildWarpCylindricalMaps
-------------------
-----------------------------
Builds cylindrical warping maps.
.. ocv:function:: void gpu::buildWarpCylindricalMaps(Size src_size, Rect dst_roi, const Mat& R, double f, double s, GpuMat& map_x, GpuMat& map_y, Stream& stream = Stream::Null())
......@@ -698,7 +698,7 @@ Builds cylindrical warping maps.
gpu::buildWarpSphericalMaps
-------------------
---------------------------
Builds spherical warping maps.
.. ocv:function:: void gpu::buildWarpSphericalMaps(Size src_size, Rect dst_roi, const Mat& R, double f, double s, GpuMat& map_x, GpuMat& map_y, Stream& stream = Stream::Null())
......
......@@ -10,7 +10,7 @@ gpu::meanStdDev
Computes a mean value and a standard deviation of matrix elements.
.. ocv:function:: void gpu::meanStdDev(const GpuMat& mtx, Scalar& mean, Scalar& stddev)
.. ocv:function:: void gpu::meanStdDev(const GpuMat& mtx, Scalar& mean, Scalar& stddev, GpuMat& buf);
.. ocv:function:: void gpu::meanStdDev(const GpuMat& mtx, Scalar& mean, Scalar& stddev, GpuMat& buf)
:param mtx: Source matrix. ``CV_8UC1`` matrices are supported for now.
......@@ -163,7 +163,7 @@ The function does not work with ``CV_64F`` images on GPUs with the compute capab
gpu::reduce
------
-----------
Reduces a matrix to a vector.
.. ocv:function:: void gpu::reduce(const GpuMat& mtx, GpuMat& vec, int dim, int reduceOp, int dtype = -1, Stream& stream = Stream::Null())
......
......@@ -109,7 +109,7 @@ addWeighted
---------------
Computes the weighted sum of two arrays.
.. ocv:function:: void gpu::addWeighted(const GpuMat& src1, double alpha, const GpuMat& src2, double beta, double gamma, GpuMat& dst, int dtype = -1, Stream& stream = Stream::Null());
.. ocv:function:: void gpu::addWeighted(const GpuMat& src1, double alpha, const GpuMat& src2, double beta, double gamma, GpuMat& dst, int dtype = -1, Stream& stream = Stream::Null())
:param src1: First source array.
......
......@@ -163,23 +163,28 @@ The function performs the following equations
*
Next it computes the forward DFTs of each source array:
.. math::
\mathbf{G}_a = \mathcal{F}\{src_1\}, \; \mathbf{G}_b = \mathcal{F}\{src_2\}
where
:math:`\mathcal{F}` is the forward DFT.
*
It then computes the cross-power spectrum of each frequency domain array:
.. math::
R = \frac{ \mathbf{G}_a \mathbf{G}_b^*}{|\mathbf{G}_a \mathbf{G}_b^*|}
*
Next the cross-correlation is converted back into the time domain via the inverse DFT:
.. math::
r = \mathcal{F}^{-1}\{R\}
*
Finally, it computes the peak location and computes a 5x5 weighted centroid around the peak to achieve sub-pixel accuracy.
.. math::
(\Delta x, \Delta y) = \texttt{weighted_centroid}\{\arg \max_{(x, y)}\{r\}\}
(\Delta x, \Delta y) = \texttt{weighted_centroid}\{\arg \max_{(x, y)}\{r\}\}
.. seealso::
:ocv:func:`dft`,
......
......@@ -212,7 +212,7 @@ Two types of constructors.
:param classNames: A set of trained models names. If it's empty then the name of each model will be constructed from the name of file containing the model. E.g. the model stored in "/home/user/cat.xml" will get the name "cat".
LatentSvmDetector::~LatentSvmDetector
------------------------------------
-------------------------------------
Destructor.
.. ocv:function:: LatentSvmDetector::~LatentSvmDetector()
......
......@@ -8,7 +8,6 @@ class TestInfo(object):
self.name = xmlnode.getAttribute("name")
self.value_param = xmlnode.getAttribute("value_param")
self.type_param = xmlnode.getAttribute("type_param")
self.name = xmlnode.getAttribute("name")
if xmlnode.getElementsByTagName("failure"):
self.status = "failed"
else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册