A method of processing a digital image, comprising: (a) obtaining a plurality of images including a low exposure image, a normal exposure image and a high exposure image; (b) converting the plurality of images into histograms; (c) setting the normal exposure image as a reference image and the low exposure image and the high exposure image as a first and a second comparison target image respectively; (d) adjusting a distribution of the histogram of the reference image to be similar to a distribution of the histogram of the first comparison target image to produce a first adjusted reference image and a distribution of the histogram of the reference image to be similar to a distribution of the histogram of the second comparison target image to produce a second adjusted reference image; (e) producing a first masking image corresponding to a difference for each pixel between the first adjusted reference image and the first comparison target image and a second masking image corresponding to a difference for each pixel between the second adjusted reference image and the second comparison target image; (f) applying the first masking image to the first comparison target image to produce a first adjusted comparison target image, and the second masking image to the second comparison target image to produce a second adjusted comparison target image, the first and the second adjusted comparison target images being obtained from the first and the second comparison target image respectively by masking and deleting therein those areas that are different from the corresponding to those of the first and second adjusted reference images respectively according to the first and the second masking images, so that only the other areas of the first and second comparison target images remain in the first and second adjusted comparison target images; and (g) assigning a respective weight to the first and the second adjusted comparison target images and then combining the reference image and the first and the second adjusted comparison target image according to their respective assigned weight to produce a high dynamic range, HDR, image, wherein the respective weights are determined as a difference value of each pixel, which is obtained by comparing the first and the second adjusted reference images and the first and the second comparison target image respectively, and are normalized to be a value between 0 and 1 on the basis of the histograms of these images and wherein the weight converges to 0 as the difference between an adjusted reference image and the corresponding comparison target image is the larger and the weight converges to 1 as the difference between an adjusted reference image and the corresponding comparison target image is the smaller. (a) obtaining a plurality of images including a low exposure image, a normal exposure image and a high exposure image; (b) converting the plurality of images into histograms; (c) setting the normal exposure image as a reference image and the low exposure image and the high exposure image as a first and a second comparison target image respectively; (d) adjusting a distribution of the histogram of the reference image to be similar to a distribution of the histogram of the first comparison target image to produce a first adjusted reference image and a distribution of the histogram of the reference image to be similar to a distribution of the histogram of the second comparison target image to produce a second adjusted reference image; (e) producing a first masking image corresponding to a difference for each pixel between the first adjusted reference image and the first comparison target image and a second masking image corresponding to a difference for each pixel between the second adjusted reference image and the second comparison target image; (f) applying the first masking image to the first comparison target image to produce a first adjusted comparison target image, and the second masking image to the second comparison target image to produce a second adjusted comparison target image, the first and the second adjusted comparison target images being obtained from the first and the second comparison target image respectively by masking and deleting therein those areas that are different from the corresponding to those of the first and second adjusted reference images respectively according to the first and the second masking images, so that only the other areas of the first and second comparison target images remain in the first and second adjusted comparison target images; and (g) assigning a respective weight to the first and the second adjusted comparison target images and then combining the reference image and the first and the second adjusted comparison target image according to their respective assigned weight to produce a high dynamic range, HDR, image, wherein the respective weights are determined as a difference value of each pixel, which is obtained by comparing the first and the second adjusted reference images and the first and the second comparison target image respectively, and are normalized to be a value between 0 and 1 on the basis of the histograms of these images and wherein the weight converges to 0 as the difference between an adjusted reference image and the corresponding comparison target image is the larger and the weight converges to 1 as the difference between an adjusted reference image and the corresponding comparison target image is the smaller.