diff --git a/modules/core/doc/basic_structures.rst b/modules/core/doc/basic_structures.rst index a01dcf3c77..7e55558e8f 100644 --- a/modules/core/doc/basic_structures.rst +++ b/modules/core/doc/basic_structures.rst @@ -7,7 +7,7 @@ DataType -------- .. cpp:class:: DataType -Template "trait" class for other??sounds strange since we haven't introduced any typs before that?? OpenCV primitive data types. A primitive OpenCV data type is one of ``unsigned char``, ``bool``, ``signed char``, ``unsigned short``, ``signed short``, ``int``, ``float``, ``double``, or a tuple of values of one of these types, where all the values in the tuple have the same type. Any primitive type from the list can be defined by an identifier in the form ``CV_{U|S|F}C()``, for example: ``uchar`` ~ ``CV_8UC1``, 3-element floating-point tuple ~ ``CV_32FC3``, and so on. A universal OpenCV structure that is able to store a single instance of such a primitive data type is +Template "trait" class for OpenCV primitive data types. A primitive OpenCV data type is one of ``unsigned char``, ``bool``, ``signed char``, ``unsigned short``, ``signed short``, ``int``, ``float``, ``double``, or a tuple of values of one of these types, where all the values in the tuple have the same type. Any primitive type from the list can be defined by an identifier in the form ``CV_{U|S|F}C()``, for example: ``uchar`` ~ ``CV_8UC1``, 3-element floating-point tuple ~ ``CV_32FC3``, and so on. A universal OpenCV structure that is able to store a single instance of such a primitive data type is :cpp:class:`Vec`. Multiple instances of such a type can be stored in a ``std::vector``, ``Mat``, ``Mat_``, ``SparseMat``, ``SparseMat_``, or any other container that is able to store ``Vec`` instances. The ``DataType`` class is basically used to provide a description of such primitive data types without adding any fields or methods to the corresponding classes (and it is actually impossible to add anything to primitive C/C++ data types). This technique is known in C++ as class traits. It is not ``DataType`` itself that is used but its specialized versions, such as: :: @@ -552,7 +552,7 @@ There are many different ways to create a ``Mat`` object. The most popular optio .. - ??is the indent required here? does it apply to step 2 but not to the whole bulleted item??Partial yet very common cases of this *user-allocated data* case are conversions from ``CvMat`` and ``IplImage`` to ``Mat``. For this purpose, there are special constructors taking pointers to ``CvMat`` or ``IplImage`` and the optional flag indicating whether to copy the data or not. + Partial yet very common cases of this *user-allocated data* case are conversions from ``CvMat`` and ``IplImage`` to ``Mat``. For this purpose, there are special constructors taking pointers to ``CvMat`` or ``IplImage`` and the optional flag indicating whether to copy the data or not. Backward conversion from ``Mat`` to ``CvMat`` or ``IplImage`` is provided via cast operators ``Mat::operator CvMat() const`` and ``Mat::operator IplImage()``. The operators do NOT copy the data. @@ -723,7 +723,7 @@ Mat::Mat .. cpp:function:: Mat::Mat(const IplImage* img, bool copyData=false) -.. cpp:function:: template explicit Mat::Mat(const Vec& vec, bool copyData=true)??output is broken for these 3 methods?? +.. cpp:function:: template explicit Mat::Mat(const Vec& vec, bool copyData=true) .. cpp:function:: template explicit Mat::Mat(const Matx& vec, bool copyData=true) @@ -1477,8 +1477,7 @@ The method is used in quite a few of OpenCV functions. The point is that element This approach, while being very simple, can boost the performance of a simple element-operation by 10-20 percents, especially if the image is rather small and the operation is quite simple. Another OpenCV idiom in this function, a call of -:cpp:func:`Mat::create` for the destination array, already has the proper size and type.?? And while the newly allocated arrays are always continuous, you still check the destination array because -:cpp:func:`create` does not always allocate a new matrix. +:cpp:func:`Mat::create` for the destination array, that allocates the destination array unless it already has the proper size and type. And while the newly allocated arrays are always continuous, you still need to check the destination array because :cpp:func:`create` does not always allocate a new matrix. Mat::elemSize @@ -1574,7 +1573,7 @@ Mat::ptr .. cpp:function:: const uchar* Mat::ptr(int i=0) const -.. cpp:function:: template _Tp* Mat::ptr(int i=0)??again broken output?? +.. cpp:function:: template _Tp* Mat::ptr(int i=0) .. cpp:function:: template const _Tp* Mat::ptr(int i=0) const @@ -1588,7 +1587,7 @@ The methods return ``uchar*`` or typed pointer to the specified matrix row. See Mat::at ----------- -.. cpp:function:: template T& Mat::at(int i) const??again, is this the expected output?? +.. cpp:function:: template T& Mat::at(int i) const .. cpp:function:: template const T& Mat::at(int i) const @@ -1631,7 +1630,7 @@ The example below initializes a Hilbert matrix: :: Mat::begin -------------- -.. cpp:function:: template MatIterator_<_Tp> Mat::begin() template MatConstIterator_<_Tp> Mat::begin() const??see output?? +.. cpp:function:: template MatIterator_<_Tp> Mat::begin() template MatConstIterator_<_Tp> Mat::begin() const Returns the matrix iterator and sets it to the first matrix element. @@ -1670,7 +1669,7 @@ The methods return the matrix read-only or read-write iterators. The use of matr Mat::end ------------ -.. cpp:function:: template MatIterator_<_Tp> Mat::end() ??output?? +.. cpp:function:: template MatIterator_<_Tp> Mat::end() .. cpp:function:: template MatConstIterator_<_Tp> Mat::end() const Returns the matrix iterator and sets it to the after-last matrix element. @@ -2081,7 +2080,7 @@ The class ``SparseMat`` represents multi-dimensional sparse numerical arrays. Su SparseMat\_ ----------- -.. cpp:class:: SparseMat_?? +.. cpp:class:: SparseMat_ Template sparse n-dimensional array class derived from :cpp:class:`SparseMat` :: diff --git a/modules/core/doc/operations_on_arrays.rst b/modules/core/doc/operations_on_arrays.rst index 700b362f53..db7a42bda5 100644 --- a/modules/core/doc/operations_on_arrays.rst +++ b/modules/core/doc/operations_on_arrays.rst @@ -3,7 +3,7 @@ Operations on Arrays .. highlight:: cpp -.. list-table:: **Arithmetical Operations**??output is not in bold, why?? +.. list-table:: **Arithmetical Operations** * - - @@ -1117,7 +1117,7 @@ gemm * **GEMM_2_T** transpose ``src2`` * **GEMM_3_T** transpose ``src3`` -The function performs generalized matrix multiplication similar?? to the corresponding functions ``*gemm`` in BLAS level 3. For example, ``gemm(src1, src2, alpha, src3, beta, dst, GEMM_1_T + GEMM_3_T)`` corresponds to +The function performs generalized matrix multiplication similar to the ``gemm`` functions in BLAS level 3. For example, ``gemm(src1, src2, alpha, src3, beta, dst, GEMM_1_T + GEMM_3_T)`` corresponds to .. math:: @@ -1139,10 +1139,6 @@ getConvertElem .. cpp:function:: ConvertScaleData getConvertScaleElem(int fromType, int toType) -.. cpp:function:: typedef void (*ConvertData)(const void* from, void* to, int cn)??broken output?? - -.. cpp:function:: typedef void (*ConvertScaleData)(const void* from, void* to, int cn, double alpha, double beta) - Returns a conversion function for a single pixel. :param fromType: Source pixel type. @@ -1161,6 +1157,12 @@ getConvertElem The functions ``getConvertElem`` and ``getConvertScaleElem`` return pointers to the functions for converting individual pixels from one type to another. While the main function purpose is to convert single pixels (actually, for converting sparse matrices from one type to another), you can use them to convert the whole row of a dense matrix or the whole matrix at once, by setting ``cn = matrix.cols*matrix.rows*matrix.channels()`` if the matrix data is continuous. +``ConvertData`` and ``ConvertScaleData`` are defined as: :: + + typedef void (*ConvertData)(const void* from, void* to, int cn) + typedef void (*ConvertScaleData)(const void* from, void* to, + int cn, double alpha, double beta) + .. seealso:: :cpp:func:`Mat::convertTo` , :cpp:func:`SparseMat::convertTo` diff --git a/modules/ml/doc/expectation_maximization.rst b/modules/ml/doc/expectation_maximization.rst index a35895cf5f..7cb60f6b8d 100644 --- a/modules/ml/doc/expectation_maximization.rst +++ b/modules/ml/doc/expectation_maximization.rst @@ -3,8 +3,8 @@ Expectation Maximization The EM (Expectation Maximization) algorithm estimates the parameters of the multivariate probability density function in the form of a Gaussian mixture distribution with a specified number of mixtures. -Consider the set of the -:math:`x_1, x_2,...,x_{N}` : N feature vectors?? from a d-dimensional Euclidean space drawn from a Gaussian mixture: +Consider the set of the N feature vectors +{ :math:`x_1, x_2,...,x_{N}` } from a d-dimensional Euclidean space drawn from a Gaussian mixture: .. math:: @@ -62,7 +62,7 @@ Alternatively, the algorithm may start with the M-step when the initial values f :math:`p_{i,k}` . Often (including ML) the :ref:`kmeans` algorithm is used for that purpose. -One of the main problems?? the EM algorithm should deal with is a large number +One of the main problems of the EM algorithm is a large number of parameters to estimate. The majority of the parameters reside in covariance matrices, which are :math:`d \times d` elements each diff --git a/modules/ml/doc/statistical_models.rst b/modules/ml/doc/statistical_models.rst index ca5b1f9d5e..c39e4c9e9a 100644 --- a/modules/ml/doc/statistical_models.rst +++ b/modules/ml/doc/statistical_models.rst @@ -123,10 +123,6 @@ CvStatModel::load The method ``load`` loads the complete model state with the specified name (or default model-dependent name) from the specified XML or YAML file. The previous model state is cleared by ``clear()`` . -**Note**: - -The method is virtual, so any model can be loaded using this virtual method. However, unlike the C types of OpenCV that can be loaded using the generic -``cross{cvLoad}`` , the model type is required here to enable constructing an empty model beforehand.?? This limitation will be removed in the later ML versions. .. index:: CvStatModel::write diff --git a/modules/objdetect/doc/cascade_classification.rst b/modules/objdetect/doc/cascade_classification.rst index 0f7d7aaee8..ab126c1c28 100644 --- a/modules/objdetect/doc/cascade_classification.rst +++ b/modules/objdetect/doc/cascade_classification.rst @@ -62,19 +62,21 @@ FeatureEvaluator::setImage ------------------------------ .. cpp:function:: bool FeatureEvaluator::setImage(const Mat& img, Size origWinSize) - Sets an image where the features are computed??. + Assigns an image to feature evaluator. :param img: Matrix of the type ``CV_8UC1`` containing an image where the features are computed. :param origWinSize: Size of training images. +The method assigns an image, where the features will be computed, to the feature evaluator. + .. index:: FeatureEvaluator::setWindow FeatureEvaluator::setWindow ------------------------------- .. cpp:function:: bool FeatureEvaluator::setWindow(Point p) - Sets a window in the current image where the features are computed (called by ??). + Assigns a window in the current image where the features will be computed. :param p: Upper left point of the window where the features are computed. Size of the window is equal to the size of training images. @@ -128,7 +130,7 @@ The cascade classifier class for object detection :: // structure for storing a tree node struct CV_EXPORTS DTreeNode { - int featureIdx; // feature index on which is a split?? + int featureIdx; // index of the feature on which we perform the split float threshold; // split threshold of ordered features only int left; // left child index in the tree nodes array int right; // right child index in the tree nodes array @@ -270,7 +272,7 @@ CascadeClassifier::runAt :param pt: Upper left point of the window where the features are computed. Size of the window is equal to the size of training images. The function returns 1 if the cascade classifier detects an object in the given location. -Otherwise, it returns ``si``, which is an index of the stage that first predicted that the given window is a background image.?? +Otherwise, it returns negated index of the stage at which the candidate has been rejected. .. index:: groupRectangles