Skip to content
Snippets Groups Projects
Commit 9dd985c2 authored by Arnau Ramisa's avatar Arnau Ramisa
Browse files

fixes

parent b94cc67c
No related branches found
No related tags found
No related merge requests found
-1.000000 -0.000000 -0.000000
-0.707107 -0.707107 -0.000000
-0.707107 -0.000000 -0.707107
-0.707107 0.707107 0.000000
-0.000000 -1.000000 -0.000000
-0.000000 -0.707107 -0.707107
-0.000000 -0.000000 -1.000000
0.000000 0.707107 -0.707107
0.000000 1.000000 0.000000
0.707107 -0.707107 0.000000
0.707107 0.000000 -0.707107
0.707107 0.707107 0.000000
1.000000 0.000000 0.000000
......@@ -8,6 +8,8 @@ include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
SET(CMAKE_BUILD_TYPE "RELEASE")
# add the necessary include directories
INCLUDE_DIRECTORIES(.)
# application source files
......
......@@ -279,7 +279,6 @@ FindddAlgorithm::FindddAlgorithm(FindddConfig new_cfg)
// Main function to compute FINDDD descriptors
void FindddAlgorithm::compute_ndescs_integral_spatial_interpolation(pcl::PointCloud<pcl::PointXYZ>& cloud, DescriptorSet &descriptor_set)
{
clock_t start=clock();
if(this->verbose_level_>=2)
{
......
......@@ -306,42 +306,46 @@ protected:
float num;
getline(ifs, line);
std::istringstream iss(line);
int i=0;
do
{
iss >> num;
this->pca_mean_.push_back(num);
}while(iss);
}while(!iss.eof());
}
int dout=0;
while (ifs.good())
{
float num;
this->pca_matrix_.push_back(std::vector<float>());
getline(ifs, line);
std::istringstream iss(line);
do
//line.erase(line.find_last_not_of(" \n\r\t")+1);
if(line.size()>0)
{
iss >> num;
this->pca_matrix_.back().push_back(num);
}while(iss);
if(dout==0) dout=this->pca_matrix_.back().size();
else if(dout!=this->pca_matrix_.back().size())
{
if(this->verbose_level_>=1)
std::cout<<"Not consistent PCA data."<<std::endl;
exit(-1);
this->pca_matrix_.push_back(std::vector<float>());
std::istringstream iss(line);
do
{
iss >> num;
this->pca_matrix_.back().push_back(num);
}while(!iss.eof());
if(dout==0) dout=this->pca_matrix_.back().size();
else if(dout!=this->pca_matrix_.back().size())
{
if(this->verbose_level_>=1)
std::cout<<"Not consistent PCA data. Previous PCA matrix row width: "<<dout<<". Current PCA matrix row width: "<<this->pca_matrix_.back().size()<<std::endl;
exit(-1);
}
}
}
if(this->pca_mean_.size() != this->pca_matrix_.size())
{
if (this->verbose_level_>=1)
std::cout<<"Not consistent PCA data."<<std::endl;
std::cout<<"Not consistent PCA data: mean vector size: "<<this->pca_mean_.size()<<" PCA matrix size: "<<this->pca_matrix_.size()<<"x"<<pca_matrix_[0].size()<<std::endl;
exit(-1);
}
//matrix correctly loaded, transposing for ease of use later
std::vector< std::vector<float> > PCA_t;
PCA_t.resize(this->pca_matrix_[0].size(), std::vector<float>(this->pca_matrix_.size()));
for(int i=0;i<this->pca_matrix_[0].size();i++)
for(int j=0;j<this->pca_matrix_.size();j++)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment