To address the gloomy sky and the low contrast caused by the left fog in the existing image dehazing methods, we propose a robust haze removal algorithm for images and videos. First, a sky detection-based adaptive atmospheric light estimation method is designed for brighter and cleaner restoration results for the sky regions.Second, in order to reconstruct a transmission map in line with the depth variation, we preprocess the input image with texture smoothing to keep the color consistency inside the same planar object and devise a texture smoothing-based robust transmission estimation method, with which the contrast and color saturation of fog-free image are greatly promoted. Finally, the restored results are post-processed with the joint bilateral filter for the purpose of noise removal. What's more, a guided filter-based temporally coherent atmospheric light smoothing strategy and a Gaussian filter-based spatial-temporally coherent transmission smoothing strategy are put forward for video dehazing, which can ensure the spatial as well as temporal continuity of the haze-free videos. Experimental results show that the recovered haze-free images and videos have high contrast and color saturation with cleaner sky regions, and the haze-free videos are free of jittering and flickering phenomena.