Fawkes API  Fawkes Development Version
border_shrinker.h
1 
2 /***************************************************************************
3  * border_shrinker.h - Header for BorderShrinker
4  *
5  * Created: Wed Feb 15 15:00:26 2006
6  * Copyright 2005-2007 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef _FIREVISION_CLASSIFIER_BORDER_SHRINKER_H_
25 #define _FIREVISION_CLASSIFIER_BORDER_SHRINKER_H_
26 
27 #include <fvclassifiers/shrinker.h>
28 
29 namespace firevision {
30 
31 class ROI;
32 
33 class BorderShrinker : public Shrinker
34 {
35 public:
36  /** CloseShrinker shrinks ROIs
37  * It will make sure that any ROI that passes it will NOT be in the border regions
38  * denoted by the pixels
39  * @param border_left left pixel margin
40  * @param border_right right pixel margin
41  * @param border_top top pixel margin
42  * @param border_bottom botto pixel margin
43  */
44  BorderShrinker(unsigned int border_left = 0,
45  unsigned int border_right = 0,
46  unsigned int border_top = 0,
47  unsigned int border_bottom = 10);
48 
49  virtual ~BorderShrinker();
50 
51  virtual void shrink(ROI *roi);
52 
53 private:
54  unsigned int border_left;
55  unsigned int border_right;
56  unsigned int border_top;
57  unsigned int border_bottom;
58 };
59 
60 } // end namespace firevision
61 
62 #endif
virtual void shrink(ROI *roi)
Shrink! Do the actual shrinking.
Region of interest.
Definition: roi.h:54
virtual ~BorderShrinker()
Virtual empty destructor.
Shrinker class to shrink ROIs.
Definition: shrinker.h:31
BorderShrinker(unsigned int border_left=0, unsigned int border_right=0, unsigned int border_top=0, unsigned int border_bottom=10)
CloseShrinker shrinks ROIs It will make sure that any ROI that passes it will NOT be in the border re...