Main Page | Class Hierarchy | Class List | File List | Class Members

morphology.h

00001 /* 00002 * This file is part of libCP 00003 * FILE: morphology.h 00004 * AUTHOR: Harald Studer (hs@lexip.ch) 00005 * 00006 * 00007 * Copyright (c) 2004, The libCP project 00008 * 00009 * This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your opinion) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 * General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; see the file COPYING. If not, write to 00021 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00022 * Boston, MA 02111-1307, USA. 00023 */ 00024 00025 #ifndef _LIBCP_MORPHOLOGY_H_ 00026 #define _LIBCP_MORPHOLOGY_H_ 00027 00028 #include <cstdlib> 00029 #include <iostream> 00030 00031 using namespace std; 00032 00033 00034 #include "image.h" 00035 00036 namespace LIBCP{ 00037 00038 #define ELEMENT_L 0 00039 #define ELEMENT_E 1 00040 #define ELEMENT_M 2 00041 #define ELEMENT_D 3 00042 #define ELEMENT_C 4 00043 #define FOUR_CONNECTIVITY 0 00044 #define EIGHT_CONNECTIVITY 1 00045 00051 class Morphology 00052 { 00053 public: 00054 static int erode( Image* dst, Image* src, Image* mask ); 00055 static int dilate( Image* dst, Image* src, Image* mask ); 00056 static int open( Image* dst, Image* src, Image* mask ); 00057 static int close( Image* dst, Image* src, Image* mask ); 00058 static int hitAndMiss( Image* dst, Image* src, Image* mask ); 00059 static int boundary( Image* dst, Image* src, Image* mask ); /*TODO*/ 00060 static int thinning( Image* dst, Image* src, Image* mask, int element, int connectivity, int iterations ); /*TODO*/ 00061 static int thickening( Image* dst, Image* src, Image* mask, int element, int connectivity, int iterations ); /*TODO*/ 00062 static int skeleton( Image* dst, Image* src, int min_distance ); /*TODO*/ 00063 static int distanceTransform( Image* dst, Image* src ); /*TODO*/ 00064 00065 };//end of class morphology definition 00066 00067 } //end of namespace LIBCP 00068 00069 #endif /* _LIBCP_MORPHOLOGY_H_ */

Generated on Wed May 26 16:43:53 2004 for libcp by doxygen 1.3.7