Commit f1a83bf3 authored by Hani JavanHemmat's avatar Hani JavanHemmat

source loaded

parent 64eb865e
add_subdirectory( include )
add_subdirectory( src )
#ifndef _ADJUSTED_BOX_HPP_20150810
#define _ADJUSTED_BOX_HPP_20150810
// *****************************************************************************
// ********************* H E A D E R S ***************************
// *****************************************************************************
#include "haniDefinitions.hpp"
namespace hjh {
namespace registration {
// *****************************************************************************
// ********************* E N U E R A T I O N S ***************************
// *****************************************************************************
// empty
// *****************************************************************************
// ********************* C L A S S E S ***************************
// *****************************************************************************
/*!
* \brief The AdjustedBox class contains the transformation data for a box to be
* adjusted into its corresponding FARO-based 3D model.
*/
class AdjustedBox
{
public:
//--------------------------------------------------------------------------
AdjustedBox();
//!< Default constructor.
AdjustedBox( const AdjustedBox &obj );
//!< Copy constructor.
/*!
* \brief AdjustedBox is the constructor.
* \param[in] box_number_ the box number.
* \param[in] box_ID_ the box ID.
* \param[in] transformation_ the transformation.
*/
AdjustedBox(
int box_number_
, std::string box_ID_
, hjh::Pose transformation_
);
virtual
~AdjustedBox();
//!< Destructor.
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
virtual
inline
AdjustedBox&
operator=( const AdjustedBox &obj );
//!< Overloaded '=' (assignemt) operator.
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
typedef boost::shared_ptr<AdjustedBox> Ptr;
//!< Shared pointer.
typedef boost::shared_ptr<const AdjustedBox> ConstPtr;
//!< Const shared pointer.
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
virtual
inline
int
get_box_number() const;
//!< Returns the corresponding data member.
virtual
inline
std::string
get_box_ID() const;
//!< Returns the corresponding data member.
virtual
inline
hjh::Pose
get_transformation() const;
//!< Returns the corresponding data member.
virtual
inline
void
set_box_number( int number_ );
//!< Sets the corresponding data member.
virtual
inline
void
set_box_ID( std::string id_ );
//!< Sets the corresponding data member.
virtual
inline
void
set_transformation( hjh::Pose trans_ );
//!< Sets the corresponding data member.
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
friend std::ostream&
operator<<(std::ostream& os, const AdjustedBox& obj);
//!< Overloaded output-stream.
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
private:
friend class boost::serialization::access;
//!< To handle boost serialization.
template<class Archive>
void
serialize( Archive & ar, const unsigned int version );
//!< Boost serialization handler.
//--------------------------------------------------------------------------
protected:
//--------------------------------------------------------------------------
/*!
* \brief box_number indicates the current box order in a Box-Chain structure.
*/
int box_number;
/*!
* \brief box_ID the box ID.
*/
std::string box_ID;
/*!
* \brief transformation determines the required transformation of the current
* box (in a Box-Chain) to adjust it into its corresponding FARO-based 3D model.
* \note it is presented as \ref hjh::Pose format.
*/
hjh::Pose transformation;
//--------------------------------------------------------------------------
};
// *****************************************************************************
// *****************************************************************************
} // end of namespace registration
} // end of namespace hjh
#include "Registration/AdjustedBox_imp.hpp"
#endif
// *****************************************************************************
// ********************* E N D O F F I L E ***************************
// *****************************************************************************
#ifndef _ADJUSTED_BOX_IMP_HPP_20150810
#define _ADJUSTED_BOX_IMP_HPP_20150810
#include "boost_serialization.hpp"
namespace hjh {
namespace registration {
// forward declaration
class AdjustedBox;
// *****************************************************************************
// *****************************************************************************
template<class Archive>
void
AdjustedBox::serialize( Archive & ar, const unsigned int version )
{
ar & BOOST_SERIALIZATION_NVP( box_number );
ar & BOOST_SERIALIZATION_NVP( box_ID );
ar & BOOST_SERIALIZATION_NVP( transformation );
}
// *****************************************************************************
// *****************************************************************************
} // end of namespace registration
} // end of namespace hjh
#endif
// *****************************************************************************
// ********************* E N D O F F I L E ***************************
// *****************************************************************************
This diff is collapsed.
#ifndef _BOX_PYRAMID_PAIR_IMP_HPP_20150727
#define _BOX_PYRAMID_PAIR_IMP_HPP_20150727
#include "boost_serialization.hpp"
namespace hjh {
namespace registration {
// forward declaration
class BoxPyramidPair;
// *****************************************************************************
// *****************************************************************************
template<class Archive>
void
BoxPyramidPair::serialize( Archive & ar, const unsigned int version )
{
ar & BOOST_SERIALIZATION_NVP( flag_valid );
ar & BOOST_SERIALIZATION_NVP( box );
ar & BOOST_SERIALIZATION_NVP( pyramid );
ar & BOOST_SERIALIZATION_NVP( score );
ar & BOOST_SERIALIZATION_NVP( number_of_matches );
ar & BOOST_SERIALIZATION_NVP( transform );
ar & BOOST_SERIALIZATION_NVP( transform_ICP );
ar & BOOST_SERIALIZATION_NVP( comparison_mode );
}
// *****************************************************************************
// *****************************************************************************
} // end of namespace registration
} // end of namespace hjh
#endif
// *****************************************************************************
// ********************* E N D O F F I L E ***************************
// *****************************************************************************
This diff is collapsed.
#ifndef _BOX_PYRAMID_REGISTRATION_IMP_20150812_HPP_
#define _BOX_PYRAMID_REGISTRATION_IMP_20150812_HPP_
// *****************************************************************************
// *****************************************************************************
// *****************************************************************************
// ********************* H E A D E R S ***************************
// *****************************************************************************
//#include "boost_serialization.hpp"
namespace hjh {
namespace registration {
// forward declaration
//class FuseColorData;
//==============================================================================
//==============================================================================
//template<class Archive>
//void
//FuseColorData::serialize( Archive & ar, const unsigned int version )
//{
// ar & BOOST_SERIALIZATION_NVP( flag_criterion_factor );
// ar & BOOST_SERIALIZATION_NVP( tolerance );
// ar & BOOST_SERIALIZATION_NVP( plus_neighbours_weight );
// ar & BOOST_SERIALIZATION_NVP( cross_neighbours_weight );
// ar & BOOST_SERIALIZATION_NVP( direct_pixel_weight );
// ar & BOOST_SERIALIZATION_NVP( flag_affect_neighbours );
// ar & BOOST_SERIALIZATION_NVP( flag_only_empty_neighbours );
//}
//==============================================================================
//==============================================================================
// *****************************************************************************
// *****************************************************************************
} // end of namespace pcd2img
} // end of namespace registration
#endif
// *****************************************************************************
// ********************* E N D O F F I L E ***************************
// *****************************************************************************
This diff is collapsed.
This diff is collapsed.
#ifndef _REGISTRATION_PIPELINE_CONFIG_IMP_HPP_20150814_
#define _REGISTRATION_PIPELINE_CONFIG_IMP_HPP_20150814_
// *****************************************************************************
// *****************************************************************************
// *****************************************************************************
// ********************* H E A D E R S ***************************
// *****************************************************************************
#include "boost_serialization.hpp"
namespace hjh {
namespace registration {
// forward declaration
class ICP_config;
//==============================================================================
//==============================================================================
template<class Archive>
void
ICP_config::serialize( Archive & ar, const unsigned int version )
{
ar & BOOST_SERIALIZATION_NVP( euclidean_fitness_epsilon );
ar & BOOST_SERIALIZATION_NVP( corr_dist_threshold );
ar & BOOST_SERIALIZATION_NVP( max_iterations );
ar & BOOST_SERIALIZATION_NVP( ransac_iterations );
ar & BOOST_SERIALIZATION_NVP( inlier_threshold );
ar & BOOST_SERIALIZATION_NVP( transformation_epsilon );
}
//==============================================================================
//==============================================================================
// *****************************************************************************
// *****************************************************************************
} // end of namespace registration
} // end of namespace hjh
#endif
// *****************************************************************************
// ********************* E N D O F F I L E ***************************
// *****************************************************************************
// *****************************************************************************
// ********************* H E A D E R S ***************************
// *****************************************************************************
#include "Registration/AdjustedBox.hpp"
#include <sstream>
namespace hjh {
namespace registration {
// *****************************************************************************
// ********************* G L O B A L S ***************************
// *****************************************************************************
// empty
// *****************************************************************************
// ********************* P R O T O T Y P E S ***************************
// *****************************************************************************
// empty
// *****************************************************************************
// ********************* D E F I N I T I O N S ***************************
// *****************************************************************************
AdjustedBox::AdjustedBox()
: box_number( -1 )
, box_ID( "" )
, transformation()
{
// empty
}
//==============================================================================
//==============================================================================
AdjustedBox::AdjustedBox( const AdjustedBox &obj )
: box_number( obj.box_number )
, box_ID( obj.box_ID )
, transformation( obj.transformation )
{
// empty
}
//==============================================================================
//==============================================================================
AdjustedBox::AdjustedBox(
int box_number_
, std::string box_ID_
, hjh::Pose transformation_
)
: box_number( box_number_ )
, box_ID( box_ID_ )
, transformation( transformation_ )
{
// empty
}
//==============================================================================
//==============================================================================
AdjustedBox::~AdjustedBox()
{
// empty
}
//==============================================================================
//==============================================================================
AdjustedBox&
AdjustedBox::operator=( const AdjustedBox &obj )
{
if ( this != &obj )
{
this->box_number = obj.box_number;
this->box_ID = obj.box_ID;
this->transformation = obj.transformation;
}
// for cascaded assignments.
return *this;
}
//==============================================================================
//==============================================================================
int
AdjustedBox::get_box_number() const
{
return box_number;
}
//==============================================================================
//==============================================================================
std::string
AdjustedBox::get_box_ID() const
{
return box_ID;
}
//==============================================================================
//==============================================================================
hjh::Pose
AdjustedBox::get_transformation() const
{
return transformation;
}
//==============================================================================
//==============================================================================
void
AdjustedBox::set_box_number( int number_ )
{
box_number = number_;
}
//==============================================================================
//==============================================================================
void
AdjustedBox::set_box_ID( std::string id_ )
{
box_ID = id_;
}
//==============================================================================
//==============================================================================
void
AdjustedBox::set_transformation( hjh::Pose trans_ )
{
transformation = trans_;
}
//==============================================================================
//==============================================================================
std::ostream&
operator<<( std::ostream& os, const AdjustedBox& obj )
{
os
<< " box_number : " << obj.box_number
<< "\n box_ID : " << obj.box_ID
<< "\n rotation : " << obj.transformation.rotation
<< "\n translation : " << obj.transformation.translation
;
return os;
}
//==============================================================================
//==============================================================================
} // end of namespace registration
} // end of namespace hjh
// *****************************************************************************
// ********************* E N D O F F I L E ***************************
// *****************************************************************************
This diff is collapsed.
This diff is collapsed.
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
# ******************************************************************************
# ******************************************************************************
SET(INCLUDE_DIRS
#${PROJECT_SOURCE_DIR}/include
${OpenCV_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
#${VTK_INCLUDE_DIRS}
#${ZLIB_INCLUDE_DIRS}
#${Freenect_INCLUDE_DIRS}
#${OpenNI2_INCLUDE_DIRs}
${Boost_INCLUDE_DIRs}
#${QT_INCLUDE_DIRs}
#${CUDA_INCLUDE_DIRs}
#${EIGEN_INCLUDE_DIRs}
#${RTABMap_INCLUDE_DIRS}
#${USB_INCLUDE_DIRS}
#${LIBUSB_1_INCLUDE_DIRS}/libusb-1.0/
)
# ******************************************************************************
# ******************************************************************************
SET(LIBRARIES
#${PROJECT_SOURCE_DIR}/lib
${OpenCV_LIBRARIES}
${PCL_LIBRARIES}
#${VTK_LIBRARIES}
#${ZLIB_LIBRARIES}
#${Freenect_LIBRARIES}
#${OpenNI2_LIBRARIES}
${Boost_LIBRARIES}
#${QT_LIBRARIES}
#${CUDA_LIBRARIES}
#${EIGEN_LIBRARIES}
#${RTABMap_LIBRARIES}
#${CMAKE_THREAD_LIBS_INIT}
)
# ******************************************************************************
# ******************************************************************************
INCLUDE_DIRECTORIES( ${INCLUDE_DIRS} )
##==============================================================================
##==============================================================================
SET( RP_SRC
RegistrationPipeline_config.cpp
RegistrationPipeline.cpp
)
ADD_LIBRARY( RegistrationPipeline ${RP_SRC} )
IF (BUILD_SHARED_LIBS)
TARGET_LINK_LIBRARIES( RegistrationPipeline
haniUtilities
BaseConfig
${LIBRARIES}
)
ENDIF()
##==============================================================================
##==============================================================================
SET( BPP_SRC
BoxPyramidRegistration.cpp
AdjustedBox.cpp
BoxPyramidPair.cpp
)
ADD_LIBRARY( BoxPyramidRegistration ${BPP_SRC} )
IF (BUILD_SHARED_LIBS)
TARGET_LINK_LIBRARIES( BoxPyramidRegistration
# haniUtilities
Utilities
${LIBRARIES}
)
ENDIF()
##==============================================================================
##==============================================================================
# ******************************************************************************
# ******************************************************************************
# end of file
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment