Fawkes API
Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * border_shrinker.h - Header for BorderShrinker 00004 * 00005 * Created: Wed Feb 15 15:00:26 2006 00006 * Copyright 2005-2007 Tim Niemueller [www.niemueller.de] 00007 * 00008 ****************************************************************************/ 00009 00010 /* This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. A runtime exception applies to 00014 * this software (see LICENSE.GPL_WRE file mentioned below for details). 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Library General Public License for more details. 00020 * 00021 * Read the full text in the LICENSE.GPL_WRE file in the doc directory. 00022 */ 00023 00024 #ifndef __FIREVISION_CLASSIFIER_BORDER_SHRINKER_H_ 00025 #define __FIREVISION_CLASSIFIER_BORDER_SHRINKER_H_ 00026 00027 #include <fvclassifiers/shrinker.h> 00028 00029 namespace firevision { 00030 #if 0 /* just to make Emacs auto-indent happy */ 00031 } 00032 #endif 00033 00034 class ROI; 00035 00036 class BorderShrinker : public Shrinker 00037 { 00038 public: 00039 00040 /** CloseShrinker shrinks ROIs 00041 * It will make sure that any ROI that passes it will NOT be in the border regions 00042 * denoted by the pixels 00043 * @param border_left left pixel margin 00044 * @param border_right right pixel margin 00045 * @param border_top top pixel margin 00046 * @param border_bottom botto pixel margin 00047 */ 00048 BorderShrinker(unsigned int border_left = 0, unsigned int border_right = 0, 00049 unsigned int border_top = 0, unsigned int border_bottom = 10); 00050 00051 virtual ~BorderShrinker(); 00052 00053 virtual void shrink( ROI *roi ); 00054 00055 private: 00056 unsigned int border_left; 00057 unsigned int border_right; 00058 unsigned int border_top; 00059 unsigned int border_bottom; 00060 00061 }; 00062 00063 } // end namespace firevision 00064 00065 #endif