Contrast adjustment is an important feature in many products and applications that process media content. Contrast adjustment techniques aim to emphasize differences in the visual properties of an image to make objects in the image distinguishable from each other and their background.
Contrast adjustment techniques typically involve the application of a transformation function that maps input pixel values to output pixel values. The transformation function aims to generate desired characteristics for the output pixel values. Such desired output pixel characteristics are commonly expressed in the form of a histogram (also referred to as a target histogram).
A transformation function can be automatically determined from the histogram information of an input image and the histogram information of its corresponding transformed output image. Despite this, challenges exist in properly specifying a target histogram for a transformed output image such that a visually pleasurable output image can be expected.
In the drawings, like reference numbers generally indicate identical, functionally similar, and/or structurally similar elements. The drawing in which an element first appears is indicated by the leftmost digit(s) in the reference number. The present invention will be described with reference to the accompanying drawings, wherein:
Reference throughout this specification to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Thus, appearances of the phrases “in one embodiment” or “in an embodiment” in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Embodiments provide approaches that characterize any input image based on its pixel value characteristics. For example, an input image represented by pixels in YUV color space may be characterized based on its Y (brightness) histogram distribution.
More particularly, such an input histogram may be classified into different distribution types. Exemplary distribution types include (but are not limited to) non-sparse, evenly-sparse, and non-evenly-sparse. From such a classification (e.g., from the category label of its Y histogram), a target histogram distribution for a corresponding output image (i.e., a contrast-adjusted transformation of the input image) may be specified. With the target histogram of the output image specified, a transformation function may be derived that maps input image brightness values (e.g., Y values) to output image brightness values (e.g., Y values).
Moreover, embodiments may smooth temporal transitions of such transformation functions. This may be based on various factors, such as history information and a confidence score of the corresponding content (or input image) classification. Such temporal smoothing may provide advantages, such as a reduction in flickering associated with video data.
Integrated Device Technology, Inc. provides an image testing capability called the HQV Benchmark version 2.0. The HQV Benchmark 2.0 involves video clips and test patterns that have been specifically designed to evaluate and score various video signal processing tasks. In embodiments, a full score provided by the HQV 2.0 benchmark may be achieved when contrast enhancement is performed according to the techniques described herein.
Conventional contrast adjustment techniques employ an approach called histogram equalization. Histogram equalization automatically determines a transformation function that produces an output image having a uniform histogram that equalizes every input histogram distribution. Unfortunately, this approach can lead to undesirable results for certain images, especially those with sparse distribution histograms.
These examples show that, although histogram equalization can produce visually vivid output images (e.g., as in
Such drawbacks of histogram equalization may be overcome by the techniques described herein. These techniques may determine a classification category for an input image, and select a target brightness histogram corresponding to the determined classification category. From this, a transformation function may be obtained. Moreover, the transformation function may be temporally smoothed. Such smoothing may be employed in contexts involving a sequence of images, such as video frames.
In embodiments, the elements of
As shown in
Input image 520 and output image 522 may each include values for multiple pixels. These values may be represented as YUV color space coordinates. However, other pixel value representations (e.g., Y′UV color space coordinates) may be employed.
Histogram generation module 502 receives input image 520. In turn, histogram generation module 502 generates an input brightness histogram 530 pertaining to the brightness values (or Y values) of input image 520. In embodiments, this histogram is a normalized cumulative histogram. Details regarding an exemplary generation of such a normalized cumulative brightness histogram 530 are provided below.
As shown in
In turn, target histogram specification module 506 determines a corresponding target histogram 534 for output image 522.
Transformation function generation module 508 produces a transformation function for the generation of output image 522 from input image 520. This may be based at least on the determined output histogram (e.g., as specified by indication 534). Further, production of this transformation function may also be based on histogram 530. This transformation function is sent to temporal smoothing module 510 (as unsmoothed transformation function 536).
Upon receipt, temporal smoothing module 510 may perform smoothing operations on unsmoothed transformation function 536. This produces a smoothed transformation function 538, which is sent to transformation function application module 512.
As described herein, embodiments may generate a brightness histogram of an input image. For example, in the context of
For a B-bit YUK image I spanning in the range of [0, 2B−1], an N-bin, equally spaced Y histogram may be denoted as h[k]. The normalized cumulative histogram of I, hc[k], can be calculated as expressed in Equation (1) below.
In the context of
From this histogram, embodiments may determine a corresponding output histogram (also referred to as a target histogram). This involves categorizing the input image based on characteristics of the input image's histogram.
More particularly, the inventors have discovered that improved contrast adjustment results may be achieved by separately performing histogram specification over different categories of input histograms. For instance, three main categories of input histograms may be employed: non-sparse, evenly-sparse, and non-evenly-sparse.
Non-sparse histograms refer to histograms having relatively-flat distributions. Evenly-sparse histograms refer to histograms having two (or two clusters of) comparable dominant bins which are substantially separated from each other. Non-evenly-sparse histograms refer to histograms with non-comparable dominant bins that are substantially separated from each other.
To distinguish between these three types of distributions, embodiments may employ an indicator that quantifies a level of sparseness of a histogram. This indicator is referred to herein as a Histogram Separation Ratio (HSR). The HSR may be derived from the information of the second derivative of the normalized cumulative input histogram, expressed below in Equation (2).
h″c[k]=hc[k+1]+hc[k−1]−2hc[k], k=1, . . . , N−2 (2)
Derivation of the HSR from the normalized cumulative input histogram is described below with reference to Equations (3) through (6).
where M is the maximum value of h″c[k]. Assuming
the sequence representing the interval between impulses in tc[k], is calculated as expressed in Equation (4).
dc[k]=lr[k+1]−lr[k]. kεint. (4)
lr in the above equation is the sorted version of l in an ascendant way. Based on Equation (2) to Equation (4), HSR may be defined in accordance with Equation (5).
In Equation (5), BW is the estimated dynamic range of I. BW may be calculated, as expressed below in Equation (6).
Based on the HSR determined by Equation (5), a classification, c, of the input histogram may be determined, as expressed below in Equation (7-1).
with:
p1=max(hc[k]|klower ≦k≦kl
p2=max(hc[k]|kl
kl
In the context of
Denoting the result of an image I after contrast adjustment is applied on it as Iout, the Y histogram of Iout as t[k], can be calculated as the formula in Equation (1).
Instead of directly specifying tc[k] for I, we utilize a five points Piece Wise Linear Function (PWLF) controlled by the category label of I as an approximation of tc[k] to implicitly specify t[k]. The five anchor points (i.e., (pnt,tcs[pnt])) constructing an approximated tc[k] for each type of input content is derived as
kps1, kps2, and kps3 in Eq. (8-1) are sorted version of indices correspond to the three dominant peaks in h[k] in an ascendant way.
rhist
In the above equations, rhist
With the target normalized cumulative histogram (i.e., tc[k]) specified for different types of input content, the transformation function F mapping the input Y value to the output Y value (i.e., F:k→kout) can be derived from the following concept.
Hc:k→hc[k], Tc:kout→tc[kout]=>F[k]=Hc−1Tc[kout]. (9-7)
One can realize that Hc and Tc are exactly the same functions calculating the normalized cumulative histogram presented in Equation (1). Since a five-point PWLF is utilized to approximate tc[k], the resulting transformation function is also a five-point PWLF where the sampling points are expressed below in Equation (9-8).
Fs[k]=Hc−1Tcs[kout], koutεpnt. (9-8)
As described above, embodiments may perform temporal smoothing of transformation functions.
For instance, when performing contrast adjustments on video data, operations described herein (e.g., content classification, target histogram specification, and transformation function determination) are applied to every video image (frame). However, instead of applying the transformation function F[k] instantly on every video frame, embodiments may employ a smoothing transformation function Ffinal[k], which incorporates temporal smoothing. Also, such smoothing may be based on a confidence level of the content classification. This may advantageously eliminate any possible flickering.
The confidence score of the classification of an input Y histogram may be calculated, as expressed below in Equation (10).
With γε(0,1).
Denoting the transformation function applied on the video frame at time t as Ft
Ft
In Equation (11), βε(0,1) is a factor adaptive to the difference between Ft
At a block 702, an input image is received. This input image has a plurality of pixel values. Each of the pixel values is encoded according to a color space having a brightness component. For example, a YUV color space may be employed. Embodiments, however, are not limited to this color space.
An input brightness histogram of the input image is generated at a block 704. As described herein, this may be a normalized cumulative brightness histogram.
Based at least on the brightness histogram, a classification category for the input image is determined at a block 706. The determination may be from multiple classification categories. For instance, as described herein, the multiple categories may include a non-sparse category, an evenly sparse category, and a non-evenly sparse category.
At a block 708, a target brightness histogram is specified. This target histogram corresponds to the determined classification category of the input image. From this, a transformation function is determined at a block 710. This determination is based at least on the input brightness histogram and the target brightness histogram.
At a block 712, the transformation is smoothed.
At a block 714, the transformation function is employed to produce an output image from the input image.
As described above, an indicator, such as the aforementioned HSR, may be employed in the classification of input images. For instance, an HSR may be used to analyze the level of sparseness of a histogram distribution. An illustrative example involving an HSR is provided in the graphs of
In embodiments, the elements of
Contrast adjustment module 902 performs contrast adjustment techniques, as described herein. Accordingly, content adjustment module 902 may include elements of
These input and output images may be received from or sent to various entities. Such entities may include any combination of communications media 904, storage media 906, image encoding/decoding module 908, and/or image input device 910.
Communications media 904 may include any combination or wired and/or wireless media that may convey information. Examples of such media include (but are not limited to) wireless communications networks, wired communications networks, optical networks/interfaces, computer bus systems, computer interfaces (e.g., serial and/or parallel interfaces), and so forth.
In embodiments, storage media 906 may store input images and/or output images. Storage media 906 may include various tangible (e.g., electronic, optical, magnetic, etc.) media that may store information. Such media may include (but is not limited to) memory, disk drives, optical storage devices, and so forth.
Further, storage media 906 may store control logic or instructions (e.g., software) that may cause a processor (e.g., a microprocessor) to perform the techniques described herein. Thus, such a processor (for instance, a CPU, a graphics processor, microcontroller, ASIC, etc.) may provide the features of contrast adjustment module 902.
Also, storage media 906 may store operational data. Such data may be associated with the techniques described herein. Examples of such operational data include (but are not limited to) threshold values, predetermined target historgrams corresponding to various content classification categories, parameters, constants, etc.).
Image encoding module 908 may encode image data into a format that is acceptable to contrast adjustment module 902. Such a format may involve encoding pixels using a color space having a brightness component (e.g., a YUV color space).
Image input device 910 may include one or more sensors (e.g., camera(s)) that generate image data from incident radiation (e.g., incident light). In turn, such image data may be provided as input image(s) to content adjustment module 902 for contrast adjustment. Alternatively, such image data may be first provided to image encoding/decoding module 908 for encoding into a format that may be accommodated by contrast adjustment module 902 (e.g., a format employing a YUV color space).
Image output device 912 may visually display output images (e.g., images received from contrast adjustment module 902) to a user. In embodiments, image output device 912 may include a display device that provides a visual output to a user. Exemplary display devices include (but are not limited to) liquid crystal displays (LCDs), light emitting diode (LED) displays, plasma displays, cathode ray tube (CRT) displays, and so forth.
The techniques described herein have been applied to complete the contrast enhancement task specified in the HQV2.0 benchmark.
These images demonstrate that specifying target histograms based on the input content not only leads to visually pleasant results, but also fulfills various requirements listed in the HQV 2.0 Benchark. For example, overall contrast is expanded in the adjustments of
As described herein, various embodiments may be implemented using hardware elements, software elements, or any combination thereof Examples of hardware elements may include processors, microprocessors, circuits, circuit elements (e.g., transistors, resistors, capacitors, inductors, and so forth), integrated circuits, application specific integrated circuits (ASIC), programmable logic devices (PLD), digital signal processors (DSP), field programmable gate array (FPGA), logic gates, registers, semiconductor device, chips, microchips, chip sets, and so forth.
Examples of software may include software components, programs, applications, computer programs, application programs, system programs, machine programs, operating system software, middleware, firmware, software modules, routines, subroutines, functions, methods, procedures, software interfaces, application program interfaces (API), instruction sets, computing code, computer code, code segments, computer code segments, words, values, symbols, or any combination thereof.
Some embodiments may be implemented, for example, using a storage medium or article which is machine readable. The storage medium may store an instruction or a set of instructions that, if executed by a machine, may cause the machine to perform a method and/or operations in accordance with the embodiments. Such a machine may include, for example, any suitable processing platform, computing platform, computing device, processing device, computing system, processing system, computer, processor, or the like, and may be implemented using any suitable combination of hardware and/or software.
As described herein, embodiments may include storage media or machine-readable articles. These may include, for example, any suitable type of memory unit, memory device, memory article, memory medium, storage device, storage article, storage medium and/or storage unit, for example, memory, removable or non-removable media, erasable or non-erasable media, writeable or re-writeable media, digital or analog media, hard disk, floppy disk, Compact Disk Read Only Memory (CD-ROM), Compact Disk Recordable (CD-R), Compact Disk Rewriteable (CD-RW), optical disk, magnetic media, magneto-optical media, removable memory cards or disks, various types of Digital Versatile Disk (DVD), a tape, a cassette, or the like. The instructions may include any suitable type of code, such as source code, compiled code, interpreted code, executable code, static code, dynamic code, encrypted code, and the like, implemented using any suitable high-level, low-level, object-oriented, visual, compiled and/or interpreted programming language.
While various embodiments of the present invention have been described above, it should be understood that they have been presented by way of example only, and not in limitation.
Accordingly, it will be apparent to persons skilled in the relevant art that various changes in form and detail can be made therein without departing from the spirit and scope of the invention. Thus, the breadth and scope of the present invention should not be limited by any of the above-described exemplary embodiments, but should be defined only in accordance with the following claims and their equivalents.
Number | Name | Date | Kind |
---|---|---|---|
7176965 | Noguchi | Feb 2007 | B1 |
7319787 | Trifonov | Jan 2008 | B2 |
7885462 | Paik | Feb 2011 | B2 |
20040258324 | Liang et al. | Dec 2004 | A1 |
20080316334 | Lee | Dec 2008 | A1 |
20100080459 | Dai et al. | Apr 2010 | A1 |
20120275700 | Stern et al. | Nov 2012 | A1 |
Entry |
---|
PCT International Search Report and Written Opinion issued in corresponding PCT/US/2011/066766 dated Sep. 14, 2012, (10 pages). |
Number | Date | Country | |
---|---|---|---|
20120250988 A1 | Oct 2012 | US |