The present invention pertains to systems, methods and techniques for image processing.
Image enhancement frequently involves a number of operations aimed at image brightness and/or contrast modification. Such operations can include, e.g.: (i) image histogram stretching or dynamic range stretching, (ii) gamma correction (e.g., for brightening or darkening the image), (iii) shadow brightening and/or (iv) highlight darkening.
A variety of different image-processing techniques exist, some employing one or more of such operations. Usually, such tasks are performed sequentially, with each operation being performed by applying a transformation (e.g., one- or multi-dimensional look-up-table, LUT) to each pixel of a two-dimensional image or to one or more image frames in a video sequence. However, the present inventors have discovered that sequential application of multiple individual operations often results in unintended consequences, e.g., with the later operations eliminating some of the benefits of earlier operations and with the user often losing a significant amount of control over the final output image. Furthermore, sequential application typically requires more computations and multiple memory access, as compared to a single LUT application.
Accordingly, the present invention concerns, among other things, image-processing techniques in which multiple individual operations are performed on an image.
More specifically, in order to address the above-identified problems of conventional techniques, one embodiment of the invention is directed to processing an image, in which input image values are obtained for an input image (which, in turn, may be a modification of another image, e.g., a linearly or non-linearly filtered original image, a sub-sampled original image, etc.); values for image parameters are measured across the input image values; target values for the image parameters are input; a transformation is applied to the input image values to produce corresponding output image values, the transformation having been generated as a result of a plurality of individual image-value operations that have been constrained by the target values in order to control the image parameters across the output image values; and a processed output image is output based on the output image values (and potentially based on other information, such as the image values for the input image and/or the image values for the original image, if any).
Another embodiment is directed to processing an image, in which input values are obtained for pixels in an input image; target values are input to replace identified ones of the input values; a transformation is applied to the input values for the pixels in order to produce corresponding output image values, the transformation including multiple two or more individual image-value operations and mapping the identified ones of the input values to the target values; and a processed output image is output based on the output image values.
The foregoing summary is intended merely to provide a brief description of certain aspects of the invention. A more complete understanding of the invention can be obtained by referring to the claims and the following detailed description of the preferred embodiments in connection with the accompanying figures.
In the following disclosure, the invention is described with reference to the attached drawings. However, it should be understood that the drawings merely depict certain representative and/or exemplary embodiments and features of the present invention and are not intended to limit the scope of the invention in any manner. The following is a brief description of each of the attached drawings.
The present invention generally pertains to digital image processing techniques. As indicated in
In any event, as shown in
A transformation process 45 according to certain embodiments of the present invention treats the input image 40 as an array of pixel elements (pixels), transforming the set of pixel values 44 that make up the input image 40 into a corresponding set of pixel values 54 that make up the output image 50. In most of the embodiments discussed below, the pixel value for each pixel 47 in the input image 40 is converted into a value for the corresponding pixel 57 (meaning, in this context, at the same pixel location) in the output image 50. More preferably, this conversion is in accordance with a single formula or mapping that is dependent upon the pixel value for such pixel 47, but is not directly dependent upon pixel values for other pixels (although, as noted above, it can be dependent upon certain aggregate statistics for the input image pixels 44). However, in alternate embodiments the output value for an individual pixel 57 might depend upon the input value for the corresponding pixel 47 and/or other pixels in the input image 40 (e.g., pixels surrounding or in the neighborhood of the corresponding pixel 47).
For monochromatic images, the pixel value ordinarily will be the brightness, lightness, luminance or intensity value of the pixel. For color images, the pixel values can be any of the three values (or channels) that define the pixel's color, in any color space. In other words, the techniques of the present invention can be applied to any arbitrary chosen axis in any image color space, such as Lightness, Chroma, Saturation, Hue or an individual primary color, or even to a number of different dimensions simultaneously (i.e., to any combination of axes, by constructing a multivariate transformation or LUT). In the examples given below, the terminology generally reflects an assumption that the pixel value is intensity; however, such examples are intended merely to better communicate certain concepts and are not intended to be limiting.
More generally, although many of the examples discussed herein refer to pixel values, the present invention is applicable to any kinds of values that represent an image or any aspect thereof (referred to herein as “image values”). For example, all of the techniques described herein can be applied to any transformation (e.g., Fourier, cosine, wavelet or any other frequency-domain, orthogonal or unitary transformation) of any pixel values. As with the spatial-domain example given above, the techniques of the present invention can be applied to only portions of such alternate-domain representations and/or such techniques may be applied differently (e.g., using different parameters) to different portions of the image values, irrespective of the particular domain or even where the input image is segmented in one domain and processed in another. In one representative embodiment, an input image first is separated into a low-frequency (smoothed) component and a high-frequency (transitions, edges, etc.) component, the present technique is applied (either in the frequency domain or in the spatial/pixel domain) to the low-frequency component, and finally the high-frequency component (either modified or not) is added back. As will be readily apparent, large numbers of variations are possible.
The present techniques often can be applied similarly in all such variations. However, as noted above, in order to simplify the explanation, the primary examples described herein pertain to pixel intensities. Generally speaking, unless the context indicates otherwise, references herein to intensity values can be extended to any kind of pixel values or image values, and references herein to pixel values can be extended to any kind of image values. Thus, when the following discussion refers to “dynamic range”, such references can be applied not only the lightness channel values, but to a range of values in any chosen domain. For instance, “Gamut Mapping” refers to an operation whereby the colors of an image are mapped from one range (“Gamut”) to another. In such an operation, the present techniques may be applied to the Chroma dimension; in this case, the “dynamic range” will represent a range of Chroma image values (sometimes referred to as the “Gamut boundary”).
In certain embodiments, it is desirable to base the image processing on measured values across the input image 40. For this purpose, it often is useful to consider the image values within the input image 40 in terms of a histogram, such as histogram 80 shown in
Using this representation, it is possible to define a dynamic range within which the pixel values fall. While it is possible to use the entire range of pixel values, i.e., from pixel value 82 to pixel value 84, this entire range typically will include a number of outliers that do not need to be considered. Accordingly, it is preferable to define the applicable dynamic range as excluding certain values on a very low end 86 and certain values on the very high end 87.
In one specific example, the low outliers 86 are defined to be any values below a specified “low percentile” (e.g., below percentile 1), and the high outliers 87 are defined to be any values above a specified “high percentile” (e.g., above percentile 99). Stated mathematically, if
then “input shadows” Sh_X 88 (which is the cutoff for the low outliers 86 and, as discussed more fully below, the beginning of the shadows 100) is the value of x such that
In the preferred embodiments, it is also preferable to define a midpoint of a range of the input pixel values. Such a midpoint can be defined, e.g., as the average, median or other statistical measure of the channel histogram. For example, the midpoint 95, referred to as the “input mid-tone” Mt_X, is defined as the median of the channel histogram, i.e.,
One aspect of the preferred embodiments of the present invention is the mapping of certain parameters of the input image or certain input image values to designated target parameters of the output image or designated output target image values, respectively, or at least the controlling of the input parameters or input image values based on designated target parameters or image values, respectively. It is noted that each of the lower endpoint of the dynamic range Sh_X 88, the upper endpoint of the dynamic range Hl_X 89 and the dynamic range midpoint or the input mid-tone Mt_X 95 is both an image value and a measured parameter across the input image 40.
In a representative embodiment of the invention, the overall image-processing transformation maps these values to other designated target values, while at the same time performing other image-processing operations. This mapping of values is illustrated conceptually in
An example of such a process 135 is now described with reference to
Input into the process 135 are image values 140 (pixel intensity values in the present example) for the input image 40 and target values 150. In the present example, target values 150 include the values Sh_Y 118, Hl_Y 119 and Mt_Y 115 to which the lower endpoint of the dynamic range Sh_X 88, the upper endpoint of the dynamic range Hl_X 89 and the input mid-tone Mt_X 95, respectively, are to be mapped. The overall transformation 145 that is to be applied to the input pixel values 140 generally represents one subset of the range of possible transformations 45 that may be applied according to the present invention.
Initially, in step 161 certain parameters are measured across the input image values 140. In the present example, such parameters are the lower endpoint of the dynamic range Sh_X 88, the upper endpoint of the dynamic range Hl_X 89 and the input mid-tone Mt_X 95. However, any other parameters pertaining to the input image 40 instead may be measured in step 161 and used throughout process 135.
In step 162, a segment of the input image values 140 (which could be all such values or a subset of them), together with the measurements generated in step 161, preferably are normalized to a desired range. For example, the normalization range could be integers in the interval [0, 255] or real numbers in the interval [0, 1]. Line 221 (with respect to the input pixel values) 140 and line 222 (with respect to the relevant measurement) of the sample pseudocode shown in
It is noted that in this example, the lower endpoint of the dynamic range Sh_X 88 and the upper endpoint of the dynamic range Hl_X 89 are defined as the endpoints of the normalized range, with just linear scaling between. The result is the normalized space 240, shown conceptually in
At the same time, in step 152 the input target values 150 preferably also are normalized, more preferably, to the same range. Line 224 of the sample pseudocode shown in
Next, in steps 164-166 a sequence of additional individual image-value transform operations are performed on the input pixel values 140. Preferably, at least two such sequential operations are performed. As illustrated, the preferably normalized target values 150 constrain such operations in order to control the values of the image parameters across the image values that ultimately are output. A specific example is discussed with reference to
In this example, step 164 is a gamma correction. Specifically, in step 226 a gamma is calculated, and in step 227 this gamma factor is applied to all of the normalized input pixel values 140. Referring to
Step 165 is implemented in the present example as a combination shadow brightening and highlight darkening operation 228. Here, the operation has been structured so that when the normalized gamma-corrected input value (Y_Gamma) is equal to the normalized target output mid-tone value (Mt_Y—0—255), no modification occurs. For values above the normalized target output mid-tone value (Mt_Y—0—255), highlight darkening occurs, and for values below the normalized target output mid-tone value (Mt_Y—0—255), shadow brightening occurs, each with equal strength. In alternate embodiments, different strength values are specified for highlight darkening and shadow brightening. Thus, although the pixel values within each of the highlight range and the shadow range are modified, the target output mid-tone value Mt_Y 115 remains static in the normalized range, as shown by a comparison of range of values 241 prior to shadow brightening and highlight darkening operation 228 and range of values 242 after shadow brightening and highlight darkening operation 228.
In the present example, there are no additional pixel-value operations (i.e., no additional transform operations 166). In alternate embodiments, e.g., where different strength values are used for shadow brightening and highlight darkening, three or more separate sequential operations 164-166 may be performed.
Finally, in step 168 the image values are transformed from the normalized space to the desired output space. As shown in
It should be noted that the sequence of pixel-value operations in the embodiment and the particular example given above (i.e., normalization, gamma correction, shadow brightening and highlight darkening and then transformation to output space) are just representative. In other embodiments and/or other examples within the above embodiment different sequences of transform operations may be performed within the overall transformation 45. One aspect of these embodiments, however, is that individual image-value operations are constrained by the target values in order to control the image parameters across the output image values.
In the particular example given above, the input dynamic range endpoints are made the endpoints of the normalized space, held there through the other pixel-value operations, and then scaled to the target values for the dynamic range endpoints in the final output-space transform operation. A similar approach can be used across a wide range of different embodiments.
The midpoint adjustment occurs in the particular example given above in the gamma correction step. As a result, the gamma factor is completely defined by the relationship between the input midpoint and the output midpoint. In systems where the user is to have control over the gamma factor, the shifting of the midpoint (or any other point between the endpoints, for that matter) can be performed in other pixel-value operation transform steps. Still further, the shifting can be divided between two or more different transform operations, all depending upon the effects to be achieved and where the user is to sacrifice some control over other transform operation parameters in order to be able to map the input measurements to the desired target values.
In the embodiment described above, it is generally contemplated that the mapping between the measured values and the target values will be exact. However, in alternate embodiments some amount of error is tolerated if necessary in order to allow the user to have greater control over other parameters of the overall image-processing transformation 45. Thus, even if the target values are not achieved exactly, they preferably are at least used to control the corresponding image parameters across the output image values.
Although the transformation 45 can be performed as a sequence of pixel-value operations on each individual image value, it generally will be preferable, particularly with respect to computational speed, to implement the entire transformation as a single formula or mapping. Combining the individual steps, for a generalization of the particular example given above, in which a shadows brightening strength parameter s1 controls the extent to which the shadows will be brightened and a separate highlights darkening strength parameter s2 controls the extent to which the highlights will be darkened, the output (that is, the transformed) value L(x) of each corresponding input pixel value x, is given by the following expression:
where
This transformation, in turn, can be applied either directly or through a lookup table.
Finally, it is noted that if the chosen mid-tone is the median, as in the example above, and the transforms are all monotonic and/or applied either exclusively above or exclusively below the mid-tone (i.e., with no crossover), then the target value for the output mid-tone also will be the median point of the output pixel values.
Initially, in step 281 image values are input for the input image 40.
Next, in step 282 values for specified parameters of the input image are measured. This step is similar to step 161, discussed above, and all the same considerations apply here.
In step 284, target parameter values are input. Once again, these values function as target values for one or more of these specified parameters. As above, this inputting step can include providing a user interface for an individual user 20 to provide such target parameter values.
One example of such a user interface is shown in
Similar sliders also are provided for adjusting other parameters of the transformation, such as a slider 316 for adjusting the strength of shadow brightening and a slider 317 for adjusting the strength of highlights darkening. In addition, a slider 318 may be provided for adjusting the locations of the input lower endpoint of the dynamic range Sh_X 88 and the upper endpoint of the dynamic range Hl_X 89, e.g., by adjusting the percentile with for each, with larger values (such as values close to one percentile point) potentially allowing greater expansion of the remaining dynamic range and with lower values (such as values close to zero) lessening the likelihood of unintentional clipping of significant information. Other graphic controls may be substituted for the sliders shown in
In step 285, a multifaceted transformation is applied using the input target values for the parameters as constraints. As in the previous embodiment, this step contemplates the use of multiple image-value operations. In many cases, the transformation 45 is generated by sequential application of such image-value operations, as discussed above. However, in alternate embodiments a single multifaceted transformation is constructed in which the various aspects (e.g., gamma correction, shadow brightening and highlights darkening) are interdependent with each other.
Finally, in step 287 the processed image, as defined by the output image values, is output. This outputting step can include any or all of displaying the image on a monitor, printing it or providing it to another application for further processing.
Initially, in step 351 image values are obtained for an input image. Such image values can be simply retrieved from memory or another storage device, or can be received from an earlier image-processing stage.
In step 352, particular image values are identified. As in the preceding embodiments, such image values can be identified by performing calculations or measurements across the input image values, either with or without user input as to the calculation or measurement parameters (e.g., user definition of the criteria for cutting off outliers). Alternatively, some or all of image pixel values can be directly identified by the user (e.g., user 20).
An example of such identification is shown in
It is noted that in the present embodiment, it is possible to specify a mid-tone range rather than simply a mid-tone point. For example, in one embodiment brightening is to be performed in the shadow region 412, darkening is to be performed in the highlights region 413, and neither brightening nor darkening is to be performed in the mid-tone region 414. More generally, any number or kinds of segments preferably may be defined by the user 20 in this embodiment of the invention, e.g., depending upon the particular types of processing that are desired and supported.
Returning to
In step 355, a multifaceted transformation 45 (e.g., having different kinds of image-values operations) is applied to the input image values, constrained by the condition that the image values identified in step 352 are mapped (either exactly or, in certain embodiments, within certain tolerances) to the corresponding replacement values input in step 354. Considerations pertaining to such a multifaceted transformation 45 have been discussed above. Performance of this step 355 may be triggered by any changes input in step 354; alternatively, referring to
Finally, in step 356 the processed image is output. For example, as noted above, the image may simply be displayed on user interface 400 or may be printed or output to another application for additional processing.
Generally speaking, except where clearly indicated otherwise, all of the systems, methods and techniques described herein can be practiced with the use of one or more programmable general-purpose computing devices. Such devices typically will include, for example, at least some of the following components interconnected with each other, e.g., via a common bus: one or more central processing units (CPUs); read-only memory (ROM); random access memory (RAM); input/output software and circuitry for interfacing with other devices (e.g., using a hardwired connection, such as a serial port, a parallel port, a USB connection or a firewire connection, or using a wireless protocol, such as Bluetooth or a 802.11 protocol); software and circuitry for connecting to one or more networks, e.g., using a hardwired connection such as an Ethernet card or a wireless protocol, such as code division multiple access (CDMA), global system for mobile communications (GSM), Bluetooth, a 802.11 protocol, or any other cellular-based or non-cellular-based system), which networks, in turn, in many embodiments of the invention, connect to the Internet or to any other networks; a display (such as a cathode ray tube display, a liquid crystal display, an organic light-emitting display, a polymeric light-emitting display or any other thin-film display); other output devices (such as one or more speakers, a headphone set and a printer); one or more input devices (such as a mouse, touchpad, tablet, touch-sensitive display or other pointing device, a keyboard, a keypad, a microphone and a scanner); a mass storage unit (such as a hard disk drive); a real-time clock; a removable storage read/write device (such as for reading from and writing to RAM, a magnetic disk, a magnetic tape, an opto-magnetic disk, an optical disk, or the like); and a modem (e.g., for sending faxes or for connecting to the Internet or to any other computer network via a dial-up connection). In operation, the process steps to implement the above methods and functionality, to the extent performed by such a general-purpose computer, typically initially are stored in mass storage (e.g., the hard disk), are downloaded into RAM and then are executed by the CPU out of RAM. However, in some cases the process steps initially are stored in RAM or ROM.
Suitable devices for use in implementing the present invention may be obtained from various vendors. In the various embodiments, different types of devices are used depending upon the size and complexity of the tasks. Suitable devices include mainframe computers, multiprocessor computers, workstations, personal computers, and even smaller computers such as PDAs, wireless telephones or any other appliance or device, whether stand-alone, hard-wired into a network or wirelessly connected to a network.
In addition, although general-purpose programmable devices have been described above, in alternate embodiments one or more special-purpose processors or computers instead (or in addition) are used. In general, it should be noted that, except as expressly noted otherwise, any of the functionality described above can be implemented in software, hardware, firmware or any combination of these, with the particular implementation being selected based on known engineering tradeoffs. More specifically, where the functionality described above is implemented in a fixed, predetermined or logical manner, it can be accomplished through programming (e.g., software or firmware), an appropriate arrangement of logic components (hardware) or any combination of the two, as will be readily appreciated by those skilled in the art.
It should be understood that the present invention also relates to machine-readable media on which are stored program instructions for performing the methods and functionality of this invention. Such media include, by way of example, magnetic disks, magnetic tape, optically readable media such as CD ROMs and DVD ROMs, or semiconductor memory such as PCMCIA cards, various types of memory cards, USB memory devices, etc. In each case, the medium may take the form of a portable item such as a miniature disk drive or a small disk, diskette, cassette, cartridge, card, stick etc., or it may take the form of a relatively larger or immobile item such as a hard disk drive, ROM or RAM provided in a computer or other device.
The foregoing description primarily emphasizes electronic computers and devices. However, it should be understood that any other computing or other type of device instead may be used, such as a device utilizing any combination of electronic, optical, biological and chemical processing.
In certain instances, the foregoing description refers to clicking or double-clicking on user-interface buttons, dragging user-interface items, or otherwise entering commands or information via a particular user-interface mechanism and/or in a particular manner. All of such references are intended to be exemplary only, it being understood that the present invention encompasses entry of the corresponding commands or information by a user in any other manner using the same or any other user-interface mechanism. In addition, or instead, such commands or information may be input by an automated (e.g., computer-executed) process.
Several different embodiments of the present invention are described above, with each such embodiment described as including certain features. However, it is intended that the features described in connection with the discussion of any single embodiment are not limited to that embodiment but may be included and/or arranged in various combinations in any of the other embodiments as well, as will be understood by those skilled in the art.
Similarly, in the discussion above, functionality sometimes is ascribed to a particular module or component. However, functionality generally may be redistributed as desired among any different modules or components, in some cases completely obviating the need for a particular component or module and/or requiring the addition of new components or modules. The precise distribution of functionality preferably is made according to known engineering tradeoffs, with reference to the specific embodiment of the invention, as will be understood by those skilled in the art.
Thus, although the present invention has been described in detail with regard to the exemplary embodiments thereof and accompanying drawings, it should be apparent to those skilled in the art that various adaptations and modifications of the present invention may be accomplished without departing from the spirit and the scope of the invention. Accordingly, the invention is not limited to the precise embodiments shown in the drawings and described above. Rather, it is intended that all such variations not departing from the spirit of the invention be considered as within the scope thereof as limited solely by the claims appended hereto.
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/US07/87825 | 12/17/2007 | WO | 00 | 6/16/2010 |