segmentImageTrackMC Class Reference

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

#include <VFAT/segmentImageTrackMC.H>

Collaboration diagram for segmentImageTrackMC:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 segmentImageTrackMC (INT maxBlobCount)
 default constructor, also sets up number of color channels
void SITsetCircleColor (unsigned int r, unsigned int g, unsigned int b)
 set the tracking color for mass circle
void SITsetBoxColor (unsigned int r, unsigned int g, unsigned int b, unsigned int bigr, unsigned int bigg, unsigned int bigb)
void SITsetTrackColor (typename std::vector< FLOAT > *color, typename std::vector< FLOAT > *std, typename std::vector< FLOAT > *norm, typename std::vector< FLOAT > *adapt, typename std::vector< FLOAT > *upperBound, typename std::vector< FLOAT > *lowerBound, bool resetColor=true, bool resetCandidates=false)
 set default tracking color values
void SITsetFrame (int *x, int *y)
 set frame size for color tracker
void SITsetUseSmoothing (bool smoothing, FLOAT alpha)
 set this if you want to temporally smooth frames
void SITsetExpectedTargetPosition (const unsigned int posX, const unsigned int posY, const unsigned int maxX, const unsigned int maxY, const unsigned int minX, const unsigned int minY)
 OPTIONAL - set where you expect the target appear.
void SITgetExpectedTargetPosition (unsigned int *posX, unsigned int *posY, unsigned int *maxX, unsigned int *maxY, unsigned int *minX, unsigned int *minY, bool *isSet)
 return the expect target positions you set
void SITunsetExpectedTargetPosition ()
 unset the bool to use expected location
void SITtoggleCandidateBandPass (bool toggle)
 turn on or off candidate pixel band passing (on,true by default)
void SITtoggleColorAdaptation (bool toggle)
 turn on or off color adaptation
void SITsetFrameNumber (unsigned long frame)
 OPTIONAL set the frame number.
void SITtrackImageAny (Image< PixH2SV2< FLOAT > > &input, Image< PixRGB< byte > > *image, Image< PixRGB< byte > > *auxImage, bool editBlobs)
 Put image one at a time into tracker and get back tracker image output.
void SITtrackImage (Image< PixRGB< byte > > &input, Image< PixRGB< byte > > *image, Image< PixRGB< byte > > *auxImage, bool editBlobs)
 Put image one at a time into tracker and get back tracker image output.
void SITtrackImage (typename std::vector< Image< FLOAT > > &input, Image< PixRGB< byte > > *image, Image< PixRGB< byte > > *auxImage, bool editBlobs)
 Put image one at a time into tracker and get back tracker image output.
void SITsmoothImage (typename std::vector< Image< FLOAT > > *input)
 smooth the input image with a temporal Kalman filter
void SITuseLog (bool useLog)
 OPTIONAL call this to turn on the logger.
void SITtoggleDrawing (bool targetImage, bool colorAdaptImage)
 OPTIONAL call this to turn off some drawing functions.
void SITrunTrack (Image< PixRGB< byte > > *image, typename std::vector< Image< FLOAT > > *input, bool editBlobs)
 run the tracker
bool SITreturnLOT ()
 This tells if no good target can be found. It returns loss of track.
unsigned int SITreturnLOTtype ()
 tells what kind of loss of track we have
std::string SITreturnLOTtypeName ()
 returns an explanation of LOT
Image< long > SITreturnBlobMap ()
 return the blob ID map from SI
Image< byteSITreturnCandidateImage ()
 return the image of candidate pixels
FLOAT SITPgauss (FLOAT X, FLOAT Xbar, FLOAT std)
 return gaussian P for X, Xbar and std
void SITdrawBlobTrack (INT i)
 draw a tracking circle around blob i
void SITdrawBlobTrackMerged ()
 draw the merged blob track box
void SITdrawBlobBox (INT i)
 draw a tracking blob around bad condidate blob
void SITdrawHistoValues (typename std::vector< FLOAT > *mean, typename std::vector< FLOAT > *std, typename std::vector< FLOAT > *lb, typename std::vector< FLOAT > *ub, typename std::vector< FLOAT > *norm, bool LOT)
 draw histogram given the values provided
void SITgetBlobPosition (int &x, int &y)
 return the blob position (for tracking) as an x y coord
void SITgetBlobWeight (int &m)
 return the blob mass (for tracking) as an integer
void SITgetMinMaxBoundry (unsigned int *minX, unsigned int *maxX, unsigned int *minY, unsigned int *maxY)
 return the bounding box to the blobs
FLOAT SITgetMass ()
 return the mass of the remaining blob
void SITgetBlobAttrition (INT *totalBlobs, INT *killedBlobs)
 how many potential blobs have been killed
void SITgetAdaptiveChannelVals (typename std::vector< FLOAT > *mean, typename std::vector< FLOAT > *std)
 get new adaptive values for color tracking
unsigned int SITgetLOTcount ()
 get how many loss of tracks have been found since last reset of color
INT SITnumberBlobs ()
 return the total number of blobs
unsigned short SITgetBlobReasonForKillCode (INT blob)
 for each blob this tells why it was killed
