#pragma once #include #include #ifdef MATRIXCV_ACTIU #include "matrixCV.h" #else #include "vector" //! Vector de doubles typedef std::vector DoubleStlVector; #endif /************************************************************************** Filtres / Filters **************************************************************************/ //! Actions performed by a filter (include or exclude blobs) #define B_INCLUDE 1L #define B_EXCLUDE 2L enum FilterAction {FLT_INCLUDE = 1, FLT_EXCLUDE}; //! Conditions to apply the filters #define B_EQUAL 3L #define B_NOT_EQUAL 4L #define B_GREATER 5L #define B_LESS 6L #define B_GREATER_OR_EQUAL 7L #define B_LESS_OR_EQUAL 8L #define B_INSIDE 9L #define B_OUTSIDE 10L enum FilterCondition {FLT_EQUAL = 3, FLT_NOTEQUAL, FLT_GREATER, FLT_LESS, FLT_GREATEROREQUAL, FLT_LESSOREQUAL, FLT_INSIDE, FLT_OUTSIDE}; /************************************************************************** Excepcions / Exceptions **************************************************************************/ //! Exceptions thrown by functions: #define EXCEPTION_BLOB_OUT_OF_BOUNDS 1000 #define EXCEPCIO_CALCUL_BLOBS 1001 /** * Class that contains a set of blobs and allows properties to be extracted or filter them according to certain criteria. * Class to calculate the blobs of an image and calculate some properties on them. Also, the class provides functions to filter the blobs using some criteria. */ class Blob; //! vector of blob pointers typedef typedef std::vector BlobVector;