Basic Image AlgorithmS Library
2.8.0
|
Evaluates a segementation into fore/back-ground. More...
#include <FeatureDetector/BlobDetectorLevelSet.hh>
Public Member Functions | |
void | AddEvaluationSquare (const BIAS::Vector2< int > &p1, const BIAS::Vector2< int > &p2) |
look at SetEvaluationSquare() More... | |
BlobDetectorLevelSet () | |
int | Detect (Image< StorageType > &image, std::vector< BIAS::BIASBlob > &blobs) |
purely virtual interface definition More... | |
void | Evolute () |
does the hole segmentation work by modifying the level set (look at class discription) More... | |
const BIAS::Image< StorageType > & | GetEval () const |
returns (roi) msk (the evaluation array) as an image More... | |
BIAS::Image< StorageType > & | GetEval () |
returns (roi) msk (the evaluation array) as an image (is allowed to be modified, iff image's roi is not in use) More... | |
std::vector< int > | GetHistogram (int hist) |
const BIAS::Image< StorageType > & | GetImage () const |
returns reference of currently used image More... | |
const BIAS::Image< StorageType > & | GetLevel () const |
returns the actual level set, modified each time you call Evolute() More... | |
BIAS::Image< StorageType > & | GetLevel () |
returns the actual level set, modified each time you call Evolute(), (is allowed to be modified), (0 is background, != 0 is foreground) More... | |
int | GetMaxNumBlobs () |
return maximum number of blobs More... | |
void | GetSegmentation (BIAS::Image< StorageType > &im) const |
creates an image for visulalistion of the actual segmentation given by actual level set More... | |
void | Init (const BIAS::Image< StorageType > &image, bool useROI=true) |
initialise this instance with given image, note: image must not be modified until you delete this instance or an other image is set, the image's roi msk defines the evaluation area (if given) More... | |
void | InitLevelSetSquare (const BIAS::Vector2< int > &p1, const BIAS::Vector2< int > &p2) |
look at class discription More... | |
void | Set (const BIAS::Image< StorageType > &image, bool useROI=true) |
sets image to operate on, note: image must not be modified until you delete this instance or an other image is set, the image's roi msk defines the evaluation area (if given) More... | |
void | SetEvaluationSquare (const BIAS::Vector2< int > &p1, const BIAS::Vector2< int > &p2) |
can be used only, iff image's roi is not in use (look at class discription) More... | |
void | SetMaxNumBlobs (const int maxnum) |
virtual | ~BlobDetectorLevelSet () |
Protected Member Functions | |
void | AddSquare (BIAS::Image< StorageType > &image, const BIAS::Vector2< int > &p1, const BIAS::Vector2< int > &p2) |
void | ClearHistograms () |
void | RecalcHistograms () |
Static Protected Member Functions | |
static void | ClearHistogram (int hist[]) |
static void | Resize (BIAS::Image< StorageType > &image, const int w, const int h) |
Protected Attributes | |
int | _hist0 [256] |
int | _hist1 [256] |
int | dMaxNumBlobs_ |
maximum number of corners to return More... | |
BIAS::Image< StorageType > | eval_ |
bool | eval_ownsdata_ |
const BIAS::Image< StorageType > * | image_ |
BIAS::Image< StorageType > * | level_ |
BIAS::Image< StorageType > * | level_s_ |
Evaluates a segementation into fore/back-ground.
Usage: Initialise class with an image by calling Init(), if the image roi has a valid mask it is used as evaluation area. Set an initial level set square (use InitLevelSetSquare). Set a evaluation square, if the image has no valid roi mask. Than call Evolute() round about 100 times (or what ever it will needs).
What you get: The segmentation of image is given by GetLevel(), but GetSegmentation() creats an image much better for visalisation.
Please take a look at example ExampleSegmentationLevelSet, which visualises the Evolute() steps.
Definition at line 35 of file BlobDetectorLevelSet.hh.
BlobDetectorLevelSet::BlobDetectorLevelSet | ( | ) |
Definition at line 12 of file BlobDetectorLevelSet.cpp.
|
virtual |
Definition at line 21 of file BlobDetectorLevelSet.cpp.
void BlobDetectorLevelSet::AddEvaluationSquare | ( | const BIAS::Vector2< int > & | p1, |
const BIAS::Vector2< int > & | p2 | ||
) |
look at SetEvaluationSquare()
Definition at line 231 of file BlobDetectorLevelSet.cpp.
|
protected |
Definition at line 129 of file BlobDetectorLevelSet.cpp.
References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), and BIAS::ImageBase::GetWidth().
|
staticprotected |
Definition at line 90 of file BlobDetectorLevelSet.cpp.
|
protected |
Definition at line 97 of file BlobDetectorLevelSet.cpp.
|
virtual |
purely virtual interface definition
Implements BIAS::BlobDetectorBase< StorageType >.
Definition at line 33 of file BlobDetectorLevelSet.cpp.
References BIAS::ImageBase::GetROI(), and BIAS::ROI::MaskValid().
void BlobDetectorLevelSet::Evolute | ( | ) |
does the hole segmentation work by modifying the level set (look at class discription)
Definition at line 242 of file BlobDetectorLevelSet.cpp.
|
inline |
returns (roi) msk (the evaluation array) as an image
Definition at line 88 of file BlobDetectorLevelSet.hh.
|
inline |
returns (roi) msk (the evaluation array) as an image (is allowed to be modified, iff image's roi is not in use)
Definition at line 93 of file BlobDetectorLevelSet.hh.
std::vector< int > BlobDetectorLevelSet::GetHistogram | ( | int | hist | ) |
Definition at line 64 of file BlobDetectorLevelSet.cpp.
|
inline |
returns reference of currently used image
Definition at line 84 of file BlobDetectorLevelSet.hh.
|
inline |
returns the actual level set, modified each time you call Evolute()
Definition at line 99 of file BlobDetectorLevelSet.hh.
|
inline |
returns the actual level set, modified each time you call Evolute(), (is allowed to be modified), (0 is background, != 0 is foreground)
Definition at line 106 of file BlobDetectorLevelSet.hh.
|
inlineinherited |
return maximum number of blobs
Definition at line 82 of file BlobDetectorBase.hh.
void BlobDetectorLevelSet::GetSegmentation | ( | BIAS::Image< StorageType > & | im | ) | const |
creates an image for visulalistion of the actual segmentation given by actual level set
Definition at line 46 of file BlobDetectorLevelSet.cpp.
References BIAS::Image< StorageType >::GetImageDataArray().
void BlobDetectorLevelSet::Init | ( | const BIAS::Image< StorageType > & | image, |
bool | useROI = true |
||
) |
initialise this instance with given image, note: image must not be modified until you delete this instance or an other image is set, the image's roi msk defines the evaluation area (if given)
Definition at line 185 of file BlobDetectorLevelSet.cpp.
References BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().
void BlobDetectorLevelSet::InitLevelSetSquare | ( | const BIAS::Vector2< int > & | p1, |
const BIAS::Vector2< int > & | p2 | ||
) |
look at class discription
Definition at line 211 of file BlobDetectorLevelSet.cpp.
|
protected |
Definition at line 104 of file BlobDetectorLevelSet.cpp.
|
staticprotected |
Definition at line 76 of file BlobDetectorLevelSet.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), and BIAS::Image< StorageType >::Release().
void BlobDetectorLevelSet::Set | ( | const BIAS::Image< StorageType > & | image, |
bool | useROI = true |
||
) |
sets image to operate on, note: image must not be modified until you delete this instance or an other image is set, the image's roi msk defines the evaluation area (if given)
Definition at line 156 of file BlobDetectorLevelSet.cpp.
References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ROI::GetMaskImage(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetWidth(), and BIAS::ROI::MaskValid().
void BlobDetectorLevelSet::SetEvaluationSquare | ( | const BIAS::Vector2< int > & | p1, |
const BIAS::Vector2< int > & | p2 | ||
) |
can be used only, iff image's roi is not in use (look at class discription)
Definition at line 220 of file BlobDetectorLevelSet.cpp.
|
inlineinherited |
Definition at line 74 of file BlobDetectorBase.hh.
|
protected |
Definition at line 118 of file BlobDetectorLevelSet.hh.
|
protected |
Definition at line 119 of file BlobDetectorLevelSet.hh.
|
protectedinherited |
maximum number of corners to return
Definition at line 89 of file BlobDetectorBase.hh.
|
protected |
Definition at line 124 of file BlobDetectorLevelSet.hh.
|
protected |
Definition at line 125 of file BlobDetectorLevelSet.hh.
|
protected |
Definition at line 121 of file BlobDetectorLevelSet.hh.
|
protected |
Definition at line 122 of file BlobDetectorLevelSet.hh.
|
protected |
Definition at line 123 of file BlobDetectorLevelSet.hh.