eLynx SDK
v3.0.1 C++ image processing API reference |
00001 //============================================================================ 00002 // IImageEdgeProcessing.h Image.Component package 00003 //============================================================================ 00004 // Usage : interface for basic local to point image processing 00005 // 00006 // http://www.ph.tn.tudelft.nl/Courses/FIP/noframes/fip-Characte.html 00007 // 00008 //---------------------------------------------------------------------------- 00009 // Copyright (C) 2007 by eLynx project 00010 // 00011 // This library is free software; you can redistribute it and/or 00012 // modify it under the terms of the GNU Library General Public 00013 // License as published by the Free Software Foundation; either 00014 // version 2 of the License, or (at your option) any later version. 00015 // 00016 // This library is distributed in the hope that it will be useful, 00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00019 // See the GNU Library General Public License for more details. 00020 //---------------------------------------------------------------------------- 00021 #ifndef __IImageEdgeProcessing_h__ 00022 #define __IImageEdgeProcessing_h__ 00023 00024 #include <elx/image/ImageLib.h> 00025 #include <elx/core/ProgressNotifier.h> 00026 #include <elx/math/ConvolutionKernel.h> 00027 #include <vector> 00028 00029 namespace eLynx { 00030 namespace Image { 00031 00032 enum EEdgeDetector 00033 { 00034 ED_PixelDifference, 00035 ED_Basic, 00036 ED_Roberts, 00037 ED_Sobel, 00038 ED_Prewitt, 00039 ED_FreiChen, 00040 ED_Max, 00041 ED_Default = ED_FreiChen 00042 }; 00043 00047 ExportedByImage const char * elxToString(EEdgeDetector iType); 00048 00049 enum EEdgeGradient 00050 { 00051 EG_North, 00052 EG_South, 00053 EG_East, 00054 EG_West, 00055 EG_NorthEast, 00056 EG_NorthWest, 00057 EG_SouthEast, 00058 EG_SouthWest, 00059 00060 EG_Vertical, 00061 EG_Horizontal, 00062 EG_DiagonalNWSE, 00063 EG_DiagonalSWNE, 00064 00065 EG_Fast, 00066 EG_FastDiagonal, 00067 EG_Accurate, 00068 EG_AccurateDiagonal, 00069 00070 EG_Max2, 00071 EG_Max2Diagonal, 00072 EG_Max4 00073 }; 00074 00078 ExportedByImage const char * elxToString(EEdgeGradient iType); 00079 00080 // Forward declaration 00081 class AbstractImage; 00082 00083 typedef std::vector<Math::ECompassDirection> OrientationtMap; 00084 00087 class ExportedByImage IImageEdgeProcessing 00088 { 00089 public: 00090 virtual ~IImageEdgeProcessing(); 00091 00094 00102 virtual bool ApplyGradient(AbstractImage& ioImage, 00103 EEdgeDetector iDetector, 00104 EEdgeGradient iGradient, 00105 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00106 00119 virtual bool ApplyCanny(AbstractImage& ioImage, 00120 EEdgeDetector iDetector, EEdgeGradient iGradient, 00121 double iRadius, double iThresholdLo, double iThresholdHi, 00122 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00123 00131 virtual bool ApplyZeroCrossing(AbstractImage& ioImage, 00132 double iRadius, double iVariance, 00133 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00134 00141 virtual bool ApplyRoberts(AbstractImage& ioImage, 00142 bool ibFast, 00143 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00145 00148 00157 virtual bool ApplyThreshold(AbstractImage& ioImage, 00158 double iThresholdLo, double iThresholdHi, 00159 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00160 00162 00170 virtual bool SegmentImage(AbstractImage& ioImage, double iStep, 00171 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00172 }; 00173 00174 } // namespace Image 00175 } // namespace eLynx 00176 00177 #endif // __IImageEdgeProcessing_h__