eLynx SDK
v3.0.1 C++ image processing API reference |
00001 //============================================================================ 00002 // IImagePointProcessing.h Image.Component package 00003 //============================================================================ 00004 // Usage : interface for basic point to point image processing 00005 // 00006 // http://www.ph.tn.tudelft.nl/Courses/FIP/noframes/fip-Characte.html 00007 // 00008 //---------------------------------------------------------------------------- 00009 // Copyright (C) 2006 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 __IImagePointProcessing_h__ 00022 #define __IImagePointProcessing_h__ 00023 00024 #include <boost/shared_ptr.hpp> 00025 #include <elx/image/ImageImpl.h> 00026 #include <elx/core/ProgressNotifier.h> 00027 00028 namespace eLynx { 00029 namespace Image { 00030 00031 #define elxBrightnessMin -1.0 00032 #define elxBrightnessDefault 0.0 00033 #define elxBrightnessMax 1.0 00034 00035 #define elxContrastMin -1.0 00036 #define elxContrastDefault 0.0 00037 #define elxContrastMax 1.0 00038 00039 #define elxGammaMin 0.0001 00040 #define elxGammaDefault 1.0 00041 #define elxGammaMax 3.0 00042 00043 #define elxMidtoneMin 0.001 00044 #define elxMidtoneDefault 0.5 00045 #define elxMidtoneMax 0.999 00046 00047 // Forward declaration 00048 class AbstractImage; 00049 00060 00061 class ExportedByImage IImagePointProcessing 00062 { 00063 public: 00064 virtual ~IImagePointProcessing(); 00065 00077 virtual bool AdjustBrightness(AbstractImage& ioImage, 00078 double iBrightness, 00079 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00080 00092 virtual bool AdjustContrast(AbstractImage& ioImage, 00093 double iContrast, 00094 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00095 00107 virtual bool AdjustGamma(AbstractImage& ioImage, 00108 double iGamma, 00109 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00110 00119 virtual bool AdjustBCG(AbstractImage& ioImage, 00120 double iBrightness, double iContrast, double iGamma, 00121 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00122 00134 virtual bool AdjustMidtone(AbstractImage& ioImage, 00135 double iMidtone, 00136 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00137 00150 virtual bool AdjustSigmoid(AbstractImage& ioImage, 00151 double iAlpha, double iBeta, 00152 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00153 00160 virtual bool AdjustHueSaturation(AbstractImage& ioImage, 00161 double iHue, double iSaturation, ProgressNotifier& iNotifier) const = 0; 00162 00170 virtual bool Balance(AbstractImage& ioImage, 00171 double iChannel0, double iChannel1, double iChannel2, 00172 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00173 00184 virtual bool Posterize(AbstractImage& ioImage, 00185 uint32 iLevels, 00186 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00187 00198 virtual bool Solarize(AbstractImage& ioImage, 00199 double iThreshold, 00200 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00201 00212 virtual bool Colorize(AbstractImage& ioImage, 00213 double iHue, double iSaturation, 00214 ProgressNotifier& iNotifier) const = 0; 00215 00216 virtual bool Desaturate(AbstractImage& ioImage, 00217 double iFactor, 00218 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00219 00220 virtual bool Blend(AbstractImage& ioImage, 00221 const AbstractImage& iImage, 00222 double iScalar, 00223 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00224 00225 virtual boost::shared_ptr< AbstractImage > CreateBinarized( 00226 const AbstractImage& iImage, 00227 double iThreshold, bool ibNegative, 00228 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00229 }; 00230 00231 } // namespace Image 00232 } // namespace eLynx 00233 00234 #endif // __IImagePointProcessing_h__