std::string SITgetBlobReasonForKill (INT blob)
 for each blob this tells why it was killed
INT SITgetBlobMass (INT blob)
 for each blob, return its mass
INT SITgetBlobPosX (INT blob)
 for each blob, return its X position
INT SITgetBlobPosY (INT blob)
 for each blob, return its Y position
 segmentImageTrackMC (INT maxBlobCount)
 default constructor, also sets up number of color channels
void SITsetCircleColor (unsigned char r, unsigned char g, unsigned char b)
 set the tracking color for mass circle
void SITsetBoxColor (unsigned char r, unsigned char g, unsigned char b, unsigned char bigr, unsigned char bigg, unsigned char bigb)
void SITsetTrackColor (typename std::vector< FLOAT > color, typename std::vector< FLOAT > std, typename std::vector< FLOAT > norm, typename std::vector< FLOAT > adapt, typename std::vector< FLOAT > upperBound, typename std::vector< FLOAT > lowerBound, bool resetColor=true, bool resetCandidates=false)
 set default tracking color values
void SITsetTrackSignature (const covHolder< double > *cov, segHolder< FLOAT, INT, SIT_channels > *seg)
 set default tracking color values
void SITgetTrackSignature (segHolder< FLOAT, INT, SIT_channels > *seg)
 get back the segHolder with values that describe the target
void SITsetFrame (unsigned short *x, unsigned short *y)
 set frame size for color tracker
void SITsetUseSmoothing (bool smoothing, FLOAT alpha)
 set this if you want to temporally smooth frames
void SITsetExpectedTargetPosition (const unsigned short posX, const unsigned short posY, const unsigned short maxX, const unsigned short maxY, const unsigned short minX, const unsigned short minY)
 OPTIONAL - set where you expect the target appear.
void SITgetExpectedTargetPosition (unsigned short *posX, unsigned short *posY, unsigned short *maxX, unsigned short *maxY, unsigned short *minX, unsigned short *minY, bool *isSet) const
 return the expect target positions you set
void SITunsetExpectedTargetPosition ()
 unset the bool to use expected location
bool SITintersection (const covHolder< double > *cov, const int boundX, const int boundY) const
 tell us if the new target overlaps with the current target
void SITpercentOverlap (const segHolder< FLOAT, INT, SIT_channels > *seg, FLOAT *overlap, FLOAT *thisArea, FLOAT *otherArea) const
 find out how much another target overlaps with this
void SITtoggleCandidateBandPass (bool toggle)
 turn on or off candidate pixel band passing (on,true by default)
void SITtoggleColorAdaptation (bool toggle)
 turn on or off color adaptation
void SITtoggleHardBounds (bool toggle)
 turn on or off hard bounds in color adaptations
void SITsetFrameNumber (unsigned long frame)
 OPTIONAL set the frame number.
void SITeditBlobs (bool toggle)
 turn on or off blob editing
void SITtrackImage (Image< PixH2SV2< FLOAT > > &input, Image< PixRGB< byte > > *output)
 Put image one at a time into tracker and get back tracker image output.
void SITsmoothImage (typename std::vector< Image< FLOAT > > *input)
 smooth the input image with a temporal Kalman filter
void SITuseLog (bool useLog)
 OPTIONAL call this to turn on the logger.
void SITtoggleDrawing (bool targetImage, bool colorAdaptImage)
 OPTIONAL call this to turn off some drawing functions.
void SITrunTrack (Image< PixRGB< byte > > *image, typename std::vector< Image< FLOAT > > *input)
 run the tracker
bool SITreturnLOT ()
 This tells if no good target can be found. It returns loss of track.
unsigned int SITreturnLOTtype ()
 tells what kind of loss of track we have
std::string SITreturnLOTtypeName ()
 returns an explanation of LOT
Image< long > SITreturnBlobMap ()
 return the blob ID map from SI
Image< byteSITreturnCandidateImage ()
 return the image of candidate pixels
FLOAT SITPgauss (FLOAT X, FLOAT Xbar, FLOAT std)
 return gaussian P for X, Xbar and std
void SITdrawBlobTrack (INT i)
 draw a tracking circle around blob i
void SITdrawBlobTrackMerged ()
 draw the merged blob track box
void SITdrawBlobBox (INT i)
 draw a tracking blob around bad condidate blob
void SITdrawHistoValues (typename std::vector< FLOAT > *mean, typename std::vector< FLOAT > *std, typename std::vector< FLOAT > *lb, typename std::vector< FLOAT > *ub, typename std::vector< FLOAT > *norm, bool LOT)
 draw histogram given the values provided
void SITgetBlobPosition (unsigned short *x, unsigned short *y)
 return the blob position (for tracking) as an x y coord
void SITgetMinMaxBoundry (unsigned short *minX, unsigned short *maxX, unsigned short *minY, unsigned short *maxY)
 return the bounding box to the blobs
Image< PixRGB< byte > > SITgetColorBars ()
 return the color adaptation bar image if used
FLOAT SITgetMass ()
 return the mass of the remaining blob
void SITgetBlobAttrition (INT *totalBlobs, INT *killedBlobs)
 how many potential blobs have been killed
