## 4 Implementation and Experiment Results  
This study demonstrates the effectiveness of these methods (2 SAIHT; 4 SAIHT and 8 SAIHT) by experiment; and by illustrating how the algorithm works and quantitatively measuring the improvement in the quality of segmentation. The performance of the proposed algorithm is also compared with those of the methods mentioned above. For a fair comparison all methods were modified so that they only performed row-wise enhancement. All methods were run on an Intel Core 2 Quad 2.83 GHz CPU with 2 GB RAM and compiled on a Windows XP operating system with Math Works MATLAB version R2010a software.  
Four types of extreme images are used: dark images, bright images, back-lit images and low-contrast images. The images are categorized into outdoor, indoor and aerial images. The images include Dawn, Morning, Afternoon and Night images. Images with different types of histogram distributions were tested. These include some daily life images that may arise in contrast to the poor image, and demonstrate the enhanced results. Figure 3 shows various types of images with bad contrast enhancement, and the results of the enhanced image processing by histogram equalization, Contrast Limited Adaptive Histogram Equalization, AIHT and the proposed Multi-Scale AIHT (MSAIHT) method. Figure 4 shows a comparison of local detail obtained using AIHT and MSAIHT (4 SAIHT). The local detail of the enhanced MSAIHT is better than that of AIHT.  
The comparative analysis between the proposed MSAIHT methods and popular existing methods shows the effectiveness of these methods. The MSAIHT technique is able to retain the sharpness of defect edges and local detail very well. Therefore, AIHT and MSAIHT are able to significantly enhance poor images, and will be helpful for defect recognition.  
Figure 2: A block diagram of 8 SAIHT parameter values.  
Figure 3: Various types of bad contrast images illustrating the difference between contrast enhancement by Contrast Limited Adaptive Histogram Equalization, Adaptive Inverse Hyperbolic Tangent (AIHT) and MSAIHT (including 2 SAIHT, 4 SAIHT and 8 SAIHT).  
Figure 4: Various types of bad contrast images illustrating the difference between contrast enhancement by Contrast Limited Adaptive Histogram Equalization, Adaptive Inverse Hyperbolic Tangent (AIHT) and MSAIHT (including 2 SAIHT, 4 SAIHT and 8 SAIHT).  
Figure 4: Result comparison of the enhanced image processing by AIHT and 8 SAIHT.  
For comparison, relative computation times were measured with respect to various scales of MSAIHT (including 2 SAIHT, 4 SAIHT and 8 SAIHT). Table 1 compares the results of various scales of MSAIHT computation time. The more the sub-band number is split, the longer the computation time. Table 2 shows parameter values of various scale of MSAIHT (including 2 SAIHT, 4 SAIHT and 8 SAIHT). It lists _mean_, _variance_, _gain_ and _bias_ values of sub-band parameters used for the MSAIHT methods (including 2 SAIHT, 4 SAIHT and 8 SAIHT). Table 3 compares results by histogram equalization; contrast limited adaptive histogram equalization and AIHT methods, using the measures of Mean Square Error; MSE, Signal to Noise Ratio; SNR and Peak Signal to Noise Ratio; PSNR. The final results show that the AIHT algorithm is much better than the other two methods. Table 4 compares results by 2 SAIHT, 4 SAIHT and 8 SAIHT methods using the measures of MSE, SNR and PSNR. The experimental results present show not only that 8 SAIHT algorithm has the best effect, but also for a variety of different scenarios. In this study the MSAIHT method was better than histogram equalization, contrast limited adaptive histogram equalization and AIHT.  
\begin{table}
\begin{tabular}{c c c c c c} \hline
**Image Resolution** & **AIHT** & **2 SAIHT** & **4