Skip to content

Commit

Permalink
Fixed bug in unit test test_people_groundBasedPeopleDetectionApp.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmunaro committed Apr 15, 2013
1 parent fc89e09 commit 844142b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ if(build)
PCL_ADD_TEST(a_people_detection_test test_people_detection
FILES test_people_groundBasedPeopleDetectionApp.cpp
LINK_WITH pcl_gtest pcl_common pcl_io pcl_kdtree pcl_search pcl_features pcl_sample_consensus pcl_filters pcl_io pcl_segmentation
ARGUMENTS ${PCL_SOURCE_DIR}/test/five_people.pcd)
ARGUMENTS ${PCL_SOURCE_DIR}/people/data/trainedLinearSVMForPeopleDetectionWithHOG.yaml ${PCL_SOURCE_DIR}/test/five_people.pcd )

if(BUILD_visualization AND (NOT UNIX OR (UNIX AND DEFINED ENV{DISPLAY})))
PCL_ADD_TEST(a_visualization_test test_visualization
Expand Down
12 changes: 9 additions & 3 deletions test/test_people_groundBasedPeopleDetectionApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,25 @@ int main (int argc, char** argv)
{
if (argc < 2)
{
cerr << "No test file given. Please download `five_people.pcd` and pass their paths to the test." << endl;
cerr << "No svm filename provided. Please download `trainedLinearSVMForPeopleDetectionWithHOG.yaml` and pass its path to the test." << endl;
return (-1);
}

if (argc < 3)
{
cerr << "No test file given. Please download 'five_people.pcd` and pass its path to the test." << endl;
return (-1);
}

cloud = PointCloudT::Ptr (new PointCloudT);
if (pcl::io::loadPCDFile (argv[1], *cloud) < 0)
if (pcl::io::loadPCDFile (argv[2], *cloud) < 0)
{
cerr << "Failed to read test file. Please download `five_people.pcd` and pass its path to the test." << endl;
return (-1);
}

// Algorithm parameters:
svm_filename = "../../people/data/trainedLinearSVMForPeopleDetectionWithHOG.yaml";
svm_filename = argv[1];
min_confidence = -1.5;
min_height = 1.3;
max_height = 2.3;
Expand Down

0 comments on commit 844142b

Please sign in to comment.