[Phission-cvs] phission/filter/video/include blob_Filter.h, 1.20, 1.21
Brought to you by:
pthoren
From: Philip T. <pt...@us...> - 2007-06-29 18:23:01
|
Update of /cvsroot/phission/phission/filter/video/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19928/filter/video/include Modified Files: blob_Filter.h Log Message: Added doxygen comments to blob_Filter Added copying of the ROI and clear_img to cloneFilter fixed a bug with the drawing routines where the args parameter was being updated;was using the wrong variable for format and depth Index: blob_Filter.h =================================================================== RCS file: /cvsroot/phission/phission/filter/video/include/blob_Filter.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** blob_Filter.h 28 Jun 2007 23:22:24 -0000 1.20 --- blob_Filter.h 29 Jun 2007 18:23:01 -0000 1.21 *************** *** 98,101 **** --- 98,102 ---- int m_draw_rects; int m_color_blobs; + int m_clear_img; uint32_t m_color_min_size; uint32_t m_color_max_size; *************** *** 124,128 **** blob_Filter(); ! /* Constuctor for nearest neighbor matching */ blob_Filter(phColor lower_threshold, phColor upper_threshold, --- 125,131 ---- blob_Filter(); ! /** ! * Constuctor for nearest neighbor matching. ! */ blob_Filter(phColor lower_threshold, phColor upper_threshold, *************** *** 134,138 **** uint32_t color_max_size = 0 ); ! /* Constructor for color/threshold array matching */ blob_Filter(phColor *incolor, phColor *threshold, --- 137,143 ---- uint32_t color_max_size = 0 ); ! /** ! * Constructor for color/threshold array matching ! */ blob_Filter(phColor *incolor, phColor *threshold, *************** *** 148,153 **** int reset(); /* neighborblobing set method(s) */ ! /* Each will also set the neighborblob parameter to neighborblob in ::filter*/ int set(phColor lower_threshold, phColor upper_threshold, --- 153,163 ---- int reset(); + /* --------------------------------------------------------------------- */ /* neighborblobing set method(s) */ ! /* --------------------------------------------------------------------- */ ! /** ! * Each will also set the neighborblob parameter to neighborblob ! * in ::filter ! */ int set(phColor lower_threshold, phColor upper_threshold, *************** *** 166,170 **** --- 176,182 ---- phColor getThreshold(); + /* --------------------------------------------------------------------- */ /* non-neighborblobbing set method(s) */ + /* --------------------------------------------------------------------- */ /* This set method will disable the neighborblob parameter */ int set(phColor *incolor = NULL, *************** *** 177,185 **** uint32_t color_max_size = 0 ); /* options for drawing information on the output */ ! int setDrawRects ( uint32_t draw_rects = 0 ); ! int setColorBlobs ( uint32_t color_blobs = 0 ); int setColorMinSize ( uint32_t color_min_size = 0 ); int setColorMaxSize ( uint32_t color_max_size = 0 ); int setOutcolor ( phColor outcolor ); --- 189,228 ---- uint32_t color_max_size = 0 ); + /* --------------------------------------------------------------------- */ /* options for drawing information on the output */ ! /* --------------------------------------------------------------------- */ ! /** ! * Enabled the drawing of the rectangles that encapsulate the blobs. ! * In the case of the nearest-neighbor blobbing, it will draw a lot of ! * rectangles because everything in the image is part of some blob. ! */ ! int setDrawRects ( int draw_rects = 0 ); ! /** ! * Enabled the color filling of the pixels that match the input ! * parameters. In the case of nearest neighbor it will color all the ! * pixels according to the average color of the blobs they were grouped ! * into. ! */ ! int setColorBlobs ( int color_blobs = 0 ); ! /** ! * When coloring in the blobs, this option tells the filter to first clear ! * the image. ! */ ! int setClearImage ( int clear_img = 0 ); ! /** ! * This sets the minimum acceptable blob size that will be colored and ! * outlined, if those options are enabled. ! */ int setColorMinSize ( uint32_t color_min_size = 0 ); + /** + * This sets the maximum acceptable blob size that will be colored and + * outlined, if those options are enabled. + */ int setColorMaxSize ( uint32_t color_max_size = 0 ); + /** + * This sets the color to use for coloring over and drawing rectangled of + * matched objects, if those options are enabled. This value isn't used when + * using neighbor blobbing. + */ int setOutcolor ( phColor outcolor ); *************** *** 190,195 **** --- 233,241 ---- phColor getOutColor(); + /* --------------------------------------------------------------------- */ /* Methods to configure region of interest for coloring and drawing * rectangles */ + /* --------------------------------------------------------------------- */ + int setROI ( phRectangleXY region ); phRectangleXY getROI ( ); *************** *** 203,208 **** --- 249,265 ---- phColor upper_threshold, phColor loop_threshold ); + /** + * Set the lower threshold for the neighbor blobbing algorithm. + */ int setLowerThreshold ( phColor lower_threshold ); + /** + * Set the upper threshold for the neighbor blobbing algorithm. + */ int setUpperThreshold ( phColor upper_threshold ); + /** + * Set the loop threshold for the neighbor blobbing algorithm. The loop + * threshold detemines how much we should loop from 255-0 or 0-255 when we + * reach the end of the byte value range. + */ int setLoopThreshold ( phColor loop_threshold ); *************** *** 213,227 **** --- 270,315 ---- /* For non-neighborblobbing; Use specific color input */ + /** + * Set the color and threshold for the simple color segmentation algorithm + */ int setColor ( phColor incolor, phColor threshold ); + /** + * Add a color/threshold pair to the list of colors we should be segmenting + * and returning through phBlobData. + */ int addColor ( phColor incolor, phColor threshold ); + /** + * Remove the color/threshold pair if it is in the list of colors to + * segment. + */ int removeColor ( phColor incolor, phColor threshold ); + /** + * Replace a color/threshold pair, if it is in the list, with a new + * color/threshold pair + */ int replaceColor ( phColor old_incolor, phColor old_threshold, phColor new_incolor, phColor new_threshold ); + /** + * Remove all the color/threshold pairs from the the list + */ int removeColors (); + /** + * Lock the filter and copy the latest blob data into the \var blobData + * parameter. + */ int getBlobData ( phBlobData &blobData ); + /** + * Get a pointer to the phBlobData object so that we can use the + * phLiveObject connect/update methods to get the data from the filter while + * it's running. + */ phLiveObject *getLiveBlobOutput(); + /** + * Create a duplicate instance of the filter using the current filter + * settings + */ phFilter *cloneFilter(); }; |