KSquare Utilities
KKB::Blob Class Reference

Used by the Raster object to identify a distinct blob; where it is in the raster and its unique id. More...

#include <Blob.h>

Public Member Functions

 Blob (kkint32 _id)
 
 ~Blob ()
 
Point BotRight () const
 Returns a point to the Bottom Right corner of the blob. More...
 
kkint32 ColLeft ()
 Left most column in the raster object that this blob occupies. More...
 
kkint32 ColRight ()
 Right most column in the raster object that this blob occupies. More...
 
kkint32 Height ()
 Number of rows that the blob occupies. More...
 
kkint32 Id ()
 The unique ID assigned to this blob. More...
 
void InitialzieAsNew (kkint32 _id)
 
kkint32 PixelCount ()
 Number of pixels that are part of this blob. More...
 
kkint32 RowBot ()
 Bottom row in the raster object that this blob occupies. More...
 
kkint32 RowTop ()
 Top row in the raster object that this blob occupies. More...
 
Point TopLeft () const
 Returns a point to the Top Left corner of the blob. More...
 
kkint32 Width ()
 Number of columns that this blob occupies. More...
 

Public Attributes

kkint32 colLeft
 
kkint32 colRight
 
kkint32 id
 
kkint32 pixelCount
 
kkint32 rowBot
 
kkint32 rowTop
 

Friends

class BlobList
 

Detailed Description

Used by the Raster object to identify a distinct blob; where it is in the raster and its unique id.

It is used by the Raster object while performing a connected component analysis. For each distinct blob located an instance of this class will be created. Its location in the raster and its unique blob ID will be stored here. These blobs will later be able to be extracted from the image by referencing this blob.

The "id" field in this blob will be stored in a array in the associated Raster object. This allows the Raster object to identify the specific pixels that belong to this Blob. Using the fields "colLeft" "colRight", "rowBot", and "rowTop" the Raster object will be able to quickly locate the associated blob.

See also
KKB::Raster
KKB::Raster::ExtractABlob
KKB::Raster::ExtractABlobTightly

Definition at line 32 of file Blob.h.

Constructor & Destructor Documentation

Blob::Blob ( kkint32  _id)

Definition at line 22 of file Blob.cpp.

References colLeft, colRight, id, pixelCount, rowBot, and rowTop.

22  :
23  colLeft (0),
24  colRight (0),
25  id (_id),
26  pixelCount (0),
27  rowBot (0),
28  rowTop (0)
29 
30 {
31 }
kkint32 colLeft
Definition: Blob.h:61
kkint32 rowBot
Definition: Blob.h:65
kkint32 rowTop
Definition: Blob.h:66
kkint32 pixelCount
Definition: Blob.h:64
kkint32 colRight
Definition: Blob.h:62
kkint32 id
Definition: Blob.h:63
Blob::~Blob ( )

Definition at line 35 of file Blob.cpp.

36 {
37 }

Member Function Documentation

Point KKB::Blob::BotRight ( ) const
inline

Returns a point to the Bottom Right corner of the blob.

Definition at line 59 of file Blob.h.

References colRight, KKB::Point::Point(), and rowBot.

kkint32 KKB::Blob::ColLeft ( )
inline

Left most column in the raster object that this blob occupies.

Definition at line 46 of file Blob.h.

References colLeft.

kkint32 KKB::Blob::ColRight ( )
inline

Right most column in the raster object that this blob occupies.

Definition at line 47 of file Blob.h.

References colRight.

kkint32 KKB::Blob::Height ( )
inline

Number of rows that the blob occupies.

Definition at line 49 of file Blob.h.

Referenced by KKB::Raster::ExtractABlobTightly(), and KKB::BlobList::LocateMostComplete().

void Blob::InitialzieAsNew ( kkint32  _id)

Definition at line 41 of file Blob.cpp.

References colLeft, colRight, id, pixelCount, rowBot, and rowTop.

42 {
43  colLeft = 0;
44  colRight = 0;
45  id = _id;
46  pixelCount = 0;
47  rowBot = 0;
48  rowTop = 0;
49 }
kkint32 colLeft
Definition: Blob.h:61
kkint32 rowBot
Definition: Blob.h:65
kkint32 rowTop
Definition: Blob.h:66
kkint32 pixelCount
Definition: Blob.h:64
kkint32 colRight
Definition: Blob.h:62
kkint32 KKB::Blob::PixelCount ( )
inline

Number of pixels that are part of this blob.

Definition at line 56 of file Blob.h.

References pixelCount.

Referenced by KKMLL::GrayScaleImagesFVProducer::ComputeFeatureVector(), and KKB::BlobList::MergeIntoSingleBlob().

kkint32 KKB::Blob::RowBot ( )
inline

Bottom row in the raster object that this blob occupies.

Definition at line 51 of file Blob.h.

References rowBot.

kkint32 KKB::Blob::RowTop ( )
inline

Top row in the raster object that this blob occupies.

Definition at line 52 of file Blob.h.

References rowTop.

Point KKB::Blob::TopLeft ( ) const
inline

Returns a point to the Top Left corner of the blob.

Definition at line 58 of file Blob.h.

References colLeft, KKB::Point::Point(), and rowTop.

kkint32 KKB::Blob::Width ( )
inline

Number of columns that this blob occupies.

Definition at line 54 of file Blob.h.

Referenced by KKB::Raster::ExtractABlobTightly(), and KKB::BlobList::LocateMostComplete().

Friends And Related Function Documentation

friend class BlobList
friend

Definition at line 34 of file Blob.h.

Member Data Documentation


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