diff options
author | cathook <b01902109@csie.ntu.edu.tw> | 2014-06-01 14:16:38 +0800 |
---|---|---|
committer | cathook <b01902109@csie.ntu.edu.tw> | 2014-06-01 14:16:38 +0800 |
commit | c60dba253906a30d3042f1dc4e9b7fe38f053fbe (patch) | |
tree | 57018f05908f0edef30cba255d46688ebfd5cd85 /meowpp.test/inc/autostitch.h | |
parent | 8bc9f2e8496c0c021b80eb0fb21e828f5900f08d (diff) | |
download | meow-c60dba253906a30d3042f1dc4e9b7fe38f053fbe.tar meow-c60dba253906a30d3042f1dc4e9b7fe38f053fbe.tar.gz meow-c60dba253906a30d3042f1dc4e9b7fe38f053fbe.tar.bz2 meow-c60dba253906a30d3042f1dc4e9b7fe38f053fbe.tar.lz meow-c60dba253906a30d3042f1dc4e9b7fe38f053fbe.tar.xz meow-c60dba253906a30d3042f1dc4e9b7fe38f053fbe.tar.zst meow-c60dba253906a30d3042f1dc4e9b7fe38f053fbe.zip |
add test...
Diffstat (limited to 'meowpp.test/inc/autostitch.h')
-rw-r--r-- | meowpp.test/inc/autostitch.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/meowpp.test/inc/autostitch.h b/meowpp.test/inc/autostitch.h new file mode 100644 index 0000000..38e809f --- /dev/null +++ b/meowpp.test/inc/autostitch.h @@ -0,0 +1,73 @@ +#ifndef autostitch_H__ +#define autostitch_H__ + +#include "meowpp/Usage.h" + +#include "meowpp/colors/RGB_Space.h" + +#include "meowpp/geo/Vectors.h" + +#include "meowpp/gra/FeaturePoint.h" +#include "meowpp/gra/FeaturePointsDetector.h" +#include "meowpp/gra/FeaturePointsMatch.h" +#include "meowpp/gra/FeaturePointsMatch_K_Match.h" + +#include "meowpp/oo/ObjBase.h" +#include "meowpp/oo/ObjSelector.h" + +#include "meowpp/math/Vector.h" + +#include <utility> +#include <vector> +#include <string> + +static const size_t FPSD_ID = 5; + +typedef std::vector<meow::FeaturePoint<double, double> > FeaturePoints; + +class MyFeaturePointsDetector: public meow::ObjBase { +public: + virtual meow::Usage usage() const = 0; + virtual bool usage(meow::Usage const& usg) = 0; + virtual FeaturePoints detect(meow::Bitmap<meow::RGBf_Space> const& bmp) + = 0; +}; + +class MyK_Match { +private: + meow::FeaturePointsMatch_K_Match<double, double> _body; +public: + MyK_Match(); + ~MyK_Match(); + meow::Usage usage() const; + bool usage(meow::Usage const& usg); + meow::FeaturePointIndexPairs match( + std::vector<std::vector<meow::FeaturePoint<double,double> > >const& fp); +}; + +class MyRansacCheck{ +private: + static double threshold; + std::vector<meow::Vector<double> > const* _from; + std::vector<meow::Vector<double> > const* _to ; + meow::Vector3D<double> _vX; + meow::Vector3D<double> _vY; +public: + static meow::Usage usage(); + static bool usage(meow::Usage const& usg); + MyRansacCheck(); + MyRansacCheck(MyRansacCheck const& __rc); + MyRansacCheck(std::vector<meow::Vector<double> > const* __from, + std::vector<meow::Vector<double> > const* __to); + ~MyRansacCheck(); + std::pair<meow::Vector3D<double>, meow::Vector3D<double> > vCalc( + std::vector<meow::FeaturePointIndexPair> const& __sample + ) const; + void rememberVCalc(std::vector<meow::FeaturePointIndexPair> const& __sample); + bool ok(meow::FeaturePointIndexPair const& __m) const; + double operator()(std::vector<meow::FeaturePointIndexPair> const& __sample, + std::vector<meow::FeaturePointIndexPair> const& __data) const; + meow::Vector2D<double> to(meow::Vector2D<double> const& __v) const; +}; + +#endif // autostitch_H__ |