segmentImageMC2 Class Reference

This is a class to track hyper spectal blobs. More...

#include <VFAT/segmentImageMC2.H>

Collaboration diagram for segmentImageMC2:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 segmentImageMC2 ()
 create an object. Set true for RGB false for HSV
void SIsetVal (const typename std::vector< FLOAT > &val, const typename std::vector< FLOAT > &thresh)
 set the Value (brightness) value you are looking for with thresh error
void SIsetValThresh (const typename std::vector< FLOAT > &high, const typename std::vector< FLOAT > &low)
 set the Value (brightness) value you are looking for with thresh error
void SIsetFrame (int *x, int *y)
 set the region of the image to inspect
void SIresetCandidates (const bool whichWay)
 Call during run if color is totally reset.
void SIsetAvg (const INT doAvg)
 set up averaging for color averaging adaptation
void SIresetAvg ()
 reset averaging for color averaging adaptation
void SIsegment (Image< PixRGB< byte > > *image, typename std::vector< Image< FLOAT > > *featureMap, const bool lowPass=false)
 segment image based upon parameters input (depricated)
void SIsegment (typename std::vector< Image< FLOAT > > *featureMap, const bool lowPass=false)
 segment image based upon parameters input
void SItoggleCandidateBandPass (const bool toggle)
 toggle band pass filter on candidate pixels on/off
void SItoggleRemoveSingles (const bool toggle)
 Turn on or off single removal: defaults to ON.
void SIsetKillValue (const unsigned int kv)
 override and set the kill value for removing singles
Image< INT > SIcreateMother (const Image< INT > &img) const
 merge all blobs into one big blob, useful if you erase blobs
Image< int > SIreturnBlobs () const
 return an image with labeled blobs. Use getBlobMap to map blobs
Image< bool > SIreturnCandidates () const
 return a bool map off all candidate pixels
Image< FLOAT > SIreturnNormalizedCandidates () const
 return a normalized displayable map off all candidate pixels
Image< PixRGB< FLOAT > > SIreturnWorkImage () const
 return the image that is being worked on, to check if its ok
INT SInumberBlobs () const
 return the total number of blobs
std::vector< INT > SIgetBlobMap () const
 return a map of blobs that gives the numeric ID of a blob from the image
void SIcalcMassCenter ()
 calculate basic mass/center blob properties
FLOAT SIgetCenterX (const INT blob) const
 get blob center in X
FLOAT SIgetCenterY (const INT blob) const
 get blob center in X
INT SIgetMass (const INT blob) const
 get blob mass
int SIgetXmin (const INT blob) const
 get X min for a blob
int SIgetXmax (const INT blob) const
 get X max for a blob
int SIgetYmin (const INT blob) const
 get Y min for a blob
int SIgetYmax (const INT blob) const
 get Y max for a blob
int SIgetImageSizeX () const
 get the working image size in X
int SIgetImageSizeY () const
 get the working image size in Y
void SIgetValue (INT *blob, typename std::vector< FLOAT > *mean, typename std::vector< FLOAT > *std, INT *in)
 get HSV mean values and standard deviations for a blob
void SIgetValueMean (INT *blobListSize, std::vector< INT > *blobList, typename std::vector< FLOAT > *mean, typename std::vector< FLOAT > *std, FLOAT *mass)
 do HVS color value means for x last iterations

Detailed Description

This is a class to track hyper spectal blobs.

This class is most likely called by segmentImageTrackMC and will segment images by linking pixels and the corresponding image regions by linked stripes. It will also segregate each blob and track it seperately.

Definition at line 81 of file segmentImageMC2.H.


Constructor & Destructor Documentation

template SI_TEMPLATE_CLASS segmentImageMC2::segmentImageMC2 (  ) 

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 67 of file segmentImageMC2.C.


Member Function Documentation

template SI_TEMPLATE_CLASS void segmentImageMC2::SIcalcMassCenter (  ) 

calculate basic mass/center blob properties

Definition at line 398 of file segmentImageMC2.C.

References Image< T >::beginw(), Image< T >::getHeight(), Image< T >::getWidth(), and height.

template SI_TEMPLATE_CLASS Image< INT > segmentImageMC2::SIcreateMother ( const Image< INT > &  img  )  const

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

else just use returnCandidates

Definition at line 316 of file segmentImageMC2.C.

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

template SI_TEMPLATE_CLASS std::vector< INT > segmentImageMC2::SIgetBlobMap (  )  const

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

Definition at line 390 of file segmentImageMC2.C.

template SI_TEMPLATE_CLASS FLOAT segmentImageMC2::SIgetCenterX ( const INT  blob  )  const

get blob center in X

Definition at line 460 of file segmentImageMC2.C.

template SI_TEMPLATE_CLASS FLOAT segmentImageMC2::SIgetCenterY ( const INT  blob  )  const

get blob center in X

Definition at line 468 of file segmentImageMC2.C.

template SI_TEMPLATE_CLASS int segmentImageMC2::SIgetImageSizeX (  )  const

get the working image size in X

Definition at line 516 of file segmentImageMC2.C.

References Image< T >::getWidth().

template SI_TEMPLATE_CLASS int segmentImageMC2::SIgetImageSizeY (  )  const

get the working image size in Y

Definition at line 524 of file segmentImageMC2.C.

References Image< T >::getHeight().

template SI_TEMPLATE_CLASS INT segmentImageMC2::SIgetMass ( const INT  blob  )  const

get blob mass

Definition at line 476 of file segmentImageMC2.C.

template SI_TEMPLATE_CLASS void segmentImageMC2::SIgetValue ( INT *  blob,
typename std::vector< FLOAT > *  mean,
typename std::vector< FLOAT > *  std,
INT *  in 
) [inline]

