eLynx SDK
v3.3.0 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 typename Pixel::type T; 00038 00041 virtual bool ComputeMin(const AbstractImage& iImage, double& oMin, bool ibNormalized) const; 00042 virtual bool ComputeMin(const AbstractImage& iImage, double (&oMin)[PC_MAX], bool ibNormalized) const; 00043 virtual bool ComputeMinLuminance(const AbstractImage& iImage, double& oMinLuminance, bool ibNormalized) const; 00044 00045 virtual bool ComputeMax(const AbstractImage& iImage, double& oMax, bool ibNormalized) const; 00046 virtual bool ComputeMax(const AbstractImage& iImage, double (&oMax)[PC_MAX], bool ibNormalized) const; 00047 virtual bool ComputeMaxLuminance(const AbstractImage& iImage, double& oMaxLuminance, bool ibNormalized) const; 00048 00049 virtual bool ComputeMinMax(const AbstractImage& iImage, double& oMin, double& oMax, bool ibNormalized) const; 00050 virtual bool ComputeMinMax(const AbstractImage& iImage, double (&oMin)[PC_MAX], double (&oMax)[PC_MAX], bool ibNormalized) const ; 00051 virtual bool ComputeMinMaxLuminance(const AbstractImage& iImage, double& oMinLuminance, double& oMaxLuminance, bool ibNormalized) const; 00053 00056 virtual bool ComputeStandardDeviation(const AbstractImage& iImage, double& oDeviation, bool ibNormalized) const; 00057 virtual bool ComputeStandardDeviation(const AbstractImage& iImage, double(&oDeviation)[PC_MAX], bool ibNormalized) const; 00058 00059 virtual bool ComputeStandardDeviation(const AbstractImage& iImage, double& oDeviation, double& oMean, bool ibNormalized) const; 00060 virtual bool ComputeStandardDeviation(const AbstractImage& iImage, double(&oDeviation)[PC_MAX], double (&oMean)[PC_MAX], bool ibNormalized) const; 00062 00063 virtual bool ComputeMean(const AbstractImage& iImage, double& oMean, bool ibNormalized) const; 00064 virtual bool ComputeMean(const AbstractImage& iImage, double (&oMean)[PC_MAX], bool ibNormalized) const; 00065 00066 virtual bool ComputeMedian(const AbstractImage& iImage, double& oMedian, bool ibNormalized) const; 00067 virtual bool ComputeMedian(const AbstractImage& iImage, double (&oMedian)[PC_MAX], bool ibNormalized) const; 00068 00069 virtual bool ComputeVariance(const AbstractImage& iImage, double& oVariance) const; 00070 virtual bool ComputeVariance(const AbstractImage& iImage, double(&oVariance)[PC_MAX]) const; 00071 00072 virtual bool ComputeEnergy(const AbstractImage& iImage, double& oEnergy) const; 00073 virtual bool ComputeEnergy(const AbstractImage& iImage, double(&oEnergy)[PC_MAX]) const; 00074 00075 virtual bool ComputeEntropy(const AbstractImage& iImage, double& oEntropy) const; 00076 virtual bool ComputeEntropy(const AbstractImage& iImage, double(&oEntropy)[PC_MAX]) const; 00077 00078 virtual bool ComputeHistogram(const AbstractImage& iImage, ImageHistogram& oHistogram) const; 00079 00082 static bool ComputeMin(const ImageImpl<Pixel>& iImage, T& oMin); 00083 static bool ComputeMin(const ImageImpl<Pixel>& iImage, double& oMin, bool ibNormalized); 00084 static bool ComputeMin(const ImageImpl<Pixel>& iImage, double (&oMin)[PC_MAX], bool ibNormalized); 00085 static bool ComputeMinLuminance(const ImageImpl<Pixel>& iImage, double& oMinLuminance, bool ibNormalized); 00086 static bool ComputeMax(const ImageImpl<Pixel>& iImage, T& oMin); 00087 static bool ComputeMax(const ImageImpl<Pixel>& iImage, double& oMax, bool ibNormalized); 00088 static bool ComputeMax(const ImageImpl<Pixel>& iImage, double (&oMax)[PC_MAX], bool ibNormalized); 00089 static bool ComputeMaxLuminance(const ImageImpl<Pixel>& iImage, double& oMaxLuminance, bool ibNormalized); 00090 static bool ComputeMinMax(const ImageImpl<Pixel>& iImage, T& oMin, T& oMax); 00091 static bool ComputeMinMax(const ImageImpl<Pixel>& iImage, double& oMin, double& oMax, bool ibNormalized); 00092 static bool ComputeMinMax(const ImageImpl<Pixel>& iImage, double (&oMin)[PC_MAX], double (&oMax)[PC_MAX], bool ibNormalized); 00093 static bool ComputeMinMaxLuminance(const ImageImpl<Pixel>& iImage, double& oMinLuminance, double& oMaxLuminance, bool ibNormalized); 00094 00095 static bool ComputeMedian(const ImageImpl<Pixel>& iImage, double& oMedian, bool ibNormalized); 00096 static bool ComputeMedian(const ImageImpl<Pixel>& iImage, double (&oMedian)[PC_MAX], bool ibNormalized); 00097 00098 static bool ComputeMean(const ImageImpl<Pixel>& iImage, double& oMean, bool ibNormalized); 00099 static bool ComputeMean(const ImageImpl<Pixel>& iImage, double (&oMean)[PC_MAX], bool ibNormalized); 00100 00101 static bool ComputeStandardDeviation(const ImageImpl<Pixel>& iImage, double& oDeviation, double& oMean, bool ibNormalized=false); 00102 static bool ComputeStandardDeviation(const ImageImpl<Pixel>& iImage, double (&oDeviation)[PC_MAX], double (&oMean)[PC_MAX], bool ibNormalized=false); 00103 00104 static bool ComputeVariance(const ImageImpl<Pixel>& iImage, double& oVariance); 00105 static bool ComputeVariance(const ImageImpl<Pixel>& iImage, double (&oVariance)[PC_MAX]); 00106 00107 static bool ComputeEnergy(const ImageImpl<Pixel>& iImage, double& oEnergy); 00108 static bool ComputeEnergy(const ImageImpl<Pixel>& iImage, double (&oEnergy)[PC_MAX]); 00109 00110 static bool ComputeEntropy(const ImageImpl<Pixel>& iImage, double& oEntropy); 00111 static bool ComputeEntropy(const ImageImpl<Pixel>& iImage, double (&oEntropy)[PC_MAX]); 00112 00113 static bool ComputeHistogram(const ImageImpl<Pixel>& iImage, ImageHistogram& oHistogram); 00115 }; 00116 00117 } // namespace Image 00118 } // namespace eLynx 00119 00120 #endif // __ImageAnalyseImpl_h__