# A High-Dynamic-Range Optical Remote Sensing Imaging Method for Digital TDI CMOS
## 3 Image Enhancement Algorithm of Entropy-Maximized Adaptive Histogram Equalization (EMAHE)  
As a local contrast enhancement method, adaptive histogram equalization (AHE) shows a significant improvement over global operators by calculating the histogram of the subdomain of the image and redistributing the grey value [8]. However, AHE has the shortcoming of excessively amplifying the noise, which may result in image distortion. Contrast-limited adaptive histogram equalization (CLAHE) can solve this problem by limiting the slope of grey value mapping function of the HE process in each subdomain [23]. The relationship between the mapping function \(T(i)\) and the cumulative distribution function (\(CDF\)) is:  
\[T(i)=\frac{M}{N_{p}}CDF(i) \tag{3}\]  
where \(M\) is the highest gray value, and \(N_{p}\) is the number of pixels. Thus, limiting the slope of the mapping function is equivalent to limiting the slope of the \(CDF\), and further equivalent to limiting the magnitude of the histogram. CLAHE cuts the maximum amplitude of the histogram with a predefined threshold before calculating the \(CDF\) to achieve the purpose of limiting the magnification. The clipped portion is evenly distributed to the histogram, as shown in Figure 5. In order to eliminate the block effect, the value of each pixel is obtained by bilinear interpolation (and linear interpolation for the edge pixels) of the mapping function of four (and two for the edge pixels) subdomains around it. Figure 4: The changing trend of entropy and average gradient as the TDI stage increases. However, the enhancement effect of CLAHE is heavily dependent on blocks (expressed as \(m\times n\)) in both the horizontal and vertical directions, and the clip limit (0-1) of the histogram. If chosen improperly, the parameters not only cannot achieve the desired enhancement effect, but also make the image quality even worse. For example, we performed CLAHE on the 5-stage image with blocks = 30 \(\times\) 30 and clip limit = 0.3. The obtained image is shown in Figure 6. It can be seen that although the targets in shadow-covered area are effectively enhanced, the noise has been magnified greatly. Therefore, in order to achieve intelligent automatic enhancement to images of different TDI stages, the traditional CLAHE is not qualified. Besides, image enhancement should maintain or even increase the entropy of image to achieve the optimization of image quality, otherwise it may result in the failure of visual improvement. We now explain the algorithm policy of EMAHE by analyzing the influence of the two parameters on enhancement effects. Setting the clip limit = 0, flattens the histogram of the subdomain. The mapping function curve becomes a straight line with slope of 1. That is, there is no non-linear gray mapping at all; the result of the enhancement is still the original image itself. As the clip limit increases, the enhancement effect becomes apparent, and the entropy and average gradient increase. As the clip limit increases further until it exceeds the maximum amplitude of the histogram, CLAHE equals AHE, and the noise of the image becomes very obvious. In this case, although the average gradient always increases, the entropy reaches a peak and gradually decreases. The larger the number of blocks is, the more blocks the original image will be cut into, and the smaller the subdomain will be. Hence, the probability of the targets of the approximate gray value aggregating in a subdomain is larger, including that of low illumination or low contrast. The regional  
Figure 5: Histogram limitation of contrast-limited adaptive histogram equalization (CLAHE). Figure 6: Enhancement effect of CLAHE. (**a**) The original 5-stage image; (**b**) CLAHE result of the original 5-stage image. HE will map the gray distribution of the subdomain to the entire gray scale (taking the 8-bit image as an example, the gray scale is from 0 to 255).