get HSV mean values and standard deviations for a blob

Definition at line 531 of file segmentImageMC2.C.

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

Referenced by SIgetValueMean().

template SI_TEMPLATE_CLASS void segmentImageMC2::SIgetValueMean ( INT *  blobListSize,
std::vector< INT > *  blobList,
typename std::vector< FLOAT > *  mean,
typename std::vector< FLOAT > *  std,
FLOAT *  mass 
)

do HVS color value means for x last iterations

Definition at line 579 of file segmentImageMC2.C.

References SIgetValue().

template SI_TEMPLATE_CLASS int segmentImageMC2::SIgetXmax ( const INT  blob  )  const

get X max for a blob

Definition at line 492 of file segmentImageMC2.C.

template SI_TEMPLATE_CLASS int segmentImageMC2::SIgetXmin ( const INT  blob  )  const

get X min for a blob

Definition at line 484 of file segmentImageMC2.C.

template SI_TEMPLATE_CLASS int segmentImageMC2::SIgetYmax ( const INT  blob  )  const

get Y max for a blob

Definition at line 508 of file segmentImageMC2.C.

template SI_TEMPLATE_CLASS int segmentImageMC2::SIgetYmin ( const INT  blob  )  const

get Y min for a blob

Definition at line 500 of file segmentImageMC2.C.

template SI_TEMPLATE_CLASS INT segmentImageMC2::SInumberBlobs (  )  const

return the total number of blobs

Definition at line 382 of file segmentImageMC2.C.

template SI_TEMPLATE_CLASS void segmentImageMC2::SIresetAvg (  )  [inline]

reset averaging for color averaging adaptation

Definition at line 207 of file segmentImageMC2.C.

template SI_TEMPLATE_CLASS void segmentImageMC2::SIresetCandidates ( const bool  whichWay  )  [inline]

Call during run if color is totally reset.

Definition at line 143 of file segmentImageMC2.C.

References Image< T >::beginw(), and Image< T >::endw().

template SI_TEMPLATE_CLASS Image< int > segmentImageMC2::SIreturnBlobs (  )  const

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

Definition at line 337 of file segmentImageMC2.C.

Referenced by WinnerTakeAllTempNote::integrate().

template SI_TEMPLATE_CLASS Image< bool > segmentImageMC2::SIreturnCandidates (  )  const

return a bool map off all candidate pixels

Definition at line 345 of file segmentImageMC2.C.

template SI_TEMPLATE_CLASS Image< FLOAT > segmentImageMC2::SIreturnNormalizedCandidates (  )  const

return a normalized displayable map off all candidate pixels

Definition at line 353 of file segmentImageMC2.C.

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

Referenced by WinnerTakeAllTempNote::integrate().

template SI_TEMPLATE_CLASS Image< PixRGB< FLOAT > > segmentImageMC2::SIreturnWorkImage (  )  const

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

Definition at line 373 of file segmentImageMC2.C.

References ASSERT.

template SI_TEMPLATE_CLASS void segmentImageMC2::SIsegment ( typename std::vector< Image< FLOAT > > *  featureMap,
const bool  lowPass = false 
)

segment image based upon parameters input

Definition at line 255 of file segmentImageMC2.C.

References lowPass5().

template SI_TEMPLATE_CLASS void segmentImageMC2::SIsegment ( Image< PixRGB< byte > > *  image,
typename std::vector< Image< FLOAT > > *  featureMap,
const bool  lowPass = false 
)

segment image based upon parameters input (depricated)

Definition at line 244 of file segmentImageMC2.C.

References image.

Referenced by WinnerTakeAllTempNote::integrate().

template SI_TEMPLATE_CLASS void segmentImageMC2::SIsetAvg ( const INT  doAvg  )  [inline]

set up averaging for color averaging adaptation

Definition at line 190 of file segmentImageMC2.C.

Referenced by WinnerTakeAllTempNote::input().

template SI_TEMPLATE_CLASS void segmentImageMC2::SIsetFrame ( int *  x,
int *  y 
) [inline]

set the region of the image to inspect

Definition at line 165 of file segmentImageMC2.C.

References Image< T >::resize().

Referenced by WinnerTakeAllTempNote::input().

template SI_TEMPLATE_CLASS void segmentImageMC2::SIsetKillValue ( const unsigned int  kv  ) 

override and set the kill value for removing singles

Definition at line 306 of file segmentImageMC2.C.

template SI_TEMPLATE_CLASS void segmentImageMC2::SIsetVal ( const typename std::vector< FLOAT > &  val,
const typename std::vector< FLOAT > &  thresh 
) [inline]

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

This method will set the threshold to be val +/- thresh. Thus, consider val to be the mean color you wish to track with a standard deviation like boundary as thresh. To set the high and low values directly use SIsetValThresh as an alternative.

Definition at line 95 of file segmentImageMC2.C.

template SI_TEMPLATE_CLASS void segmentImageMC2::SIsetValThresh ( const typename std::vector< FLOAT > &  high,
const typename std::vector< FLOAT > &  low 
) [inline]

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

Set threshold values directly as a boundary between high and low. If you wish to work more on mean values use SIsetVal instead.

Definition at line 117 of file segmentImageMC2.C.

Referenced by WinnerTakeAllTempNote::input().

template SI_TEMPLATE_CLASS void segmentImageMC2::SItoggleCandidateBandPass ( const bool  toggle  ) 

toggle band pass filter on candidate pixels on/off

Definition at line 292 of file segmentImageMC2.C.

Referenced by WinnerTakeAllTempNote::input().

template SI_TEMPLATE_CLASS void segmentImageMC2::SItoggleRemoveSingles ( const bool  toggle  ) 

Turn on or off single removal: defaults to ON.

Definition at line 299 of file segmentImageMC2.C.


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