Contrast control apparatus and method

A contrast control apparatus includes a memory for storing input image signals within one frame and an image reducing unit for selecting at least one image signal of the input image signals. An accumulation value calculating unit calculates accumulation values for predetermined sampling gray values with respect to the selected image signal. An image characteristic decision unit determines at least one characteristic of the selected image based on the accumulation values. A contrast control function calculating unit calculates a contrast control function based on the characteristic of the selected image. A contrast controller controls contrast of the image signals stored in the memory according to the contrast control function.

CROSS-REFERENCE TO RELATED APPLICATIONS

A claim of priority is made to Korean Patent Application No. 10-2006-0073863, filed on Aug. 4, 2006, the subject matter of which is hereby incorporated by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image processing apparatus and method, and more particularly, to an apparatus and method for controlling contrast of an image signal.

2. Description of the Related Art

A variety of flat display panels, such as liquid crystal displays and plasma display panels, are widely used with recently developed electronic technology. In these flat display panels, a driving circuit applies image signals to data lines, while it sequentially drives multiple scan lines of the flat display panel to display a predetermined image. The driving circuit controls contrast of the image signals to optimize the image displayed on the flat display panel.

Examples of methods of controlling contrast of image signals include a look-up table method, a histogram sliding method and a contrast stretching method.

The look-up table method uses image signals corresponding to respective pixels as indices of arrangement, stores output image signals corresponding to input image signals in a look-up table, and outputs output signals corresponding to predetermined input image signals, thereby controlling contrast. The look-up table method requires a process of calculating an output image for each image signal in order to make a look-up table in advance, and requires a memory for storing the look-up table. Also, since the look-up table method controls contrast for a next image signal using a previous image signal, the look-up table method is difficult to apply to an image signal having a variety of changes.

The histogram sliding method obtains a histogram that has measured the number of pixels having a predetermined value on the basis of input image signals, and applies a predetermined weight on the input image signals to extend or reduce the histogram, thereby controlling contrast. However, because histogram distribution varies for each input image signal, there is a high possibility that underflow and overflow will occur. Therefore, a separate clamping circuit for preventing the underflow and overflow is required.

The contrast stretching method is suitable for projection of intermediate brightness. The contrast stretching method measures the number of pixels having the same value from input image signals to obtain a histogram, and subtracts a lowest pixel value from a current pixel value to determine weight. However, because the contrast stretching method includes a multiplier and an accumulator having a complicated structure, the contrast stretching method is difficult to apply, particularly where image signals are displayed in real-time. Also, the contrast stretching method is not suitable for processing image signals distributed on a region having high or low contrast.

SUMMARY OF THE INVENTION

An aspect of the present invention provides a contrast control apparatus having a memory, an image reducing unit, an accumulation value calculating unit, an image characteristic decision unit, a contrast control function calculating unit and a contrast control unit. The memory stores input image signals within one frame. The image reducing unit selects at least one image signal of the input image signals. The accumulation value calculating unit calculates accumulation values for predetermined sampling gray values with respect to the selected image signal. The image characteristic decision unit determines at least one characteristic of the selected image based on the accumulation values. The contrast control function calculating unit calculates a contrast control function based on the at least one determined characteristic of the selected image. The contrast controller controls contrast of the image signals stored in the memory according to the contrast control function.

The image reducing unit may include a vertical selector for selecting image signals of the input image signals in a vertical direction, corresponding to a vertical reduction ratio, as first reduction image signals. The image reducing unit may also include a horizontal selector for selecting image signals output from the vertical selector in a horizontal direction, corresponding to a horizontal reduction ratio, as second reduction signals. The vertical selector may include a first counter, operating in synchronization with a vertical synchronization signal, which outputs the first reduction image signals when a count value of the first counter is a multiple of the vertical reduction ratio. Likewise, the horizontal selector may include a second counter, operating in synchronization with a horizontal synchronization signal, which outputs second reduction image signals when a count value of the second counter is a multiple of the horizontal reduction ratio.

The accumulation value calculating unit may include comparators that receive reference signals, such that each comparator compares the reference signals with the at least one image signal and outputs a comparison signal. The accumulation value calculating unit may also include counters corresponding to the comparators, such that each counter operates in response to the comparison signal from the corresponding comparator, and outputs an accumulation value. Each reference signal may be a sampling gray value. Also, each of the counters may perform a counting operation when the comparison signal output from the corresponding comparator is a first level.

The image characteristic decision unit may determine an image characteristic accumulation value by identifying a largest difference between adjacent accumulation values output from the corresponding counters. The image characteristic decision unit may include a density calculator for calculating differences between adjacent accumulation values output from the counters, and a maximum value decision part for outputting a maximum accumulation value corresponding to a largest difference among the differences between adjacent accumulation values as an image characteristic accumulation value.

The contrast control function calculator may calculate a contrast control function, which approximates a reference function, based on the image characteristic accumulation value. The reference function may include a reference accumulation value change function with respect to a gray change for displaying an optimum image. The contrast control function calculator unit may add or subtract a compensation value to or from each accumulation value to calculate controlled accumulation values, and may calculate the contrast control function based on the controlled accumulation values. The contrast control function calculator may subtract the compensation value from the accumulation value when the accumulation value corresponding to the sampling gray value is greater than the reference accumulation value corresponding to the sampling gray value, and may add the compensation value to the accumulation when the accumulation value corresponding to the sampling gray value is less than the reference accumulation value corresponding to the sampling gray value.

The compensation value may be proportional to a difference between the image characteristic accumulation value and a reference accumulation value corresponding to the image characteristic accumulation value. Also, the compensation value may include a product of a proportional constant and a difference between the image characteristic accumulation value and a reference accumulation value corresponding to the image characteristic accumulation value. The proportional constant may be a number greater than 0 and less than 1.

The contrast control function f′(x) may be provided by the equation: f′(x)=αk′(x−REFk)+CVk′where αk′is a slope, x is an input image signal, k is one of 1, 2, 3, . . . , l, when the total number of the sampling gray values is l. CVk′is a controlled accumulation value, and REFkis a sampling gray value, where REFK≦x≦REFk+1. The slope αk′may be provided by the following equation, in which the controlled accumulation values CVk′are calculated by adding/subtracting a compensation value W to/from accumulation values CVk:

The contrast control function calculator may subtract the compensation value from the accumulation value when the accumulation value corresponding to the sampling gray value is greater than the reference accumulation value corresponding to the sampling gray value. The contrast control function calculator may add the compensation value to the accumulation value when the accumulation value corresponding to the sampling gray value is less than the reference accumulation value corresponding to the sampling gray value.

Another aspect of the present invention provides a method for controlling contrast of an image. The method includes selecting image signals within one frame of the image to provide reduction image signals; calculating accumulation values corresponding to sampling gray values set in advance with respect to the reduction image signals; determining characteristics of the image signals based on the accumulation values and selecting an image characteristic accumulation value; and calculating a contrast control function based on the selected image characteristic accumulation value. The contrast of all image signals is controlled within the one frame according to the contrast control function.

Selecting the image signals within one frame may include selecting image signals at predetermined positions within the one frame as the reduction image signals. Also, providing the reduction image signals may include selecting at least one image signal within the one frame corresponding to a vertical reduction ratio as first reduction image signals, and selecting the first reduction image signals corresponding to a horizontal reduction ratio as second reduction signals. Also, selecting the image characteristic accumulation value may include selecting an accumulation value of the calculated accumulation values that has a largest difference between an adjacent accumulation value. Calculating the contrast control function includes approximating a reference function based on the image characteristic accumulation value. The reference function may include a reference accumulation value change function with respect to a gray change for displaying an optimum image.

DETAILED DESCRIPTION OF THE EMBODIMENTS

The present invention will now be described more fully with reference to the accompanying drawings, in which exemplary embodiments of the invention are shown. The invention, however, may be embodied in various different forms, and should not be construed as being limited only to the illustrated embodiments. Rather, these embodiments are provided as examples, to convey the concept of the invention to one skilled in the art. Accordingly, known processes, elements, and techniques are not described with respect to some of the embodiments of the present invention. Throughout the drawings and written description, like reference numerals will be used to refer to like or similar elements.

FIG. 1is a block diagram of a contrast control apparatus100, according to an exemplary embodiment of the present invention. Referring toFIG. 1, the contrast control apparatus100includes an image reducing unit110, an accumulation value calculating unit120, an image characteristic decision unit130, a contrast control function calculating unit140, a memory150and a contrast control unit160.

The image reducing unit110receives image signals D_IN, for example, from an outside source. The image reducing unit110selects some (at least one) of the image signals D_IN within one frame, and outputs the selected image signals as reduction image signals D_VH to the accumulation value calculating unit120. Image signals may be selected at predetermined positions within the frame to be the reduction image signals.