void SITgetLifeSpans (unsigned long *totalLifeSpan, unsigned long *lifeSpan)
 How long have we been tracking this object.
void SITgetAdaptiveChannelVals (typename std::vector< FLOAT > *mean, typename std::vector< FLOAT > *std)
 get new adaptive values for color tracking
unsigned int SITgetLOTcount ()
 get how many loss of tracks have been found since last reset of color
INT SITnumberBlobs ()
 return the total number of blobs
unsigned short SITgetBlobReasonForKillCode (INT blob)
 for each blob this tells why it was killed
std::string SITgetBlobReasonForKill (INT blob)
 for each blob this tells why it was killed
INT SITgetBlobMass (INT blob)
 for each blob, return its mass
INT SITgetBlobPosX (INT blob)
 for each blob, return its X position
INT SITgetBlobPosY (INT blob)
 for each blob, return its Y position

Public Attributes

bool SIT_LOTandRESET
 this is set to true if after calling the tracker it reset colors

Detailed Description

This is a class to track hyper spectal blobs.

This class will segment blobs and track them using adaptive thresholding and by calling segmentImageMC. It can be used as a simple color tracker or can track anything else in real time so long as its features are continuous

This class will segment blobs and track them using adaptive thresholding and by calling segmentImageMC2. It can be used as a simple color tracker or can track anything else in real time so long as its features are contiuous

Definition at line 87 of file segmentImageTrackMC.H.


Constructor & Destructor Documentation

template SIT_TEMPLATE_CLASS segmentImageTrackMC::segmentImageTrackMC ( INT  maxBlobCount  ) 
segmentImageTrackMC::segmentImageTrackMC ( INT  maxBlobCount  ) 

default constructor, also sets up number of color channels


Member Function Documentation

void segmentImageTrackMC::SITdrawBlobBox ( INT  i  ) 

draw a tracking blob around bad condidate blob

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITdrawBlobBox ( INT  i  ) 
void segmentImageTrackMC::SITdrawBlobTrack ( INT  i  ) 

draw a tracking circle around blob i

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITdrawBlobTrack ( INT  i  ) 
void segmentImageTrackMC::SITdrawBlobTrackMerged (  ) 

draw the merged blob track box

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITdrawBlobTrackMerged (  ) 

draw the merged blob track box

Definition at line 1328 of file segmentImageTrackMC.C.

References DEC, drawCircle(), drawRectEZ(), sqrt(), and Rectangle::tlbrI().

void segmentImageTrackMC::SITdrawHistoValues ( typename std::vector< FLOAT > *  mean,
typename std::vector< FLOAT > *  std,
typename std::vector< FLOAT > *  lb,
typename std::vector< FLOAT > *  ub,
typename std::vector< FLOAT > *  norm,
bool  LOT 
)

draw histogram given the values provided

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITdrawHistoValues ( typename std::vector< FLOAT > *  mean,
typename std::vector< FLOAT > *  std,
typename std::vector< FLOAT > *  lb,
typename std::vector< FLOAT > *  ub,
typename std::vector< FLOAT > *  norm,
bool  LOT 
)

draw histogram given the values provided

Definition at line 1372 of file segmentImageTrackMC.C.

References drawRectEZ(), Image< T >::getHeight(), Image< T >::getWidth(), Image< T >::resize(), and Rectangle::tlbrI().

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITeditBlobs ( bool  toggle  ) 

turn on or off blob editing

Definition at line 1140 of file segmentImageTrackMC2.C.

void segmentImageTrackMC::SITgetAdaptiveChannelVals ( typename std::vector< FLOAT > *  mean,
typename std::vector< FLOAT > *  std 
)

get new adaptive values for color tracking

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITgetAdaptiveChannelVals ( typename std::vector< FLOAT > *  mean,
typename std::vector< FLOAT > *  std 
)

get new adaptive values for color tracking

Definition at line 1223 of file segmentImageTrackMC.C.

Referenced by SITgetTrackSignature().

void segmentImageTrackMC::SITgetBlobAttrition ( INT *  totalBlobs,
INT *  killedBlobs 
)

how many potential blobs have been killed

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITgetBlobAttrition ( INT *  totalBlobs,
INT *  killedBlobs 
)

how many potential blobs have been killed

Definition at line 1212 of file segmentImageTrackMC.C.

Referenced by SITgetTrackSignature().

INT segmentImageTrackMC::SITgetBlobMass ( INT  blob  ) 

for each blob, return its mass

template SIT_TEMPLATE_CLASS INT segmentImageTrackMC::SITgetBlobMass ( INT  blob  ) 

for each blob, return its mass

Definition at line 1267 of file segmentImageTrackMC.C.

References segmentImageMC::SIgetMass().

Referenced by main().

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITgetBlobPosition ( unsigned short *  x,
unsigned short *  y 
)

return the blob position (for tracking) as an x y coord

Definition at line 1316 of file segmentImageTrackMC2.C.

References SIT_GLOBAL_DEC.

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITgetBlobPosition ( int &  x,
int &  y 
)

return the blob position (for tracking) as an x y coord

Definition at line 1164 of file segmentImageTrackMC.C.

References DEC.

Referenced by main(), and SITgetTrackSignature().

INT segmentImageTrackMC::SITgetBlobPosX ( INT  blob  ) 

for each blob, return its X position

template SIT_TEMPLATE_CLASS INT segmentImageTrackMC::SITgetBlobPosX ( INT  blob  ) 

for each blob, return its X position

Definition at line 1275 of file segmentImageTrackMC.C.

References segmentImageMC::SIgetCenterX().

Referenced by main().

INT segmentImageTrackMC::SITgetBlobPosY ( INT  blob  ) 

for each blob, return its Y position

template SIT_TEMPLATE_CLASS INT segmentImageTrackMC::SITgetBlobPosY ( INT  blob  ) 

for each blob, return its Y position

Definition at line 1283 of file segmentImageTrackMC.C.

References segmentImageMC::SIgetCenterY().

Referenced by main().

std::string segmentImageTrackMC::SITgetBlobReasonForKill ( INT  blob  ) 

for each blob this tells why it was killed

template SIT_TEMPLATE_CLASS std::string segmentImageTrackMC::SITgetBlobReasonForKill ( INT  blob  ) 

for each blob this tells why it was killed

Definition at line 1259 of file segmentImageTrackMC.C.

unsigned short segmentImageTrackMC::SITgetBlobReasonForKillCode ( INT  blob  ) 

for each blob this tells why it was killed

template SIT_TEMPLATE_CLASS unsigned short segmentImageTrackMC::SITgetBlobReasonForKillCode ( INT  blob  ) 

for each blob this tells why it was killed

Definition at line 1251 of file segmentImageTrackMC.C.

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITgetBlobWeight ( int &  m  ) 

return the blob mass (for tracking) as an integer

Definition at line 1176 of file segmentImageTrackMC.C.

References DEC.

Referenced by main().

template SIT_TEMPLATE_CLASS Image< PixRGB< byte > > segmentImageTrackMC::SITgetColorBars (  ) 

return the color adaptation bar image if used

Definition at line 1346 of file segmentImageTrackMC2.C.

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITgetExpectedTargetPosition ( unsigned short *  posX,
unsigned short *  posY,
unsigned short *  maxX,
unsigned short *  maxY,
unsigned short *  minX,
unsigned short *  minY,
bool *  isSet 
) const

return the expect target positions you set

Definition at line 953 of file segmentImageTrackMC2.C.

References SIT_GLOBAL_DEC.

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITgetExpectedTargetPosition ( unsigned int *  posX,
unsigned int *  posY,
unsigned int *  maxX,
unsigned int *  maxY,
unsigned int *  minX,
unsigned int *  minY,
bool *  isSet 
)

return the expect target positions you set

Definition at line 872 of file segmentImageTrackMC.C.

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITgetLifeSpans ( unsigned long *  totalLifeSpan,
unsigned long *  lifeSpan 
)

How long have we been tracking this object.

totalLifeSpan is the total number of tracking iterations while lifeSpan does not include short intervals where we have lost track thus, we can see how strong our track is by comparing the total time vs. the time actually spent tracking

Definition at line 1374 of file segmentImageTrackMC2.C.

Referenced by SITgetTrackSignature().

unsigned int segmentImageTrackMC::SITgetLOTcount (  ) 

get how many loss of tracks have been found since last reset of color

template SIT_TEMPLATE_CLASS unsigned int segmentImageTrackMC::SITgetLOTcount (  ) 

get how many loss of tracks have been found since last reset of color

Definition at line 1234 of file segmentImageTrackMC.C.

Referenced by SITgetTrackSignature().

FLOAT segmentImageTrackMC::SITgetMass (  ) 

return the mass of the remaining blob

template SIT_TEMPLATE_CLASS FLOAT segmentImageTrackMC::SITgetMass (  ) 

return the mass of the remaining blob

Definition at line 1204 of file segmentImageTrackMC.C.

Referenced by SITgetTrackSignature().

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITgetMinMaxBoundry ( unsigned short *  minX,
unsigned short *  maxX,
unsigned short *  minY,
unsigned short *  maxY 
)

return the bounding box to the blobs

Definition at line 1327 of file segmentImageTrackMC2.C.

References SIT_GLOBAL_DEC.

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITgetMinMaxBoundry ( unsigned int *  minX,
unsigned int *  maxX,
unsigned int *  minY,
unsigned int *  maxY 
)

return the bounding box to the blobs

Definition at line 1184 of file segmentImageTrackMC.C.

References DEC.

Referenced by main(), and SITgetTrackSignature().

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITgetTrackSignature ( segHolder< FLOAT, INT, SIT_channels > *  seg  ) 
template SIT_TEMPLATE_CLASS bool segmentImageTrackMC::SITintersection ( const covHolder< double > *  cov,
const int  boundX,
const int  boundY 
) const

tell us if the new target overlaps with the current target

Definition at line 986 of file segmentImageTrackMC2.C.

References vfatTargetInfo< FLOAT >::maxX, vfatTargetInfo< FLOAT >::maxY, vfatTargetInfo< FLOAT >::minX, vfatTargetInfo< FLOAT >::minY, and SIT_GLOBAL_DEC.

