|
latest version v1.9 - last update 24 Nov 2005 |
|
#include <ltiRegionGrowing.h>
Inheritance diagram for lti::regionGrowing:


Public Member Functions | |
| regionGrowing () | |
| regionGrowing (const parameters &par) | |
| regionGrowing (const regionGrowing &other) | |
| virtual | ~regionGrowing () |
| virtual const char * | getTypeName () const |
| channel8 & | apply (channel8 &srcdest) const |
| channel & | apply (channel &srcdest) const |
| image & | apply (image &srcdest) const |
| channel8 & | apply (const channel8 &src, channel8 &dest) const |
| channel8 & | apply (const channel &src, channel8 &dest) const |
| channel8 & | apply (const image &src, channel8 &dest) const |
| regionGrowing & | copy (const regionGrowing &other) |
| virtual functor * | clone () const |
| const parameters & | getParameters () const |
Protected Member Functions | |
| bool | similar (const ubyte &neighbour, const ubyte &avrgAtSeed, const int &avrgThreshold) const |
| bool | similar (const float &neighbour, const float &avrgAtSeed, const float &avrgThreshold) const |
| template<class T> | |
| void | mask (matrix< T > &img, const channel8 &msk, const T &background) const |
| channel8 & | segmentate (const image &src, channel8 &dest) const |
| channel8 & | segmentate (const channel &src, channel8 &dest) const |
Classes | |
| class | parameters |
| The parameters for the class regionGrowing. More... | |
It uses a set of seed pixels (given in the parameters) to start the region growing. To check the similarity, a comparition is done between the pixel value at the candidate position and the average value at the seed position. If the difference of these values is lower than a given threshold, the pixel will be considered as part of the growing region. It is possible to get automatically values for these thresholds if a known background region is given in the parameters.
Example:
lti::loadBMP loader; lti::image img; // the color image to be segmented lti::channel8 chnl; // the segmentation mask will be left here loader.load("img/leo040801_00_019.bmp",img); // read an image lti::regionGrowing segmenter; // segmentation functor and lti::regionGrowing::parameters param; // its parameters param.useGaussKernel = true; // use a gaussian kernel 5x5 param.localStatisticsKernelSize = 5; param.localStatisticsKernelVariance = -1; param.mode = lti::regionGrowing::parameters::UseGivenThresholds; param.averageThresholds = trgbPixel<float>(0.05,0.05,0.05); param.edgesThreshold = 0.04; // do not use all corners as seed-points, just the three following... param.seedPoints.resize(3,tpoint<float>(0,0)); param.seedPoints.at(1).y = 1.0f; param.seedPoints.at(2).x = 1.0f; param.seedPoints.at(2).y = 1.0f; // indicate the segmentation functor the user-parameters segmenter.setParameters(param); // segmentate the image and leave the segmentation in the channel segmenter.apply(img,chnl); view1.show(img); // show original image view2.show(chnl); // show the segmentation mask
|
|
Default constructor.
|
|
|
Default constructor with parameters.
|
|
|
Copy constructor.
|
|
|
Destructor.
|
|
||||||||||||
|
Operates on a copy of the given parameters.
|
|
||||||||||||
|
Operates on a copy of the given parameters.
|
|
||||||||||||
|
Operates on a copy of the given parameters.
|
|
|
Operates on the given parameter. The background-pixels will be set to black, grey or white depending on the parameter "backgroundType".
|
|
|
Operates on the given parameter. The background-pixels will be set to 0, 0.5 or 1.0 depending on the parameter "backgroundType".
|
|
|
Operates on the given parameter. The background-pixels will be set to 0,128 or 255 depending on the parameter "backgroundType".
|
|
|
Returns a pointer to a clone of this functor.
Reimplemented from lti::segmentation. |
|
|
Copy data of "other" functor.
|
|
|
Returns used parameters.
Reimplemented from lti::functor. |
|
|
Returns the name of this type ("regionGrowing").
Reimplemented from lti::segmentation. |
|
||||||||||||||||||||
|
All pixels at img for which the mask is 0 will be set to the given value. The mask and img MUST have the same size! |
|
||||||||||||
|
Operates on a copy of the given parameters.
|
|
||||||||||||
|
Operates on a copy of the given parameters.
|
|
||||||||||||||||
|
The pixel at position "neighbour" will be compared with the average value corresponding to the position "seed". The Codition for similarity proof if the absolute value of the difference between the channel value at "neighbour" and the local average on the "seed"-position is lower than the given avrgThreshold |
|
||||||||||||||||
|
The pixel at position "neighbour" will be compared with the average value corresponding to the position "seed". The Codition for similarity proof if the absolute value of the difference between the channel value at "neighbour" and the local average on the "seed"-position is lower than the given avrgThreshold |