Giter VIP home page Giter VIP logo

featurebasedalignment's Introduction

Feature Based Alignment

Some programs to roughly align two point clouds representing the same underlying geometry.
The goal is to accurately register two point clouds created from different image spectrums 
(e.g. visual to infrared), in different coordinate systems of different scales.  

This depends on:
- PCL (http://pointclouds.org/)
- CMake and some c++ compiler
Also used the pcl visualization library, which depends on some toolkit (I use QT4).

Current approach is:
- Take two point clouds 
- Estimate normals for each point
- Find FPFH Features for each point
- Find likely correspondences between two models (based on FPFH)
- Use top features to estimate scale, 
- Run RANSAC to estimate transformation, and eliminate correspondences
- Use remaining correspondences to run ICP for finer alignment


Usage Example:
#estimate correspondences - saves a corrs.txt file
./corrs cloudA.ply cloudB.ply AtoBCorrs.txt

#run rough alignment using corrs
./align cloudA.ply cloudB.ply AtoBCorrs.txt

#saves files:
irRough.pcd - cloud A after RANSAC alignment
eoRough.pcd - cloud B after RANSAC alignment
irFinal.pcd - cloud A after ICP alignment
eoFinal.pcd - cloud B after ICP alignment


other tools include bbox and circular cropping
./bbox cloud.pcd

./crop cloud.pcd centerX centerY centerZ radius out.pcd

featurebasedalignment's People

Contributors

andymiller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

featurebasedalignment's Issues

Building problem

Hi,
I have tried to build FeatureBasedAlignment, but it does not work out. Can you help to fix the problem, please
Thanks,

My error:

Scanning dependencies of target pcl_alignment
[ 5%] Building CXX object CMakeFiles/pcl_alignment.dir/alignment.cxx.o
In file included from /home/alex/Downloads/FeatureBasedAlignment-master/alignment.cxx:1:0:
/home/alex/Downloads/FeatureBasedAlignment-master/alignment.h: In instantiation of ‘pcl::CorrespondencesPtr RoughFeatureAlignment::estimateCorrespondances(typename pcl::PointCloud::Ptr&, typename pcl::PointCloud::Ptr&, unsigned int) [with T = pcl::FPFHSignature33; pcl::CorrespondencesPtr = boost::shared_ptr<std::vector<pcl::Correspondence, Eigen::aligned_allocatorpcl::Correspondence > >; typename pcl::PointCloud::Ptr = boost::shared_ptr<pcl::PointCloudpcl::FPFHSignature33 >]’:
/home/alex/Downloads/FeatureBasedAlignment-master/alignment.cxx:28:59: required from here
/home/alex/Downloads/FeatureBasedAlignment-master/alignment.h:105:3: warning: ‘void pcl::registration::CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::setInputCloud(const PointCloudSourceConstPtr&) [with PointSource = pcl::FPFHSignature33; PointTarget = pcl::FPFHSignature33; Scalar = float; pcl::registration::CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::PointCloudSourceConstPtr = boost::shared_ptr<const pcl::PointCloudpcl::FPFHSignature33 >]’ is deprecated: [pcl::registration::CorrespondenceEstimationBase::setInputCloud] setInputCloud is deprecated. Please use setInputSource instead. [-Wdeprecated-declarations]
ce.setInputCloud(sourcePts);
^
In file included from /usr/local/include/pcl-1.8/pcl/registration/correspondence_estimation.h:452:0,
from /home/alex/Downloads/FeatureBasedAlignment-master/util.h:5,
from /home/alex/Downloads/FeatureBasedAlignment-master/alignment.h:4,
from /home/alex/Downloads/FeatureBasedAlignment-master/alignment.cxx:1:
/usr/local/include/pcl-1.8/pcl/registration/impl/correspondence_estimation.hpp:48:1: note: declared here
pcl::registration::CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::setInputCloud (const typename pcl::registration::CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::PointCloudSourceConstPtr &cloud)
^
In file included from /usr/local/include/pcl-1.8/pcl/sample_consensus/sac_model.h:52:0,
from /usr/local/include/pcl-1.8/pcl/sample_consensus/sac.h:45,
from /usr/local/include/pcl-1.8/pcl/sample_consensus/ransac.h:44,
from /usr/local/include/pcl-1.8/pcl/registration/icp.h:45,
from /home/alex/Downloads/FeatureBasedAlignment-master/alignment.h:6,
from /home/alex/Downloads/FeatureBasedAlignment-master/alignment.cxx:1:
/usr/local/include/pcl-1.8/pcl/sample_consensus/model_types.h: In function ‘void __static_initialization_and_destruction_0(int, int)’:
/usr/local/include/pcl-1.8/pcl/sample_consensus/model_types.h:99:3: warning: ‘pcl::SAC_SAMPLE_SIZE’ is deprecated: This map is deprecated and is kept only to prevent breaking existing user code. Starting from PCL 1.8.0 model sample size is a protected member of the SampleConsensusModel class [-Wdeprecated-declarations]
SAC_SAMPLE_SIZE (sample_size_pairs, sample_size_pairs + sizeof (sample_size_pairs) / sizeof (SampleSizeModel));
^
/usr/local/include/pcl-1.8/pcl/sample_consensus/model_types.h:99:3: note: declared here
[ 11%] Building CXX object CMakeFiles/pcl_alignment.dir/util.cxx.o
[ 17%] Linking CXX static library libpcl_alignment.a
[ 17%] Built target pcl_alignment
Scanning dependencies of target distance
[ 23%] Building CXX object CMakeFiles/distance.dir/distance.cxx.o
[ 29%] Linking CXX executable distance
/usr/bin/ld: CMakeFiles/distance.dir/distance.cxx.o: undefined reference to symbol '_ZN3pcl11KdTreeFLANNINS_8PointXYZEN5flann9L2_SimpleIfEEE10setEpsilonEf'
/usr/local/lib/libpcl_kdtree.so.1.8: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/distance.dir/build.make:158: recipe for target 'distance' failed
make[2]: *** [distance] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/distance.dir/all' failed
make[1]: *** [CMakeFiles/distance.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.