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

edges.h

00001 /* 00002 * This file is part of libCP 00003 * FILE: edges.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 LICENSE. 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_EDGES_H_ 00027 #define _LIBCP_EDGES_H_ 00028 00029 using namespace std; 00030 00031 #include "image.h" 00032 00033 namespace LIBCP{ 00034 00039 struct HoughAccu { 00040 int xMin; 00041 int xMax; 00042 int yMin; 00043 int yMax; 00044 int width; 00045 int height; 00046 int radius; 00047 float *data; 00048 }; 00049 00054 class Edges 00055 { 00056 00057 public: 00058 static int laplacianOfGaussian( Image* dst, Image* src ); /*TODO*/ 00059 static int onePixelEdge( Image* dst, Image* src, int window ); 00060 static int morphologicalEdge( Image* dst, Image* src ); /*TODO*/ 00061 static int lineExtract( Image* dst, Image* src ); /*TODO*/ 00062 static int cannyEdge( Image* dst, Image* src, 00063 const int sigma ); 00064 static int hysteresisThreshold( Image* dst, Image* src ); /*TODO*/ 00065 static int localThreshold( Image* dst, Image* src ); /*TODO*/ 00066 static int houghTransformLines( Image* dst, Image* src ); /*TODO*/ 00067 static int houghTransformLinesFromGradient( Image* dst, Image* src, 00068 Image* gradient ); /*TODO*/ 00069 static int inverseHoughTransformLines( Image* dst, Image* src ); /*TODO*/ 00070 static int houghTransformCircles( Image* dst, Image* src, 00071 const int radius ); 00072 static int houghTransformCircles( Image* dst_image, Image* dst_accu, 00073 Image* src, 00074 const int minRadius, 00075 const int maxRadius, 00076 const int xOffset, 00077 const int yOffset, 00078 int &originX, 00079 int &originY, 00080 double &radius); 00081 static int inverseHoughTransformCircles( Image* dst, Image* src, 00082 const int threshold, 00083 const int radius ); 00084 00085 private: 00086 static int simpleCircle( HoughAccu *accu, 00087 const int x, const int y, 00088 const int r, const float color); 00089 static double gauss( double x, double sigma ); 00090 static double meanGauss ( double x, double sigma ); 00091 static double dGauss ( double x, double sigma ); 00092 static double norm ( double x, double y ); 00093 static bool inAccuWidth( const HoughAccu *accu, const int x); 00094 static bool inAccuHeight( const HoughAccu *accu, const int y); 00095 00096 }; //end of class Edges 00097 } //end of namespace LIBCP 00098 00099 #endif //_LIBCP_EDGES_H_

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