The accumulation value calculating unit120obtains accumulation values CV1-CV5corresponding to sampling gray values, which are reference values REF1-REF5set in advance, of the selected reduction image signals output from the image reducing unit110. The image characteristic decision unit130determines a representative characteristic of the one frame, such as which of bright color, mid-tone color and dark color images are primarily included. The contrast control function calculating unit140calculates a contrast control function f′(x), considering the image characteristics. The memory150stores the image signals D_IN of the input frame. The contrast control unit160controls contrast of the image signals D_IN stored in the memory150according to the contrast control function f′(x) obtained by the contrast control function calculating unit140.

Generally, the contrast control apparatus100extracts some of the image signals D_IN within one frame as samples, decides characteristics of the corresponding image using the extracted sample image signals D_VH, and calculates the contrast control function f′(x) on the basis of these image characteristics. The contrast control apparatus100can improve image quality by controlling contrast of the input image signals D_IN according to the calculated contrast control function f′(x). Since some of image signals D_IN within one frame are extracted as samples to calculate a contrast control function f′(x), the construction of the contrast control apparatus100is simple, thus increasing processing speed.

FIG. 2is a block diagram illustrating a more detailed construction of the image reducing110unit illustrated inFIG. 1. Referring toFIG. 2, the image reducing unit110includes a vertical selector210and a horizontal selector220. The vertical selector210includes a counter212, and selects some (at least one) of the input image signals D_IN in a vertical direction to obtain first reduction image signals D_V. The vertical selector210outputs the first reduction image signals D_V in response to a vertical synchronization signal V_SYNC and in accordance with a vertical reduction ratio DR_V.

The horizontal selector220includes a counter222, and selects some (at least one) of the first reduction image signals D_V, output from the vertical selector210, in a horizontal direction. In an embodiment, the horizontal selector220may select all of the first reduction image signals D_V. The horizontal selector220outputs second reduction image signals D_VH in response to a horizontal synchronization signal H_SYNC and in accordance with a horizontal reduction ratio DR_H. The second reduction image signals D_VH output from the horizontal selector220are image signals reduced in the vertical and horizontal directions.

FIG. 3is a conceptual view illustrating an exemplary image signal D_IN300input to the image reducing unit110ofFIG. 1, and a corresponding second reduction image signal D_VH310output from the image reducing unit110. When the resolution is m×n, for example, one frame includes image signals corresponding to m pixels in the horizontal direction and image signals corresponding to n pixels in the vertical direction. When the vertical reduction ratio DR_V is 4 and the horizontal reduction ratio DR_H is 4, the second reduction image signal D_VH310output from the image reducing unit110has a resolution of m/4×n/4.

At this point, the counter212within the vertical selector210ofFIG. 2operates in synchronization with the vertical synchronization signal V_SYNC. The vertical selector210outputs a first reduction image signal D_V whenever a count value of the counter212is a multiple of the vertical reduction ratio DR_V, that is, 0, 4, 8, 12, . . . . Likewise, the counter222within the horizontal selector220operates in synchronization with the horizontal synchronization signal H_SYNC. The horizontal selector220outputs a second reduction image signal D_VH whenever a count value of the counter222is a multiple of the horizontal reduction ratio DR_H, that is, 0, 4, 8, 12, . . . . Therefore, in the depicted example, the resolution of the second reduction image signal D_VH belonging to one frame and output from the image reducing unit110is reduced by one sixteenth, compared to the resolution of the corresponding input image signal D_V.

FIG. 4is a block diagram illustrating a more detailed construction of the accumulation value calculating unit120illustrated inFIG. 1. The accumulation value calculating unit120includes comparators410-414, counters420-424, and registers430-434. The comparators410-414receive the second reduction image signal D_VH output from the image reducing unit110, and corresponding reference values REF1-REF5, respectively. The counters420-424are respectively connected to output terminals of the comparators410-414. The counters420-424increase a count value by one whenever a low level signal is output from the corresponding comparators410-414. The registers430-434correspond to the counters420-424, and store count values output from the corresponding counters, respectively.

When the second reduction image signal D_VH is an 8-bit signal, for example, the second reduction image signal D_VH can express 256 levels ranging from gray value 0 to gray value 255. The reference values REF1-REF5provided to the comparators410-414are sampling gray values for classifying the second reduction image signals D_VH into predetermined gray value groups. Examples of reference values provided to the comparators410-414include 16, 64, 128, 192 and 255. For example, when the second reduction image signal D_VH is a signal having a corresponding gray value of “120,” the comparators410-412output a high level comparison signal, and the comparators413-414output a low level comparison signal.

