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

This commit is contained in:
Andrey Kamaev 2012-03-02 20:59:13 +00:00
parent 1956f32aac
commit aeaae8b057
9 changed files with 25 additions and 16 deletions

View File

@ -11,7 +11,7 @@
# All configuration values have a default; values that are commented out # All configuration values have a default; values that are commented out
# serve to show the default. # serve to show the default.
import sys, os import sys, os, re
# If extensions (or modules to document with autodoc) are in another directory, # 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 # 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 # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
# built documents. # 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. # The short X.Y version.
version = '2.3' version = version_major + '.' + version_minor
# The full version, including alpha/beta/rc tags. # 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 # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.

View File

@ -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. 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. * ``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.

View File

@ -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& 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. If ``compactResult`` is ``true`` , the ``matches`` vector does not contain matches for fully masked-out query descriptors.

View File

@ -324,7 +324,7 @@ gpu::remap
-------------- --------------
Applies a generic geometrical transformation to an image. 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. :param src: Source image.
@ -678,7 +678,7 @@ Equalizes the histogram of a grayscale image.
gpu::buildWarpPlaneMaps gpu::buildWarpPlaneMaps
------------------- -----------------------
Builds plane warping maps. 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()) .. 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 gpu::buildWarpCylindricalMaps
------------------- -----------------------------
Builds cylindrical warping maps. 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()) .. 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 gpu::buildWarpSphericalMaps
------------------- ---------------------------
Builds spherical warping maps. 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()) .. 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())

View File

@ -10,7 +10,7 @@ gpu::meanStdDev
Computes a mean value and a standard deviation of matrix elements. 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)
.. 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. :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 gpu::reduce
------ -----------
Reduces a matrix to a vector. 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()) .. ocv:function:: void gpu::reduce(const GpuMat& mtx, GpuMat& vec, int dim, int reduceOp, int dtype = -1, Stream& stream = Stream::Null())

View File

@ -109,7 +109,7 @@ addWeighted
--------------- ---------------
Computes the weighted sum of two arrays. 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. :param src1: First source array.

View File

@ -163,23 +163,28 @@ The function performs the following equations
* *
Next it computes the forward DFTs of each source array: Next it computes the forward DFTs of each source array:
.. math:: .. math::
\mathbf{G}_a = \mathcal{F}\{src_1\}, \; \mathbf{G}_b = \mathcal{F}\{src_2\} \mathbf{G}_a = \mathcal{F}\{src_1\}, \; \mathbf{G}_b = \mathcal{F}\{src_2\}
where where
:math:`\mathcal{F}` is the forward DFT. :math:`\mathcal{F}` is the forward DFT.
* *
It then computes the cross-power spectrum of each frequency domain array: It then computes the cross-power spectrum of each frequency domain array:
.. math:: .. math::
R = \frac{ \mathbf{G}_a \mathbf{G}_b^*}{|\mathbf{G}_a \mathbf{G}_b^*|} 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: Next the cross-correlation is converted back into the time domain via the inverse DFT:
.. math:: .. math::
r = \mathcal{F}^{-1}\{R\} 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. Finally, it computes the peak location and computes a 5x5 weighted centroid around the peak to achieve sub-pixel accuracy.
.. math:: .. 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:: .. seealso::
:ocv:func:`dft`, :ocv:func:`dft`,

View File

@ -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". :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 LatentSvmDetector::~LatentSvmDetector
------------------------------------ -------------------------------------
Destructor. Destructor.
.. ocv:function:: LatentSvmDetector::~LatentSvmDetector() .. ocv:function:: LatentSvmDetector::~LatentSvmDetector()

View File

@ -8,7 +8,6 @@ class TestInfo(object):
self.name = xmlnode.getAttribute("name") self.name = xmlnode.getAttribute("name")
self.value_param = xmlnode.getAttribute("value_param") self.value_param = xmlnode.getAttribute("value_param")
self.type_param = xmlnode.getAttribute("type_param") self.type_param = xmlnode.getAttribute("type_param")
self.name = xmlnode.getAttribute("name")
if xmlnode.getElementsByTagName("failure"): if xmlnode.getElementsByTagName("failure"):
self.status = "failed" self.status = "failed"
else: else: