segmentImage Class Reference

Collaboration diagram for segmentImage:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 segmentImage (int imageType)
 create an object. Set true for RGB false for HSV
void setRed (int val, int thresh, int skew)
 set the red value you are looking for with thresh error, and skew
void setGreen (int val, int thresh, int skew)
 set the green value you are looking for with thresh error, and skew
void setBlue (int val, int thresh, int skew)
 set the blue value you are looking for with thresh error, and skew
void setHue (double val, double thresh, double skew)
 set the Hue value you are looking for with thresh error, and skew
void setSat (double val, double thresh, double skew)
 set the Saturation value you are looking for with thresh error, and skew
void setVal (double val, double thresh, double skew)
 set the Value (brightness) value you are looking for with thresh error
void setFrame (int x1, int y1, int x2, int y2, int realX, int realY)
 set the region of the image to inspect
void setHSVavg (long doAvg)
 set up averaging for HSV color averaging
void segment (Image< PixRGB< float > > &image)
 segment image based upon parameters input
void segment (Image< float > &image)
 segment image based upon parameters input
Image< long > createMother (Image< long > &img)
 merge all blobs into one big blob, useful if you erase blobs
Image< long > returnBlobs ()
 return an image with labeled blobs. Use getBlobMap to map blobs
Image< bool > returnCandidates ()
 return a bool map off all candidate pixels
Image< float > returnNormalizedCandidates ()
 return a normalized displayable map off all candidate pixels
Image< PixRGB< float > > returnWorkImage ()
 return the image that is being worked on, to check if its ok
Image< float > returnWorkImageGREY ()
 return the image that is being worked on, to check if its ok
int numberBlobs ()
 return the total number of blobs
std::vector< long > getBlobMap ()
 return a map of blobs that gives the numeric ID of a blob from the image
void calcMassCenter ()
 calculate basic mass/center blob properties
float getCenterX (long blob)
 get blob center in X
float getCenterY (long blob)
 get blob center in X
long getMass (long blob)
 get blob mass
int getXmin (long blob)
 get X min for a blob
int getXmax (long blob)
 get X max for a blob
int getYmin (long blob)
 get Y min for a blob
int getYmax (long blob)
 get Y max for a blob
int getImageSizeX ()
 get the working image size in X
int getImageSizeY ()
 get the working image size in Y
void getHSVvalue (long blob, float *H, float *S, float *V, float *Hstd, float *Sstd, float *Vstd)
 get HSV mean values and standard deviations for a blob
void getHSVvalueMean (long blob, float *H, float *S, float *V, float *Hstd, float *Sstd, float *Vstd)
 do HVS color value means for x last iterations

Detailed Description

Definition at line 48 of file segmentImage.H.


Constructor & Destructor Documentation

segmentImage::segmentImage ( int  imageType  ) 

create an object. Set true for RGB false for HSV

skews here are used to skew the curve towards one end of the threshold that is, you pick the ideal color value as val, the you pick the cut off threshold as thresh. You can then bias towads one end or the other by setting skew to +/- value, that value bing added to the upper or lower bound for the cut off depending on whether it is +/- that is, if its a neg. value then the lower bound is extended

Definition at line 378 of file segmentImage.C.

References segmentImage().

Referenced by segmentImage().


Member Function Documentation

void segmentImage::calcMassCenter (  ) 

calculate basic mass/center blob properties

Definition at line 662 of file segmentImage.C.

References Image< T >::getVal().

Referenced by main(), segmentImageMerge::trackImage(), and segmentImageMerge::trackImageMulti().

Image< long > segmentImage::createMother ( Image< long > &  img  ) 

merge all blobs into one big blob, useful if you erase blobs

else just use returnCandidates

Definition at line 592 of file segmentImage.C.

References Image< T >::getHeight(), Image< T >::getVal(), Image< T >::getWidth(), Image< T >::resize(), Image< T >::setVal(), and ZEROS.

std::vector< long > segmentImage::getBlobMap (  ) 

return a map of blobs that gives the numeric ID of a blob from the image

Definition at line 657 of file segmentImage.C.

float segmentImage::getCenterX ( long  blob  ) 

get blob center in X

Definition at line 712 of file segmentImage.C.

Referenced by main(), and segmentImageMerge::verganceSpring().

float segmentImage::getCenterY ( long  blob  ) 

get blob center in X

Definition at line 717 of file segmentImage.C.

Referenced by main().

void segmentImage::getHSVvalue ( long  blob,
float *  H,
float *  S,
float *  V,
float *  Hstd,
float *  Sstd,
float *  Vstd 
)

get HSV mean values and standard deviations for a blob

Definition at line 764 of file segmentImage.C.

References Image< T >::getVal(), and sqrt().

Referenced by getHSVvalueMean().

void segmentImage::getHSVvalueMean ( long  blob,
float *  H,
float *  S,
float *  V,
float *  Hstd,
float *  Sstd,
float *  Vstd 
)

do HVS color value means for x last iterations

Definition at line 800 of file segmentImage.C.

References getHSVvalue().

Referenced by main().

int segmentImage::getImageSizeX (  ) 

get the working image size in X

Definition at line 754 of file segmentImage.C.

References Image< T >::getWidth().

int segmentImage::getImageSizeY (  ) 

get the working image size in Y

Definition at line 759 of file segmentImage.C.

References Image< T >::getHeight().

long segmentImage::getMass ( long  blob  ) 

get blob mass

Definition at line 722 of file segmentImage.C.

Referenced by main().

int segmentImage::getXmax ( long  blob  ) 

get X max for a blob

Definition at line 734 of file segmentImage.C.

Referenced by main().

int segmentImage::getXmin ( long  blob  ) 

get X min for a blob

Definition at line 727 of file segmentImage.C.

Referenced by main().

int segmentImage::getYmax ( long  blob  ) 

get Y max for a blob

Definition at line 748 of file segmentImage.C.

Referenced by main().

int segmentImage::getYmin ( long  blob  ) 

get Y min for a blob

Definition at line 741 of file segmentImage.C.

Referenced by main().

int segmentImage::numberBlobs (  ) 

return the total number of blobs

Definition at line 652 of file segmentImage.C.

Referenced by main(), and segmentImageMerge::verganceSpring().

Image< long > segmentImage::returnBlobs (  ) 

return an image with labeled blobs. Use getBlobMap to map blobs

Definition at line 612 of file segmentImage.C.

Image< bool > segmentImage::returnCandidates (  ) 

return a bool map off all candidate pixels

Definition at line 617 of file segmentImage.C.

Image< float > segmentImage::returnNormalizedCandidates (  ) 

return a normalized displayable map off all candidate pixels

Definition at line 622 of file segmentImage.C.

References Image< T >::getHeight(), Image< T >::getVal(), Image< T >::getWidth(), Image< T >::resize(), and Image< T >::setVal().

Referenced by main(), and segmentImageMerge::returnCandidateImage().

Image< PixRGB< float > > segmentImage::returnWorkImage (  ) 

return the image that is being worked on, to check if its ok

Definition at line 639 of file segmentImage.C.

References ASSERT.

Image< float > segmentImage::returnWorkImageGREY (  ) 

return the image that is being worked on, to check if its ok

Definition at line 645 of file segmentImage.C.

References ASSERT.

void segmentImage::segment ( Image< float > &  image  ) 

segment image based upon parameters input

Definition at line 570 of file segmentImage.C.

References lowPass5(), and Image< T >::resize().

void segmentImage::segment ( Image< PixRGB< float > > &  image  ) 

segment image based upon parameters input

Definition at line 552 of file segmentImage.C.

References image, lowPass5(), and Image< T >::resize().

Referenced by main(), segmentImageMerge::trackImage(), and segmentImageMerge::trackImageMulti().

void segmentImage::setBlue ( int  val,
int  thresh = 1,
int  skew = 0 
)

set the blue value you are looking for with thresh error, and skew

Definition at line 433 of file segmentImage.C.

References ASSERT.

void segmentImage::setFrame ( int  x1,
int  y1,
int  x2,
int  y2,
int  realX,
int  realY 
)

set the region of the image to inspect

Definition at line 503 of file segmentImage.C.

References Image< T >::resize().

Referenced by main(), and segmentImageMerge::setFrame().

void segmentImage::setGreen ( int  val,
int  thresh = 1,
int  skew = 0 
)

set the green value you are looking for with thresh error, and skew

Definition at line 416 of file segmentImage.C.

References ASSERT.

void segmentImage::setHSVavg ( long  doAvg  ) 

set up averaging for HSV color averaging

Definition at line 530 of file segmentImage.C.

Referenced by main(), and segmentImageMerge::setTrackColor().

void segmentImage::setHue ( double  val,
double  thresh = 1,
double  skew = 0 
)

set the Hue value you are looking for with thresh error, and skew

Definition at line 450 of file segmentImage.C.

References ASSERT.

Referenced by main(), and segmentImageMerge::setTrackColor().

void segmentImage::setRed ( int  val,
int  thresh = 1,
int  skew = 0 
)

set the red value you are looking for with thresh error, and skew

Definition at line 399 of file segmentImage.C.

References ASSERT.

void segmentImage::setSat ( double  val,
double  thresh = 1,
double  skew = 0 
)

set the Saturation value you are looking for with thresh error, and skew

Definition at line 467 of file segmentImage.C.

References ASSERT.

Referenced by main(), and segmentImageMerge::setTrackColor().

void segmentImage::setVal ( double  val,
double  thresh = 1,
double  skew = 0 
)

set the Value (brightness) value you are looking for with thresh error

Definition at line 484 of file segmentImage.C.

References ASSERT.

Referenced by main(), and segmentImageMerge::setTrackColor().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:43:48 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3