State-of-the-art methods for removing haze from a single image rely on a haze image formation model and the inversion problem is solved by estimating medium transmission and global atmospheric light. In this paper, we propose a hazy image enhancement framework, called Intensity Mapping and Detail Mapping(IMDM), for dehazing, which can strike a good balance in enhancing details and preserving color fidelity. We propose two mapping fucntions to respectively process the detail and intensity components of the hazy image instead of jointly tackling the two parts. Compared with joint tackling of these two kinds of information, respective processings are more advantagous in stretching the contrast and highlight the details. For obtaining the optimal parameters of mapping functions, we specially set up an image dataset, which consists of numbers of pairs of hazy and the corresponding ground truth images, for the training process. In order to simulate hazy images in the real world as much as possible, hazy images in this dataset are captured in an artificial hazy environment. With the learned parameters, details in the hazy image can be clearly restored without causing color infidelity. Experimental results demonstrate that the proposed method (called IMDM) is superior to both the enhancement and model-based methods in terms of improving the visibility and preserving color fidelity.