Fawkes API  Fawkes Development Version
morphologicalfilter.h
1 
2 /***************************************************************************
3  * morphologicalfilter.h - interface for a morphological filter
4  *
5  * Created: Thu Jun 08 09:58:21 2006
6  * Copyright 2005-2012 Tim Niemueller [www.niemueller.de]
7  ****************************************************************************/
8 
9 /* This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version. A runtime exception applies to
13  * this software (see LICENSE.GPL_WRE file mentioned below for details).
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Library General Public License for more details.
19  *
20  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
21  */
22 
23 #ifndef _FIREVISION_FILTER_MORPHOLOGY_MORPHOLOGICAL_H_
24 #define _FIREVISION_FILTER_MORPHOLOGY_MORPHOLOGICAL_H_
25 
26 #if !(defined(HAVE_IPP) || defined(HAVE_OPENCV))
27 # error "Neither IPP nor OpenCV installed"
28 #endif
29 
30 #include <fvfilters/filter.h>
31 
32 namespace firevision {
33 
34 class MorphologicalFilter : public Filter
35 {
36 public:
37  MorphologicalFilter(const char *name, unsigned int max_num_buffers = 1);
38  virtual ~MorphologicalFilter();
39  virtual void set_structuring_element(unsigned char *se,
40  unsigned int se_width,
41  unsigned int se_height,
42  unsigned int se_anchor_x,
43  unsigned int se_anchor_y);
44 
45 protected:
46  /** Structuring element */
47  unsigned char *se;
48  /** Width of structuring element */
49  unsigned int se_width;
50  /** Height of structuring element */
51  unsigned int se_height;
52  /** Anchor point x offset of structuring element */
53  unsigned int se_anchor_x;
54  /** Anchor point y offset of structuring element */
55  unsigned int se_anchor_y;
56 };
57 
58 } // end namespace firevision
59 
60 #endif
firevision::MorphologicalFilter::se_width
unsigned int se_width
Width of structuring element.
Definition: morphologicalfilter.h:59
firevision::MorphologicalFilter::se_height
unsigned int se_height
Height of structuring element.
Definition: morphologicalfilter.h:61
firevision::MorphologicalFilter::se_anchor_y
unsigned int se_anchor_y
Anchor point y offset of structuring element.
Definition: morphologicalfilter.h:65
firevision::MorphologicalFilter::set_structuring_element
virtual void set_structuring_element(unsigned char *se, unsigned int se_width, unsigned int se_height, unsigned int se_anchor_x, unsigned int se_anchor_y)
Set the structuring element for successive filter runs.
Definition: morphologicalfilter.cpp:67
firevision::MorphologicalFilter::~MorphologicalFilter
virtual ~MorphologicalFilter()
Destructor.
Definition: morphologicalfilter.cpp:53
firevision::MorphologicalFilter::se_anchor_x
unsigned int se_anchor_x
Anchor point x offset of structuring element.
Definition: morphologicalfilter.h:63
firevision::MorphologicalFilter::se
unsigned char * se
Structuring element.
Definition: morphologicalfilter.h:57
firevision::Filter::name
virtual const char * name()
Get filter name.
Definition: filter.cpp:148
firevision::MorphologicalFilter::MorphologicalFilter
MorphologicalFilter(const char *name, unsigned int max_num_buffers=1)
Constructor.
Definition: morphologicalfilter.cpp:45