diff --git a/doc/cxcore_clustering_search.tex b/doc/cxcore_clustering_search.tex index 6e8850233..b15d13d94 100644 --- a/doc/cxcore_clustering_search.tex +++ b/doc/cxcore_clustering_search.tex @@ -293,7 +293,11 @@ This section documents OpenCV's interface to the FLANN\footnote{http://people.cs contains a collection of algorithms optimized for fast nearest neighbor search in large datasets and for high dimensional features. More information about FLANN can be found in \cite{muja_flann_2009}. +\ifplastex \cvclass{cv::flann::Index_} +\else +\subsubsection{cv::flann::Index\_}\label{cvflann.Index} +\fi The FLANN nearest neighbor index class. This class is templated with the type of elements for which the index is built. \begin{lstlisting} @@ -345,10 +349,14 @@ namespace flann } } // namespace cv::flann \end{lstlisting} +\ifplastex \cvCppFunc{cv::flann::Index_::Index_} +\else +\subsubsection{cvflann::Index\_$$::Index\_}\label{cvflann.Index.Index} +\fi Constructs a nearest neighbor search index for a given dataset. -\cvdefCpp{Index_::Index_(const Mat\& features, const IndexParams\& params);} +\cvdefCpp{Index\_::Index\_(const Mat\& features, const IndexParams\& params);} \begin{description} \cvarg{features}{ Matrix of containing the features(points) to index. The size of the matrix is num\_features x feature\_dimensionality and the data type of the elements in the matrix must coincide with the type of the index.} @@ -439,13 +447,21 @@ struct SavedIndexParams : public IndexParams \end{description} \end{description} +\ifplastex \cvCppFunc{cv::flann::Index_::knnSearch} +\else +\subsubsection{cv::flann::Index\_$$::knnSearch}\label{cvflann.Index.knnSearch} +\fi Performs a K-nearest neighbor search for a given query point using the index. -\cvdefCpp{void Index_::knnSearch(const vector\& query, \par +\cvdefCpp{ +void Index\_::knnSearch(const vector\& query, \par vector\& indices, \par vector\& dists, \par int knn, \par - const SearchParams\& params);} + const SearchParams\& params);\newline +void Index\_::knnSearch(const Mat\& queries,\par + Mat\& indices, Mat\& dists,\par + int knn, const SearchParams\& params);} \begin{description} \cvarg{query}{The query point} \cvarg{indices}{Vector that will contain the indices of the K-nearest neighbors found. It must have at least knn size.} @@ -462,28 +478,22 @@ Performs a K-nearest neighbor search for a given query point using the index. \end{description} \end{description} -\cvCppFunc{cv::flann::Index_::knnSearch} -Performs a K-nearest neighbor search for multiple query points. - -\cvdefCpp{void Index_::knnSearch(const Mat\& queries,\par - Mat\& indices, Mat\& dists,\par - int knn, const SearchParams\& params);} - -\begin{description} -\cvarg{queries}{The query points, one per row. The type of queries must match the index type.} -\cvarg{indices}{Indices of the nearest neighbors found } -\cvarg{dists}{Distances to the nearest neighbors found} -\cvarg{knn}{Number of nearest neighbors to search for} -\cvarg{params}{Search parameters} -\end{description} - - +\ifplastex \cvCppFunc{cv::flann::Index_::radiusSearch} +\else +\subsubsection{cv::flann::Index\_$$::radiusSearch}\label{cvflann.Index.radiusSearch} +\fi Performs a radius nearest neighbor search for a given query point. -\cvdefCpp{int Index_::radiusSearch(const vector\& query, \par +\cvdefCpp{ +int Index\_::radiusSearch(const vector\& query, \par vector\& indices, \par vector\& dists, \par float radius, \par + const SearchParams\& params);\newline +int Index\_::radiusSearch(const Mat\& query, \par + Mat\& indices, \par + Mat\& dists, \par + float radius, \par const SearchParams\& params);} \begin{description} \cvarg{query}{The query point} @@ -493,33 +503,26 @@ Performs a radius nearest neighbor search for a given query point. \cvarg{params}{Search parameters} \end{description} - -\cvCppFunc{cv::flann::Index_::radiusSearch} -Performs a radius nearest neighbor search for multiple query points. -\cvdefCpp{int Index_::radiusSearch(const Mat\& query, \par - Mat\& indices, \par - Mat\& dists, \par - float radius, \par - const SearchParams\& params);} -\begin{description} -\cvarg{queries}{The query points, one per row} -\cvarg{indices}{Indices of the nearest neighbors found} -\cvarg{dists}{Distances to the nearest neighbors found} -\cvarg{radius}{The search radius} -\cvarg{params}{Search parameters} -\end{description} - - +\ifplastex \cvCppFunc{cv::flann::Index_::save} +\else +\subsubsection{cv::flann::Index\_$$::save}\label{cvflann.Index.save} +\fi + Saves the index to a file. -\cvdefCpp{void Index_::save(std::string filename);} +\cvdefCpp{void Index\_::save(std::string filename);} \begin{description} \cvarg{filename}{The file to save the index to} \end{description} +\ifplastex \cvCppFunc{cv::flann::Index_::getIndexParameters} +\else +\subsubsection{cv::flann::Index\_$$::getIndexParameters}\label{cvflann.Index.getIndexParameters} +\fi + Returns the index paramreters. This is usefull in case of autotuned indices, when the parameters computed can be retrived using this method. -\cvdefCpp{const IndexParams* Index_::getIndexParameters();} +\cvdefCpp{const IndexParams* Index\_::getIndexParameters();} \cvCppFunc{cv::flann::hierarchicalClustering}