SMIL  0.8
 All Classes Functions Variables Groups Pages
Mesures on blobs
+ Collaboration diagram for Mesures on blobs:

Classes

struct  Blob
 List of offset and size of line contiguous pixels. More...
 
struct  PixelSequence
 Start offset and length of pixels in an image. More...
 

Functions

template<class T >
map< T, Blob > computeBlobs (const Image< T > &imIn, bool onlyNonZero=true)
 Create a map of Blob from a labelized image.
 
template<class labelT , class T >
RES_T drawBlobs (map< labelT, Blob > &blobs, Image< T > &imOut, T blobsValue=ImDtTypes< T >::max(), bool fillFirst=true, T defaultValue=T(0))
 Represent Blobs in an image. More...
 
template<class labelT , class T >
RES_T drawBlobs (map< labelT, Blob > &blobs, map< labelT, T > &lut, Image< T > &imOut, bool fillFirst=true, T defaultValue=T(0))
 Represent Blobs in an image with a lookup map.
 
template<class T >
map< T, double > measAreas (const Image< T > &imLbl, const bool onlyNonZero=true)
 Measure label areas. More...
 
template<class labelT >
map< labelT, double > measAreas (map< labelT, Blob > &blobs)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Measure label areas from a pre-generated Blob map (faster).
 
template<class T >
map< T, Vector_double > measBarycenters (const Image< T > &imLbl, const bool onlyNonZero=true)
 Measure barycenter of a labeled image. More...
 
template<class T , class labelT >
map< labelT, Vector_double > measBarycenters (const Image< T > &imIn, map< labelT, Blob > &blobs)
 Measure the barycenter of each blob in imIn. More...
 
template<class T >
map< T, Vector_UINT > measBoundBoxes (const Image< T > &imLbl, const bool onlyNonZero=true)
 Measure bounding boxes of labeled image. More...
 
template<class T , class labelT >
map< labelT, Vector_UINT > measBoundBoxes (const Image< T > &imIn, map< labelT, Blob > &blobs)
 Measure bounding boxes of each blob (faster with blobs pre-generated). More...
 
template<class T >
map< T, Vector_double > measInertiaMatrices (const Image< T > &imLbl, const bool onlyNonZero=true)
 Measure inertia moments of each label.
 
template<class T , class labelT >
map< labelT, Vector_double > measInertiaMatrices (const Image< T > &imIn, map< labelT, Blob > &blobs)
 Measure blobs inertia moments. More...
 
template<class T , class labelT >
map< labelT, T > measMaxVals (const Image< T > &imIn, map< labelT, Blob > &blobs)
 Measure the maximum value of each blob in imIn. More...
 
template<class T , class labelT >
map< labelT, Vector_double > measMeanVals (const Image< T > &imIn, map< labelT, Blob > &blobs)
 Measure the mean value and the std dev. More...
 
template<class T , class labelT >
map< labelT, T > measMinVals (const Image< T > &imIn, map< labelT, Blob > &blobs)
 Measure the minimum value of each blob in imIn. More...
 
template<class T , class labelT >
map< labelT, T > measModeVals (const Image< T > &imIn, map< labelT, Blob > &blobs)
 Measure the mode value of imIn in each blob. More...
 
template<class T , class labelT >
map< labelT, vector< T > > measRangeVals (const Image< T > &imIn, map< labelT, Blob > &blobs)
 Measure the min and max values of each blob in imIn. More...
 
template<class T , class labelT >
map< labelT, double > measVolumes (const Image< T > &imIn, map< labelT, Blob > &blobs)
 Measure the maximum value of each blob in imIn. More...
 
template<class T , class labelT >
map< labelT, vector< T > > valueLists (const Image< T > &imIn, map< labelT, Blob > &blobs)
 Measure the list of values of each blob in imIn. More...
 

Detailed Description

Function Documentation

RES_T smil::drawBlobs ( map< labelT, Blob > &  blobs,
Image< T > &  imOut,
blobsValue = ImDtTypes<T>::max(),
bool  fillFirst = true,
defaultValue = T(0) 
)

Represent Blobs in an image.

If blobsValue==0, the blobs are represented with their label value.

map<T, double> smil::measAreas ( const Image< T > &  imLbl,
const bool  onlyNonZero = true 
)

Measure label areas.

Return a map(labelValue, size_t) with the area of each label value.

Examples:
blob_measures.py
map<T, Vector_double> smil::measBarycenters ( const Image< T > &  imLbl,
const bool  onlyNonZero = true 
)

Measure barycenter of a labeled image.

Return a map(labelValue, Point) with the barycenter point coordinates for each label.

Examples:
blob_measures.py
map<labelT, Vector_double> smil::measBarycenters ( const Image< T > &  imIn,
map< labelT, Blob > &  blobs 
)

Measure the barycenter of each blob in imIn.

Return a map(labelValue, vector<double>) with the barycenter for each blob label.

map<T, Vector_UINT > smil::measBoundBoxes ( const Image< T > &  imLbl,
const bool  onlyNonZero = true 
)

Measure bounding boxes of labeled image.

Return a map(labelValue, Box) with the bounding box for each label value.

map<labelT, Vector_UINT > smil::measBoundBoxes ( const Image< T > &  imIn,
map< labelT, Blob > &  blobs 
)

Measure bounding boxes of each blob (faster with blobs pre-generated).

Return a map(labelValue, Box) with the bounding box for each label value.

map<labelT, Vector_double> smil::measInertiaMatrices ( const Image< T > &  imIn,
map< labelT, Blob > &  blobs 
)

Measure blobs inertia moments.

Examples:
inertia_moments.py
map<labelT, T> smil::measMaxVals ( const Image< T > &  imIn,
map< labelT, Blob > &  blobs 
)

Measure the maximum value of each blob in imIn.

Return a map(labelValue, T) with the max value for each label.

map<labelT, Vector_double> smil::measMeanVals ( const Image< T > &  imIn,
map< labelT, Blob > &  blobs 
)

Measure the mean value and the std dev.

of each blob in imIn. Return a map(labelValue, vector<double>) with the mean and std dev. values for each label.

map<labelT, T> smil::measMinVals ( const Image< T > &  imIn,
map< labelT, Blob > &  blobs 
)

Measure the minimum value of each blob in imIn.

Return a map(labelValue, T) with the min value for each label.

map<labelT, T > smil::measModeVals ( const Image< T > &  imIn,
map< labelT, Blob > &  blobs 
)

Measure the mode value of imIn in each blob.

Return a map(labelValue, T) with the m mode value for each label.

map<labelT, vector<T> > smil::measRangeVals ( const Image< T > &  imIn,
map< labelT, Blob > &  blobs 
)

Measure the min and max values of each blob in imIn.

Return a map(labelValue, T) with the min and max values for each label.

map<labelT, double> smil::measVolumes ( const Image< T > &  imIn,
map< labelT, Blob > &  blobs 
)

Measure the maximum value of each blob in imIn.

Return a map(labelValue, double) with the max value for each label.

map<labelT, vector<T> > smil::valueLists ( const Image< T > &  imIn,
map< labelT, Blob > &  blobs 
)

Measure the list of values of each blob in imIn.

Return a map(labelValue, vector<T>) with the list of values for each blob label.