This is a class to track hyper spectal blobs. More...
#include <VFAT/segmentImageMC.H>
Public Member Functions | |
segmentImageMC () | |
create an object. Set true for RGB false for HSV | |
void | SIsetVal (typename std::vector< FLOAT > &val, typename std::vector< FLOAT > &thresh, typename std::vector< FLOAT > &skew) |
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 (bool whichWay) |
Call during run if color is totally reset. | |
void | SIsetAvg (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, bool lowPass=false) |
segment image based upon parameters input | |
void | SItoggleCandidateBandPass (bool toggle) |
toggle band pass filter on candidate pixels on/off | |
Image< INT > | SIcreateMother (Image< INT > &img) |
merge all blobs into one big blob, useful if you erase blobs | |
Image< long > | SIreturnBlobs () |
return an image with labeled blobs. Use getBlobMap to map blobs | |
Image< bool > | SIreturnCandidates () |
return a bool map off all candidate pixels | |
Image< FLOAT > | SIreturnNormalizedCandidates () |
return a normalized displayable map off all candidate pixels | |
Image< PixRGB< FLOAT > > | SIreturnWorkImage () |
return the image that is being worked on, to check if its ok | |
INT | SInumberBlobs () |
return the total number of blobs | |
std::vector< INT > | SIgetBlobMap () |
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 (INT blob) |
get blob center in X | |
FLOAT | SIgetCenterY (INT blob) |
get blob center in X | |
INT | SIgetMass (INT blob) |
get blob mass | |
int | SIgetXmin (INT blob) |
get X min for a blob | |
int | SIgetXmax (INT blob) |
get X max for a blob | |
int | SIgetYmin (INT blob) |
get Y min for a blob | |
int | SIgetYmax (INT blob) |
get Y max for a blob | |
int | SIgetImageSizeX () |
get the working image size in X | |
int | SIgetImageSizeY () |
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 |
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 segmentImageMC.H.
template SI_TEMPLATE_CLASS segmentImageMC::segmentImageMC | ( | ) |
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 564 of file segmentImageMC.C.
template SI_TEMPLATE_CLASS void segmentImageMC::SIcalcMassCenter | ( | ) |
calculate basic mass/center blob properties
Definition at line 853 of file segmentImageMC.C.
References Image< T >::beginw(), Image< T >::getHeight(), and Image< T >::getWidth().
Referenced by segmentImageTrackMC::SITrunTrack().
merge all blobs into one big blob, useful if you erase blobs
else just use returnCandidates
Definition at line 771 of file segmentImageMC.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 > segmentImageMC::SIgetBlobMap | ( | ) |
return a map of blobs that gives the numeric ID of a blob from the image
Definition at line 845 of file segmentImageMC.C.
template SI_TEMPLATE_CLASS FLOAT segmentImageMC::SIgetCenterX | ( | INT | blob | ) |
get blob center in X
Definition at line 915 of file segmentImageMC.C.
Referenced by segmentImageTrackMC::SITdrawBlobTrack(), and segmentImageTrackMC::SITgetBlobPosX().
template SI_TEMPLATE_CLASS FLOAT segmentImageMC::SIgetCenterY | ( | INT | blob | ) |
get blob center in X
Definition at line 923 of file segmentImageMC.C.
Referenced by segmentImageTrackMC::SITdrawBlobTrack(), and segmentImageTrackMC::SITgetBlobPosY().
template SI_TEMPLATE_CLASS int segmentImageMC::SIgetImageSizeX | ( | ) |
get the working image size in X
Definition at line 971 of file segmentImageMC.C.
References Image< T >::getWidth().
template SI_TEMPLATE_CLASS int segmentImageMC::SIgetImageSizeY | ( | ) |
get the working image size in Y
Definition at line 979 of file segmentImageMC.C.
References Image< T >::getHeight().
template SI_TEMPLATE_CLASS INT segmentImageMC::SIgetMass | ( | INT | blob | ) |
get blob mass
Definition at line 931 of file segmentImageMC.C.
Referenced by segmentImageTrackMC::SITdrawBlobTrack(), and segmentImageTrackMC::SITgetBlobMass().
template SI_TEMPLATE_CLASS void segmentImageMC::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 986 of file segmentImageMC.C.
References Image< T >::beginw(), Image< T >::endw(), and sqrt().
Referenced by SIgetValueMean().
template SI_TEMPLATE_CLASS void segmentImageMC::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 1034 of file segmentImageMC.C.
References SIgetValue().
template SI_TEMPLATE_CLASS int segmentImageMC::SIgetXmax | ( | INT | blob | ) |
get X max for a blob
Definition at line 947 of file segmentImageMC.C.
Referenced by segmentImageTrackMC::SITdrawBlobBox(), and segmentImageTrackMC::SITdrawBlobTrack().
template SI_TEMPLATE_CLASS int segmentImageMC::SIgetXmin | ( | INT | blob | ) |
get X min for a blob
Definition at line 939 of file segmentImageMC.C.
Referenced by segmentImageTrackMC::SITdrawBlobBox(), and segmentImageTrackMC::SITdrawBlobTrack().
template SI_TEMPLATE_CLASS int segmentImageMC::SIgetYmax | ( | INT | blob | ) |
get Y max for a blob
Definition at line 963 of file segmentImageMC.C.
Referenced by segmentImageTrackMC::SITdrawBlobBox(), and segmentImageTrackMC::SITdrawBlobTrack().
template SI_TEMPLATE_CLASS int segmentImageMC::SIgetYmin | ( | INT | blob | ) |
get Y min for a blob
Definition at line 955 of file segmentImageMC.C.
Referenced by segmentImageTrackMC::SITdrawBlobBox(), and segmentImageTrackMC::SITdrawBlobTrack().
template SI_TEMPLATE_CLASS INT segmentImageMC::SInumberBlobs | ( | ) |
return the total number of blobs
Definition at line 837 of file segmentImageMC.C.
Referenced by segmentImageTrackMC::SITnumberBlobs().
template SI_TEMPLATE_CLASS void segmentImageMC::SIresetAvg | ( | ) |
reset averaging for color averaging adaptation
Definition at line 685 of file segmentImageMC.C.
Referenced by segmentImageTrackMC::SITsetTrackColor(), and segmentImageTrackMC::SITsetTrackSignature().
template SI_TEMPLATE_CLASS void segmentImageMC::SIresetCandidates | ( | bool | whichWay | ) |
Call during run if color is totally reset.
Definition at line 621 of file segmentImageMC.C.
References Image< T >::beginw(), and Image< T >::endw().
Referenced by segmentImageTrackMC::SITsetTrackColor().
template SI_TEMPLATE_CLASS Image< long > segmentImageMC::SIreturnBlobs | ( | ) |
return an image with labeled blobs. Use getBlobMap to map blobs
Definition at line 792 of file segmentImageMC.C.
Referenced by segmentImageTrackMC::SITreturnBlobMap().
template SI_TEMPLATE_CLASS Image< bool > segmentImageMC::SIreturnCandidates | ( | ) |
return a bool map off all candidate pixels
Definition at line 800 of file segmentImageMC.C.
template SI_TEMPLATE_CLASS Image< FLOAT > segmentImageMC::SIreturnNormalizedCandidates | ( | ) |
return a normalized displayable map off all candidate pixels
Definition at line 808 of file segmentImageMC.C.
References Image< T >::getHeight(), Image< T >::getVal(), Image< T >::getWidth(), Image< T >::resize(), and Image< T >::setVal().
Referenced by segmentImageTrackMC::SITreturnCandidateImage().
return the image that is being worked on, to check if its ok
Definition at line 828 of file segmentImageMC.C.
References ASSERT.
template SI_TEMPLATE_CLASS void segmentImageMC::SIsegment | ( | Image< PixRGB< byte > > * | image, | |
typename std::vector< Image< FLOAT > > * | featureMap, | |||
bool | lowPass = false | |||
) |
segment image based upon parameters input
Definition at line 719 of file segmentImageMC.C.
References Image< T >::begin(), image, and lowPass5().
Referenced by segmentImageTrackMC::SITrunTrack().
template SI_TEMPLATE_CLASS void segmentImageMC::SIsetAvg | ( | INT | doAvg | ) |
set up averaging for color averaging adaptation
Definition at line 668 of file segmentImageMC.C.
Referenced by segmentImageTrackMC::SITsetTrackColor(), and segmentImageTrackMC::SITsetTrackSignature().
template SI_TEMPLATE_CLASS void segmentImageMC::SIsetFrame | ( | int * | x, | |
int * | y | |||
) |
set the region of the image to inspect
Definition at line 643 of file segmentImageMC.C.
References Image< T >::resize().
Referenced by segmentImageTrackMC::SITsetFrame().
template SI_TEMPLATE_CLASS void segmentImageMC::SIsetVal | ( | typename std::vector< FLOAT > & | val, | |
typename std::vector< FLOAT > & | thresh, | |||
typename std::vector< FLOAT > & | skew | |||
) |
set the Value (brightness) value you are looking for with thresh error
Definition at line 591 of file segmentImageMC.C.
Referenced by segmentImageTrackMC::SITsetTrackColor(), and segmentImageTrackMC::SITsetTrackSignature().
template SI_TEMPLATE_CLASS void segmentImageMC::SItoggleCandidateBandPass | ( | bool | toggle | ) |
toggle band pass filter on candidate pixels on/off
Definition at line 761 of file segmentImageMC.C.
Referenced by segmentImageTrackMC::SITtoggleCandidateBandPass().