When the second reduction image signals D_VH are classified into predetermined sampling gray value groups, the count values stored in the registers430-434indicate the number of second reduction image signals D_VH contained in each respective sampling gray value group, indicated as accumulation values CV1-CV5. The accumulation values CV1-CV5are provided to the image characteristic decision unit130.

FIG. 5is a block diagram illustrating a more detailed construction of the image characteristic deciding unit130illustrated inFIG. 1. Referring toFIG. 5, the image characteristic decision unit130includes a density calculator510and a maximum value decision part520. The density calculator510calculates densities PVk, which are differences between adjacent accumulation values output by the accumulation value calculating unit120. The density PVkis calculated using Equation 1:
PVk=CVk−CVk−1(Equation 1)

Applying Equation 1 to the embodiment illustrated inFIG. 4, for example, k is one of 1, 2, 3, . . . , l, where l is the total number of sampling gray values. In the present embodiment, k is one of 1, 2, 3, 4 or 5 and corresponds to each sampling gray value REF1-REF5. CV1-CV5are the gray values provided by the accumulation value calculating unit120, and CV0(i.e., CVk−1, when k=1) is zero. Accordingly, PV1is the difference between the accumulation value CV1corresponding to gray value 16 and zero, and PV2is the difference between the accumulation value CV2, corresponding to gray value 64, and the accumulation value CV1, corresponding to gray value 16.

The maximum value decision part520of the image characteristic decision unit130determines the largest density of the densities PV1-PV5output from the density calculator510, and outputs an image characteristic accumulation value CV_MAX, which is the accumulation value corresponding to the largest density. For example, when the density PV4is the largest among of the densities PV1-PV5, the accumulation value CV4is selected as the image characteristic accumulation value CV_MAX. The contrast control function calculator140calculates a contrast control function f′(x) on the basis of the image characteristic accumulation value CV_MAX provided by the image characteristic decision unit130.

FIG. 6Ais a histogram of an exemplary second reduction image signal D_VH output from the image reducing unit110.FIG. 6Bis an accumulated distribution diagram illustrating accumulation values (e.g., CV1-CV6) obtained by accumulating the second reduction image signals D_VH ofFIG. 6Awith respect to each of the predetermined sampling gray values. An accumulation distribution function f(x) for the accumulation values illustrated inFIG. 6Bis obtained using linear interpolation, as illustrated inFIG. 6C, for example.

The slopes of the accumulation distribution function f(x) between adjacent sampling gray values may be different from each other. Equation 2 represents an equation for obtaining a slope αkbetween adjacent sampling gray values to calculate the accumulation distribution function f(x):

In Equation 2, k is one of 1, 2, 3, 4 or 5, corresponding to the sampling gray values, respectively, CVkare accumulation values and REFkare reference values, as discussed above. REF0is 0, and CV0is 0.

The equation for obtaining the accumulation distribution function f(x) illustrated inFIG. 6Cis provided by Equation 3:
f(x)=αk(x−REFk)+CVk, REFk≦x≦REFk+1(Equation 3)

In Equation 3, x is a gray value of the second reduction image signal D_HV.

FIG. 6Dis a view illustrating an exemplary contrast control function f′(x), which is a mapping function obtained by the contrast control function calculating unit140within the contrast control apparatus100, according to an embodiment of the present invention. Referring toFIG. 6D, an ideal image has a reference function fref(x) characteristic according to which image signals having various brightnesses are uniformly distributed, so that the gray values are proportional to the accumulation values. However, a real image typically has a distribution according to which image signals having various brightnesses may be irregularly distributed, or many image signals having predetermined brightnesses an be represented as illustrated inFIG. 6C.

In the example depicted inFIG. 6C, the difference between the accumulation value CV3corresponding to gray value 128 and the accumulation value CV4corresponding to gray value 192 is large, indicating that many of the image signals have relatively bright brightnesses. That is, a density PV4has the largest value. In this case, a brightness of the image signals corresponding to a relatively dark brightness is controlled to be brighter and a brightness of the image signals corresponding to a relatively bright brightness is controlled to be darker, improving the contrast of the image.

As described above, the contrast of an input image can be improved by determining a characteristic of the input image and obtaining a contrast control function according to the determined characteristic of the input image. Equation 4 below is an equation for obtaining a controlled slope α′ to obtain a contrast control function:

In Equation 5, k′=1, 2, 3, 4 or 5, and β is a proportional constant where 0≦β≦1. REF_MAX is a value corresponding to an image characteristic CV_MAX, i.e., fref(CV_MAX), in a reference function fref(x), which is an ideal image function, as illustrated inFIG. 6D. Controlled accumulation values CV1′-CV5′can be obtained by adding or subtracting a compensation value W to or from accumulation values CV1-CV5, respectively. The compensation value W is proportional to a difference between the image characteristic value (CV_MAX) and a reference value (REF_MAX) of the reference function that corresponds to the image characteristic value.

More particularly, controlled accumulation values CVk′are obtained by subtracting a compensation value W from an accumulation value CVk(i.e., CVk−W) when the accumulation value CVkcorresponding to sampling gray value REFkis greater than an accumulation value in a reference function fref(k). On the other hand, controlled accumulation values CVk′can be obtained by adding the compensation value W to the accumulation value CVk(i.e., CVk+W) when the accumulation value CVkcorresponding to sampling gray value REFkis smaller than the accumulation value in a reference function fref(k).

A contrast control function f′(x) can be calculated using Equation. 6, according to a controlled slope α′ obtained by Equation 4:
f′(x)=αk′(x−REFk)+CVk′, REFk≦x≦REFk+1(Equation 6)

Comparison ofFIG. 6CwithFIG. 6Dshows that the accumulation distribution function f(x) illustrated inFIG. 6Chas been changed to a contrast control function f′(x) illustrated inFIG. 6D, which is closer to the reference function fref(x), thus approximating the reference function fref(x).

The function f′(x), obtained by the contrast control function calculating unit140, is provided to a contrast control unit160. The contrast control unit160converts the input image signals D_IN stored in the memory150to output image signals DOUT, using the contrast control function f′(x).

The contrast control apparatus100according to the present embodiment extracts some of the image signals D_IN belonging to one frame to obtain second reduction image signals D_VH, as discussed above. Because a contrast control function f′(x) can be calculated on the basis of fewer than all of the image signals within the frame, the time required for calculating the contrast control function f′(x) is shortened. Therefore, the contrast control function f′(x) can be calculated in real-time with respect to input image signals D_IN.

The accumulation value calculating unit120ofFIG. 4calculates accumulation values using predetermined sampling gray values, instead of calculating accumulation values for all gray values (e.g., 256 gray values) corresponding to the number of bits of an image signal. Therefore, because the accumulation value calculating unit120requires only a minimum number of the comparators410-414, counters420-424and registers430-434, a circuit area is reduced.

Referring toFIGS. 6C and 6D, because accumulation values for the remaining gray values, located between sampling gray values, can be obtained using linear interpolation, the number of operations required for calculating accumulation values corresponding to the remaining gray values is not very large.

Because the contrast control function f′(x) can be obtained to approximate the reference function fref(x), the contrast of an image is improved. Also, the reference function fref(x) and β required for obtaining the contrast control function f′(x) can be set by a user to express an optimum image.

FIG. 7is a flowchart illustrating a method for controlling contrast according to an exemplary embodiment of the present invention.

Referring toFIG. 7, a reduction image signal D_VH corresponding to an original input signal D_IN is input in operation700. When the input image signal D_IN has resolution of m×n, one frame includes image signals corresponding to m pixels in the horizontal direction and image signals corresponding to n pixels in the vertical direction. When a vertical reduction ratio is DR_V is 4 and a horizontal reduction ratio DR_H is 4, for example, a corresponding second reduction image signal D_VH has resolution of m/4×n/4.

Accumulation values for predetermined sampling gray values are obtained in operation710. For example, when the bit width of an input signal D_IN is 8 bits, accumulation values corresponding to five sampling gray values of 16, 64, 128, 192 and 255 in total can be obtained.

In operation720, a characteristic of the image is determined based on accumulation values corresponding to reference sampling gray values. For example, an accumulation value having the largest difference between itself and an adjacent accumulation value indicates that the image contains a large number of the corresponding sampling gray value. It is therefore considered that the accumulation value having the largest difference between itself and an adjacent accumulation value best represents the characteristic of the image, and thus that accumulation value is selected as an image characteristic accumulation value CV_MAX.

The contrast control function f′(x) is obtained on the basis of the image characteristic accumulation value CV_MAX in operation730. The contrast of input image signal D_IN is controlled according to the contrast control function f′(x) in operation740.

According to the present invention, a contrast control function can be obtained through a minimum number of operations. Also, since the contrast control function can be varied depending on a characteristic of an image, image quality improves.