eLynx SDK
v3.3.0 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 #define elxShadowMin 0.0 00048 #define elxShadowDefault 0.0 00049 #define elxShadowMax 1.0 00050 00051 #define elxHighlightMin 0.0 00052 #define elxHighlightDefault 1.0 00053 #define elxHighlightMax 1.0 00054 00055 00056 // Forward declaration 00057 class AbstractImage; 00058 00069 00070 class ExportedByImage IImagePointProcessing 00071 { 00072 public: 00073 virtual ~IImagePointProcessing(); 00074 00086 virtual bool AdjustBrightness(AbstractImage& ioImage, 00087 double iBrightness, 00088 ProgressNotifier& iNotifier) const = 0; 00089 00101 virtual bool AdjustContrast(AbstractImage& ioImage, 00102 double iContrast, 00103 ProgressNotifier& iNotifier) const = 0; 00104 00116 virtual bool AdjustGamma(AbstractImage& ioImage, 00117 double iGamma, 00118 ProgressNotifier& iNotifier) const = 0; 00119 00128 virtual bool AdjustBCG(AbstractImage& ioImage, 00129 double iBrightness, double iContrast, double iGamma, 00130 ProgressNotifier& iNotifier) const = 0; 00131 00139 virtual bool AdjustHueSaturation(AbstractImage& ioImage, 00140 double iHue, double iSaturation, 00141 ProgressNotifier& iNotifier) const = 0; 00142 00150 virtual bool Desaturate(AbstractImage& ioImage, 00151 double iFactor, 00152 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00153 00165 virtual bool Colorize(AbstractImage& ioImage, 00166 double iHue, double iSaturation, 00167 ProgressNotifier& iNotifier) const = 0; 00168 00182 virtual bool Balance(AbstractImage& ioImage, 00183 double iRed, double iGreen, double iBlue, 00184 ProgressNotifier& iNotifier) const = 0; 00185 00198 virtual bool AdjustMidtone(AbstractImage& ioImage, 00199 double iMidtone, 00200 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00201 00215 virtual bool AdjustSigmoid(AbstractImage& ioImage, 00216 double iAlpha, double iBeta, 00217 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00218 00227 virtual bool AdjustShadowHighlight(AbstractImage& ioImage, 00228 double iShadow, double iHighlight, 00229 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00230 00242 virtual bool Posterize(AbstractImage& ioImage, 00243 uint32 iLevels, 00244 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00245 00257 virtual bool Solarize(AbstractImage& ioImage, 00258 double iThreshold, 00259 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00260 00263 // blended = iScalar*image1 + (1-iScalar)*image2. 00271 virtual bool Blend(AbstractImage& ioImage, 00272 const AbstractImage& iImage, 00273 double iScalar, 00274 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00275 00276 virtual boost::shared_ptr< AbstractImage > CreateBinarized( 00277 const AbstractImage& iImage, 00278 double iThreshold, bool ibNegative, 00279 uint32 iChannelMask, ProgressNotifier& iNotifier) const = 0; 00280 }; 00281 00282 } // namespace Image 00283 } // namespace eLynx 00284 00285 #endif // __IImagePointProcessing_h__