mirror of
https://github.com/opencv/opencv.git
synced 2025-01-21 08:37:57 +08:00
Bug fix in flann wrapper
This commit is contained in:
parent
9bf80fb209
commit
204c54291d
@ -104,7 +104,7 @@ Index_<T>::Index_(const Mat& dataset, const IndexParams& params)
|
|||||||
{
|
{
|
||||||
CV_Assert(dataset.type() == CvType<T>::type());
|
CV_Assert(dataset.type() == CvType<T>::type());
|
||||||
CV_Assert(dataset.isContinuous());
|
CV_Assert(dataset.isContinuous());
|
||||||
::cvflann::Matrix<float> m_dataset((T*)dataset.ptr<T>(0), dataset.rows, dataset.cols);
|
::cvflann::Matrix<T> m_dataset((T*)dataset.ptr<T>(0), dataset.rows, dataset.cols);
|
||||||
|
|
||||||
nnIndex = new ::cvflann::Index<T>(m_dataset, params);
|
nnIndex = new ::cvflann::Index<T>(m_dataset, params);
|
||||||
nnIndex->buildIndex();
|
nnIndex->buildIndex();
|
||||||
|
Loading…
Reference in New Issue
Block a user