Fawkes API
Fawkes Development Version
morphologicalfilter.cpp
1
2
/***************************************************************************
3
* morphologicalfilter.cpp - interface for a morphological filter
4
*
5
* Created: Tue Mar 27 23:27:46 2007
6
* Copyright 2005-2007 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
#include <fvfilters/morphology/morphologicalfilter.h>
24
25
#include <cstddef>
26
27
namespace
firevision {
28
29
/** @class MorphologicalFilter <fvfilters/morphology/morphologicalfilter.h>
30
* Morphological filter interface.
31
* This interface defines specific API details for morphological filters.
32
*
33
* @author Tim Niemueller
34
*
35
*/
36
37
/** Constructor.
38
* @param name filter name
39
* @param max_num_buffers maximum number of source buffers. */
40
MorphologicalFilter::MorphologicalFilter
(
const
char
*name,
unsigned
int
max_num_buffers)
41
: Filter(name, max_num_buffers)
42
{
43
se
= NULL;
44
se_width
=
se_height
=
se_anchor_x
=
se_anchor_y
= 0;
45
}
46
47
/** Destructor. */
48
MorphologicalFilter::~MorphologicalFilter
()
49
{
50
}
51
52
/** Set the structuring element for successive filter runs.
53
* @param se structuring element buffer. This is just a line-wise concatenated array
54
* of values. A value of zero means ignore, any other value means to consider this
55
* value.
56
* @param se_width width of structuring element
57
* @param se_height height of structuring element
58
* @param se_anchor_x x coordinate of anchor in structuring element
59
* @param se_anchor_y y coordinate of anchor in structuring element
60
*/
61
void
62
MorphologicalFilter::set_structuring_element
(
unsigned
char
*se,
63
unsigned
int
se_width,
64
unsigned
int
se_height,
65
unsigned
int
se_anchor_x,
66
unsigned
int
se_anchor_y)
67
{
68
this->se =
se
;
69
this->se_width =
se_width
;
70
this->se_height =
se_height
;
71
this->se_anchor_x =
se_anchor_x
;
72
this->se_anchor_y =
se_anchor_y
;
73
}
74
75
}
// end namespace firevision
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::MorphologicalFilter::MorphologicalFilter
MorphologicalFilter(const char *name, unsigned int max_num_buffers=1)
Constructor.
Definition:
morphologicalfilter.cpp:45
src
libs
fvfilters
morphology
morphologicalfilter.cpp
Generated by
1.8.17