Fawkes API Fawkes Development Version
laplace.h
1
2/***************************************************************************
3 * laplace.h - Header of the laplace filter
4 *
5 * Created: Thu Jun 16 16:28:38 2005
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_LAPLACE_H_
24#define _FIREVISION_FILTER_LAPLACE_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
32namespace firevision {
33
34class FilterLaplace : public Filter
35{
36public:
38 FilterLaplace(float sigma, unsigned int size, float scale);
40
41 virtual void apply();
42
43 static void calculate_kernel(int *kernel_buffer, float sigma, unsigned int size, float scale);
44
45private:
46 int *kernel;
47 // only used for OpenCV, but adding unconditional to avoid weird
48 // problems with differently sized class type sizes of macro missing
49 float * kernel_float;
50 unsigned int kernel_size;
51};
52
53} // end namespace firevision
54
55#endif
Laplacian filter.
Definition: laplace.h:35
~FilterLaplace()
Destructor.
Definition: laplace.cpp:71
virtual void apply()
Apply the filter.
Definition: laplace.cpp:82
FilterLaplace()
Constructor.
Definition: laplace.cpp:46
static void calculate_kernel(int *kernel_buffer, float sigma, unsigned int size, float scale)
Calculate a Laplacian of Gaussian kernel.
Definition: laplace.cpp:195
Filter interface.
Definition: filter.h:33