Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
icl::cv::RegionGrower Class Reference

class for region growing on images and DataSegments (e.g. poincloud xyzh) More...

#include <RegionGrower.h>

List of all members.

Classes

struct  EqualThreshold
struct  Float4EuclideanDistance
struct  RegionGrowerDataAccessor
struct  RegionGrowerDataAccessor< core::DataSegment< float, 4 >, float, 4 >
struct  RegionGrowerDataAccessor< core::Img8u, icl8u, 1 >
struct  RegionGrowerDataAccessor< core::Img8u, icl8u, 3 >

Public Member Functions

template<class Criterion >
const core::Img32sapply (const core::Img8u &image, Criterion crit, core::Img8u *initialMask=0, const unsigned int minSize=0, const unsigned int startID=1)
 Applies the region growing on an input image with a growing criterion.
template<class Criterion >
const core::Img32sapply (const core::DataSegment< float, 4 > &dataseg, Criterion crit, core::Img8u *initialMask=0, const unsigned int minSize=0, const unsigned int startID=1)
 Applies the region growing on an input data segment with a growing criterion.
const core::Img32sapplyFloat4EuclideanDistance (const core::DataSegment< float, 4 > &dataseg, core::Img8u mask, const int threshold, const unsigned int minSize=0, const unsigned int startID=1)
 Applies the region growing on an input data segment with euclidean distance criterion.
const core::Img32sapplyEqualThreshold (const core::Img8u &image, core::Img8u mask, const int threshold, const unsigned int minSize=0, const unsigned int startID=1)
 Applies the region growing on an input image with value-equals-threshold criterion.
std::vector< std::vector< int > > getRegions ()
 Returns a vector of regions containing the image IDs. This is an additional representation of the result.

Private Member Functions

template<class T , class DataT , int DIM, class Criterion >
void region_grow (const T &data, core::Img8u &mask, core::Img32s &result, Criterion crit, const unsigned int minSize, const unsigned int startID=1)

Static Private Member Functions

template<class T , class DataT , int DIM, class Criterion >
static void flood_fill (const RegionGrowerDataAccessor< T, DataT, DIM > &a, int xStart, int yStart, core::Channel8u &processed, Criterion crit, std::vector< int > &result, core::Channel32s &result2, int id)

Private Attributes

core::Img8u mask
core::Img32s result
std::vector< std::vector< int > > regions

Detailed Description

class for region growing on images and DataSegments (e.g. poincloud xyzh)

The RegionGrower class is designed as template applying a growing criterion to given input data. A mask defines the points for processing (e.g. a region of interest).


Member Function Documentation

template<class Criterion >
const core::Img32s& icl::cv::RegionGrower::apply ( const core::Img8u image,
Criterion  crit,
core::Img8u initialMask = 0,
const unsigned int  minSize = 0,
const unsigned int  startID = 1 
) [inline]

Applies the region growing on an input image with a growing criterion.

Parameters:
imagethe input image for region growing
critthe region growing criterion
initialMaskthe initial mask (e.g. ROI)
minSizethe minimum size of regions (smaller regions are removed)
startIDthe start id for the result label image
Returns:
the result label image
template<class Criterion >
const core::Img32s& icl::cv::RegionGrower::apply ( const core::DataSegment< float, 4 > &  dataseg,
Criterion  crit,
core::Img8u initialMask = 0,
const unsigned int  minSize = 0,
const unsigned int  startID = 1 
) [inline]

Applies the region growing on an input data segment with a growing criterion.

Parameters:
datasegthe input data segment for region growing
critthe region growing criterion
initialMaskthe initial mask (e.g. ROI)
minSizethe minimum size of regions (smaller regions are removed)
startIDthe start id for the result label image
Returns:
the result label image
const core::Img32s& icl::cv::RegionGrower::applyEqualThreshold ( const core::Img8u image,
core::Img8u  mask,
const int  threshold,
const unsigned int  minSize = 0,
const unsigned int  startID = 1 
) [inline]

Applies the region growing on an input image with value-equals-threshold criterion.

Parameters:
imagethe input image for region growing
maskthe initial mask (e.g. ROI)
thresholdthe equals-to-value (growing criterion)
minSizethe minimum size of regions (smaller regions are removed)
startIDthe start id for the result label image
Returns:
the result label image
const core::Img32s& icl::cv::RegionGrower::applyFloat4EuclideanDistance ( const core::DataSegment< float, 4 > &  dataseg,
core::Img8u  mask,
const int  threshold,
const unsigned int  minSize = 0,
const unsigned int  startID = 1 
) [inline]

Applies the region growing on an input data segment with euclidean distance criterion.

Parameters:
datasegthe input data segment for region growing
maskthe initial mask (e.g. ROI)
thresholdthe maximum euclidean distance
minSizethe minimum size of regions (smaller regions are removed)
startIDthe start id for the result label image
Returns:
the result label image
template<class T , class DataT , int DIM, class Criterion >
void icl::cv::RegionGrower::flood_fill ( const RegionGrowerDataAccessor< T, DataT, DIM > &  a,
int  xStart,
int  yStart,
core::Channel8u &  processed,
Criterion  crit,
std::vector< int > &  result,
core::Channel32s &  result2,
int  id 
) [static, private]
std::vector<std::vector<int> > icl::cv::RegionGrower::getRegions ( ) [inline]

Returns a vector of regions containing the image IDs. This is an additional representation of the result.

Returns:
the vector of regions with the image IDs.
template<class T , class DataT , int DIM, class Criterion >
void icl::cv::RegionGrower::region_grow ( const T &  data,
core::Img8u mask,
core::Img32s result,
Criterion  crit,
const unsigned int  minSize,
const unsigned int  startID = 1 
) [inline, private]

Member Data Documentation

std::vector<std::vector<int> > icl::cv::RegionGrower::regions [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines