Saturation contrast image enhancement

A digital imaging tool and a method for enhancing, or adjusting, a saturation contrast of a digital image is provided. The digital imaging tool may convert an original color space of a digital image to a second color space having a saturation channel. The digital imaging tool may define a function based, at least partially, on one or more user-provided parameters. Saturation values of pixels of the digital image, in the second color space, may be adjusted, or enhanced, by applying each of the saturation values to the defined function to produce corresponding enhanced saturation values. The second color space then may be converted back to the original color space and a saturation-enhanced version of the digital image may be presented and/or saved.

BACKGROUND

Digital photographers often adjust a contrast of digital images to make the digital images more appealing to viewers. Typically, this is done by enhancing a brightness contrast by making bright regions brighter and dark regions darker, thereby increasing a relative ratio between bright regions and dark regions.

Digital photographers also may enhance digital images by modifying color saturation. Tools exist which permit digital photographers to adjust color saturation, but the tools have their limitations. For example, the existing tools use traditional color models, such as, for example, RGB (Red, Green and Blue) and HSV (Hue, Saturation and Value), which rely on physical models of light. Editing the saturation in traditional color models is not intuitive and often results in shifts in hue or an unnatural appearance. Further, the existing tools only support uniform changes to saturation, which has no effect on saturation contrast.

SUMMARY

