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

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2019-09-05 14:28:07 +03:00
165 changed files with 1601 additions and 369 deletions
+17 -16
View File
@@ -107,38 +107,38 @@ the index is built.
`Distance` functor specifies the metric to be used to calculate the distance between two points.
There are several `Distance` functors that are readily available:
@link cvflann::L2_Simple cv::flann::L2_Simple @endlink- Squared Euclidean distance functor.
cv::cvflann::L2_Simple - Squared Euclidean distance functor.
This is the simpler, unrolled version. This is preferable for very low dimensionality data (eg 3D points)
@link cvflann::L2 cv::flann::L2 @endlink- Squared Euclidean distance functor, optimized version.
cv::flann::L2 - Squared Euclidean distance functor, optimized version.
@link cvflann::L1 cv::flann::L1 @endlink - Manhattan distance functor, optimized version.
cv::flann::L1 - Manhattan distance functor, optimized version.
@link cvflann::MinkowskiDistance cv::flann::MinkowskiDistance @endlink - The Minkowsky distance functor.
cv::flann::MinkowskiDistance - The Minkowsky distance functor.
This is highly optimised with loop unrolling.
The computation of squared root at the end is omitted for efficiency.
@link cvflann::MaxDistance cv::flann::MaxDistance @endlink - The max distance functor. It computes the
cv::flann::MaxDistance - The max distance functor. It computes the
maximum distance between two vectors. This distance is not a valid kdtree distance, it's not
dimensionwise additive.
@link cvflann::HammingLUT cv::flann::HammingLUT @endlink - %Hamming distance functor. It counts the bit
cv::flann::HammingLUT - %Hamming distance functor. It counts the bit
differences between two strings using a lookup table implementation.
@link cvflann::Hamming cv::flann::Hamming @endlink - %Hamming distance functor. Population count is
cv::flann::Hamming - %Hamming distance functor. Population count is
performed using library calls, if available. Lookup table implementation is used as a fallback.
@link cvflann::Hamming2 cv::flann::Hamming2 @endlink- %Hamming distance functor. Population count is
cv::flann::Hamming2 - %Hamming distance functor. Population count is
implemented in 12 arithmetic operations (one of which is multiplication).
@link cvflann::HistIntersectionDistance cv::flann::HistIntersectionDistance @endlink - The histogram
cv::flann::HistIntersectionDistance - The histogram
intersection distance functor.
@link cvflann::HellingerDistance cv::flann::HellingerDistance @endlink - The Hellinger distance functor.
cv::flann::HellingerDistance - The Hellinger distance functor.
@link cvflann::ChiSquareDistance cv::flann::ChiSquareDistance @endlink - The chi-square distance functor.
cv::flann::ChiSquareDistance - The chi-square distance functor.
@link cvflann::KL_Divergence cv::flann::KL_Divergence @endlink - The Kullback-Leibler divergence functor.
cv::flann::KL_Divergence - The Kullback-Leibler divergence functor.
Although the provided implementations cover a vast range of cases, it is also possible to use
a custom implementation. The distance functor is a class whose `operator()` computes the distance
@@ -397,8 +397,6 @@ int GenericIndex<Distance>::radiusSearch(const Mat& query, Mat& indices, Mat& di
return nnIndex->radiusSearch(m_query,m_indices,m_dists,radius,searchParams);
}
//! @endcond
/**
* @deprecated Use GenericIndex class instead
*/
@@ -531,6 +529,7 @@ private:
::cvflann::Index< L1<ElementType> >* nnIndex_L1;
};
//! @endcond
/** @brief Clusters features using hierarchical k-means algorithm.
@@ -567,8 +566,8 @@ int hierarchicalClustering(const Mat& features, Mat& centers, const ::cvflann::K
return ::cvflann::hierarchicalClustering<Distance>(m_features, m_centers, params, d);
}
/** @deprecated
*/
//! @cond IGNORED
template <typename ELEM_TYPE, typename DIST_TYPE>
CV_DEPRECATED int hierarchicalClustering(const Mat& features, Mat& centers, const ::cvflann::KMeansIndexParams& params)
{
@@ -589,6 +588,8 @@ CV_DEPRECATED int hierarchicalClustering(const Mat& features, Mat& centers, cons
}
}
//! @endcond
//! @} flann
} } // namespace cv::flann
@@ -30,6 +30,8 @@
#ifndef OPENCV_FLANN_ALL_INDICES_H_
#define OPENCV_FLANN_ALL_INDICES_H_
//! @cond IGNORED
#include "general.h"
#include "nn_index.h"
@@ -152,4 +154,6 @@ NNIndex<Distance>* create_index_by_type(const Matrix<typename Distance::ElementT
}
//! @endcond
#endif /* OPENCV_FLANN_ALL_INDICES_H_ */
@@ -31,6 +31,8 @@
#ifndef OPENCV_FLANN_ALLOCATOR_H_
#define OPENCV_FLANN_ALLOCATOR_H_
//! @cond IGNORED
#include <stdlib.h>
#include <stdio.h>
@@ -189,4 +191,6 @@ private:
}
//! @endcond
#endif //OPENCV_FLANN_ALLOCATOR_H_
@@ -12,6 +12,8 @@
* Adapted for FLANN by Marius Muja
*/
//! @cond IGNORED
#include "defines.h"
#include <stdexcept>
#include <ostream>
@@ -327,4 +329,6 @@ inline std::ostream& operator <<(std::ostream& out, const any& any_val)
}
//! @endcond
#endif // OPENCV_FLANN_ANY_H_
@@ -30,6 +30,8 @@
#ifndef OPENCV_FLANN_AUTOTUNED_INDEX_H_
#define OPENCV_FLANN_AUTOTUNED_INDEX_H_
//! @cond IGNORED
#include <sstream>
#include "general.h"
@@ -588,4 +590,6 @@ private:
};
}
//! @endcond
#endif /* OPENCV_FLANN_AUTOTUNED_INDEX_H_ */
@@ -31,6 +31,8 @@
#ifndef OPENCV_FLANN_COMPOSITE_INDEX_H_
#define OPENCV_FLANN_COMPOSITE_INDEX_H_
//! @cond IGNORED
#include "general.h"
#include "nn_index.h"
#include "kdtree_index.h"
@@ -191,4 +193,6 @@ private:
}
//! @endcond
#endif //OPENCV_FLANN_COMPOSITE_INDEX_H_
@@ -30,9 +30,13 @@
#ifndef OPENCV_FLANN_CONFIG_H_
#define OPENCV_FLANN_CONFIG_H_
//! @cond IGNORED
#ifdef FLANN_VERSION_
#undef FLANN_VERSION_
#endif
#define FLANN_VERSION_ "1.6.10"
//! @endcond
#endif /* OPENCV_FLANN_CONFIG_H_ */
@@ -30,6 +30,8 @@
#ifndef OPENCV_FLANN_DEFINES_H_
#define OPENCV_FLANN_DEFINES_H_
//! @cond IGNORED
#include "config.h"
#ifdef FLANN_EXPORT
@@ -161,4 +163,6 @@ enum
}
//! @endcond
#endif /* OPENCV_FLANN_DEFINES_H_ */
@@ -31,6 +31,8 @@
#ifndef OPENCV_FLANN_DIST_H_
#define OPENCV_FLANN_DIST_H_
//! @cond IGNORED
#include <cmath>
#include <cstdlib>
#include <string.h>
@@ -901,4 +903,6 @@ typename Distance::ResultType ensureSimpleDistance( typename Distance::ResultTyp
}
//! @endcond
#endif //OPENCV_FLANN_DIST_H_
@@ -2,6 +2,8 @@
#ifndef OPENCV_FLANN_DUMMY_H_
#define OPENCV_FLANN_DUMMY_H_
//! @cond IGNORED
namespace cvflann
{
@@ -9,5 +11,6 @@ CV_DEPRECATED inline void dummyfunc() {}
}
//! @endcond
#endif /* OPENCV_FLANN_DUMMY_H_ */
@@ -35,6 +35,8 @@
#ifndef OPENCV_FLANN_DYNAMIC_BITSET_H_
#define OPENCV_FLANN_DYNAMIC_BITSET_H_
//! @cond IGNORED
#ifndef FLANN_USE_BOOST
# define FLANN_USE_BOOST 0
#endif
@@ -156,4 +158,6 @@ private:
#endif
//! @endcond
#endif // OPENCV_FLANN_DYNAMIC_BITSET_H_
@@ -31,6 +31,8 @@
#ifndef OPENCV_FLANN_BASE_HPP_
#define OPENCV_FLANN_BASE_HPP_
//! @cond IGNORED
#include <vector>
#include <cassert>
#include <cstdio>
@@ -292,4 +294,7 @@ int hierarchicalClustering(const Matrix<typename Distance::ElementType>& points,
}
}
//! @endcond
#endif /* OPENCV_FLANN_BASE_HPP_ */
@@ -31,6 +31,8 @@
#ifndef OPENCV_FLANN_GENERAL_H_
#define OPENCV_FLANN_GENERAL_H_
//! @cond IGNORED
#include "opencv2/core.hpp"
namespace cvflann
@@ -46,5 +48,6 @@ public:
}
//! @endcond
#endif /* OPENCV_FLANN_GENERAL_H_ */
@@ -31,6 +31,8 @@
#ifndef OPENCV_FLANN_GROUND_TRUTH_H_
#define OPENCV_FLANN_GROUND_TRUTH_H_
//! @cond IGNORED
#include "dist.h"
#include "matrix.h"
@@ -91,4 +93,6 @@ void compute_ground_truth(const Matrix<typename Distance::ElementType>& dataset,
}
//! @endcond
#endif //OPENCV_FLANN_GROUND_TRUTH_H_
+235
View File
@@ -0,0 +1,235 @@
/***********************************************************************
* Software License Agreement (BSD License)
*
* Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
* Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*************************************************************************/
#ifndef OPENCV_FLANN_HDF5_H_
#define OPENCV_FLANN_HDF5_H_
//! @cond IGNORED
#include <hdf5.h>
#include "matrix.h"
namespace cvflann
{
namespace
{
template<typename T>
hid_t get_hdf5_type()
{
throw FLANNException("Unsupported type for IO operations");
}
template<>
hid_t get_hdf5_type<char>() { return H5T_NATIVE_CHAR; }
template<>
hid_t get_hdf5_type<unsigned char>() { return H5T_NATIVE_UCHAR; }
template<>
hid_t get_hdf5_type<short int>() { return H5T_NATIVE_SHORT; }
template<>
hid_t get_hdf5_type<unsigned short int>() { return H5T_NATIVE_USHORT; }
template<>
hid_t get_hdf5_type<int>() { return H5T_NATIVE_INT; }
template<>
hid_t get_hdf5_type<unsigned int>() { return H5T_NATIVE_UINT; }
template<>
hid_t get_hdf5_type<long>() { return H5T_NATIVE_LONG; }
template<>
hid_t get_hdf5_type<unsigned long>() { return H5T_NATIVE_ULONG; }
template<>
hid_t get_hdf5_type<float>() { return H5T_NATIVE_FLOAT; }
template<>
hid_t get_hdf5_type<double>() { return H5T_NATIVE_DOUBLE; }
}
#define CHECK_ERROR(x,y) if ((x)<0) throw FLANNException((y));
template<typename T>
void save_to_file(const cvflann::Matrix<T>& dataset, const String& filename, const String& name)
{
#if H5Eset_auto_vers == 2
H5Eset_auto( H5E_DEFAULT, NULL, NULL );
#else
H5Eset_auto( NULL, NULL );
#endif
herr_t status;
hid_t file_id;
file_id = H5Fopen(filename.c_str(), H5F_ACC_RDWR, H5P_DEFAULT);
if (file_id < 0) {
file_id = H5Fcreate(filename.c_str(), H5F_ACC_EXCL, H5P_DEFAULT, H5P_DEFAULT);
}
CHECK_ERROR(file_id,"Error creating hdf5 file.");
hsize_t dimsf[2]; // dataset dimensions
dimsf[0] = dataset.rows;
dimsf[1] = dataset.cols;
hid_t space_id = H5Screate_simple(2, dimsf, NULL);
hid_t memspace_id = H5Screate_simple(2, dimsf, NULL);
hid_t dataset_id;
#if H5Dcreate_vers == 2
dataset_id = H5Dcreate2(file_id, name.c_str(), get_hdf5_type<T>(), space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
#else
dataset_id = H5Dcreate(file_id, name.c_str(), get_hdf5_type<T>(), space_id, H5P_DEFAULT);
#endif
if (dataset_id<0) {
#if H5Dopen_vers == 2
dataset_id = H5Dopen2(file_id, name.c_str(), H5P_DEFAULT);
#else
dataset_id = H5Dopen(file_id, name.c_str());
#endif
}
CHECK_ERROR(dataset_id,"Error creating or opening dataset in file.");
status = H5Dwrite(dataset_id, get_hdf5_type<T>(), memspace_id, space_id, H5P_DEFAULT, dataset.data );
CHECK_ERROR(status, "Error writing to dataset");
H5Sclose(memspace_id);
H5Sclose(space_id);
H5Dclose(dataset_id);
H5Fclose(file_id);
}
template<typename T>
void load_from_file(cvflann::Matrix<T>& dataset, const String& filename, const String& name)
{
herr_t status;
hid_t file_id = H5Fopen(filename.c_str(), H5F_ACC_RDWR, H5P_DEFAULT);
CHECK_ERROR(file_id,"Error opening hdf5 file.");
hid_t dataset_id;
#if H5Dopen_vers == 2
dataset_id = H5Dopen2(file_id, name.c_str(), H5P_DEFAULT);
#else
dataset_id = H5Dopen(file_id, name.c_str());
#endif
CHECK_ERROR(dataset_id,"Error opening dataset in file.");
hid_t space_id = H5Dget_space(dataset_id);
hsize_t dims_out[2];
H5Sget_simple_extent_dims(space_id, dims_out, NULL);
dataset = cvflann::Matrix<T>(new T[dims_out[0]*dims_out[1]], dims_out[0], dims_out[1]);
status = H5Dread(dataset_id, get_hdf5_type<T>(), H5S_ALL, H5S_ALL, H5P_DEFAULT, dataset[0]);
CHECK_ERROR(status, "Error reading dataset");
H5Sclose(space_id);
H5Dclose(dataset_id);
H5Fclose(file_id);
}
#ifdef HAVE_MPI
namespace mpi
{
/**
* Loads a the hyperslice corresponding to this processor from a hdf5 file.
* @param flann_dataset Dataset where the data is loaded
* @param filename HDF5 file name
* @param name Name of dataset inside file
*/
template<typename T>
void load_from_file(cvflann::Matrix<T>& dataset, const String& filename, const String& name)
{
MPI_Comm comm = MPI_COMM_WORLD;
MPI_Info info = MPI_INFO_NULL;
int mpi_size, mpi_rank;
MPI_Comm_size(comm, &mpi_size);
MPI_Comm_rank(comm, &mpi_rank);
herr_t status;
hid_t plist_id = H5Pcreate(H5P_FILE_ACCESS);
H5Pset_fapl_mpio(plist_id, comm, info);
hid_t file_id = H5Fopen(filename.c_str(), H5F_ACC_RDWR, plist_id);
CHECK_ERROR(file_id,"Error opening hdf5 file.");
H5Pclose(plist_id);
hid_t dataset_id;
#if H5Dopen_vers == 2
dataset_id = H5Dopen2(file_id, name.c_str(), H5P_DEFAULT);
#else
dataset_id = H5Dopen(file_id, name.c_str());
#endif
CHECK_ERROR(dataset_id,"Error opening dataset in file.");
hid_t space_id = H5Dget_space(dataset_id);
hsize_t dims[2];
H5Sget_simple_extent_dims(space_id, dims, NULL);
hsize_t count[2];
hsize_t offset[2];
hsize_t item_cnt = dims[0]/mpi_size+(dims[0]%mpi_size==0 ? 0 : 1);
hsize_t cnt = (mpi_rank<mpi_size-1 ? item_cnt : dims[0]-item_cnt*(mpi_size-1));
count[0] = cnt;
count[1] = dims[1];
offset[0] = mpi_rank*item_cnt;
offset[1] = 0;
hid_t memspace_id = H5Screate_simple(2,count,NULL);
H5Sselect_hyperslab(space_id, H5S_SELECT_SET, offset, NULL, count, NULL);
dataset.rows = count[0];
dataset.cols = count[1];
dataset.data = new T[dataset.rows*dataset.cols];
plist_id = H5Pcreate(H5P_DATASET_XFER);
H5Pset_dxpl_mpio(plist_id, H5FD_MPIO_COLLECTIVE);
status = H5Dread(dataset_id, get_hdf5_type<T>(), memspace_id, space_id, plist_id, dataset.data);
CHECK_ERROR(status, "Error reading dataset");
H5Pclose(plist_id);
H5Sclose(space_id);
H5Sclose(memspace_id);
H5Dclose(dataset_id);
H5Fclose(file_id);
}
}
#endif // HAVE_MPI
} // namespace cvflann::mpi
//! @endcond
#endif /* OPENCV_FLANN_HDF5_H_ */
@@ -31,6 +31,8 @@
#ifndef OPENCV_FLANN_HEAP_H_
#define OPENCV_FLANN_HEAP_H_
//! @cond IGNORED
#include <algorithm>
#include <vector>
@@ -162,4 +164,6 @@ public:
}
//! @endcond
#endif //OPENCV_FLANN_HEAP_H_
@@ -31,6 +31,8 @@
#ifndef OPENCV_FLANN_HIERARCHICAL_CLUSTERING_INDEX_H_
#define OPENCV_FLANN_HIERARCHICAL_CLUSTERING_INDEX_H_
//! @cond IGNORED
#include <algorithm>
#include <map>
#include <cassert>
@@ -845,4 +847,6 @@ private:
}
//! @endcond
#endif /* OPENCV_FLANN_HIERARCHICAL_CLUSTERING_INDEX_H_ */
@@ -31,6 +31,8 @@
#ifndef OPENCV_FLANN_INDEX_TESTING_H_
#define OPENCV_FLANN_INDEX_TESTING_H_
//! @cond IGNORED
#include <cstring>
#include <cassert>
#include <cmath>
@@ -315,4 +317,6 @@ void test_index_precisions(NNIndex<Distance>& index, const Matrix<typename Dista
}
//! @endcond
#endif //OPENCV_FLANN_INDEX_TESTING_H_
@@ -31,6 +31,8 @@
#ifndef OPENCV_FLANN_KDTREE_INDEX_H_
#define OPENCV_FLANN_KDTREE_INDEX_H_
//! @cond IGNORED
#include <algorithm>
#include <map>
#include <cassert>
@@ -623,4 +625,6 @@ private:
}
//! @endcond
#endif //OPENCV_FLANN_KDTREE_INDEX_H_
@@ -31,6 +31,8 @@
#ifndef OPENCV_FLANN_KDTREE_SINGLE_INDEX_H_
#define OPENCV_FLANN_KDTREE_SINGLE_INDEX_H_
//! @cond IGNORED
#include <algorithm>
#include <map>
#include <cassert>
@@ -632,4 +634,6 @@ private:
}
//! @endcond
#endif //OPENCV_FLANN_KDTREE_SINGLE_INDEX_H_
@@ -31,6 +31,8 @@
#ifndef OPENCV_FLANN_KMEANS_INDEX_H_
#define OPENCV_FLANN_KMEANS_INDEX_H_
//! @cond IGNORED
#include <algorithm>
#include <map>
#include <cassert>
@@ -1169,4 +1171,6 @@ private:
}
//! @endcond
#endif //OPENCV_FLANN_KMEANS_INDEX_H_
@@ -31,6 +31,8 @@
#ifndef OPENCV_FLANN_LINEAR_INDEX_H_
#define OPENCV_FLANN_LINEAR_INDEX_H_
//! @cond IGNORED
#include "general.h"
#include "nn_index.h"
@@ -129,4 +131,6 @@ private:
}
//! @endcond
#endif // OPENCV_FLANN_LINEAR_INDEX_H_
@@ -31,6 +31,8 @@
#ifndef OPENCV_FLANN_LOGGER_H
#define OPENCV_FLANN_LOGGER_H
//! @cond IGNORED
#include <stdio.h>
#include <stdarg.h>
@@ -132,4 +134,6 @@ private:
}
//! @endcond
#endif //OPENCV_FLANN_LOGGER_H
@@ -35,6 +35,8 @@
#ifndef OPENCV_FLANN_LSH_INDEX_H_
#define OPENCV_FLANN_LSH_INDEX_H_
//! @cond IGNORED
#include <algorithm>
#include <cassert>
#include <cstring>
@@ -389,4 +391,6 @@ private:
};
}
//! @endcond
#endif //OPENCV_FLANN_LSH_INDEX_H_
@@ -35,6 +35,8 @@
#ifndef OPENCV_FLANN_LSH_TABLE_H_
#define OPENCV_FLANN_LSH_TABLE_H_
//! @cond IGNORED
#include <algorithm>
#include <iostream>
#include <iomanip>
@@ -510,4 +512,6 @@ inline LshStats LshTable<unsigned char>::getStats() const
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//! @endcond
#endif /* OPENCV_FLANN_LSH_TABLE_H_ */
@@ -31,6 +31,8 @@
#ifndef OPENCV_FLANN_DATASET_H_
#define OPENCV_FLANN_DATASET_H_
//! @cond IGNORED
#include <stdio.h>
#include "general.h"
@@ -113,4 +115,6 @@ public:
}
//! @endcond
#endif //OPENCV_FLANN_DATASET_H_
@@ -43,6 +43,8 @@
#ifndef OPENCV_MINIFLANN_HPP
#define OPENCV_MINIFLANN_HPP
//! @cond IGNORED
#include "opencv2/core.hpp"
#include "opencv2/flann/defines.h"
@@ -174,4 +176,6 @@ protected:
} } // namespace cv::flann
//! @endcond
#endif
@@ -36,6 +36,8 @@
#include "result_set.h"
#include "params.h"
//! @cond IGNORED
namespace cvflann
{
@@ -174,4 +176,6 @@ public:
}
//! @endcond
#endif //OPENCV_FLANN_NNINDEX_H
@@ -31,6 +31,8 @@
#ifndef OPENCV_FLANN_OBJECT_FACTORY_H_
#define OPENCV_FLANN_OBJECT_FACTORY_H_
//! @cond IGNORED
#include <map>
namespace cvflann
@@ -88,4 +90,6 @@ private:
}
//! @endcond
#endif /* OPENCV_FLANN_OBJECT_FACTORY_H_ */
@@ -30,6 +30,8 @@
#ifndef OPENCV_FLANN_PARAMS_H_
#define OPENCV_FLANN_PARAMS_H_
//! @cond IGNORED
#include "any.h"
#include "general.h"
#include <iostream>
@@ -95,5 +97,6 @@ inline void print_params(const IndexParams& params)
}
//! @endcond
#endif /* OPENCV_FLANN_PARAMS_H_ */
@@ -31,6 +31,8 @@
#ifndef OPENCV_FLANN_RANDOM_H
#define OPENCV_FLANN_RANDOM_H
//! @cond IGNORED
#include <algorithm>
#include <cstdlib>
#include <vector>
@@ -152,4 +154,6 @@ public:
}
//! @endcond
#endif //OPENCV_FLANN_RANDOM_H
@@ -31,6 +31,8 @@
#ifndef OPENCV_FLANN_RESULTSET_H
#define OPENCV_FLANN_RESULTSET_H
//! @cond IGNORED
#include <algorithm>
#include <cstring>
#include <iostream>
@@ -540,4 +542,6 @@ private:
};
}
//! @endcond
#endif //OPENCV_FLANN_RESULTSET_H
@@ -30,6 +30,8 @@
#ifndef OPENCV_FLANN_SAMPLING_H_
#define OPENCV_FLANN_SAMPLING_H_
//! @cond IGNORED
#include "matrix.h"
#include "random.h"
@@ -77,5 +79,6 @@ Matrix<T> random_sample(const Matrix<T>& srcMatrix, size_t size)
} // namespace
//! @endcond
#endif /* OPENCV_FLANN_SAMPLING_H_ */
@@ -29,6 +29,8 @@
#ifndef OPENCV_FLANN_SAVING_H_
#define OPENCV_FLANN_SAVING_H_
//! @cond IGNORED
#include <cstring>
#include <vector>
@@ -184,4 +186,6 @@ void load_value(FILE* stream, std::vector<T>& value)
}
//! @endcond
#endif /* OPENCV_FLANN_SAVING_H_ */
@@ -31,6 +31,8 @@
#ifndef OPENCV_FLANN_SIMPLEX_DOWNHILL_H_
#define OPENCV_FLANN_SIMPLEX_DOWNHILL_H_
//! @cond IGNORED
namespace cvflann
{
@@ -183,4 +185,6 @@ float optimizeSimplexDownhill(T* points, int n, F func, float* vals = NULL )
}
//! @endcond
#endif //OPENCV_FLANN_SIMPLEX_DOWNHILL_H_
@@ -31,6 +31,8 @@
#ifndef OPENCV_FLANN_TIMER_H
#define OPENCV_FLANN_TIMER_H
//! @cond IGNORED
#include <time.h>
#include "opencv2/core.hpp"
#include "opencv2/core/utility.hpp"
@@ -91,4 +93,6 @@ public:
}
//! @endcond
#endif // FLANN_TIMER_H