# Dual Histogram Equalization Algorithm Based on Adaptive Image Correction
## 1 Introduction
These methods can protect the average brightness of the input image, but their limitations are that the segmented sub-histogram is too narrow, leading to poor image enhancement, and the distribution is too wide, so it will contain noise, artifacts, and other defects. To solve the problem of image detail loss, some scholars proposed the local histogram equalization algorithm (AHE) for image contrast enhancement, but the algorithm is complex, has a long running time, and generates a lot of noise and block effects, so it was improved to produce the contrast-limited adaptive histogram equalization (CLAHE) algorithm [15]. In recent years, to mitigate the problem of average brightness change and image detail loss due to gray-level merging in the equalization process, [PERSON] et al. [16] proposed adaptive histogram equalization, the idea of which is to segment the image, perform histogram equalization for each region separately, and finally merge multiple local maps, which can protect certain detail information but also introduce noise. To improve the image over-enhancement problem, [PERSON] et al. [17] proposed a pre-processing algorithm for pectoral muscle detection and suppression using contrast limited adaptive histogram equalization (ARAN) to enhance the contrast of digital mammograms. Bi-histogram with a plateau limit for digital image enhancement (BHEPL) [18] uses the average of the intensity of each sub-histogram as the platform limit. [PERSON] et al. [19] proposed a dual Bi-histogram equalization algorithm using two platform limits (BHE2 PL). [PERSON] et al. [20] proposed an image enhancement technique using the idea of exposure values, called image enhancement using exposure-based sub-image histogram equalization (ESIHE), which divides the cropped histogram into two parts using a pre-computed exposure threshold. [PERSON] [21] proposed a three-histogram equalization technique for digital image enhancement in the three-platform limit, which uses a separation threshold parameter to initially separate the histogram of the input image into three sub-histograms. [PERSON] [22] proposed an image enhancement strategy--contrast-constrained dynamic quadratic histogram equalization (CLDQHE)--to overcome the drawbacks of over-enhancement and over-smoothing that exist in traditional histogram equalization methods. Although these algorithms perform well in contrast improvement, they fail to maintain brightness and preserve fine structures. Hence, this study proposes a dual histogram equalization algorithm based on adaptive image correction (AICHE) for image enhancement in the process of moving arm hole machine vision measurement in complex working conditions. With AICHE, the global histogram is divided into two sub-histograms to solve the problem of mean luminance shift, and then the sub-histograms are corrected in two platform limits to avoid the over-enhancement of the image. Next, to prevent image over-enhancement and gray-level merging problems, grayscale correction is conducted using a local grayscale correction algorithm to perform histogram equalization on the basis of maintaining the average brightness of the input image to improve the image contrast while protecting image detail information.