In various embodiments, a digital imaging tool may be provided for enhancing a saturation contrast of a digital image. The digital imaging tool may convert an original color space of a digital image to a second color space having a saturation channel. The saturation channel may include saturation values of all pixels of the digital image. The second color space may be a traditional color space, such as, for example, HSV, a perceptually uniform color space, such as, for example, CIE (Commission Internationale de l'Eclairge) LCH (also known as CIELCH), or another color space.

A user may provide one or more user-provided parameters, based upon which, a function may be defined. In some embodiments, the function may be an s-curve function, such that when saturation values of respective pixels of the digital image are applied to the s-curve function, resulting enhanced saturation values of some of the pixels may be greater than corresponding original saturation values and enhanced saturation values of others of the pixels may be less than corresponding original saturation values.

The digital imaging tool then may convert the second color space, including the enhanced saturation values, back to the original color space and a saturation-enhanced digital image may then be presented to a user and/or saved.

In some embodiments, only saturation values of pixels that satisfy a luminance threshold condition may be applied to the function. As a result, the saturation contrast of dark regions of the digital image may remain unchanged.

DETAILED DESCRIPTION

Embodiments are discussed in detail below. While specific implementations are discussed, it is to be understood that this is done for illustration purposes only. A person skilled in the relevant art will recognize that other components and configurations may be used without parting from the spirit and scope of the subject matter of this disclosure.

Overview

In embodiments consistent with the subject matter of this disclosure, a digital imaging tool and a method are provided for enhancing a saturation contrast of digital images. In various embodiments, the saturation contrast of a digital image may be enhanced by first, converting an original color space of the digital image to a second color space having a saturation channel, including, but not limited to HSV (Hue, Saturation and Value). The original color space may be RGB, sRGB (standard Red, Green and Blue), or another traditional color model. In some embodiments, the second color space may be a perceptually uniform color space, including, but not limited to CIE (Commission Internationale de l'Eclairge) LCH (also known as CIELCH). The CIELCH color space has three axes. An L axis represents lightness, a C axis represents chroma or saturation, and an H axis represents hue.

Next, a saturation contrast enhancement may be applied to the saturation channel (saturation values of pixels of the digital image). In some embodiments, a user may provide one or more inputs, based upon which, a function may be defined. The respective saturation values of the pixels of the digital image may be applied to the function to produce enhanced saturation values. Some of the enhanced saturation values may be greater than corresponding ones of the respective saturation values, while others of the enhanced saturation values may be less than corresponding ones of the respective saturation values. In some embodiments, the defined function may be an s-curve, but other functions may be employed in other embodiments.

The second color space, including the enhanced saturation values of the pixels of the digital image, may then be converted back to the original color space and a saturation-enhanced version of the digital image may be presented and/or saved.

Exemplary Processing Device

FIG. 1is a functional block diagram of an exemplary processing device100, which may be used to implement embodiments of a digital imaging tool consistent with the subject matter of this disclosure. Processing device100may be a desktop personal computer (PC), a notebook or laptop PC, a digital camera, or other processing device capable of being used as a digital imaging tool. Processing device100may include a bus110, a processor120, a random access memory130, a read only memory (ROM)140, an input device150, and an output device160. Bus110may permit communication among components of processing device100.

Processor120may include one or more conventional and/or graphical processors that interpret and execute instructions. A memory may include a RAM (Random Access Memory)130, a ROM (Read Only Memory)140, or another type of dynamic or static storage device that stores information and instructions for execution by processor120. RAM130, or another type of dynamic storage device, may store instructions as well as temporary variables or other intermediate information used during execution of instructions by processor120. ROM140, or another type of static storage device, may store static information and instructions for processor120.

Input device150may include a keyboard, a pointing device, an electronic pen, a touchscreen, or other device for providing input. Output device160may include a display, a printer, or other device for outputting information including, but not limited to, digital images.

Processing device100may perform functions in response to processor120executing sequences of instructions contained in a tangible machine-readable medium, such as, for example, RAM130, ROM140or other tangible machine-readable medium. Such instructions may be read into RAM130from another machine-readable medium or from a separate device via a communication interface (not shown).

Exemplary Processing

FIG. 2is a flowchart of an exemplary process that may be performed in various embodiments of a digital imaging tool. The process may begin with a digital image being input into a memory including, but not limited to, RAM130, of a digital imaging tool (act202). Assuming that an original color space of the digital image does not include a saturation channel, processor120may convert the original color space to a second color space, which includes a saturation channel (act204). The second color space may be the HSV color space, a perceptually uniform color space, such as, for example, CIELCH, or another color space. Processor120may then apply a saturation contrast enhancement to saturation values of pixels of the digital image (the saturation channel) (act206).

FIG. 3is a flowchart illustrating an exemplary process for performing act206in an embodiment. The process may begin by receiving one or more user-supplied parameters, which may represent various aspects of a function (act302). Next, the function may be defined based, at least in part, on the received one or more user-supplied parameters (act304). In some embodiments, the function may be an s-curve. Although a number of different s-curves may be used, one example of an s-curve may be defined as:

In some embodiment, k=6.0, α=0.3758773, and β=1.9481615, although other values of k, α, and β may be used in other embodiments. A value of m determines a strength of a saturation contrast effect. A value of t differentiates between low saturation and high saturation. In other words, t determines what areas of a digital image will have increased saturation and what areas of the digital image will have decreased saturation. Changing the value of t causes an inflection point of the s-curve to move along an x axis. A low value of t results in more of the digital image becoming highly saturated, while a high value of t results in a greater proportion of the digital image being less saturated. Further, because some pixels of the digital image may have increased saturation and other pixels of the digital image may have decreased saturation, the digital imaging tool independently produces enhanced saturation values for each of the pixels of the digital image.

In another embodiment of act304, a function for enhancing saturation contrast may be defined based on only one user-supplied parameter.FIG. 4is a flowchart illustrating an exemplary process in which a function for enhancing saturation contrast is defined based, at least partly, on the one user-supplied parameter.

The process may begin by computing saturation statistics of the digital image (act402).FIG. 5illustrates one example of how the saturation statistics may be computed for the digital image.

The process may begin with processor120constructing a histogram of the saturation values of pixels of the digital image (act502). Next, processor120may compute a median saturation value based on the constructed histogram (act504).

Returning toFIG. 4, an inflection point of an s-curve may be set based on the computed saturation statistics (act404). In one embodiment, this may be achieved by setting a value of t in equation 1 according to the computed median saturation value. Thus, 50% of the digital image, by area, may have increased saturation as a result of saturation contrast enhancement, and 50% of the digital image, by area, may have decreased saturation as a result of saturation contrast enhancement. By setting the inflection point based on the computed median saturation, a widest variety of images may be accommodated.

A magnitude of the s-curve may be based on the one user-supplied parameter (act406). Thus, by setting the value of m in equation 1, a function, in this example an s-curve, may be defined.

Returning toFIG. 3, processor120may access information regarding a first pixel of the digital image (act306). The information may include a saturation value and a luminance value. Processor120may then determine whether the luminance value is greater than or equal to a threshold value (i.e., a luminance threshold condition is satisfied) (act308). If the luminance value is greater than or equal to the threshold value, then processor120may adjust saturation contrast by applying the saturation value to the function to obtain an enhanced saturation value (act310). Otherwise, if the luminance threshold condition is not satisfied, the saturation value of the pixel may remain unchanged.

Processor120may then determine whether there are additional pixels of the digital image to process (act312). If there are no additional pixels to process, then the process is complete. Otherwise, processor120may access information regarding a next pixel of the digital image (act314) and acts308-312may be repeated.

The exemplary process ofFIG. 3preserves saturation values with respect to pixels with low luminance. Increasing saturation contrast may magnify hue fluctuations that are caused by low-level noise in the digital image. By enhancing saturation values of only ones of the pixels of the digital image that satisfy the luminance threshold condition, saturation may be enhanced everywhere in the digital image except for darker areas, where the digital image retains only the low-level noise present in an original version of the digital image.

In embodiments in which luminance thresholding is not performed, act308ofFIG. 3may be eliminated and the saturation values of all of the pixels of the digital image may be enhanced by performing act310with respect to each and every one of the pixels of the digital image.

Returning toFIG. 2, process120may then convert the second color space back to the original color space (act208). A saturation-contrast-enhanced, or saturation-contrast-adjusted, version of the digital image may then be presented on output device160, which may be a display device, a printer, or other output device capable of presenting a digital image, and/or the saturation-contrast-enhanced, or the saturation-contrast-adjusted, version of the digital image may be saved to a storage device, such as, for example, a hard disk, an optical disc, a flash RAM storage device, or other type of storage device (act210).

In another embodiment of the process ofFIG. 2, acts204and208may only be performed if the original color space of the digital image does not include a saturation channel. For example, after act202is performed, processor120may perform a check to determine whether the original color space includes a saturation channel (i.e., each one of the pixels of the input digital image in the original color space has a corresponding saturation value). If the original color space includes the saturation channel, then act206may be performed without performing act204. After performing act206, processor120may perform a second check to determine whether the original color space of the input digital image includes the saturation channel. If the original color space is determined to include the saturation channel, then act208may be skipped and act210may be performed to present the saturation-contrast-enhanced version of the digital image on output device160.

In some embodiments, a user-supplied input parameter, such as a magnitude of an s-curve, representing a strength of a saturation contrast effect, may be input by a user via a user interface, such as, for example, a slider control displayed on a display screen.FIG. 6illustrates an exemplary slider control600which a user may use to provide the magnitude. Slider control600includes a slider602which a user may move in a first direction (toward “+”) to increase the magnitude and which the user may move in a second direction (toward “−”) to decrease the magnitude. The user may move slider602by selecting slider602with a pointing device, such as, for example, a computer mouse, an electronic pen, a user's finger touching a slider602displayed on a touchscreen, or other pointing device, and dragging selected slider602in the first direction or the second direction.

In other embodiments, other methods may be used to input the magnitude. For example, a joystick or other controller device may be used to input the magnitude. Further, in other embodiments the user may input a value for the magnitude via a keyboard.

The above-mentioned embodiments are only exemplary. In other embodiments, a function for enhancing saturation contrast of digital images may be a different s-curve, or another function. In addition, other user-supplied parameters may be input, in numerous ways, to define the function. Methods for inputting other user-supplied parameters may include, but not be limited to, using a keyboard, using a numeric keypad, and using a displayed keyboard or displayed numeric keypad on a touchscreen display of a digital imaging tool.

CONCLUSION

Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms for implementing the claims.

Other configurations of the described embodiments are part of the scope of this disclosure. For example, in other embodiments, an order of acts performed by processes, such as the processes illustrated byFIGS. 3-5, may be different and/or may include additional or other acts. Additionally, in other embodiments, the processes illustrated byFIGS. 3-5may be performed by a number of processing devices, which communicate with one another via a network, and act as a single larger processing device.

Accordingly, the appended claims and their legal equivalents define embodiments, rather than any specific examples given.