Abstract:For a single smog image, there are some problems such as large area of thick fog, high brightness, and white objects. Based on the foggy day degradation model, a defogging algorithm is proposed to improve the dark channel and solve the ambient light value by using the gray-scale open operation in this paper. Firstly, according to the dark channel prior theory, the image threshold is used to segment the dark primary color region and the bright primary color region.And the dark primary color region and the bright primary color region are combined to obtain a more accurate original transmittance. Then, the guided filter algorithm is used to refine the original transmittance, And the interval of the ambient light value is estimated by the gray-scale operation to improve the accuracy and robustness of ambient light values. Make the algorithm suitable for dense fog highlighting area with bad dark channel defogging effect.The image after defogging is more real and natural, and the edge details are more abundant, effectively removing the Halo effect.At the same time, it also effectively solves the problem that the picture is dark after defogging a single picture, and the visual effect of the picture is not good. Comparing this algorithm with the classic defogging algorithm,it also directly proves that the processed image is superior to other algorithms in terms of contrast, distortion, detail and edge retention.