INT segmentImageTrackMC::SITnumberBlobs (  ) 

return the total number of blobs

template SIT_TEMPLATE_CLASS INT segmentImageTrackMC::SITnumberBlobs (  ) 

return the total number of blobs

Definition at line 1242 of file segmentImageTrackMC.C.

References segmentImageMC::SInumberBlobs().

Referenced by main().

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITpercentOverlap ( const segHolder< FLOAT, INT, SIT_channels > *  seg,
FLOAT *  overlap,
FLOAT *  thisArea,
FLOAT *  otherArea 
) const

find out how much another target overlaps with this

Definition at line 1039 of file segmentImageTrackMC2.C.

References vfatTargetInfo< FLOAT >::maxX, vfatTargetInfo< FLOAT >::maxY, vfatTargetInfo< FLOAT >::minX, vfatTargetInfo< FLOAT >::minY, and SIT_GLOBAL_DEC.

FLOAT segmentImageTrackMC::SITPgauss ( FLOAT  X,
FLOAT  Xbar,
FLOAT  std 
)

return gaussian P for X, Xbar and std

FLOAT segmentImageTrackMC::SITPgauss ( FLOAT  X,
FLOAT  Xbar,
FLOAT  std 
)

return gaussian P for X, Xbar and std

Image<long> segmentImageTrackMC::SITreturnBlobMap (  ) 

return the blob ID map from SI

template SIT_TEMPLATE_CLASS Image< long > segmentImageTrackMC::SITreturnBlobMap (  ) 

return the blob ID map from SI

Definition at line 1148 of file segmentImageTrackMC.C.

References segmentImageMC::SIreturnBlobs().

Image<byte> segmentImageTrackMC::SITreturnCandidateImage (  ) 

return the image of candidate pixels

template SIT_TEMPLATE_CLASS Image< byte > segmentImageTrackMC::SITreturnCandidateImage (  ) 

return the image of candidate pixels

Definition at line 1156 of file segmentImageTrackMC.C.

References segmentImageMC::SIreturnNormalizedCandidates().

Referenced by main(), BeoSubTaskDecoder::runDecoder(), and BeoSubCanny::setupCanny().

bool segmentImageTrackMC::SITreturnLOT (  ) 

This tells if no good target can be found. It returns loss of track.

template SIT_TEMPLATE_CLASS bool segmentImageTrackMC::SITreturnLOT (  ) 

This tells if no good target can be found. It returns loss of track.

Definition at line 1124 of file segmentImageTrackMC.C.

Referenced by main(), BeoSubTaskDecoder::runDecoder(), and SITgetTrackSignature().

unsigned int segmentImageTrackMC::SITreturnLOTtype (  ) 

tells what kind of loss of track we have

Types of loss of track are 1 - object is no longer inside tracking frame 2 - object no longer has mass, this either means a total loss of track OR all blobs have been edited out

template SIT_TEMPLATE_CLASS unsigned int segmentImageTrackMC::SITreturnLOTtype (  ) 

tells what kind of loss of track we have

Types of loss of track are 1 - object is no longer inside tracking frame 2 - object no longer has mass, this either means a total loss of track OR all blobs have been edited out

Definition at line 1132 of file segmentImageTrackMC.C.

Referenced by SITgetTrackSignature().

std::string segmentImageTrackMC::SITreturnLOTtypeName (  ) 

returns an explanation of LOT

template SIT_TEMPLATE_CLASS std::string segmentImageTrackMC::SITreturnLOTtypeName (  ) 

returns an explanation of LOT

Definition at line 1140 of file segmentImageTrackMC.C.

Referenced by SITgetTrackSignature().

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITrunTrack ( Image< PixRGB< byte > > *  image,
typename std::vector< Image< FLOAT > > *  input 
)
template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITrunTrack ( Image< PixRGB< byte > > *  image,
typename std::vector< Image< FLOAT > > *  input,
bool  editBlobs = true 
)

run the tracker

Definition at line 1093 of file segmentImageTrackMC.C.

References image, segmentImageMC::SIcalcMassCenter(), segmentImageMC::SIsegment(), and SIT_LOTandRESET.

Referenced by SITtrackImage().

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITsetBoxColor ( unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  bigr,
unsigned char  bigg,
unsigned char  bigb 
)

set the tracking colot for the bounding box set the tracking color for mass circle

Parameters:
r this is the red color for the output bounding box
g this is the green color for the output bounding box
b this is the blue color for the output bounding box
bigr this is the red color for the merged bounding box
bigg this is the green color for the merged bounding box
bigb this is the blue color for the merged bounding box
instance this is the tracker to apply these settings to

Definition at line 719 of file segmentImageTrackMC2.C.

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITsetBoxColor ( unsigned int  r,
unsigned int  g,
unsigned int  b,
unsigned int  bigr,
unsigned int  bigg,
unsigned int  bigb 
)

set the tracking color for the bounding box set the tracking color for mass circle

Parameters:
r this is the red color for the output bounding box
g this is the green color for the output bounding box
b this is the blue color for the output bounding box
bigr this is the red color for the merged bounding box
bigg this is the green color for the merged bounding box
bigb this is the blue color for the merged bounding box
instance this is the tracker to apply these settings to

Definition at line 752 of file segmentImageTrackMC.C.

Referenced by BeoSubTaskDecoder::BeoSubTaskDecoder(), main(), BeoSubCanny::setupCanny(), BeoSubCross::setupOrangeTracker(), and ColorTracker::setupTracker().

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITsetCircleColor ( unsigned char  r,
unsigned char  g,
unsigned char  b 
)

set the tracking color for mass circle

Parameters:
r this is the red color for the output circle
g this is the green color for the output circle
b this is the blue color for the output circle
instance this is the tracker to apply these settings to

Definition at line 706 of file segmentImageTrackMC2.C.

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITsetCircleColor ( unsigned int  r,
unsigned int  g,
unsigned int  b 
)

set the tracking color for mass circle

Parameters:
r this is the red color for the output circle
g this is the green color for the output circle
b this is the blue color for the output circle
instance this is the tracker to apply these settings to

Definition at line 739 of file segmentImageTrackMC.C.

Referenced by BeoSubTaskDecoder::BeoSubTaskDecoder(), main(), BeoSubCanny::setupCanny(), BeoSubCross::setupOrangeTracker(), and ColorTracker::setupTracker().

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITsetExpectedTargetPosition ( const unsigned short  posX,
const unsigned short  posY,
const unsigned short  maxX,
const unsigned short  maxY,
const unsigned short  minX,
const unsigned short  minY 
)

OPTIONAL - set where you expect the target appear.

Parameters:
posX This is the centroid in X where you expect the target
posY This is the centroid in Y where you expect the target
maxX This creates a boundary for expectations
maxY This creates a boundary for expectations
minX This creates a boundary for expectations
minY This creates a boundary for expectations

Definition at line 934 of file segmentImageTrackMC2.C.

References SIT_GLOBAL_DEC.

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITsetExpectedTargetPosition ( const unsigned int  posX,
const unsigned int  posY,
const unsigned int  maxX,
const unsigned int  maxY,
const unsigned int  minX,
const unsigned int  minY 
)

OPTIONAL - set where you expect the target appear.

Parameters:
posX This is the centroid in X where you expect the target
posY This is the centroid in Y where you expect the target
maxX This creates a boundary for expectations
maxY This creates a boundary for expectations
minX This creates a boundary for expectations
minY This creates a boundary for expectations

Definition at line 852 of file segmentImageTrackMC.C.

Referenced by SITsetTrackSignature().

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITsetFrame ( unsigned short *  x,
unsigned short *  y 
)

set frame size for color tracker

This allows the algorithm to inpect an area within each image rather than the whole image. Thus, images do not need to be resized in order to contrain the region processed.

Definition at line 911 of file segmentImageTrackMC2.C.

References segmentImageMC::SIsetFrame(), and SIT_GLOBAL_DEC.

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITsetFrame ( int *  x,
int *  y 
)

set frame size for color tracker

This allows the algorithm to inpect an area within each image rather than the whole image. Thus, images do not need to be resized in order to contrain the region processed.

Definition at line 831 of file segmentImageTrackMC.C.

References segmentImageMC::SIsetFrame().

Referenced by BeoSubTaskDecoder::BeoSubTaskDecoder(), main(), BeoSubCanny::setupCanny(), BeoSubCross::setupOrangeTracker(), ColorTracker::setupTracker(), and SITsetTrackSignature().

void segmentImageTrackMC::SITsetFrameNumber ( unsigned long  frame  ) 

OPTIONAL set the frame number.

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITsetFrameNumber ( unsigned long  frame  ) 

OPTIONAL set the frame number.

Definition at line 912 of file segmentImageTrackMC.C.

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITsetTrackColor ( typename std::vector< FLOAT >  color,
typename std::vector< FLOAT >  std,
typename std::vector< FLOAT >  norm,
typename std::vector< FLOAT >  adapt,
typename std::vector< FLOAT >  upperBound,
typename std::vector< FLOAT >  lowerBound,
bool  resetColor = true,
bool  resetCandidates = false 
)

set default tracking color values

In this method you place the properties for the colors you wish to track as a list from a std::vector. You upload the mean color on each channel which is the color you wish to initially track. You also upload the boundary for the color as the parameter std. This tells the inital range for considering a pixel as OK. The range is color +/- std. Norm is a normalizer to the color. For instance, if a channel ranges between 0 and 255 then this should be set to 255. The parameter adapt is for the color adaptation. This defines the range around which new colors can be found. This is a value that is multiplied by standard deviation of adapted color mean. Higher values mean less selective. The upper and lower bound determine the values above or below color adaptation can never go (ever). This keeps the adaptation in check.

Parameters:
color This is the mean color to track on each channel
std This is the threshold for color (color +/- std)
norm This is the normalizer range for a color channel
adapt This is the adaptation multiplier for color adaption
upperBound This is the hard upper bound on channel values
lowerBound This is the hard lower bound on channel values

