Tone mapping for preserving contrast of fine features in an image
This disclosure is directed towards tone mapping systems and methods that preserve contrast of fine features of an image and avoid brightening monotonic regions of the image. To preserve contrast and avoiding brightening of the monotonic regions, an image processing circuitry may include hardware that enables determining pixel statistics of an image, generating a tone mapping that is configured to adjust the color values of pixels in the image, and applying the tone mapping to at least the low frequency component of the image to produce an output image where the contrast of the fine details is preserved. In addition, the image processing circuitry may include hardware that enables adjusting the tone mapping based on variance bins in a histogram of pixel values and applying the adjusted tone mapping to produce an output image where the monotonic regions are not brightened.
1 . An electronic device comprising:
an electronic display configured to display an image;
a display pipeline comprising pixel contrast control processing circuitry comprising circuitry configured to:
determine pixel statistics indicative of content of the image based at least in part on image data of the image that indicates luma values of each pixel in the image, wherein the pixel statistics comprise a histogram of a frequency of each luma value of pixels of the image;
determine an adjusted histogram by multiplying a size of each bin of a plurality of bins in the histogram by a variance of the bin to adjust a weight of a first number of bins of the plurality of bins corresponding to a monotonic region of the image;
determine an adjusted tone curve based at least in part on the adjusted histogram and the weight of the first number of bins, wherein the adjusted tone curve is configured to map the luma values to adjusted luma values; and
determine an output image data based at least in part on the adjusted tone curve, wherein the output image data corresponds to an output image.
2 . The electronic device of claim 1 , wherein the image and the output image both comprise a first region where the luma values of neighboring pixels are similar and a second region where the luma values of a neighboring pixels vary.
3 . The electronic device of claim 2 , wherein a difference in the luma values of the first region between the output image and the image is less than the difference in the luma values between the second region of the output image and the image.
4 . The electronic device of claim 1 , wherein the circuitry of the pixel contrast control processing circuitry is configured to:
determine a tone curve based on the histogram, wherein the tone curve is different from the adjusted tone curve.
5 . The electronic device of claim 1 , wherein the variance is associated with a distribution of the luma values within the bin of the histogram.
6 . The electronic device of claim 1 , wherein determining the adjusted histogram comprises normalizing the adjusted histogram so that it represents a number of pixels that is represented by the histogram.
7 . One or more tangible, non-transitory, computer-readable media, comprising instructions that cause pixel contrast control processing circuitry of an electronic device to:
determine pixel statistics indicative of content of an image based at least in part on image data that indicates values of each pixel in the image, wherein the pixel statistics comprise a histogram of a frequency of each value of pixels of the image;
determine an adjusted histogram by shifting each bin with low variance of a plurality of bins in the histogram to a next bin position such that each bin with low variance that maps to first output values that are comparatively higher than that of second output values are shifted to the next bin position, and wherein each bin with low variance corresponds to a monotonic region of the image;
determine an adjusted tone curve based at least in part on the adjusted histogram, wherein the adjusted tone curve is configured to map the values to adjusted output values and not map each bin with low variance to the first output values based on the shift; and
determine an output image data based at least in part on the adjusted tone curve and on the image data, wherein the output image data corresponds to an output image.
8 . The one or more tangible, non-transitory, computer-readable media of claim 7 , wherein the instructions cause the processing circuitry to:
determine a variance of each bin of the plurality of bins in the histogram; and
identify each bin with low variance of the plurality of bins based on the pixel statistics and a threshold.
9 . The one or more tangible, non-transitory, computer-readable media of claim 8 , wherein the threshold indicates a proximity to a minimum variance.
10 . The one or more tangible, non-transitory, computer-readable media of claim 7 , wherein the instructions that cause the processing circuitry to shift each bin with low variance to the next bin position comprise assigning a size of a bin with low variance to a bin in the next bin position and assigning a size of zero to the bin with low variance.
11 . The one or more tangible, non-transitory, computer-readable media of claim 7 , wherein the instructions that cause the processing circuitry to determine the pixel statistics comprise determining a maximum variance of the plurality of bins in the histogram and a minimum variance of the plurality of bins in the histogram.
12 . The one or more tangible, non-transitory, computer-readable media of claim 7 , wherein the values comprise luma values, luminance values, or both.
13 . The electronic device of claim 1 , wherein adjusting the weight of the first number of bins of the plurality of bins comprises decreasing the weight of the first number of bins of the plurality of bins.