eLynx SDK
v3.0.1 C++ image processing API reference |
00001 //============================================================================ 00002 // ImageAnalyseImpl.h Image.Component package 00003 //============================================================================ 00004 // Usage : image analyse interface implementation 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 __ImageAnalyseImpl_h__ 00019 #define __ImageAnalyseImpl_h__ 00020 00021 #include <elx/image/IImageAnalyse.h> 00022 #include <elx/image/ImageImpl.h> 00023 00024 namespace eLynx { 00025 namespace Image { 00026 00027 // Forward declaration 00028 class AbstractImage; 00029 00033 template <class Pixel> 00034 class ExportedByImage ImageAnalyseImpl : public IImageAnalyse 00035 { 00036 public: 00037 typedef Pixel Pixel_t; 00038 typedef typename Pixel::type T; 00039 00042 virtual bool ComputeMin(const AbstractImage& iImage, double& oMin, bool ibNormalized) const; 00043 virtual bool ComputeMin(const AbstractImage& iImage, double (&oMin)[PC_MAX], bool ibNormalized) const; 00044 virtual bool ComputeMinLuminance(const AbstractImage& iImage, double& oMinLuminance, bool ibNormalized) const; 00045 00046 virtual bool ComputeMax(const AbstractImage& iImage, double& oMax, bool ibNormalized) const; 00047 virtual bool ComputeMax(const AbstractImage& iImage, double (&oMax)[PC_MAX], bool ibNormalized) const; 00048 virtual bool ComputeMaxLuminance(const AbstractImage& iImage, double& oMaxLuminance, bool ibNormalized) const; 00049 00050 virtual bool ComputeMinMax(const AbstractImage& iImage, double& oMin, double& oMax, bool ibNormalized) const; 00051 virtual bool ComputeMinMax(const AbstractImage& iImage, double (&oMin)[PC_MAX], double (&oMax)[PC_MAX], bool ibNormalized) const ; 00052 virtual bool ComputeMinMaxLuminance(const AbstractImage& iImage, double& oMinLuminance, double& oMaxLuminance, bool ibNormalized) const; 00054 00057 virtual bool ComputeStandardDeviation(const AbstractImage& iImage, double& oDeviation, bool ibNormalized) const; 00058 virtual bool ComputeStandardDeviation(const AbstractImage& iImage, double(&oDeviation)[PC_MAX], bool ibNormalized) const; 00059 00060 virtual bool ComputeStandardDeviation(const AbstractImage& iImage, double& oDeviation, double& oMean, bool ibNormalized) const; 00061 virtual bool ComputeStandardDeviation(const AbstractImage& iImage, double(&oDeviation)[PC_MAX], double (&oMean)[PC_MAX], bool ibNormalized) const; 00063 00064 virtual bool ComputeMean(const AbstractImage& iImage, double& oMean, bool ibNormalized) const; 00065 virtual bool ComputeMean(const AbstractImage& iImage, double (&oMean)[PC_MAX], bool ibNormalized) const; 00066 00067 virtual bool ComputeMedian(const AbstractImage& iImage, double& oMedian, bool ibNormalized) const; 00068 virtual bool ComputeMedian(const AbstractImage& iImage, double (&oMedian)[PC_MAX], bool ibNormalized) const; 00069 00070 virtual bool ComputeVariance(const AbstractImage& iImage, double& oVariance) const; 00071 virtual bool ComputeVariance(const AbstractImage& iImage, double(&oVariance)[PC_MAX]) const; 00072 00073 virtual bool ComputeEnergy(const AbstractImage& iImage, double& oEnergy) const; 00074 virtual bool ComputeEnergy(const AbstractImage& iImage, double(&oEnergy)[PC_MAX]) const; 00075 00076 virtual bool ComputeEntropy(const AbstractImage& iImage, double& oEntropy) const; 00077 virtual bool ComputeEntropy(const AbstractImage& iImage, double(&oEntropy)[PC_MAX]) const; 00078 00079 virtual bool ComputeHistogram(const AbstractImage& iImage, ImageHistogram& oHistogram) const; 00080 00083 static bool ComputeMin(const ImageImpl<Pixel>& iImage, T& oMin); 00084 static bool ComputeMin(const ImageImpl<Pixel>& iImage, double& oMin, bool ibNormalized); 00085 static bool ComputeMin(const ImageImpl<Pixel>& iImage, double (&oMin)[PC_MAX], bool ibNormalized); 00086 static bool ComputeMinLuminance(const ImageImpl<Pixel>& iImage, double& oMinLuminance, bool ibNormalized); 00087 static bool ComputeMax(const ImageImpl<Pixel>& iImage, T& oMin); 00088 static bool ComputeMax(const ImageImpl<Pixel>& iImage, double& oMax, bool ibNormalized); 00089 static bool ComputeMax(const ImageImpl<Pixel>& iImage, double (&oMax)[PC_MAX], bool ibNormalized); 00090 static bool ComputeMaxLuminance(const ImageImpl<Pixel>& iImage, double& oMaxLuminance, bool ibNormalized); 00091 static bool ComputeMinMax(const ImageImpl<Pixel>& iImage, T& oMin, T& oMax); 00092 static bool ComputeMinMax(const ImageImpl<Pixel>& iImage, double& oMin, double& oMax, bool ibNormalized); 00093 static bool ComputeMinMax(const ImageImpl<Pixel>& iImage, double (&oMin)[PC_MAX], double (&oMax)[PC_MAX], bool ibNormalized); 00094 static bool ComputeMinMaxLuminance(const ImageImpl<Pixel>& iImage, double& oMinLuminance, double& oMaxLuminance, bool ibNormalized); 00095 00096 static bool ComputeMedian(const ImageImpl<Pixel>& iImage, double& oMedian, bool ibNormalized); 00097 static bool ComputeMedian(const ImageImpl<Pixel>& iImage, double (&oMedian)[PC_MAX], bool ibNormalized); 00098 00099 static bool ComputeMean(const ImageImpl<Pixel>& iImage, double& oMean, bool ibNormalized); 00100 static bool ComputeMean(const ImageImpl<Pixel>& iImage, double (&oMean)[PC_MAX], bool ibNormalized); 00101 00102 static bool ComputeStandardDeviation(const ImageImpl<Pixel>& iImage, double& oDeviation, double& oMean, bool ibNormalized=false); 00103 static bool ComputeStandardDeviation(const ImageImpl<Pixel>& iImage, double (&oDeviation)[PC_MAX], double (&oMean)[PC_MAX], bool ibNormalized=false); 00104 00105 static bool ComputeVariance(const ImageImpl<Pixel>& iImage, double& oVariance); 00106 static bool ComputeVariance(const ImageImpl<Pixel>& iImage, double (&oVariance)[PC_MAX]); 00107 00108 static bool ComputeEnergy(const ImageImpl<Pixel>& iImage, double& oEnergy); 00109 static bool ComputeEnergy(const ImageImpl<Pixel>& iImage, double (&oEnergy)[PC_MAX]); 00110 00111 static bool ComputeEntropy(const ImageImpl<Pixel>& iImage, double& oEntropy); 00112 static bool ComputeEntropy(const ImageImpl<Pixel>& iImage, double (&oEntropy)[PC_MAX]); 00113 00114 static bool ComputeHistogram(const ImageImpl<Pixel>& iImage, ImageHistogram& oHistogram); 00116 }; 00117 00118 } // namespace Image 00119 } // namespace eLynx 00120 00121 #endif // __ImageAnalyseImpl_h__