Image Component Library (ICL)
|
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 > |
Public Member Functions | |
template<class Criterion > | |
const core::Img32s & | apply (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::Img32s & | apply (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::Img32s & | applyFloat4EuclideanDistance (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::Img32s & | applyEqualThreshold (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 |
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).
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.
image | the input image for region growing |
crit | the region growing criterion |
initialMask | the initial mask (e.g. ROI) |
minSize | the minimum size of regions (smaller regions are removed) |
startID | the start id for the result label image |
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.
dataseg | the input data segment for region growing |
crit | the region growing criterion |
initialMask | the initial mask (e.g. ROI) |
minSize | the minimum size of regions (smaller regions are removed) |
startID | the start id for 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.
image | the input image for region growing |
mask | the initial mask (e.g. ROI) |
threshold | the equals-to-value (growing criterion) |
minSize | the minimum size of regions (smaller regions are removed) |
startID | the start id for 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.
dataseg | the input data segment for region growing |
mask | the initial mask (e.g. ROI) |
threshold | the maximum euclidean distance |
minSize | the minimum size of regions (smaller regions are removed) |
startID | the start id for the result label image |
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.
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] |
core::Img8u icl::cv::RegionGrower::mask [private] |
std::vector<std::vector<int> > icl::cv::RegionGrower::regions [private] |
core::Img32s icl::cv::RegionGrower::result [private] |