Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef REGISTRATION_H_
00029 #define REGISTRATION_H_
00030
00031 #include "rtabmap/core/RtabmapExp.h"
00032
00033 #include <rtabmap/core/Parameters.h>
00034 #include <rtabmap/core/Signature.h>
00035 #include <rtabmap/core/RegistrationInfo.h>
00036
00037 namespace rtabmap {
00038
00039 class RTABMAP_EXP Registration
00040 {
00041 public:
00042 enum Type {
00043 kTypeUndef = -1,
00044 kTypeVis = 0,
00045 kTypeIcp = 1,
00046 kTypeVisIcp = 2
00047 };
00048
00049 public:
00050 static Registration * create(const ParametersMap & parameters);
00051 static Registration * create(Type & type, const ParametersMap & parameters = ParametersMap());
00052
00053 public:
00054 virtual ~Registration();
00055 virtual void parseParameters(const ParametersMap & parameters);
00056
00057 bool isImageRequired() const;
00058 bool isScanRequired() const;
00059 bool isUserDataRequired() const;
00060
00061 int getMinVisualCorrespondences() const;
00062 float getMinGeometryCorrespondencesRatio() const;
00063
00064 bool varianceFromInliersCount() const {return varianceFromInliersCount_;}
00065 bool force3DoF() const {return force3DoF_;}
00066
00067
00068 void setChildRegistration(Registration * child);
00069
00070 Transform computeTransformation(
00071 const Signature & from,
00072 const Signature & to,
00073 Transform guess = Transform::getIdentity(),
00074 RegistrationInfo * info = 0) const;
00075 Transform computeTransformation(
00076 const SensorData & from,
00077 const SensorData & to,
00078 Transform SensorData = Transform::getIdentity(),
00079 RegistrationInfo * info = 0) const;
00080
00081 Transform computeTransformationMod(
00082 Signature & from,
00083 Signature & to,
00084 Transform guess = Transform::getIdentity(),
00085 RegistrationInfo * info = 0) const;
00086
00087 protected:
00088
00089 Registration(const ParametersMap & parameters = ParametersMap(), Registration * child = 0);
00090
00091
00092
00093 virtual Transform computeTransformationImpl(
00094 Signature & from,
00095 Signature & to,
00096 Transform guess,
00097 RegistrationInfo & info) const = 0;
00098
00099 virtual bool isImageRequiredImpl() const {return false;}
00100 virtual bool isScanRequiredImpl() const {return false;}
00101 virtual bool isUserDataRequiredImpl() const {return false;}
00102 virtual int getMinVisualCorrespondencesImpl() const {return 0;}
00103 virtual float getMinGeometryCorrespondencesRatioImpl() const {return 0.0f;}
00104
00105 private:
00106 bool varianceFromInliersCount_;
00107 bool force3DoF_;
00108 Registration * child_;
00109
00110 };
00111
00112 }
00113
00114 #endif