From: Andrey Kamaev Date: Fri, 2 Mar 2012 20:59:13 +0000 (+0000) Subject: Updated rst configuration to read OpenCV version from sources; fixed several sphinx... X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~5424 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aeaae8b057cdba0aeada7cdffa5fa2bb9615c04a;p=platform%2Fupstream%2Fopencv.git Updated rst configuration to read OpenCV version from sources; fixed several sphinx' warnings --- diff --git a/doc/conf.py b/doc/conf.py index 5e41e79..30a9d15 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -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. diff --git a/doc/user_guide/ug_traincascade.rst b/doc/user_guide/ug_traincascade.rst index 4ac860e..cb5190b 100644 --- a/doc/user_guide/ug_traincascade.rst +++ b/doc/user_guide/ug_traincascade.rst @@ -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. diff --git a/modules/gpu/doc/feature_detection_and_description.rst b/modules/gpu/doc/feature_detection_and_description.rst index 3ad9126..aaa4714 100644 --- a/modules/gpu/doc/feature_detection_and_description.rst +++ b/modules/gpu/doc/feature_detection_and_description.rst @@ -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 >&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 >& 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 >& matches, bool compactResult = false) If ``compactResult`` is ``true`` , the ``matches`` vector does not contain matches for fully masked-out query descriptors. diff --git a/modules/gpu/doc/image_processing.rst b/modules/gpu/doc/image_processing.rst index e584958..70634f6 100644 --- a/modules/gpu/doc/image_processing.rst +++ b/modules/gpu/doc/image_processing.rst @@ -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()) diff --git a/modules/gpu/doc/matrix_reductions.rst b/modules/gpu/doc/matrix_reductions.rst index 26e420c..c24dc5c 100644 --- a/modules/gpu/doc/matrix_reductions.rst +++ b/modules/gpu/doc/matrix_reductions.rst @@ -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()) diff --git a/modules/gpu/doc/per_element_operations.rst b/modules/gpu/doc/per_element_operations.rst index a09b7a3..4fc4e1d 100644 --- a/modules/gpu/doc/per_element_operations.rst +++ b/modules/gpu/doc/per_element_operations.rst @@ -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. diff --git a/modules/imgproc/doc/motion_analysis_and_object_tracking.rst b/modules/imgproc/doc/motion_analysis_and_object_tracking.rst index 5e9e046..7cf22ee 100644 --- a/modules/imgproc/doc/motion_analysis_and_object_tracking.rst +++ b/modules/imgproc/doc/motion_analysis_and_object_tracking.rst @@ -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`, diff --git a/modules/objdetect/doc/latent_svm.rst b/modules/objdetect/doc/latent_svm.rst index ce45495..f262df6 100644 --- a/modules/objdetect/doc/latent_svm.rst +++ b/modules/objdetect/doc/latent_svm.rst @@ -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() diff --git a/modules/ts/misc/testlog_parser.py b/modules/ts/misc/testlog_parser.py index caab53d..c6bab20 100644 --- a/modules/ts/misc/testlog_parser.py +++ b/modules/ts/misc/testlog_parser.py @@ -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: