fixed Latex docs for cleaner HTML output
authorVadim Pisarevsky <no@email>
Mon, 31 May 2010 16:46:09 +0000 (16:46 +0000)
committerVadim Pisarevsky <no@email>
Mon, 31 May 2010 16:46:09 +0000 (16:46 +0000)
doc/cv_image_filtering.tex
doc/cxcore_array_operations.tex
doc/cxcore_basic_structures.tex
doc/cxcore_clustering_search.tex

index e35950c..2a18b54 100644 (file)
@@ -1136,22 +1136,19 @@ Returns the structuring element of the specified size and shape for morphologica
 \cvdefCpp{Mat getStructuringElement(int shape, Size esize,\par Point anchor=Point(-1,-1));}
 
 \begin{description}
-\cvarg{shape}{The element shape, one of:
-    
+\cvarg{shape}{The element shape, one of:}
     \begin{itemize}
         \item \texttt{MORPH\_RECT} - rectangular structuring element
             \[E_{ij}=1\]
 
-        \item \texttt{MORPH\_ELLIPSE} - elliptic structuring element, i.e. a filled
-            ellipse inscribed into the rectangle
+        \item \texttt{MORPH\_ELLIPSE} - elliptic structuring element, i.e. a filled ellipse inscribed into the rectangle
             \texttt{Rect(0, 0, esize.width, 0.esize.height)}
 
         \item \texttt{MORPH\_CROSS} - cross-shaped structuring element:
             \[
             E_{ij} = \fork{1}{if i=\texttt{anchor.y} or j=\texttt{anchor.x}}{0}{otherwise}
             \]
-        
-    \end{itemize}}
+    \end{itemize}
 \cvarg{esize}{Size of the structuring element}
 \cvarg{anchor}{The anchor position within the element. The default value $(-1, -1)$ means that the anchor is at the center. Note that only the cross-shaped element's shape depends on the anchor position; in other cases the anchor just regulates by how much the result of the morphological operation is shifted}
 \end{description}
index b89f96c..5622f41 100644 (file)
@@ -3838,7 +3838,7 @@ MatExpr<...> abs(const MatExpr<...>\& src);}
 \begin{itemize}
     \item \texttt{C = abs(A-B)} is equivalent to \texttt{absdiff(A, B, C)} and
     \item \texttt{C = abs(A)} is equivalent to \texttt{absdiff(A, Scalar::all(0), C)}.
-    \item \texttt{C = Mat\_<Vec<uchar,\emph{n}> >(abs(A*$\alpha$ + $\beta$))} is equivalent to \texttt{convertScaleAbs(A, C, alpha, beta)}
+    \item \texttt{C = Mat\_<Vec<uchar,n> >(abs(A*alpha + beta))} is equivalent to \texttt{convertScaleAbs(A, C, alpha, beta)}
 \end{itemize}
 
 The output matrix will have the same size and the same type as the input one
index 7e32d8d..5163bfc 100644 (file)
@@ -1011,9 +1011,9 @@ public:
 The class is the most universal representation of short numerical vectors or tuples. It is possible to convert \texttt{Vec<T,2>} to/from \texttt{Point\_}, \texttt{Vec<T,3>} to/from \texttt{Point3\_}, and \texttt{Vec<T,4>} to \cross{CvScalar}~. The elements of \texttt{Vec} are accessed using \texttt{operator[]}. All the expected vector operations are implemented too:
 
 \begin{itemize}
-    \item \texttt{v1 = $v2 \pm v3$, v1 = v2 * $\alpha$, v1 = $\alpha$ * v2} (plus the corresponding augmenting operations; note that these operations apply \hyperref[saturatecast]{saturate\_cast.3C.3E} to the each computed vector component)
+    \item $\texttt{v1} = \texttt{v2} \pm \texttt{v3}$, $\texttt{v1} = \texttt{v2} * \alpha$, $\texttt{v1} = \alpha * \texttt{v2}$ (plus the corresponding augmenting operations; note that these operations apply \hyperref[saturatecast]{saturate\_cast.3C.3E} to the each computed vector component)
     \item \texttt{v1 == v2, v1 != v2}
-    \item \texttt{double n = norm(v1); // $L_2$-norm}
+    \item \texttt{norm(v1)} ($L_2$-norm)
 \end{itemize}
 
 For user convenience, the following type aliases are introduced:
@@ -1517,14 +1517,15 @@ The next important thing to learn about the matrix class is element access. Here
 
 Given these parameters, address of the matrix element $M_{ij}$ is computed as following:
 
-
-\texttt{addr($M_{ij}$)=M.data + M.step*i + j*M.elemSize()}
-
+\[
+\texttt{addr}(\texttt{M}_{ij})=\texttt{M.data + M.step*i + j*M.elemSize()}
+\]
 
 if you know the matrix element type, e.g. it is \texttt{float}, then you can use \texttt{at<>()} method:
 
-
-\texttt{addr($M_{ij}$)=\&M.at<float>(i,j)}
+\[
+\texttt{addr}(\texttt{M}_{ij})=\&\texttt{M.at<float>(i,j)}
+\]
 
 (where \& is used to convert the reference returned by \texttt{at} to a pointer).
 if you need to process a whole row of matrix, the most efficient way is to get the pointer to the row first, and then just use plain C operator \texttt{[]}:
@@ -1576,23 +1577,23 @@ The matrix iterators are random-access iterators, so they can be passed to any S
 
 This is a list of implemented matrix operations that can be combined in arbitrary complex expressions
 (here \emph{A}, \emph{B} stand for matrices (\texttt{Mat}), \emph{s} for a scalar (\texttt{Scalar}),
-\emph{$\alpha$} for a real-valued scalar (\texttt{double})):
+$\alpha$ for a real-valued scalar (\texttt{double})):
 
 \begin{itemize}
-    \item addition, subtraction, negation: $\texttt{A}\pm \texttt{B},\;\texttt{A}\pm \texttt{s},\;\texttt{s}\pm \texttt{A},\;-\texttt{A}$
-    \item scaling: \texttt{A*$\alpha$, A/$\alpha$}
-    \item per-element multiplication and division: \texttt{A.mul(B), A/B, $\alpha$/A}
-    \item matrix multiplication: \texttt{A*B}
-    \item transposition: \texttt{A.t() $\sim A^t$}
+    \item addition, subtraction, negation: $A \pm B,\;A \pm s,\;s \pm A,\;-A$
+    \item scaling: $A*\alpha$, $A*\alpha$
+    \item per-element multiplication and division: $A.mul(B), A/B, \alpha/A$
+    \item matrix multiplication: $A*B$
+    \item transposition: $A.t() \sim A^t$
     \item matrix inversion and pseudo-inversion, solving linear systems and least-squares problems:
-        \texttt{A.inv([method]) $\sim A^{-1}$}, \texttt{A.inv([method])*B $\sim X:\,AX=B$}
-    \item comparison: $\texttt{A}\gtreqqless \texttt{B},\;\texttt{A} \ne \texttt{B},\;\texttt{A}\gtreqqless \alpha,\; \texttt{A} \ne \alpha$.
+        $A.inv([method]) \sim A^{-1}, A.inv([method])*B \sim X:\,AX=B$
+    \item comparison: $A\gtreqqless B,\;A \ne B,\;A \gtreqqless \alpha,\;A \ne \alpha$.
           The result of comparison is 8-bit single channel mask, which elements are set to 255
           (if the particular element or pair of elements satisfy the condition) and 0 otherwise.
-    \item bitwise logical operations: \texttt{A \& B, A \& s, A | B, A | s, A \^ B, A \^ s, \textasciitilde A}
-    \item element-wise minimum and maximum: \texttt{min(A, B), min(A, $\alpha$), max(A, B), max(A, $\alpha$)}
-    \item element-wise absolute value: \texttt{abs(A)}
-    \item cross-product, dot-product: \texttt{A.cross(B), A.dot(B)}
+    \item bitwise logical operations: \texttt{A \& B, A \& s, A | B, A | s, A \textasciicircum{} B, A \textasciicircum{} s, \textasciitilde A}
+    \item element-wise minimum and maximum: $min(A, B), min(A, \alpha), max(A, B), max(A, \alpha)$
+    \item element-wise absolute value: $abs(A)$
+    \item cross-product, dot-product: $A.cross(B), A.dot(B)$
     \item any function of matrix or matrices and scalars that returns a matrix or a scalar, such as
           \cvCppCross{norm}, \cvCppCross{mean}, \cvCppCross{sum}, \cvCppCross{countNonZero}, \cvCppCross{trace},
           \cvCppCross{determinant}, \cvCppCross{repeat} etc.
@@ -1643,7 +1644,7 @@ Various matrix constructors
 These are various constructors that form a matrix. As noticed in the
 \hyperref{AutomaticMemoryManagement2}{introduction}, often the default constructor is enough, and the proper matrix will be allocated by an OpenCV function. The constructed matrix can further be assigned to another matrix or matrix expression, in which case the old content is dereferenced, or be allocated with \cross{Mat::create}.
 
-\cvCppFunc{Mat::Mat}index{cv::Mat::\textasciitilde Mat}label{cppfunc.Mat::destructor}
+\cvCppFunc{Mat::Mat}\index{cv::Mat::destructor}\label{cppfunc.Mat::destructor}
 Matrix destructor
 
 \cvdefCpp{
index 21e337c..9d8ffb5 100644 (file)
@@ -342,114 +342,90 @@ Constructs a nearest neighbor search index for a given dataset.
 \begin{description}
 \cvarg{features}{ Matrix of type CV\_32F containing the features(points) to index. The size of the matrix is num\_features x feature\_dimensionality.}
 \cvarg{params}{Structure containing the index parameters. The type of index that will be constructed depends on the type of this parameter.
-The possible parameter types are:
+The possible parameter types are:}
 
 \begin{description}
- \cvarg{LinearIndexParams}{When passing an object of this type, the index will perform a linear, brute-force search.
-   \cvcode{
-    struct LinearIndexParams : public IndexParams\newline
-  \{\newline
-  \};}
-  }
-
-\cvarg{KDTreeIndexParams}{When passing an object of this type the index constructed will consist of a set 
-of randomized kd-trees which will be searched in parallel.
- \cvcode{
-  struct KDTreeIndexParams : public IndexParams\newline
-  \{\newline
-       KDTreeIndexParams( int trees = 4 );\newline
-  \};}
+\cvarg{LinearIndexParams}{When passing an object of this type, the index will perform a linear, brute-force search.}
+\begin{lstlisting}
+struct LinearIndexParams : public IndexParams
+{
+};
+\end{lstlisting}
+
+\cvarg{KDTreeIndexParams}{When passing an object of this type the index constructed will consist of a set of randomized kd-trees which will be searched in parallel.}
+\begin{lstlisting}
+struct KDTreeIndexParams : public IndexParams
+{
+    KDTreeIndexParams( int trees = 4 );
+};
+\end{lstlisting}
 \begin{description}
 \cvarg{trees}{The number of parallel kd-trees to use. Good values are in the range [1..16]}
 \end{description}
-}
-\cvarg{KMeansIndexParams}{When passing an object of this type the index constructed will be a hierarchical k-means tree. 
-\cvcode{
-  struct KMeansIndexParams : public IndexParams\newline
-  \{\newline
-           KMeansIndexParams( int branching = 32,\par
-                          int iterations = 11,\par
-                          flann\_centers\_init\_t centers\_init = CENTERS\_RANDOM,\par
-                          float cb\_index = 0.2 );\newline
-  \};}
+
+\cvarg{KMeansIndexParams}{When passing an object of this type the index constructed will be a hierarchical k-means tree.}
+\begin{lstlisting}
+struct KMeansIndexParams : public IndexParams
+{
+    KMeansIndexParams(
+        int branching = 32,
+        int iterations = 11,
+        flann_centers_init_t centers_init = CENTERS_RANDOM,
+        float cb_index = 0.2 );
+};
+\end{lstlisting}
 \begin{description}
 \cvarg{branching}{ The branching factor to use for the hierarchical k-means tree }
-\cvarg{iterations}{ The maximum number of iterations to use in the k-means clustering 
-                   stage when building the k-means tree. A value of -1 used here means
-                   that the k-means clustering should be iterated until convergence}
-\cvarg{centers\_init}{ The algorithm to use for selecting the initial
-                 centers when performing a k-means clustering step. The possible values are
-                 CENTERS\_RANDOM (picks the initial cluster centers randomly), CENTERS\_GONZALES (picks the
-                 initial centers using Gonzales' algorithm) and CENTERS\_KMEANSPP (picks the initial
-               centers using the algorithm suggested in \cite{arthur_kmeanspp_2007}) }
-\cvarg{cb\_index}{ This parameter (cluster boundary index) influences the
-                 way exploration is performed in the hierarchical kmeans tree. When \texttt{cb\_index} is zero
-                 the next kmeans domain to be explored is choosen to be the one with the closest center. 
-                 A value greater then zero also takes into account the size of the domain.}
+\cvarg{iterations}{ The maximum number of iterations to use in the k-means clustering stage when building the k-means tree. A value of -1 used here means that the k-means clustering should be iterated until convergence}
+\cvarg{centers\_init}{The algorithm to use for selecting the initial centers when performing a k-means clustering step. The possible values are \texttt{CENTERS\_RANDOM} (picks the initial cluster centers randomly), \texttt{CENTERS\_GONZALES} (picks the initial centers using Gonzales' algorithm) and \texttt{CENTERS\_KMEANSPP} (picks the initial centers using the algorithm suggested in \cite{arthur_kmeanspp_2007})}
+\cvarg{cb\_index}{This parameter (cluster boundary index) influences the way exploration is performed in the hierarchical kmeans tree. When \texttt{cb\_index} is zero the next kmeans domain to be explored is choosen to be the one with the closest center. A value greater then zero also takes into account the size of the domain.}
 \end{description}
-}
-\cvarg{CompositeIndexParams}{When using a parameters object of this type the index created combines the randomized kd-trees 
-       and the hierarchical k-means tree.
-\cvcode{
-  struct CompositeIndexParams : public IndexParams\newline 
-  \{\newline
-           CompositeIndexParams( int trees = 4,\par
-                             int branching = 32,\par
-                             int iterations = 11,\par
-                             flann\_centers\_init\_t centers\_init = CENTERS\_RANDOM,\par 
-                             float cb\_index = 0.2 );\newline
-  \};}
-}
-\cvarg{AutotunedIndexParams}{When passing an object of this type the index created is automatically tuned to offer 
-the best performance, by choosing the optimal index type (randomized kd-trees, hierarchical kmeans, linear) and parameters for the
-dataset provided.
-\cvcode{
-  struct AutotunedIndexParams : public IndexParams\newline 
-  \{\newline
-           AutotunedIndexParams( float target\_precision = 0.9,\par
-                             float build\_weight = 0.01,\par
-                             float memory\_weight = 0,\par
-                             float sample\_fraction = 0.1 );\newline
-  \};}
+
+\cvarg{CompositeIndexParams}{When using a parameters object of this type the index created combines the randomized kd-trees  and the hierarchical k-means tree.}
+\begin{lstlisting}
+struct CompositeIndexParams : public IndexParams
+{
+    CompositeIndexParams(
+        int trees = 4,
+        int branching = 32,
+        int iterations = 11,
+        flann_centers_init_t centers_init = CENTERS_RANDOM,
+        float cb_index = 0.2 );
+};
+\end{lstlisting}
+
+\cvarg{AutotunedIndexParams}{When passing an object of this type the index created is automatically tuned to offer  the best performance, by choosing the optimal index type (randomized kd-trees, hierarchical kmeans, linear) and parameters for the dataset provided.}
+\begin{lstlisting}
+struct AutotunedIndexParams : public IndexParams
+{
+    AutotunedIndexParams(
+        float target_precision = 0.9,
+        float build_weight = 0.01,
+        float memory_weight = 0,
+        float sample_fraction = 0.1 );
+};
+\end{lstlisting}
 \begin{description}
-\cvarg{target\_precision}{ Is a number between 0 and 1 specifying the
-percentage of the approximate nearest-neighbor searches that return the
-exact nearest-neighbor. Using a higher value for this parameter gives
-more accurate results, but the search takes longer. The optimum value
-usually depends on the application. }
-
-\cvarg{build\_weight}{ Specifies the importance of the
-index build time raported to the nearest-neighbor search time. In some
-applications it's acceptable for the index build step to take a long time
-if the subsequent searches in the index can be performed very fast. In
-other applications it's required that the index be build as fast as
-possible even if that leads to slightly longer search times.}
-
-\cvarg{memory\_weight}{Is used to specify the tradeoff between
-time (index build time and search time) and memory used by the index. A
-value less than 1 gives more importance to the time spent and a value
-greater than 1 gives more importance to the memory usage.}
-
-\cvarg{sample\_fraction}{Is a number between 0 and 1 indicating what fraction
-of the dataset to use in the automatic parameter configuration algorithm. Running the 
-algorithm on the full dataset gives the most accurate results, but for
-very large datasets can take longer than desired. In such case using just a fraction of the
-data helps speeding up this algorithm while still giving good approximations of the
-optimum parameters.}
+\cvarg{target\_precision}{ Is a number between 0 and 1 specifying the percentage of the approximate nearest-neighbor searches that return the exact nearest-neighbor. Using a higher value for this parameter gives more accurate results, but the search takes longer. The optimum value usually depends on the application. }
+
+\cvarg{build\_weight}{ Specifies the importance of the index build time raported to the nearest-neighbor search time. In some applications it's acceptable for the index build step to take a long time if the subsequent searches in the index can be performed very fast. In other applications it's required that the index be build as fast as possible even if that leads to slightly longer search times.}
+
+\cvarg{memory\_weight}{Is used to specify the tradeoff between time (index build time and search time) and memory used by the index. A value less than 1 gives more importance to the time spent and a value greater than 1 gives more importance to the memory usage.}
+
+\cvarg{sample\_fraction}{Is a number between 0 and 1 indicating what fraction of the dataset to use in the automatic parameter configuration algorithm. Running the algorithm on the full dataset gives the most accurate results, but for very large datasets can take longer than desired. In such case using just a fraction of the data helps speeding up this algorithm while still giving good approximations of the optimum parameters.}
 \end{description}
-}
- \cvarg{SavedIndexParams}{This object type is used for loading a previously saved index from the disk.
-\cvcode{
-  struct SavedIndexParams : public IndexParams\newline
-  \{\newline
-          SavedIndexParams( std::string filename );\newline
-  \};}
+
+\cvarg{SavedIndexParams}{This object type is used for loading a previously saved index from the disk.}
+\begin{lstlisting}
+struct SavedIndexParams : public IndexParams
+{
+    SavedIndexParams( std::string filename );
+};
+\end{lstlisting}
 \begin{description}
 \cvarg{filename}{ The filename in which the index was saved. }
 \end{description}
-}
 \end{description}
-}
 \end{description}
 
 \cvCppFunc{cvflann::Index::knnSearch}
@@ -471,11 +447,7 @@ Performs a K-nearest neighbor search for a given query point using the index.
   };
 \end{lstlisting}
 \begin{description}
-\cvarg{checks}{ The number of times the tree(s) in the index should be recursively traversed. A
-higher value for this parameter would give better search precision, but
-also take more time. If automatic configuration was used when the
-index was created, the number of checks required to achieve the specified
-precision was also computed, in which case this parameter is ignored.}
+\cvarg{checks}{ The number of times the tree(s) in the index should be recursively traversed. A higher value for this parameter would give better search precision, but also take more time. If automatic configuration was used when the index was created, the number of checks required to achieve the specified precision was also computed, in which case this parameter is ignored.}
 \end{description}
 \end{description}
 
@@ -541,10 +513,7 @@ Clusters the given points by constructing a hierarchical k-means tree and choosi
                                       const KMeansIndexParams\& params);}
 \begin{description}
 \cvarg{features}{The points to be clustered}
-\cvarg{centers}{The centers of the clusters obtained. The number of rows in this matrix represents the number of clusters desired, 
-however, because of the way the cut in the hierarchical tree is choosen, the number of clusters computed will be
- the highest number of the form $(branching-1)*k+1$ that's lower than the number of clusters desired, where $branching$ is the tree's 
-branching factor (see description of the KMeansIndexParams).  }
+\cvarg{centers}{The centers of the clusters obtained. The number of rows in this matrix represents the number of clusters desired, however, because of the way the cut in the hierarchical tree is chosen, the number of clusters computed will be the highest number of the form \texttt{(branching-1)*k+1} that's lower than the number of clusters desired, where \texttt{branching} is the tree's branching factor (see description of the KMeansIndexParams).}
 \cvarg{params}{Parameters used in the construction of the hierarchical k-means tree}
 \end{description}
 The function returns the number of clusters computed.