eLynx SDK
v3.3.0 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 00048 ExportedByImage const char * elxToString(EEdgeDetector iType); 00049 00053 ExportedByImage EEdgeDetector elxToEEdgeDetector(const char * iprType); 00054 00055 enum EEdgeGradient 00056 { 00057 EG_North, 00058 EG_South, 00059 EG_East, 00060 EG_West, 00061 EG_NorthEast, 00062 EG_NorthWest, 00063 EG_SouthEast, 00064 EG_SouthWest, 00065 00066 EG_Vertical, 00067 EG_Horizontal, 00068 EG_DiagonalNWSE, 00069 EG_DiagonalSWNE, 00070 00071 EG_Fast, 00072 EG_FastDiagonal, 00073 EG_Accurate, 00074 EG_AccurateDiagonal, 00075 00076 EG_Max2, 00077 EG_Max2Diagonal, 00078 EG_Max4 00079 }; 00080 00084 ExportedByImage const char * elxToString(EEdgeGradient iType); 00085 00089 ExportedByImage EEdgeGradient elxToEEdgeGradient(const char * iprType); 00090 00091 // Forward declaration 00092 class AbstractImage; 00093 00094 typedef std::vector<Math::ECompassDirection> OrientationtMap; 00095 00098 class ExportedByImage IImageEdgeProcessing 00099 { 00100 public: 00101 virtual ~IImageEdgeProcessing(); 00102 00105 00113 virtual bool ApplyGradient(AbstractImage& ioImage, 00114 EEdgeDetector iDetector, 00115 EEdgeGradient iGradient, 00116 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00117 00130 virtual bool ApplyCanny(AbstractImage& ioImage, 00131 EEdgeDetector iDetector, EEdgeGradient iGradient, 00132 double iRadius, double iThresholdLo, double iThresholdHi, 00133 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00134 00141 virtual bool ApplyZeroCrossing(AbstractImage& ioImage, 00142 double iRadius, 00143 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00144 00151 virtual bool ApplyRoberts(AbstractImage& ioImage, 00152 bool ibFast, 00153 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00155 00158 00167 virtual bool ApplyThreshold(AbstractImage& ioImage, 00168 double iThresholdLo, double iThresholdHi, 00169 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00170 00172 00180 virtual bool SegmentImage(AbstractImage& ioImage, double iStep, 00181 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00182 }; 00183 00184 } // namespace Image 00185 } // namespace eLynx 00186 00187 #endif // __IImageEdgeProcessing_h__