The dehazing algorithm based on dark channel prior is hard to be put into practical application due to the great time complexity of estimating and optimizing the transmission, which needs a large amount of data comparisons and calculating the amalgamation matrix. In order to solve this problem, an fast algorithm based on dark channel prior is presented. Firstly, a data structure called partitioned minimal table(PAMT) is used to increase the estimating speed of initial transmission. Then, a color image edge detection based on morphological gradient is adopted to obtain the edge information of the image to reduce the scope when optimizing the transmission. This edge information and the spatial correlation of the pixel used to optimize the transmission can avoid the complex matrix calculation, which accelerates the speed of optimization. At last, the final recovered image, with enhanced contrast, is obtained by performing a post-processing technique based on just-noticeable difference(JND). Experimental results show that the performance of the proposed algorithm is substantially the same as the original one, but the time complexity has greatly reduced.