You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

39 lines
1.0 KiB

#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<CBlobContour> 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