For the low visibility and contrast of the foggy image, I propose a single image defogging algorithm. Firstly, change the foggy image from the space of RGB to HSI and divide it into a plurality of blocks. Secondly, elect the maximum point of S component of each block and correct it, keeping H component constant and adjusting I component, so we can estimate fog component through bilinear interpolation. Most importantly, the algorithm deals with the sky region individually. Finally, let the RGB values of all pixels in the blocks minus the fog component and adjust the brightness, so we can obtain the defogging image. Compared with the other algorithms, its efficiency is improved greatly and the image clarity is enhanced. At the same time, the scene is not limited and the scope of application is wide.