Definition at line 853 of file segmentImageTrackMC2.C.

References ASSERT, ERRINTERVAL, segmentImageMC::SIresetAvg(), segmentImageMC::SIresetCandidates(), segmentImageMC::SIsetAvg(), segmentImageMC::SIsetVal(), and SIT_LOG_FILE.

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITsetTrackColor ( typename std::vector< FLOAT > *  color,
typename std::vector< FLOAT > *  std,
typename std::vector< FLOAT > *  norm,
typename std::vector< FLOAT > *  adapt,
typename std::vector< FLOAT > *  upperBound,
typename std::vector< FLOAT > *  lowerBound,
bool  resetColor = true,
bool  resetCandidates = false 
)

set default tracking color values

In this method you place the properties for the colors you wish to track as a list from a std::vector. You upload the mean color on each channel which is the color you wish to initially track. You also upload the boundary for the color as the parameter std. This tells the inital range for considering a pixel as OK. The range is color +/- std. Norm is a normalizer to the color. For instance, if a channel ranges between 0 and 255 then this should be set to 255. The parameter adapt is for the color adaptation. This defines the range around which new colors can be found. This is a value that is multiplied by standard deviation of adapted color mean. Higher values mean less selective. The upper and lower bound determine the values above or below color adaptation can never go (ever). This keeps the adaptation in check.

Parameters:
color This is the mean color to track on each channel
std This is the threshold for color (color +/- std)
norm This is the normalizer range for a color channel
adapt This is the adaptation multiplier for color adaption
upperBound This is the hard upper bound on channel values
lowerBound This is the hard lower bound on channel values

Definition at line 772 of file segmentImageTrackMC.C.

References ASSERT, ERRINTERVAL, segmentImageMC::SIresetAvg(), segmentImageMC::SIresetCandidates(), segmentImageMC::SIsetAvg(), segmentImageMC::SIsetVal(), and SIT_LOG_FILE.

Referenced by main(), BeoSubCanny::setupCanny(), BeoSubCross::setupOrangeTracker(), and ColorTracker::setupTracker().

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITsetTrackSignature ( const covHolder< double > *  cov,
segHolder< FLOAT, INT, SIT_channels > *  seg 
)

set default tracking color values

Input a covHolder signature for tracking along with data from a segHolder.

Parameters:
cov This is a covHolder object from covHolder.H
seg This is a segHolder object from segHolder.H

Definition at line 739 of file segmentImageTrackMC2.C.

References vfatTargetInfo< FLOAT >::baseID, vfatTargetInfo< FLOAT >::bias, segHolder< FLOAT, INT, dim >::channelAdapt, segHolder< FLOAT, INT, dim >::channelMap, vfatTargetInfo< FLOAT >::dim, ERRINTERVAL, segHolder< FLOAT, INT, dim >::expectedX, segHolder< FLOAT, INT, dim >::expectedXmax, segHolder< FLOAT, INT, dim >::expectedXmin, segHolder< FLOAT, INT, dim >::expectedY, segHolder< FLOAT, INT, dim >::expectedYmax, segHolder< FLOAT, INT, dim >::expectedYmin, vfatTargetInfo< FLOAT >::featureName, vfatTargetInfo< FLOAT >::imageSizeX, vfatTargetInfo< FLOAT >::imageSizeY, vfatTargetInfo< FLOAT >::lifeSpan, segHolder< FLOAT, INT, dim >::LOTcount, segHolder< FLOAT, INT, dim >::lowerBoundMod, vfatTargetInfo< FLOAT >::maxX, vfatTargetInfo< FLOAT >::maxY, vfatTargetInfo< FLOAT >::mean, vfatTargetInfo< FLOAT >::minX, vfatTargetInfo< FLOAT >::minY, vfatTargetInfo< FLOAT >::norm, vfatTargetInfo< FLOAT >::posX, vfatTargetInfo< FLOAT >::posY, segmentImageMC::SIresetAvg(), segmentImageMC::SIsetAvg(), segmentImageMC::SIsetVal(), SIT_LOG_FILE, SITsetExpectedTargetPosition(), SITsetFrame(), vfatTargetInfo< FLOAT >::STD, segHolder< FLOAT, INT, dim >::STDmod, segHolder< FLOAT, INT, dim >::totalLifeSpan, and segHolder< FLOAT, INT, dim >::upperBoundMod.

void segmentImageTrackMC::SITsetUseSmoothing ( bool  smoothing,
FLOAT  alpha 
)

set this if you want to temporally smooth frames

this will use a Kalman like filter to preserve past images

Parameters:
alpha This is the percentage of last iteration to keep 0-1
template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITsetUseSmoothing ( bool  smoothing,
FLOAT  alpha 
)

set this if you want to temporally smooth frames

this will use a Kalman like filter to preserve past images

Parameters:
alpha This is the percentage of last iteration to keep 0-1

Definition at line 843 of file segmentImageTrackMC.C.

Referenced by BeoSubTaskDecoder::BeoSubTaskDecoder(), main(), BeoSubCanny::setupCanny(), BeoSubCross::setupOrangeTracker(), and ColorTracker::setupTracker().

