Aiming at the problem of low visibility of hazy images and dim brightness of dehazed image,a two-stage dehazing algorithm based on atmospheric scattering model was proposed.Firstly,the minimum channel of hazy-free image was derived by linearly transforming of brightness of hazy image and stretc-hing saturation of hazy image,which was used to calculate rough transmittance combining with the mini-mum channel of the hazy image.The rough transmittance were optimized separately by double gradient cost function or guided filtering in different stages.Finally,the hazy-free image was restored by the at-mospheric scattering model that would be used again to improve brightness for dehazed image.The ex-perimental results show that the restored image become clearer and brighter after hazy removal;The av-erage of objective indicators such as image comprehensive quality,peak signal-to-noise ratio and running time are superior to compared algorithms,in which the image comprehensive quality is improved by at least 1.55 times and the running speed is accelerated by at least 1.50 times on average.The proposed al-gorithm effectively improves the visibility and brightness of hazy image.