Image Component Library (ICL)
Classes | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
icl::cv::RegionGrower Class Reference

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

#include <RegionGrower.h>

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 >
 
struct  U8EuclideanDistance
 

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. More...
 
const core::Img32sapplyColorImageGrowing (const core::Img8u &image, float const th, 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. More...
 
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. More...
 
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. More...
 
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. More...
 
std::vector< std::vector< int > > getRegions ()
 Returns a vector of regions containing the image IDs. This is an additional representation of the result. More...
 

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

static float dist3u8 (const math::FixedColVector< icl8u, 3 > &a, const math::FixedColVector< icl8u, 3 > &b)
 
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

◆ apply() [1/2]

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

◆ apply() [2/2]

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

◆ applyColorImageGrowing()

const core::Img32s& icl::cv::RegionGrower::applyColorImageGrowing ( const core::Img8u image,
float const  th,
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

◆ applyEqualThreshold()

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

◆ applyFloat4EuclideanDistance()

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

◆ dist3u8()

static float icl::cv::RegionGrower::dist3u8 ( const math::FixedColVector< icl8u, 3 > &  a,
const math::FixedColVector< icl8u, 3 > &  b 
)
inlinestaticprivate

◆ flood_fill()

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 
)
staticprivate

◆ getRegions()

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.

◆ region_grow()

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 
)
inlineprivate

Member Data Documentation

◆ mask

core::Img8u icl::cv::RegionGrower::mask
private

◆ regions

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

◆ result

core::Img32s icl::cv::RegionGrower::result
private

The documentation for this class was generated from the following file: