renamed cv::flann to cv::cvflann to avoid name conflicts
This commit is contained in:
@@ -149,7 +149,7 @@ namespace cv{
|
||||
std::vector<int>& desc_idxs, std::vector<int>& pose_idxs, std::vector<float>& distances,
|
||||
CvMat* avg = 0, CvMat* eigenvalues = 0);
|
||||
|
||||
void FindOneWayDescriptor(cv::flann::Index* m_pca_descriptors_tree, CvSize patch_size, int m_pca_dim_low, int m_pose_count, IplImage* patch, int& desc_idx, int& pose_idx, float& distance,
|
||||
void FindOneWayDescriptor(cv::cvflann::Index* m_pca_descriptors_tree, CvSize patch_size, int m_pca_dim_low, int m_pose_count, IplImage* patch, int& desc_idx, int& pose_idx, float& distance,
|
||||
CvMat* avg = 0, CvMat* eigenvalues = 0);
|
||||
|
||||
void FindOneWayDescriptorEx(int desc_count, const OneWayDescriptor* descriptors, IplImage* patch,
|
||||
@@ -163,7 +163,7 @@ namespace cv{
|
||||
std::vector<float>& distances, std::vector<float>& scales,
|
||||
CvMat* avg, CvMat* eigenvectors);
|
||||
|
||||
void FindOneWayDescriptorEx(cv::flann::Index* m_pca_descriptors_tree, CvSize patch_size, int m_pca_dim_low, int m_pose_count, IplImage* patch,
|
||||
void FindOneWayDescriptorEx(cv::cvflann::Index* m_pca_descriptors_tree, CvSize patch_size, int m_pca_dim_low, int m_pose_count, IplImage* patch,
|
||||
float scale_min, float scale_max, float scale_step,
|
||||
int& desc_idx, int& pose_idx, float& distance, float& scale,
|
||||
CvMat* avg, CvMat* eigenvectors);
|
||||
@@ -800,7 +800,7 @@ namespace cv{
|
||||
|
||||
#if defined(_KDTREE)
|
||||
|
||||
void FindOneWayDescriptor(cv::flann::Index* m_pca_descriptors_tree, CvSize patch_size, int m_pca_dim_low, int m_pose_count, IplImage* patch, int& desc_idx, int& pose_idx, float& distance,
|
||||
void FindOneWayDescriptor(cv::cvflann::Index* m_pca_descriptors_tree, CvSize patch_size, int m_pca_dim_low, int m_pose_count, IplImage* patch, int& desc_idx, int& pose_idx, float& distance,
|
||||
CvMat* avg, CvMat* eigenvectors)
|
||||
{
|
||||
desc_idx = -1;
|
||||
@@ -848,8 +848,8 @@ namespace cv{
|
||||
//--------
|
||||
|
||||
//float* target = new float[m_pca_dim_low];
|
||||
//::flann::KNNResultSet res(1,pca_coeffs->data.fl,m_pca_dim_low);
|
||||
//::flann::SearchParams params;
|
||||
//::cvflann::KNNResultSet res(1,pca_coeffs->data.fl,m_pca_dim_low);
|
||||
//::cvflann::SearchParams params;
|
||||
//params.checks = -1;
|
||||
|
||||
//int maxDepth = 1000000;
|
||||
@@ -875,7 +875,7 @@ namespace cv{
|
||||
object_ptr[i] = pca_coeffs->data.fl[i];
|
||||
}
|
||||
|
||||
m_pca_descriptors_tree->knnSearch(m_object, m_indices, m_dists, 1, cv::flann::SearchParams(-1) );
|
||||
m_pca_descriptors_tree->knnSearch(m_object, m_indices, m_dists, 1, cv::cvflann::SearchParams(-1) );
|
||||
|
||||
desc_idx = ((int*)(m_indices.ptr<int>(0)))[0] / m_pose_count;
|
||||
pose_idx = ((int*)(m_indices.ptr<int>(0)))[0] % m_pose_count;
|
||||
@@ -1109,7 +1109,7 @@ namespace cv{
|
||||
}
|
||||
|
||||
#if defined(_KDTREE)
|
||||
void FindOneWayDescriptorEx(cv::flann::Index* m_pca_descriptors_tree, CvSize patch_size, int m_pca_dim_low,
|
||||
void FindOneWayDescriptorEx(cv::cvflann::Index* m_pca_descriptors_tree, CvSize patch_size, int m_pca_dim_low,
|
||||
int m_pose_count, IplImage* patch,
|
||||
float scale_min, float scale_max, float scale_step,
|
||||
int& desc_idx, int& pose_idx, float& distance, float& scale,
|
||||
@@ -1633,13 +1633,13 @@ namespace cv{
|
||||
int pca_dim_low = this->GetDescriptor(0)->GetPCADimLow();
|
||||
|
||||
//if (!m_pca_descriptors_matrix)
|
||||
// m_pca_descriptors_matrix = new ::flann::Matrix<float>(n*m_pose_count,pca_dim_low);
|
||||
// m_pca_descriptors_matrix = new ::cvflann::Matrix<float>(n*m_pose_count,pca_dim_low);
|
||||
//else
|
||||
//{
|
||||
// if ((m_pca_descriptors_matrix->cols != pca_dim_low)&&(m_pca_descriptors_matrix->rows != n*m_pose_count))
|
||||
// {
|
||||
// delete m_pca_descriptors_matrix;
|
||||
// m_pca_descriptors_matrix = new ::flann::Matrix<float>(n*m_pose_count,pca_dim_low);
|
||||
// m_pca_descriptors_matrix = new ::cvflann::Matrix<float>(n*m_pose_count,pca_dim_low);
|
||||
// }
|
||||
//}
|
||||
|
||||
@@ -1657,10 +1657,10 @@ namespace cv{
|
||||
}
|
||||
cv::Mat pca_descriptors_mat(m_pca_descriptors_matrix,false);
|
||||
|
||||
//::flann::KDTreeIndexParams params;
|
||||
//::cvflann::KDTreeIndexParams params;
|
||||
//params.trees = 1;
|
||||
//m_pca_descriptors_tree = new KDTree(pca_descriptors_mat);
|
||||
m_pca_descriptors_tree = new cv::flann::Index(pca_descriptors_mat,cv::flann::KDTreeIndexParams(1));
|
||||
m_pca_descriptors_tree = new cv::cvflann::Index(pca_descriptors_mat,cv::cvflann::KDTreeIndexParams(1));
|
||||
//cvReleaseMat(&m_pca_descriptors_matrix);
|
||||
//m_pca_descriptors_tree->buildIndex();
|
||||
}
|
||||
|
Reference in New Issue
Block a user