Fawkes API
Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * laplace.h - Header of the laplace filter 00004 * 00005 * Created: Thu Jun 16 16:28:38 2005 00006 * Copyright 2005-2012 Tim Niemueller [www.niemueller.de] 00007 ****************************************************************************/ 00008 00009 /* This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. A runtime exception applies to 00013 * this software (see LICENSE.GPL_WRE file mentioned below for details). 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU Library General Public License for more details. 00019 * 00020 * Read the full text in the LICENSE.GPL_WRE file in the doc directory. 00021 */ 00022 00023 #if ! (defined(HAVE_IPP) || defined(HAVE_OPENCV)) 00024 #error "Neither IPP nor OpenCV installed" 00025 #endif 00026 00027 #ifndef __FIREVISION_FILTER_LAPLACE_H_ 00028 #define __FIREVISION_FILTER_LAPLACE_H_ 00029 00030 #include <fvfilters/filter.h> 00031 00032 namespace firevision { 00033 #if 0 /* just to make Emacs auto-indent happy */ 00034 } 00035 #endif 00036 00037 class FilterLaplace : public Filter 00038 { 00039 00040 public: 00041 FilterLaplace(); 00042 FilterLaplace(float sigma, unsigned int size, float scale); 00043 ~FilterLaplace(); 00044 00045 virtual void apply(); 00046 00047 static void calculate_kernel(int *kernel_buffer, float sigma, unsigned int size, float scale); 00048 00049 private: 00050 int *kernel; 00051 // only used for OpenCV, but adding unconditional to avoid weird 00052 // problems with differently sized class type sizes of macro missing 00053 float *kernel_float; 00054 unsigned int kernel_size; 00055 }; 00056 00057 } // end namespace firevision 00058 00059 #endif