00001 #include <cmath> 00002 #include <boost/numeric/ublas/matrix.hpp> 00003 #include <boost/numeric/ublas/vector.hpp> 00004 #include "object.h" 00005 #include "image.h" 00006 00007 #ifndef MOMENTS_TOOL_H 00008 #define MOMENTS_TOOL_H 00009 00010 namespace mimas { 00018 class moments_tool: public object 00019 { 00020 public: 00021 typedef boost::numeric::ublas::matrix< double > Matrix; 00022 typedef boost::numeric::ublas::vector< double > Vector; 00023 00024 private: 00025 00026 00027 public: 00028 moments_tool(void); 00029 boost::numeric::ublas::matrix< double > findMoments(const image< unsigned char > imagein, const unsigned char bglevel=0, bool binaryImage=false); 00030 boost::numeric::ublas::vector< double > findHuInvariantMoments(const image< unsigned char > imagein, const unsigned char bglevel=0, bool binaryImage=false); 00031 00032 00033 }; 00034 00035 00036 } 00037 00038 #endif