The focal plane size of modern CCD/CMOS camera is getting bigger and bigger, that is to say, more and more pixels have been integrated on the focal plane array. Under this advance in technology, people can take a picture with higher resolution and higher dynamic range. The image contains much more information of the real world. A serious problem of dealing with such kind of image is that, although the image has high dynamic range, people cannot display all the information of it. Certain technologies have been applied on modern cameras to solve this problem, but they still have some defects. A novel high dynamic range image enhancement algorithm was raised, which used the guided image filter to separate the image and deal with the detail layer as well as the base layer. The high frequency information needs to be enhanced to highlight the detail of the image on the detail layer. Meanwhile, the base layer controls the gray scale contrast which also needs to be processed with certain strategy. The color saturation can be controlled by both two layers. The raw high dynamic range image can be enhanced both through the detail layer and the base layer to improve its digital detail, gray scale rearranging and the color contrast. Detailed analysis of the procedure and figure demonstration were illustrated to show the ability of this algorithm.