The subject disclosure relates to image processing techniques including one or more aspects of image characteristic oriented tone mapping for high dynamic range images.
In real-world settings, the range of light can be vast. For example, the luminance ratio between starlight and sunlight may be greater than ten orders.
Notwithstanding, common cameras may only enable capturing 8-bit, 256-luminance-level photographs. If such a camera captures a scene with high contrast, for example a scene including indoor and outdoor environment, the captured image will likely be underexposed or overexposed in some regions.
Ways are known of addressing the above-described problem. For example, with the help of high dynamic range (HDR) cameras and some existing HDR imaging methods, HDR images with improved quality can be generated. However, generating a suitable display or print of the improved image presents further problems. For example, common liquid crystal displays (LCDs) are of only 8-bit contrast ratio, and printers have an even lower contrast ratio. Consequently, such devices are typically inadequate for showing the full quality of HDR images.
One way to generate a high-quality HDR display is to buy high-quality HDR display equipment. However, such equipment is usually very expensive.
Lower-cost solutions include tone mapping. Tone mapping is a process to convert the tonal values of an image with a high dynamic range to a lower one. Thus, tone mapping may be used to convert an HDR image to a low dynamic range (LDR) image visually suitable for common display monitors.
Tone mapping has been researched for a period of time. There are two main categories: tone reproduction operator (TRO)-based; and tone reproduction curve (TRC)-based. The main difference between TRO-based techniques and TRC-based techniques is that TRC-based mapping uses a global operator, while TRO-based mapping uses a local one.
More specifically, TRC-based mapping provides a reproduction curve for mapping HDR data to lower range values globally without any spatial processing. An advantage of TRC is that it can provide a tone-mapped image with the original characteristics of the HDR image. The brighter part of the image will be mapped to greater values and the dimmer part will be mapped to smaller values. However, local contrast may be lost due to the compression of the dynamic range. One conventional TRC technique calculates the real world radiance values of a scene instead of the display radiance values that will represent them.
In contrast to TRC-based mapping, TRO-based mapping focuses on local details. It generates a tone-mapped image that preserves or even enhances the local contrast. Generally, TRO-based mapping provides more details in the tone-mapped image, but too many details can make the image look artificial. The loss of global contrast results makes it difficult to distinguish which part of the image is originally bright and which part is originally dim. Another disadvantage is that TRO-based mapping is computationally expensive, as it involves the spatial manipulation of local neighboring pixels. Conventional TRO-based techniques attempt to separate the luminance component from the reflectance component in the image formation model. Other conventional systems provide a tonal reproduction curve while at the same time considering the human visual system.
As stated previously, TRC-based methods can retain the whole image's characteristics. However, the difference between the maximum and minimum values of common HDR images is extremely large and most of the time, the population deflects to one side as discussed further on with respect to
In view of the above, there is a need for tone mapping capable of reproducing the appearance of an HDR image on common display devices in an efficient and inexpensive manner, and that avoids the above-described deficiencies of current designs for tone mapping.
The above-described deficiencies are merely intended to provide an overview of some of the problems of today's designs, and are not intended to be exhaustive. For instance, other problems with the state of the art may become further apparent upon review of the following description of various non-limiting embodiments below.
The following presents a simplified summary of the claimed subject matter in order to provide a basic understanding of some aspects of the claimed subject matter. This summary is not an extensive overview of the claimed subject matter. It is intended to neither identify key or critical elements of the claimed subject matter nor delineate the scope of the claimed subject matter. Its sole purpose is to present some concepts of the claimed subject matter in a simplified form as a prelude to the more detailed description that is presented later.
In various non-limiting embodiments, high dynamic range images are mapped to low dynamic range images. An input set of luminance values can be divided into separate regions corresponding to particular luminance value ranges. A region value can be determined for each region. Based at least in part on the region value, a quantity of range assigned to each region for tone mapping can be dynamically adjusted until each region meets a decision criterion or stopping condition, referred to herein as “concentration.” A region can be said to be concentrated if all luminance values therein are within a concentration interval or range. After a region is concentrated, it can be tone-mapped by quantization.
In view of the above, it can be seen that in embodiments of the invention, a logarithmic process or adaptive mapping to compress the range of the image as a first step, as in the current designs discussed above, are avoided. This prevents the undesirable side effects of current designs, discussed above, of distorting the shape of the histogram and the original image's characteristics.
To the accomplishment of the foregoing and related ends, certain illustrative aspects of the claimed subject matter are described herein in connection with the following description and the annexed drawings. These aspects are indicative, however, of but a few of the various ways in which the principles of the claimed subject matter can be employed. The claimed subject matter is intended to include all such aspects and their equivalents. Other advantages and novel features of the claimed subject matter can become apparent from the following detailed description when considered in conjunction with the drawings.
Various non-limiting embodiments are further described with reference to the accompanying drawings in which:
The claimed subject matter is now described with reference to the drawings, wherein like reference numerals are used to refer to like elements throughout. In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the claimed subject matter. It may be evident, however, that the claimed subject matter may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form in order to facilitate describing the claimed subject matter.
As used in this application, the terms “component,” “system,” and the like are intended to refer to a computer-related entity, either hardware, a combination of hardware and software, software, or software in execution. For example, a component may be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and/or a computer. By way of illustration, both an application running on a computer and the computer can be a component. One or more components may reside within a process and/or thread of execution and a component may be localized on one computer and/or distributed across two or more computers. Also, the methods and apparatus of the claimed subject matter, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium, wherein, when the program code is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the claimed subject matter. The components may communicate via local and/or remote processes such as in accordance with a signal having one or more data packets (e.g., data from one component interacting with another component in a local system, distributed system, and/or across a network such as the Internet with other systems via the signal).
Furthermore, the claimed subject matter may be described in the general context of computer-executable instructions, such as program modules, executed by one or more components. Generally, program modules include routines, programs, objects, data structures, etc., that perform particular tasks or implement particular abstract data types. Typically the functionality of the program modules may be combined or distributed as desired in various embodiments. Furthermore, as will be appreciated various portions of the disclosed systems above and methods below may include or consist of artificial intelligence or knowledge or rule based components, sub-components, processes, means, methodologies, or mechanisms (e.g., support vector machines, neural networks, expert systems, Bayesian belief networks, fuzzy logic, data fusion engines, classifiers, . . . ). Such components, inter alia, can automate certain mechanisms or processes performed thereby to make portions of the systems and methods more adaptive as well as efficient and intelligent.
In various non-limiting embodiments of the invention, an image can be processed to improve a corresponding display or print of the image. Referring now to
According to various non-limiting embodiments, operations of the dynamic range allocation 101 component can include dividing the input set of luminance values 100 into separate regions corresponding to particular luminance value ranges. A region value can be determined for each region.
Based at least in part on the region value, a quantity of range assigned to each region for tone mapping can be dynamically adjusted until each region meets a decision criterion or stopping condition, referred to herein as “concentration.” A region can be said to be concentrated if all luminance values therein are within a concentration interval or range. The concentration interval or range can be determined based on characteristics of luminance values in a corresponding region.
After a region is concentrated, operations of the tone mapping component 102 can include tone-mapping the concentrated region by quantization.
After quantization, adaptive techniques can be applied to the resulting tone-mapped images to adjust brightness or dimness.
If 3 bits are used to perform uniform quantization of an HDR image, as can be seen, most of the values are mapped to zero on the luminance axis 201, and consequently almost all details are lost.
By contrast, if the luminance range 201 is first divided into parts, and uniform quantization is separately performed on each part, the result will be improved. For example, if luminance values are divided into a region corresponding to values between 0 and 0.1 on the luminance axis 201, and a region corresponding to values above 0.1 on the luminance axis 201, and uniform quantization is performed separately on each region, the result will be improved. Global contrast is retained and there are certain values to retain local details as well.
In various non-limiting embodiments of the invention, concepts as illustrated in the above example are applied. Referring now to
In various non-limiting embodiments, the concentration interval or range can be defined in terms of a factor, referred to herein as Fstd, multiplied by the standard deviation for a corresponding region. To this end, the dynamic range allocation component 101 can include operations as shown in
L=0.299×R+0.587×G+0.114×B (1)
where R, G, and B correspond to red, green and blue, as in RGB pixel coloration. The RGB values can be in the form of digital data stored in a computer memory, for example. The RGB values may, for instance, have been captured by an image capture device, such as a digital camera. An initial population of luminance values (L), referred to herein for convenience as Region L, can be considered as a whole or global region that can be subsequently partitioned into separate regions. The luminance values of Region L can be sorted in ascending order.
The minimum, maximum and mean values of the luminance values can be determined (block 502), and the Fstd factor can be computed based on the minimum, maximum and mean values (block 503). Specifically, for example, for Region L, factor Fstd can be computed in terms of the global maximum, minimum and mean luminance values of Region L, denoted respectively as Lmaxg, Lming and Lmeang, as follows:
Diff
mm=min[(Lmeang−Lming), (Lmaxg−Lmeang)] (2)
F
std=√{square root over (log 10(8+(Lmaxg−Lming)/Diffmm))} (3).
Fstd indicates the degree of the population deflection. To determine the concentration interval or range that serves as a basis for a decision criterion or stopping point as discussed above, the Fstd value can be multiplied by the standard deviation σL of Region L (block 504).
To apply the decision criterion, it can be determined whether the luminance values of the population are within the concentration interval or range, defined as ±(Fstd×σL). If it is determined that the luminance values are within ±(Fstd×σL), Region L is said to be concentrated and is not further divided. Instead, tone-mapping can be performed on the luminance values of Region L (block 505).
On the other hand, if it is determined that the luminance values are not within ±(Fstd×σL), Region L is not concentrated, and consequently can be divided into plural regions. Referring now to
Region values RgA, RgB and RgC can be computed for each region. As mentioned previously, the region values can be used to dynamically allocate a reproduction range, subsequently used in tone mapping, for each region. In each region, a probability density, P, and a range, R, can be determined and used in computing the region values. For example, if P=0, the corresponding region value (Rg) will be set to zero, since a region without any population need not be allocated any dynamic range.
For computing Rg, alternative factors FP1 or FP2 can be calculated using the below expressions:
where k is an iteration number and PmeanL is the probability density greater than the mean in Region L. If PmeanL<0.5, Pmean′L=1−PmeanL. Otherwise, Pmean′L=PmeanL.
For Region A, the region value RgA can be expressed as:
Rg
A
=P
A
F
×R
A (6).
RgB and RgC, i.e., region values for Region B and Region C, respectively, can likewise be calculated using expressions (4), (5) and (6), replacing PA and RA with PB, RB, PC and RC correspondingly.
In embodiments of the invention, after region values have been determined, dynamic range allocation for tone mapping can be performed using the region values. The dynamic range allocation can include plural iterations performed recursively.
On a first iteration or if the whole population (Region L) does not come from Region B of any previous iteration, FP1 can be used for calculating the region values as described above. When FP1 is used, it means that the population of Region L may deflect to one side, and consequently greater range should be given to that side for quantization. Accordingly, FP1 (usually >1) may be used as a power index or exponent of the probability density in (6), which makes Rg relatively larger with higher probability density. Greater deflection results in greater FP1.
Otherwise FP2 can be used instead of FP1 in (6). When FP2 is used, it means that the population of Region L is at least once within a certain standard deviation, which is quite concentrated. If, in such a case, the range allocated were still according to the probability density it would be similar to histogram equalization, which results in loss of contrast. Therefore, in this case, FP2 (usually <1) is used as the power index or exponent in (6), which makes Rg depend more on the range so that the local details can be maintained.
As region values are computed, a dynamic range for mapping by quantization can be allocated. DRA, DRB and DRC are the quantity of range allocated to Region A, B and C respectively. In embodiments, DRA, DRB and DRC can be determined using the below expressions:
If RgA or RgC is not equal to 0, DRA or DRC in (7) and (8) will be at least 1 as every luminance value should have a mapping value.
After a first iteration of dynamic range allocation, DRA, DRB and DRC can be applied to redefine the ranges allocated to Regions A, B and C respectively. It can then be determined whether the regions thus obtained are concentrated or have a corresponding DR value (i.e., DRA, DRB or DRC)=1. If all the regions are either concentrated or have a corresponding DR value=1, no further dynamic range allocation is performed.
On the other hand, if all the regions resulting from the first iteration are not either concentrated or assigned a corresponding DR value=1, further iterations can be performed. In a next iteration, each of Regions A, B and C may be divided as the original, whole Region L was divided as described above. Thus, referring now to
For each of the newly-formed regions, the corresponding Lmax, Lmin, Lmean and σ of their respective parent population of luminance values can be obtained (i.e., LmaxA, LminA, LmeanA and σA, LmaxB, LminB, LmeanB and σB, and LmaxC, LminC, LmeanC and σC, as needed). Moreover, DR as in (7), (8), (9) can be set to DRA, DRB and DRC correspondingly as obtained from the first iteration. Further, Fstd for the corresponding region can be increased. For example, in the kth iteration, Fstd for the corresponding region can be set to k×Fstd.
Processing can be performed recursively as described above for additional iterations. Processing can be stopped after all regions are either concentrated or have a corresponding DR value=1.
A concentration interval can be determined based on the mean, minimum and maximum (block 803). More specifically, the concentration interval can be defined as the product of a factor Fstd as described above, and the standard deviation σL of the luminance values.
The concentration interval can act as a decision criterion or stopping condition as discussed above. Thus, operations can further include determining whether a region containing the population of luminance values is within the concentration interval (block 804).
If not, the region can be divided into plural regions (block 805) and region values can be determined for each of the plural regions (block 806). A region value can depend at least in part on a range of the corresponding region, as discussed above.
The region ranges can be adjusted, based at least in part on the region values, to form regions with adjusted ranges (block 807). A mean, minimum and maximum for each of the regions with the adjusted ranges can be determined (block 802), and a concentration interval can be determined for each of the regions with the adjusted ranges (block 803).
It can then be determined whether the respective populations of luminance values in the regions with the adjusted ranges are within their respective concentration intervals (block 804). If all regions either meet this stopping condition or have been allocated a dynamic range DR=1, tone mapping can be performed for each region (block 808). A display or print of the tone-mapped image can be generated (block 809). Otherwise, blocks 802-807 can be iterated recursively until the stopping condition is met.
As described above, tone mapping by quantization can be performed for every concentrated region or region with DR=1. This is illustrated in
Now consider an arbitrary concentrated region, denoted for convenience as Region Z 903 (see
A wth decision level point DP(w) for quantization can be determined by the below expression:
DP(w)=LminZ+(w/y)F
where w=1, 2, . . . , y−1.
It can then be determined in what intervals values in the input range [x, x+y] lie (block 1004). The input values can then be mapped according to the mapping rule (block 1005). For example, values lying in the first interval [x, x+DP(1)] can be mapped to x, values lying in the second interval [x+DP(1), x+DP(2)] can be mapped to x+1, and so on. F mean controls the quantization performance by adjusting the size of the quantization intervals. When F mean is equal to 1, every interval is of the same size and so the quantization is uniform. F mean may typically be quite close to 1 because the region is concentrated, thus the quantization may be characterized as “uniform-like.”
After the tone reproduction curve is constructed by the above-described quantization, the brightness or dimness of the resulting image can be adjusted (block 1006). More specifically, for example, the 20th percentile of input luminance values can be compared to the 20th percentile of the reproduction range after mapping. If the 20th percentile of input luminance values are not greater than the 20th percentile of the reproduction range after mapping, all decision level points can be exponentially decreased so that the resulting image is not too dim. A similar technique can be applied to the 80th percentile of input luminance values so that the tone-mapped image is not too bright. The above-described adaptive techniques improve the image quality without altering the image characteristics.
After the tone reproduction curve is finalized, the following expression can be used to compute the output display pixels (block 1007):
where Lin and Lout are luminance values before and after tone reproduction, respectively, and γ=0.5 controls the display color. A display or print corresponding to the output pixels can be generated (block 1008).
The image data device 1301 can be coupled to, communicate with, or be otherwise associated with an image processing device 1302. The image processing device 1302 can include logic to process input luminance values obtained from the image data storage device 1301 in accordance with embodiments of the present invention.
The image processing device 1302 can be coupled to, communicate with, or be otherwise associated with the image data storage device 1301 and the display and/or print device 1303 by way of one or more interfaces 1302.5. The image processing device 1302 can obtain image data for processing from the image data storage device 1301 via the one or more interfaces 1302.5, for example. The interfaces 1302.5 can enable the image processing device 1302 to be coupled to, communicate with, or be otherwise associated with additional input/output devices.
Processing logic 1302.2 can include any kind of programmed or programmable logic device, such as a general purpose processor chip or an application-specific integrated circuit (ASIC). To implement processes according to embodiments of the invention, processing logic 1302.2 can execute instructions received from memory 1302.1, for instance, or can execute hard-wired logic or microcode or firmware embedded in application-specific circuits, or any combination thereof.
The image processing device can be coupled to, communicate with, or be otherwise associated with the display and/or print device 1303. After processing by processing logic 1302.2, image data can be displayed or printed on display and/or print device 1303, for example by way of one or more interfaces 1302.5. Display and/or print device 1303 can include any kind of display and/or print device. For example, display and/or print device 1303 can be a liquid crystal display (LCD) on a digital camera, or a monitor or printer associated with a personal or other computer, and the like. In particular, display and/or print device 1303 can be an LDR device, such as an 8-bit device.
The image processing system 1300 can include all or any combination of the image data storage device 1301, image processing device 302 and display and/or print device 303 in a single unit. Alternatively, components 1301, 1302 and 1303 can be separate and distributed across plural units or systems.
For example, one or more components of the image processing system 1300 can be included in a computing device (e.g., a personal computer, a laptop, a handheld computing device, . . . ), a telephone (e.g., a cellular phone, a smart phone, a wireless phone, . . . ), a handheld communication device, a gaming device, a personal digital assistant (PDA), a teleconferencing system, a consumer product, an automobile, a mobile media player (e.g., MP3 player, . . . ), a camera (e.g., still image camera and/or video camera, . . . ), a server, a network node, or the like. However, the claimed subject matter is not limited to the aforementioned examples.
Alternatively, processing logic can be embodied in circuits of the image capture device 1501 to implement components of the invention. For example, in an embodiment where the image capture device 1501 is a digital camera, the processing logic can process the HDR data and generate a corresponding display on an LDR review mode screen 1506, for example, of the camera 1501.
Components of the image processing system 1300 can be distributed in the configuration of
The subject matter disclosed herein is not limited by the examples given. In addition, any aspect or design described herein as exemplary is not necessarily to be construed as preferred or advantageous over other aspects or designs, nor is it meant to preclude equivalent exemplary structures and techniques known to those of ordinary skill in the art. Furthermore, to the extent that the terms “includes,” “has,” “contains,” and other similar words are used in either the detailed description or the claims, for the avoidance of doubt, such terms are intended to be inclusive in a manner similar to the term “comprising” as an open transition word without precluding any additional or other elements.
The aforementioned systems have been described with respect to interaction between several components. It can be appreciated that such systems and components can include those components or specified sub-components, some of the specified components or sub-components, and/or additional components, and according to various permutations and combinations of the foregoing. Sub-components can also be implemented as components communicatively coupled to other components rather than included within parent components (hierarchical). Additionally, it should be noted that one or more components may be combined into a single component providing aggregate functionality or divided into several separate sub-components, and that any one or more middle layers, such as a management layer, may be provided to communicatively couple to such sub-components in order to provide integrated functionality. Any components described herein may also interact with one or more other components not specifically described herein but generally known by those of skill in the art.
In view of the exemplary systems described supra, methodologies that may be implemented in accordance with the described subject matter will be better appreciated with reference to the flowcharts of the various figures. While for purposes of simplicity of explanation, the methodologies are shown and described as a series of blocks, it is to be understood and appreciated that the claimed subject matter is not limited by the order of the blocks, as some blocks may occur in different orders and/or concurrently with other blocks from what is depicted and described herein. Where non-sequential, or branched, flow is illustrated via flowchart, it can be appreciated that various other branches, flow paths, and orders of the blocks, may be implemented which achieve the same or a similar result. Moreover, not all illustrated blocks may be required to implement the methodologies described hereinafter.
In addition to the various embodiments described herein, it is to be understood that other similar embodiments can be used or modifications and additions can be made to the described embodiment(s) for performing the same or equivalent function of the corresponding embodiment(s) without deviating there from. Still further, multiple processing chips or multiple devices can share the performance of one or more functions described herein, and similarly, storage can be effected across a plurality of devices. Accordingly, no single embodiment shall be considered limiting, but rather the various embodiments and their equivalents should be construed consistently with the breadth, spirit and scope in accordance with the appended claims.