Skip to content

Commit

Permalink
* bug in loading the training data set. path iterator was returning a…
Browse files Browse the repository at this point in the history
… boost::filesystem::path object instead of a std::string.

git-svn-id: svn+ssh://svn.pointclouds.org/pcl/trunk@8736 a9d63959-f2ad-4865-b262-bf0e56cfafb6
  • Loading branch information
potthast83 committed Feb 22, 2013
1 parent bfc82c9 commit d91ee01
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tools/unary_classifier_segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,13 @@ loadTrainedFeatures (std::vector<FeatureT::Ptr> &out,
boost::filesystem::extension (it->path ()) == ".pcd")
{
std::stringstream ss;
ss << it->path ().filename ();
ss << it->path ().string ();

print_highlight ("Loading %s \n", ss.str ().c_str ());

FeatureT::Ptr features (new FeatureT);
loadPCDFile (ss.str (), *features);
if (loadPCDFile (ss.str ().c_str (), *features) < 0)
return false;

out.push_back (features);
}
Expand Down Expand Up @@ -202,7 +203,8 @@ main (int argc, char** argv)

// load the trained features
std::vector<FeatureT::Ptr> trained_features;
loadTrainedFeatures (trained_features, dir_name.c_str ());
if (!loadTrainedFeatures (trained_features, dir_name.c_str ()))
return (-1);

print_info ("feature_threshold: %f \n", feature_threshold);
print_info ("normal-radius-search: %f \n", normal_radius_search);
Expand Down

0 comments on commit d91ee01

Please sign in to comment.