eLynx SDK
v3.3.0 C++ image processing API reference |
00001 //============================================================================ 00002 // ImageEdgeProcessingImpl.h Image.Component package 00003 //============================================================================ 00004 // Usage : implementation of basic local to point image processing interface 00005 //---------------------------------------------------------------------------- 00006 // Copyright (C) 2006 by eLynx project 00007 // 00008 // This library is free software; you can redistribute it and/or 00009 // modify it under the terms of the GNU Library General Public 00010 // License as published by the Free Software Foundation; either 00011 // version 2 of the License, or (at your option) any later version. 00012 // 00013 // This library is distributed in the hope that it will be useful, 00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 // See the GNU Library General Public License for more details. 00017 //---------------------------------------------------------------------------- 00018 #ifndef __ImageEdgeProcessingImpl_h__ 00019 #define __ImageEdgeProcessingImpl_h__ 00020 00021 #include <boost/shared_array.hpp> 00022 00023 #include <elx/image/IImageEdgeProcessing.h> 00024 #include <elx/image/ImageImpl.h> 00025 00026 namespace eLynx { 00027 namespace Image { 00028 00031 00032 template <class Pixel> 00033 class ExportedByImage ImageEdgeProcessingImpl : public IImageEdgeProcessing 00034 { 00035 public: 00038 virtual bool ApplyGradient(AbstractImage& ioImage, 00039 EEdgeDetector iDetector, 00040 EEdgeGradient iGradient, 00041 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00042 00043 virtual bool ApplyCanny(AbstractImage& ioImage, 00044 EEdgeDetector iDetector, 00045 EEdgeGradient iGradient, 00046 double iRadius, double iThresholdLo, double iThresholdHi, 00047 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00048 00049 virtual bool ApplyZeroCrossing(AbstractImage& ioImage, 00050 double iRadius, 00051 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00052 00053 virtual bool ApplyRoberts(AbstractImage& ioImage, 00054 bool ibFast, 00055 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00056 00057 virtual bool SegmentImage(AbstractImage& ioImage, double iStep, 00058 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00059 00061 00064 virtual bool ApplyThreshold(AbstractImage& ioImage, 00065 double iThresholdLo, double iThresholdHi, 00066 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00068 00069 00072 static bool ApplyGradient(ImageImpl<Pixel>& ioImage, 00073 EEdgeDetector iDetector, 00074 EEdgeGradient iGradient, 00075 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00076 00077 static bool ApplyGradientDirection(ImageImpl<Pixel>& ioImage, 00078 boost::shared_array<float>& ospOrientation, 00079 EEdgeDetector iDetector, 00080 EEdgeGradient iGradient, 00081 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00082 00083 static bool ApplyCanny(ImageImpl<Pixel>& ioImage, 00084 EEdgeDetector iDetector, 00085 EEdgeGradient iGradient, 00086 double iRadius, double iThresholdLo, double iThresholdHi, 00087 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00088 00089 static bool ApplyNonMaxSuppression(ImageImpl<Pixel>& ioImage, 00090 const float * iprEdgeOrientation, 00091 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00092 00093 static bool ApplyThreshold(ImageImpl<Pixel>& ioImage, 00094 double iThresholdLo, double iThresholdHi, 00095 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00096 00097 static bool SegmentImage(ImageImpl<Pixel>& ioImage, double iStep, 00098 uint32 iChannelMask, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00099 00101 }; 00102 00103 ExportedByImage Math::ConvolutionKerneld elxGetKernel( 00104 EEdgeDetector iDetector, 00105 Math::ECompassDirection iDirection); 00106 00107 ExportedByImage Math::ConvolutionKerneld elxGetKernel( 00108 EEdgeDetector iDetector, 00109 EEdgeGradient iGradient); 00110 00111 } // namespace Image 00112 } // namespace eLynx 00113 00114 #endif // __ImageEdgeProcessingImpl_h__