#ifndef BLOB_PROPERTIES_H_INCLUDED #define BLOB_PROPERTIES_H_INCLUDED //! Max order of calculated moments #define MAX_MOMENTS_ORDER 3 #include "BlobContour.h" //namespace CBlob; typedef std::list t_contourList; class CBlobProperties { private: //! Computed area from blob float m_area; //! Computed perimeter from blob float m_perimeter; // Computed moment from the blob float m_moment[MAX_MOMENTS_ORDER*MAX_MOMENTS_ORDER]; protected: //! External contour of the blob (crack codes) CBlobContour m_externalContour; //! Internal contours (crack codes) t_contourList m_internalContours; public: CBlobProperties(){}; virtual ~CBlobProperties(){}; //! Get blob area float GetArea(); //! Get blob perimeter float GetPerimeter(); //! Get contour moment (p,q up to MAX_CALCULATED_MOMENTS) float GetMoment(int p, int q); }; #endif //!BLOB_PROPERTIES_H_INCLUDED