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

histogram.h

00001 /* 00002 * This file is part of libCP 00003 * FILE: histogram.h 00004 * AUTHOR: Harald Studer <hs@lexip.ch> 00005 * Mathias Herzog <mathu@gmx.ch> 00006 * 00007 * 00008 * Copyright (c) 2004, The libCP project 00009 * 00010 * This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your opinion) any later version. 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 GNU 00018 * General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU General Public License 00021 * along with this program; see the file COPYING. If not, write to 00022 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00023 * Boston, MA 02111-1307, USA. 00024 */ 00025 00026 #ifndef _LIBCP_HISTOGRAM_H_ 00027 #define _LIBCP_HISTOGRAM_H_ 00028 00029 #include <cstdlib> 00030 #include <iostream> 00031 #include "image.h" 00032 00033 using namespace std; 00034 namespace LIBCP{ 00035 00036 struct histo{ 00037 Image* img; 00038 int histogram[G]; 00039 }; 00040 00046 class Histogram 00047 { 00048 public: 00049 static void makeHistogram( Image* img, histo* histogram ); 00050 static int negativeImage( Image* dst, Image* src ); 00051 static int markLevelRange( Image* dst, Image* src, int markStart, 00052 int markEnd, Color* col, bool background = true ); 00053 static int stretchContrast( Image* dst, Image* src ); 00054 static int logarithmOperator( Image* dst, Image* src );/*TODO*/ 00055 static int binarize( Image* dst, Image* src, int threshold ); 00056 static int hysteresisThreshold( Image* dst, Image* src, 00057 const int low, const int up ); 00058 static int falseColoring( Image* dst, Image* src ); /*TODO*/ 00059 static int gammaCorrection( Image* dst, Image* src, float r = 2.2f ); 00060 static int localThreshold( Image* dst, Image* src ); /*TODO*/ 00061 00062 private: 00063 static int trace( const int x, const int y, 00064 Image *src, Image *dst, 00065 const int lowThreshold ); 00066 00067 };//end of class Histogram definition 00068 } //end of namespace LIBCP 00069 00070 #endif /* _LIBCP_HISTOGRAM_H_ */

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