[Wavelet-commit] Wavelet/WImage Image.hh,1.10,1.11 debug.h,1.2,1.3 tools.h,1.4,1.5
Status: Beta
Brought to you by:
herbert
From: Johan H. E. <bo...@us...> - 2005-07-13 12:13:31
|
Update of /cvsroot/wavelet/Wavelet/WImage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29033/WImage Modified Files: Image.hh debug.h tools.h Log Message: Made following changes to "Image" class: ------------------------------------------------------------------------------------------------------------ 1.Fixed histogram equalization function to work on non - spatial images. 2.Speed optimized gamma function. 3.Added a auto-gamma function. ------------------------------------------------------------------------------------------------------------ Added coeffecient to int function in "tools.h / tools.cc". Added to macro in "debug.h" to disable debug_printf for WIN CE. Index: tools.h =================================================================== RCS file: /cvsroot/wavelet/Wavelet/WImage/tools.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tools.h 3 Jun 2005 14:02:04 -0000 1.4 --- tools.h 13 Jul 2005 12:13:23 -0000 1.5 *************** *** 21,24 **** --- 21,30 ---- pixel tools_coeff2pixel (coeff c); + /** Convert a coeff value to a integer + * @param c + * the coefficient + * @return the integer value */ + int tools_coeff2int ( coeff c); + /** Return true if two double values are equal * @param d1 the first value Index: Image.hh =================================================================== RCS file: /cvsroot/wavelet/Wavelet/WImage/Image.hh,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Image.hh 12 Jul 2005 14:52:18 -0000 1.10 --- Image.hh 13 Jul 2005 12:13:23 -0000 1.11 *************** *** 168,177 **** int ysize = -1, int xsize = -1); ! /** Perform a histogram equalization. ! * The operation performs a floatingpoint to int quantization and then * sets the color range automatically. For images with all-positive ! * values, the color range 0..255 is assumed, else it is calculated from ! * the minimal and maximal intensity values. ! * Code provided by Johan Ehlers * @param ysize * the horizontal size of the region to process --- 168,206 ---- int ysize = -1, int xsize = -1); ! /** Does a automatic gamma correction. This function breaks the image up into ! * smaller matrices and then calculates their averages. The highest and ! * lowest average is then used to calculate a gamma value which is used ! * to a parameter in a call to gammaCorrection(). ! * @note ! * If the image can not be split into the required sub-areas without a ! * remainder the nearest solution (down) is used. ! * @param rows ! * Split image horizontly into subsections ! * @param columns ! * Split image vertically into subsections ! * @param yoffs ! * Vertical offset ! * @param xoffs ! * Horizontal offset ! * @param ysize ! * Vertical size ! * @param xsize ! * Horizontal size ! * @return ! * the gamma value - ( use it to undo operation if need be )*/ ! double gammaCorrectionAuto ( int row , int columns , int yoffs = 0 , ! int xoffs = 0 , int ysize = -1 , ! int xsize = -1 ); ! ! /** Perform a histogram equalisation. ! * The operation performs a floating-point to int quantisation and then * sets the color range automatically. For images with all-positive ! * values, the color range 0..255 is assumed. Else other values can ! * be specified for example Haar LL Level 1 would be 0..1023 and Haar non ! * LL Level 1 would be -512..511. ! * Code provided by Johan Ehlers. ! * @waring ! * Use unnormalised coefficients else the operation has un-determinable ! * results. * @param ysize * the horizontal size of the region to process *************** *** 181,187 **** * the horizontal offset of the region to process * @param xoffs ! * the vertical offset of the region to process */ virtual void histEqualization (int yoffs = 0, int xoffs = 0, ! int ysize = -1, int xsize = -1); /** Do an intelligent kind of beautification considering previous --- 210,221 ---- * the horizontal offset of the region to process * @param xoffs ! * the vertical offset of the region to process ! * @param startH ! * the start value for range of histogram default = 0 ! * @param endH ! * the end value for the range of the histogram default = 255*/ virtual void histEqualization (int yoffs = 0, int xoffs = 0, ! int ysize = -1, int xsize = -1, ! int startH = 0, int endH = 255); /** Do an intelligent kind of beautification considering previous Index: debug.h =================================================================== RCS file: /cvsroot/wavelet/Wavelet/WImage/debug.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** debug.h 3 Jun 2005 14:02:04 -0000 1.2 --- debug.h 13 Jul 2005 12:13:23 -0000 1.3 *************** *** 13,17 **** * @{ */ ! #if !defined (NDEBUG) && !defined (DPRINTF) int debug_printf (const char *tmpl, ...); --- 13,17 ---- * @{ */ ! #if !defined (NDEBUG) && !defined (DPRINTF) && !defined (_WIN32_WCE) int debug_printf (const char *tmpl, ...); |