摘要

Removing the redundant information for 16-bit gray level images is not only beneficial to the observation of the region of interest to, but also one key step for image enhancement. In this paper, an automatic windowing algorithm is proposed for highly dynamic industrial X-ray image based on short-term energy of gray histogram. We first calculate values of the average energy of short-term frame histogram at high bit image, and then use a dual-threshold to detect the frames containing useful information. Finally, the endpoint gray values of the detected frames are regarded as the window endpoints, wherein the most appropriate frame length and frame shift are traversed and determined by comparing and searching the maximum of image contrast. The validity and practicability of the algorithm are analyzed qualitatively and quantitatively by a series of comparative experiments. The results show that the distance between gray bins is automatically stretched, and the image contrast is enhanced without changing the relationships between the pixels. In addition, the redundant background information is removed.