An image processing method comprising: receiving illuminance information sensed through an illuminance sensor, the illuminance sensor sensing ambient illumination of a display device on which the image processed by this method will be displayed; receiving a first high dynamic range, HDR, image comprising gray level information; converting the gray level information of the first HDR image into luminance information using a perceptual quantizer electro-optical transfer function (PQ-EOTF) and adjusting the luminance information according to the illuminance information by applying an illuminance-based weight to derive a second HDR image; analyzing the luminance information of the second HDR image and calculating a rate of occupancy of high-luminance pixels of the display device in the second HDR image, wherein high-luminance pixels have at least a target peak luminance (Ytp), and wherein the high-luminance rate comprises the ratio of the number of high-luminance pixels to the total number of pixels; determining whether the high-luminance rate exceeds a threshold; when the high-luminance rate exceeds the threshold, luminance-mapping the second HDR image to derive a third HDR image using a mapping function changed according to the high-luminance rate, wherein the mapping function includes first and second mapping functions divided according to the target peak luminance, wherein the luminance mapping comprises using the first mapping function in a first luminance part at less than or equal to the target peak luminance and using the second mapping function for increasing luminance according to the high-luminance rate of the second HDR image in a second luminance part at greater than the target peak luminance; when the high-luminance rate is less than the threshold, luminance mapping the first luminance part at less than or equal to the target peak luminance using the first mapping function and clipping the luminance of the second luminance part at greater than the target peak luminance to the target peak luminance without using the second mapping function; and converting luminance information of the third HDR image into gray level information using a perceptual quantizer opto-electrical transfer function (PQ-OETF) to derive a fourth HDR image comprising the gray level information, and outputting the fourth HDR image. receiving illuminance information sensed through an illuminance sensor, the illuminance sensor sensing ambient illumination of a display device on which the image processed by this method will be displayed; receiving a first high dynamic range, HDR, image comprising gray level information; converting the gray level information of the first HDR image into luminance information using a perceptual quantizer electro-optical transfer function (PQ-EOTF) and adjusting the luminance information according to the illuminance information by applying an illuminance-based weight to derive a second HDR image; analyzing the luminance information of the second HDR image and calculating a rate of occupancy of high-luminance pixels of the display device in the second HDR image, wherein high-luminance pixels have at least a target peak luminance (Ytp), and wherein the high-luminance rate comprises the ratio of the number of high-luminance pixels to the total number of pixels; determining whether the high-luminance rate exceeds a threshold; when the high-luminance rate exceeds the threshold, luminance-mapping the second HDR image to derive a third HDR image using a mapping function changed according to the high-luminance rate, wherein the mapping function includes first and second mapping functions divided according to the target peak luminance, wherein the luminance mapping comprises using the first mapping function in a first luminance part at less than or equal to the target peak luminance and using the second mapping function for increasing luminance according to the high-luminance rate of the second HDR image in a second luminance part at greater than the target peak luminance; when the high-luminance rate is less than the threshold, luminance mapping the first luminance part at less than or equal to the target peak luminance using the first mapping function and clipping the luminance of the second luminance part at greater than the target peak luminance to the target peak luminance without using the second mapping function; and converting luminance information of the third HDR image into gray level information using a perceptual quantizer opto-electrical transfer function (PQ-OETF) to derive a fourth HDR image comprising the gray level information, and outputting the fourth HDR image.