void segmentImageTrackMC::SITsmoothImage ( typename std::vector< Image< FLOAT > > *  input  ) 

smooth the input image with a temporal Kalman filter

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITsmoothImage ( typename std::vector< Image< FLOAT > > *  input  ) 

smooth the input image with a temporal Kalman filter

Definition at line 1043 of file segmentImageTrackMC.C.

References Image< T >::resize().

Referenced by SITtrackImage().

void segmentImageTrackMC::SITtoggleCandidateBandPass ( bool  toggle  ) 

turn on or off candidate pixel band passing (on,true by default)

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITtoggleCandidateBandPass ( bool  toggle  ) 

turn on or off candidate pixel band passing (on,true by default)

Definition at line 899 of file segmentImageTrackMC.C.

References segmentImageMC::SItoggleCandidateBandPass().

Referenced by BeoSubTaskDecoder::BeoSubTaskDecoder(), main(), BeoSubCanny::setupCanny(), BeoSubCross::setupOrangeTracker(), and ColorTracker::setupTracker().

void segmentImageTrackMC::SITtoggleColorAdaptation ( bool  toggle  ) 

turn on or off color adaptation

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITtoggleColorAdaptation ( bool  toggle  ) 
void segmentImageTrackMC::SITtoggleDrawing ( bool  targetImage,
bool  colorAdaptImage 
)

OPTIONAL call this to turn off some drawing functions.

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITtoggleDrawing ( bool  targetImage,
bool  colorAdaptImage 
)

OPTIONAL call this to turn off some drawing functions.

Definition at line 1083 of file segmentImageTrackMC.C.

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITtoggleHardBounds ( bool  toggle  ) 

turn on or off hard bounds in color adaptations

Definition at line 1126 of file segmentImageTrackMC2.C.

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITtrackImage ( Image< PixH2SV2< FLOAT > > &  input,
Image< PixRGB< byte > > *  output 
)

Put image one at a time into tracker and get back tracker image output.

This is designed to run any pixel type images. If one wishes to use hyperspectral images use SITtrackImage with an input of vectorized images.

Parameters:
input this is the raw input image
output this is a pointer to the output image

Definition at line 1154 of file segmentImageTrackMC2.C.

References ASSERT, decXY(), Image< T >::resize(), and SIT_GLOBAL_DEC.

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITtrackImage ( typename std::vector< Image< FLOAT > > &  input,
Image< PixRGB< byte > > *  image,
Image< PixRGB< byte > > *  auxImage,
bool  editBlobs 
)

Put image one at a time into tracker and get back tracker image output.

Parameters:
input this a set of input channel images
image this is a pointer to the output image
auxImage this is a pointer to the channel threshold bar image

Definition at line 1016 of file segmentImageTrackMC.C.

References Image< T >::begin(), decXY(), image, SITrunTrack(), and SITsmoothImage().

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITtrackImage ( Image< PixRGB< byte > > &  input,
Image< PixRGB< byte > > *  image,
Image< PixRGB< byte > > *  auxImage,
bool  editBlobs 
)

Put image one at a time into tracker and get back tracker image output.

Parameters:
input this is the raw input image
image this is a pointer to the output image
auxImage this is a pointer to the channel threshold bar image

Definition at line 968 of file segmentImageTrackMC.C.

References ASSERT, Image< T >::beginw(), decXY(), Image< T >::endw(), Image< T >::getHeight(), Image< T >::getWidth(), image, and Image< T >::resize().

Referenced by main().

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITtrackImageAny ( Image< PixH2SV2< FLOAT > > &  input,
Image< PixRGB< byte > > *  image,
Image< PixRGB< byte > > *  auxImage,
bool  editBlobs 
)

Put image one at a time into tracker and get back tracker image output.

This is designed to run any pixel type images. If one wishes to use hyperspectral images use SITtrackImage with an input of vectorized images.

Parameters:
input this is the raw input image
image this is a pointer to the output image
auxImage this is a pointer to the channel threshold bar image

Definition at line 926 of file segmentImageTrackMC.C.

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

Referenced by main(), BeoSubTaskDecoder::runDecoder(), and BeoSubCanny::setupCanny().

void segmentImageTrackMC::SITunsetExpectedTargetPosition (  ) 

unset the bool to use expected location

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITunsetExpectedTargetPosition (  ) 

unset the bool to use expected location

Definition at line 892 of file segmentImageTrackMC.C.

void segmentImageTrackMC::SITuseLog ( bool  useLog  ) 

OPTIONAL call this to turn on the logger.

template SIT_TEMPLATE_CLASS void segmentImageTrackMC::SITuseLog ( bool  useLog  ) 

OPTIONAL call this to turn on the logger.

Definition at line 1075 of file segmentImageTrackMC.C.


Member Data Documentation

this is set to true if after calling the tracker it reset colors

This indicates that the number of loss of tracks has exceded the the max number causing the color to be reset. This is only set once after colors are reset. Then it returns to having a value of false when the tracker is called again.

Definition at line 438 of file segmentImageTrackMC.H.

Referenced by SITgetTrackSignature(), and SITrunTrack().


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