Fawkes API  Fawkes Development Version
morphologicalfilter.h
00001 
00002 /***************************************************************************
00003  *  morphologicalfilter.h - interface for a morphological filter
00004  *
00005  *  Created: Thu Jun 08 09:58:21 2006
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_MORPHOLOGY_MORPHOLOGICAL_H_
00028 #define __FIREVISION_FILTER_MORPHOLOGY_MORPHOLOGICAL_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 MorphologicalFilter : public Filter {
00038  public:
00039   MorphologicalFilter(const char *name, unsigned int max_num_buffers = 1);
00040   virtual ~MorphologicalFilter();
00041   virtual void set_structuring_element(unsigned char *se,
00042                                        unsigned int se_width,
00043                                        unsigned int se_height,
00044                                        unsigned int se_anchor_x,
00045                                        unsigned int se_anchor_y );
00046 
00047  protected:
00048   /** Structuring element */
00049   unsigned char *se;
00050   /** Width of structuring element */
00051   unsigned int   se_width;
00052   /** Height of structuring element */
00053   unsigned int   se_height;
00054   /** Anchor point x offset of structuring element */
00055   unsigned int   se_anchor_x;
00056   /** Anchor point y offset of structuring element */
00057   unsigned int   se_anchor_y;
00058 };
00059 
00060 } // end namespace firevision
00061 
00062 #endif