1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Spell checked the documentation with VIM (issue #223)

This commit is contained in:
Ilya Lysenkov
2012-04-13 19:04:44 +00:00
parent 5d4c194502
commit 2619221331
49 changed files with 128 additions and 128 deletions
+8 -8
View File
@@ -42,7 +42,7 @@ The main purpose of this class is to convert compilation-time type information t
cout << B.depth() << ", " << B.channels() << endl;
So, such traits are used to tell OpenCV which data type you are working with, even if such a type is not native to OpenCV. For example, the matrix ``B`` intialization above is compiled because OpenCV defines the proper specialized template class ``DataType<complex<_Tp> >`` . This mechanism is also useful (and used in OpenCV this way) for generic algorithms implementations.
So, such traits are used to tell OpenCV which data type you are working with, even if such a type is not native to OpenCV. For example, the matrix ``B`` initialization above is compiled because OpenCV defines the proper specialized template class ``DataType<complex<_Tp> >`` . This mechanism is also useful (and used in OpenCV this way) for generic algorithms implementations.
Point\_
@@ -100,7 +100,7 @@ Size\_
------
.. ocv:class:: Size_
Template class for specfying the size of an image or rectangle. The class includes two members called ``width`` and ``height``. The structure can be converted to and from the old OpenCV structures
Template class for specifying the size of an image or rectangle. The class includes two members called ``width`` and ``height``. The structure can be converted to and from the old OpenCV structures
``CvSize`` and ``CvSize2D32f`` . The same set of arithmetic and comparison operations as for ``Point_`` is available.
OpenCV defines the following ``Size_<>`` aliases: ::
@@ -372,7 +372,7 @@ This class provides the following options:
*
Heterogeneous collections of objects. The standard STL and most other C++ and OpenCV containers can store only objects of the same type and the same size. The classical solution to store objects of different types in the same container is to store pointers to the base class ``base_class_t*`` instead but then you loose the automatic memory management. Again, by using ``Ptr<base_class_t>()`` instead of the raw pointers, you can solve the problem.
The ``Ptr`` class treats the wrapped object as a black box. The reference counter is allocated and managed separately. The only thing the pointer class needs to know about the object is how to deallocate it. This knowledge is incapsulated in the ``Ptr::delete_obj()`` method that is called when the reference counter becomes 0. If the object is a C++ class instance, no additional coding is needed, because the default implementation of this method calls ``delete obj;`` .
The ``Ptr`` class treats the wrapped object as a black box. The reference counter is allocated and managed separately. The only thing the pointer class needs to know about the object is how to deallocate it. This knowledge is encapsulated in the ``Ptr::delete_obj()`` method that is called when the reference counter becomes 0. If the object is a C++ class instance, no additional coding is needed, because the default implementation of this method calls ``delete obj;`` .
However, if the object is deallocated in a different way, the specialized method should be created. For example, if you want to wrap ``FILE`` , the ``delete_obj`` may be implemented as follows: ::
template<> inline void Ptr<FILE>::delete_obj()
@@ -711,7 +711,7 @@ This is a list of implemented matrix operations that can be combined in arbitrar
*
``Mat_<destination_type>()`` constructors to cast the result to the proper type.
.. note:: Comma-separated initializers and probably some other operations may require additional explicit ``Mat()`` or ``Mat_<T>()`` constuctor calls to resolve a possible ambiguity.
.. note:: Comma-separated initializers and probably some other operations may require additional explicit ``Mat()`` or ``Mat_<T>()`` constructor calls to resolve a possible ambiguity.
Here are examples of matrix expressions:
@@ -892,7 +892,7 @@ The method makes a new header for the specified matrix row and returns it. This
// works, but looks a bit obscure.
A.row(i) = A.row(j) + 0;
// this is a bit longe, but the recommended method.
// this is a bit longer, but the recommended method.
A.row(j).copyTo(A.row(i));
Mat::col
@@ -998,7 +998,7 @@ When the operation mask is specified, and the ``Mat::create`` call shown above r
Mat::convertTo
------------------
Converts an array to another datatype with optional scaling.
Converts an array to another data type with optional scaling.
.. ocv:function:: void Mat::convertTo( OutputArray m, int rtype, double alpha=1, double beta=0 ) const
@@ -1010,7 +1010,7 @@ Converts an array to another datatype with optional scaling.
:param beta: Optional delta added to the scaled values.
The method converts source pixel values to the target datatype. ``saturate_cast<>`` is applied at the end to avoid possible overflows:
The method converts source pixel values to the target data type. ``saturate_cast<>`` is applied at the end to avoid possible overflows:
.. math::
@@ -1602,7 +1602,7 @@ The method returns a matrix size: ``Size(cols, rows)`` . When the matrix is more
Mat::empty
--------------
Returns ``true`` if the array has no elemens.
Returns ``true`` if the array has no elements.
.. ocv:function:: bool Mat::empty() const
+1 -1
View File
@@ -23,7 +23,7 @@ Finds centers of clusters and groups input samples around the clusters.
:param criteria: The algorithm termination criteria, that is, the maximum number of iterations and/or the desired accuracy. The accuracy is specified as ``criteria.epsilon``. As soon as each of the cluster centers moves by less than ``criteria.epsilon`` on some iteration, the algorithm stops.
:param attempts: Flag to specify the number of times the algorithm is executed using different initial labelings. The algorithm returns the labels that yield the best compactness (see the last function parameter).
:param attempts: Flag to specify the number of times the algorithm is executed using different initial labellings. The algorithm returns the labels that yield the best compactness (see the last function parameter).
:param rng: CvRNG state initialized by RNG().
+2 -2
View File
@@ -210,7 +210,7 @@ Fills the area bounded by one or more polygons.
:param offset: Optional offset of all points of the contours.
The function ``fillPoly`` fills an area bounded by several polygonal contours. The function can fill complex areas, for example,
areas with holes, contours with self-intersections (some of thier parts), and so forth.
areas with holes, contours with self-intersections (some of their parts), and so forth.
@@ -415,7 +415,7 @@ Draws a simple, thick, or filled up-right rectangle.
:param pt1: Vertex of the rectangle.
:param pt2: Vertex of the recangle opposite to ``pt1`` .
:param pt2: Vertex of the rectangle opposite to ``pt1`` .
:param r: Alternative specification of the drawn rectangle.
+6 -6
View File
@@ -34,7 +34,7 @@ A storage for various OpenCV dynamic data structures, such as ``CvSeq``, ``CvSet
Memory storage is a low-level structure used to store dynamically growing data structures such as sequences, contours, graphs, subdivisions, etc. It is organized as a list of memory blocks of equal size -
``bottom`` field is the beginning of the list of blocks and ``top`` is the currently used block, but not necessarily the last block of the list. All blocks between ``bottom`` and ``top``, not including the
latter, are considered fully occupied; all blocks between ``top`` and the last block, not including ``top``, are considered free and ``top`` itself is partly ocupied - ``free_space`` contains the number of free bytes left in the end of ``top``.
latter, are considered fully occupied; all blocks between ``top`` and the last block, not including ``top``, are considered free and ``top`` itself is partly occupied - ``free_space`` contains the number of free bytes left in the end of ``top``.
A new memory buffer that may be allocated explicitly by :ocv:cfunc:`MemStorageAlloc` function or implicitly by higher-level functions, such as :ocv:cfunc:`SeqPush`, :ocv:cfunc:`GraphAddEdge` etc.
@@ -344,7 +344,7 @@ Creates structure for depth-first graph traversal.
* **CV_GRAPH_BACK_EDGE** stop at back edges ( ``back edge`` is an edge connecting the last visited vertex with some of its ancestors in the search tree)
* **CV_GRAPH_FORWARD_EDGE** stop at forward edges ( ``forward edge`` is an edge conecting the last visited vertex with some of its descendants in the search tree. The forward edges are only possible during oriented graph traversal)
* **CV_GRAPH_FORWARD_EDGE** stop at forward edges ( ``forward edge`` is an edge connecting the last visited vertex with some of its descendants in the search tree. The forward edges are only possible during oriented graph traversal)
* **CV_GRAPH_CROSS_EDGE** stop at cross edges ( ``cross edge`` is an edge connecting different search trees or branches of the same tree. The ``cross edges`` are only possible during oriented graph traversal)
@@ -721,7 +721,7 @@ The function removes a vertex from the graph by using its pointer together with
GraphVtxDegree
--------------
Counts the number of edges indicent to the vertex.
Counts the number of edges incident to the vertex.
.. ocv:cfunction:: int cvGraphVtxDegree( const CvGraph* graph, int vtxIdx )
@@ -1228,7 +1228,7 @@ Searches for an element in a sequence.
:param elem_idx: Output parameter; index of the found element
:param userdata: The user parameter passed to the compasion function; helps to avoid global variables in some cases
:param userdata: The user parameter passed to the comparison function; helps to avoid global variables in some cases
::
@@ -1271,7 +1271,7 @@ Sorts sequence element using the specified comparison function.
:param func: The comparison function that returns a negative, zero, or positive value depending on the relationships among the elements (see the above declaration and the example below) - a similar function is used by ``qsort`` from C runline except that in the latter, ``userdata`` is not used
:param userdata: The user parameter passed to the compasion function; helps to avoid global variables in some cases
:param userdata: The user parameter passed to the comparison function; helps to avoid global variables in some cases
::
@@ -1558,5 +1558,5 @@ Gathers all node pointers to a single sequence.
:param storage: Container for the sequence
The function puts pointers of all nodes reacheable from ``first`` into a single sequence. The pointers are written sequentially in the depth-first order.
The function puts pointers of all nodes reachable from ``first`` into a single sequence. The pointers are written sequentially in the depth-first order.
+1 -1
View File
@@ -91,7 +91,7 @@ you can use::
Ptr<T> ptr = new T(...);
That is, ``Ptr<T> ptr`` incapsulates a pointer to a ``T`` instance and a reference counter associated with the pointer. See the
That is, ``Ptr<T> ptr`` encapsulates a pointer to a ``T`` instance and a reference counter associated with the pointer. See the
:ocv:class:`Ptr`
description for details.
+2 -2
View File
@@ -750,7 +750,7 @@ or:
DotProduct
----------
Calculates the dot product of two arrays in Euclidian metrics.
Calculates the dot product of two arrays in Euclidean metrics.
.. ocv:cfunction:: double cvDotProduct(const CvArr* src1, const CvArr* src2)
.. ocv:pyoldfunction:: cv.DotProduct(src1, src2)-> double
@@ -937,7 +937,7 @@ The function provides an easy way to handle both types of arrays - ``IplImage``
.. seealso:: :ocv:cfunc:`GetImage`, :ocv:func:`cvarrToMat`.
.. note:: If the input array is ``IplImage`` with planar data layout and COI set, the function returns the pointer to the selected plane and ``COI == 0``. This feature allows user to process ``IplImage`` strctures with planar data layout, even though OpenCV does not support such images.
.. note:: If the input array is ``IplImage`` with planar data layout and COI set, the function returns the pointer to the selected plane and ``COI == 0``. This feature allows user to process ``IplImage`` structures with planar data layout, even though OpenCV does not support such images.
GetNextSparseNode
-----------------
@@ -144,7 +144,7 @@ Type information. ::
..
The structure contains information about one of the standard or user-defined types. Instances of the type may or may not contain a pointer to the corresponding :ocv:struct:`CvTypeInfo` structure. In any case, there is a way to find the type info structure for a given object using the :ocv:cfunc:`TypeOf` function. Aternatively, type info can be found by type name using :ocv:cfunc:`FindType`, which is used when an object is read from file storage. The user can register a new type with :ocv:cfunc:`RegisterType`
The structure contains information about one of the standard or user-defined types. Instances of the type may or may not contain a pointer to the corresponding :ocv:struct:`CvTypeInfo` structure. In any case, there is a way to find the type info structure for a given object using the :ocv:cfunc:`TypeOf` function. Alternatively, type info can be found by type name using :ocv:cfunc:`FindType`, which is used when an object is read from file storage. The user can register a new type with :ocv:cfunc:`RegisterType`
that adds the type information structure into the beginning of the type list. Thus, it is possible to create specialized types from generic standard types and override the basic methods.
Clone
@@ -215,7 +215,7 @@ Finds a node in a map or file storage.
:param name: The file node name
The function finds a file node by ``name``. The node is searched either in ``map`` or, if the pointer is NULL, among the top-level file storage nodes. Using this function for maps and :ocv:cfunc:`GetSeqElem`
(or sequence reader) for sequences, it is possible to nagivate through the file storage. To speed up multiple queries for a certain key (e.g., in the case of an array of structures) one may use a combination of :ocv:cfunc:`GetHashedKey` and :ocv:cfunc:`GetFileNode`.
(or sequence reader) for sequences, it is possible to navigate through the file storage. To speed up multiple queries for a certain key (e.g., in the case of an array of structures) one may use a combination of :ocv:cfunc:`GetHashedKey` and :ocv:cfunc:`GetFileNode`.
GetFileNodeName
---------------
@@ -629,7 +629,7 @@ The function finishes the currently written stream and starts the next stream. I
</opencv_storage>
...
The a YAML file will look like this: ::
The YAML file will look like this: ::
%YAML:1.0
# stream #1 data
@@ -722,7 +722,7 @@ Writes an object to file storage.
:param ptr: Pointer to the object
:param attributes: The attributes of the object. They are specific for each particular type (see the dicsussion below).
:param attributes: The attributes of the object. They are specific for each particular type (see the discussion below).
The function writes an object to file storage. First, the appropriate type info is found using :ocv:cfunc:`TypeOf`. Then, the ``write`` method associated with the type info is called.
@@ -796,7 +796,7 @@ Writes a file node to another file storage.
:param node: The written node
:param embed: If the written node is a collection and this parameter is not zero, no extra level of hiararchy is created. Instead, all the elements of ``node`` are written into the currently written structure. Of course, map elements can only be embedded into another map, and sequence elements can only be embedded into another sequence.
:param embed: If the written node is a collection and this parameter is not zero, no extra level of hierarchy is created. Instead, all the elements of ``node`` are written into the currently written structure. Of course, map elements can only be embedded into another map, and sequence elements can only be embedded into another sequence.
The function writes a copy of a file node to file storage. Possible applications of the function are merging several file storages into one and conversion between XML and YAML formats.
+7 -7
View File
@@ -208,7 +208,7 @@ Calculates the per-element bit-wise conjunction of two arrays or an array and a
:param src2: Second source array or a scalar.
:param dst: Destination arrayb that has the same size and type as the input array(s).
:param dst: Destination array that has the same size and type as the input array(s).
:param mask: Optional operation mask, 8-bit single channel array, that specifies elements of the destination array to be changed.
@@ -1213,7 +1213,7 @@ Performs generalized matrix multiplication.
.. ocv:pyfunction:: cv2.gemm(src1, src2, alpha, src3, gamma[, dst[, flags]]) -> dst
.. ocv:cfunction:: void cvGEMM( const CvArr* src1, const CvArr* src2, double alpha, const CvArr* src3, double beta, CvArr* dst, int tABC=0)
.. ocv:pyoldfunction:: cv.GEMM(src1, src2, alphs, src3, beta, dst, tABC=0)-> None
.. ocv:pyoldfunction:: cv.GEMM(src1, src2, alpha, src3, beta, dst, tABC=0)-> None
:param src1: First multiplied input matrix that should have ``CV_32FC1`` , ``CV_64FC1`` , ``CV_32FC2`` , or ``CV_64FC2`` type.
@@ -1404,7 +1404,7 @@ The function checks the range as follows:
That is, ``dst`` (I) is set to 255 (all ``1`` -bits) if ``src`` (I) is within the specified 1D, 2D, 3D, ... box and 0 otherwise.
When the lower and/or upper bounary parameters are scalars, the indexes ``(I)`` at ``lowerb`` and ``upperb`` in the above formulas should be omitted.
When the lower and/or upper boundary parameters are scalars, the indexes ``(I)`` at ``lowerb`` and ``upperb`` in the above formulas should be omitted.
invert
@@ -1429,7 +1429,7 @@ Finds the inverse or pseudo-inverse of a matrix.
* **DECOMP_SVD** Singular value decomposition (SVD) method.
* **DECOMP_CHOLESKY** Cholesky decomposion. The matrix must be symmetrical and positively defined.
* **DECOMP_CHOLESKY** Cholesky decomposition. The matrix must be symmetrical and positively defined.
The function ``invert`` inverts the matrix ``src`` and stores the result in ``dst`` .
When the matrix ``src`` is singular or non-square, the function computes the pseudo-inverse matrix (the ``dst`` matrix) so that ``norm(src*dst - I)`` is minimal, where I is an identity matrix.
@@ -2128,7 +2128,7 @@ Normalizes the norm or value range of an array.
:param alpha: Norm value to normalize to or the lower range boundary in case of the range normalization.
:param beta: Upper range boundary in case ofthe range normalization. It is not used for the norm normalization.
:param beta: Upper range boundary in case of the range normalization. It is not used for the norm normalization.
:param normType: Normalization type. See the details below.
@@ -3054,7 +3054,7 @@ If you need to extract a single channel or do some other sophisticated channel p
sqrt
----
Calculates a quare root of array elements.
Calculates a square root of array elements.
.. ocv:function:: void sqrt(InputArray src, OutputArray dst)
@@ -3236,7 +3236,7 @@ Performs SVD of a matrix
:param vt: Transposed matrix of right singular values
:param flags: Opertion flags - see :ocv:func:`SVD::SVD`.
:param flags: Operation flags - see :ocv:func:`SVD::SVD`.
The methods/functions perform SVD of matrix. Unlike ``SVD::SVD`` constructor and ``SVD::operator()``, they store the results to the user-provided matrices. ::
@@ -31,7 +31,7 @@ Aligns a buffer size to the specified number of bytes.
:param n: Alignment size that must be a power of two.
The function returns the minimum number that is greater or equal to ``sz`` and is divisble by ``n`` :
The function returns the minimum number that is greater or equal to ``sz`` and is divisible by ``n`` :
.. math::
+4 -4
View File
@@ -148,7 +148,7 @@ FileStorage
-----------
.. ocv:class:: FileStorage
XML/YAML file storage class that incapsulates all the information necessary for writing or reading data to/from a file.
XML/YAML file storage class that encapsulates all the information necessary for writing or reading data to/from a file.
FileStorage::FileStorage
------------------------
@@ -179,7 +179,7 @@ Opens a file.
.. ocv:function:: bool FileStorage::open(const string& filename, int flags, const string& encoding=string())
See description of parameters in :ocv:func:`FileStorage::FileStorage`. The method calls :ocv:func:`FileStorage::release` before openning the file.
See description of parameters in :ocv:func:`FileStorage::FileStorage`. The method calls :ocv:func:`FileStorage::release` before opening the file.
FileStorage::isOpened
@@ -583,7 +583,7 @@ Reads node elements to the buffer with the specified format.
:param vec: Pointer to the destination array.
:param len: Number of elements to read. If it is greater than number of remaning elements then all of them will be read.
:param len: Number of elements to read. If it is greater than number of remaining elements then all of them will be read.
Usually it is more convenient to use :ocv:func:`operator >>` instead of this method.
@@ -687,6 +687,6 @@ Reads node elements to the buffer with the specified format.
:param vec: Pointer to the destination array.
:param maxCount: Number of elements to read. If it is greater than number of remaning elements then all of them will be read.
:param maxCount: Number of elements to read. If it is greater than number of remaining elements then all of them will be read.
Usually it is more convenient to use :ocv:func:`operator >>` instead of this method.