Skip to content

Commit

Permalink
add exaple and update .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahabaz-Bagwan committed Dec 15, 2021
1 parent 96a3cfe commit 8af2263
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[Bb]uild/
[Bb]in/
[Ll]ib/
.vscode/
input/
.cache/
30 changes: 30 additions & 0 deletions Example/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#include <FileHandler.hpp>
#include <IterativeClosestPoint.hpp>
#include <KdtreeFlann.hpp>
#include <PointCloudFilters.hpp>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>

int main( int argc, char* argv[] )
{
if( argc < 2 ) {
std::cout << "Please provide input file" << std::endl;
return 1;
}
FileHandler fh;
pointCloud pc = fh.loadXYZfile( argv[ 1 ] );
std::cout << "Input pointcloud size: " << pc.size() << std::endl;

Filter3D filters;
KDtreeFlann kdtree;
IterativeClosestPoint ipc;

pointCloud op;
filters.voxelFilter( pc, std::stod( argv[ 2 ] ), op );
std::cout << "Output pointcloud size: " << op.size() << std::endl;
fh.writeXYZfile( op, "output.xyz" );

return 0;
}

0 comments on commit 8af2263

Please sign in to comment.