00001 #if 0
00002
00003 #ifndef _GROUPSS_MAP_HPP_
00004 #define _GROUPSS_MAP_HPP_
00005
00006 #include <vector>
00007
00008 #include <boost/serialization/vector.hpp>
00009
00010 #include "image/JfrImage.hpp"
00011 #include "model3d/Image3D.hpp"
00012 #include "gfm/InterestPoint.hpp"
00013 #include "jmath/jblas.hpp"
00014
00015 #include "facetsmap/densitymap.hpp"
00016 #include "facetsmap/facetsanalyser.hpp"
00017 #include "facetsmap/groupsmatching.hpp"
00018
00019 namespace jafar {
00020 namespace facetsmap {
00021 class FacetsGroup;
00022 class GroupsMap : public FacetsAnalyser {
00023 public:
00024 GroupsMap() : FacetsAnalyser() {}
00025 virtual ~GroupsMap() {};
00026 public:
00027 virtual void processImage(boost::numeric::ublas::bounded_matrix<double,4,4>& robotpos,
00028 const jafar::image::JfrImage& imgl, const jafar::image::JfrImage& imgr, const jafar::stereo::CalibrageMatrices& cm, int time, bool updateFacet, jafar::model3d::Image3DTemplate<jafar::model3d::Point3D>& im3d);
00029 private:
00033 void selectBestFacets(std::vector<Candidat>& candidats, vFacets& candidatsFacets);
00041 void insertGroup(FacetsGroup* fg, std::vector<Candidat>& vc, vFacets& candidatsFacets);
00042
00048 vFacets findCloseMatch(Facet* f);
00052 void findGroupMatches(std::vector<Candidat>& candidats, vFacets& candidatsFacets);
00053 public:
00057 static GroupsMap* loadFromFile(char* filename);
00061 void saveToFile(char* filename);
00062 private:
00063 friend class boost::serialization::access;
00064 template<class Archive>
00065 void serialize(Archive & ar, const unsigned int version);
00066 private:
00067 DensityMap m_densityMap;
00068 vFacetsGroup m_groups;
00069 };
00070 template<class Archive>
00071 void GroupsMap::serialize(Archive & ar, const unsigned int version)
00072 {
00073 ar & boost::serialization::base_object<FacetsAnalyser>(*this);
00074 ar & m_densityMap;
00075 ar & m_groups;
00076 }
00077 };
00078 };
00079
00080
00081 #endif
00082
00083 #endif