Fawkes API  Fawkes Development Version
geodesic_erosion.h
00001 
00002 /***************************************************************************
00003  *  geodesic_erosion.h - header for morphological geodesic erosion
00004  *                       reconstruction
00005  *
00006  *  Created: Sat Jun 10 16:10:08 2006 (FIFA WM 2006, England vs. Paraguay)
00007  *  Copyright  2005-2007  Tim Niemueller [www.niemueller.de]
00008  *
00009  ****************************************************************************/
00010 
00011 /*  This program is free software; you can redistribute it and/or modify
00012  *  it under the terms of the GNU General Public License as published by
00013  *  the Free Software Foundation; either version 2 of the License, or
00014  *  (at your option) any later version. A runtime exception applies to
00015  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00016  *
00017  *  This program is distributed in the hope that it will be useful,
00018  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  *  GNU Library General Public License for more details.
00021  *
00022  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00023  */
00024 
00025 #ifndef __FIREVISION_FILTERS_MORPHOLOGY_GEODESIC_EROSION_H_
00026 #define __FIREVISION_FILTERS_MORPHOLOGY_GEODESIC_EROSION_H_
00027 
00028 #include <fvfilters/morphology/morphologicalfilter.h>
00029 
00030 namespace firevision {
00031 #if 0 /* just to make Emacs auto-indent happy */
00032 }
00033 #endif
00034 
00035 class FilterErosion;
00036 class FilterMax;
00037 class ImageDiff;
00038 class ROI;
00039 
00040 class FilterGeodesicErosion : public MorphologicalFilter
00041 {
00042  public:
00043   FilterGeodesicErosion(unsigned int se_size = 3);
00044   virtual ~FilterGeodesicErosion();
00045 
00046   virtual void apply();
00047 
00048   virtual unsigned int num_iterations();
00049 
00050   static const unsigned int MARKER;
00051   static const unsigned int MASK;
00052 
00053  private:
00054   unsigned char *isotropic_se;
00055   unsigned int   se_size;
00056 
00057   FilterErosion  *erode;
00058   FilterMax      *max;
00059 
00060   ImageDiff      *diff;
00061 
00062   unsigned int iterations;
00063 };
00064 
00065 } // end namespace firevision
00066 
00067 #endif