System and method for contrast extension adjustment and overflow compensation of image signal

Information

  • Patent Application
  • 20070297690
  • Publication Number
    20070297690
  • Date Filed
    June 14, 2007
    17 years ago
  • Date Published
    December 27, 2007
    17 years ago
Abstract
This invention provides a system and method for image signal contrast extension and overflow compensation. The system includes contrast extension and overflow compensation look-up tables, an image gray level boundary determining unit, a contrast extension unit, an overflow judging unit, and an overflow compensation unit. The image gray level boundary determining unit defines a maximum and a minimum among the gray levels of the pixels of an image signal and calculates the difference. The contrast extension unit selects corresponding parameter from the contrast extension table for contrast extension of a given image pixel. The overflow judging unit judges whether the pixels are overflowed. The overflow compensation unit compensates the pixel. When a pixel is overflowed, the overflow compensation unit selects, according to the gray level of the pixel, a corresponding overflow compensation parameter to reduce the gray level to overcome the problem of overflow.
Description

BRIEF DESCRIPTION OF THE APPENDED DRAWINGS


FIG. 1 is a system context diagram of the contrast extension and the overflow compensation of an image signal according to the invention.



FIG. 2 is a module context diagram of a method for contrast extension according to the invention.



FIG. 3 is a schematic diagram of an overflow compensation look-up table when a single color is inputted according to the invention.



FIGS. 4A through 4D are schematic diagrams showing the overflow compensation calculation for the inputting of many colors.



FIG. 5 is a module context diagram of the method for overflow compensation according to the invention.



FIG. 6 is a schematic diagram of the result of the overflow compensation calculation when a single color is inputted according to the invention.



FIG. 7 is a schematic diagram of the result of the proportion of three colors prior to and after overflow compensation calculation on the three inputted colors.



FIG. 8 is a flowchart of the method for contrast extension and overflow compensation of an image signal.





DETAILED DESCRIPTION OF THE INVENTION

Referring to FIG. 1, FIG. 1 is a system context diagram of the contrast extension and the overflow compensation of an image signal according to the invention. Generally speaking, after the system 20 for contrast extension and the overflow compensation of the image signal, according to the invention, is connected to an image signal preprocessing unit 10, the preprocessing image signal unit 10 is used for performing a corresponding image preprocessing function on an image 18. Usually, an image signal includes a predetermined number of bits for recording the gray scale value of the pixel. Assuming that a set of 8-bit image signals 18 are inputted into the image signal preprocessing unit 10 for increasing processing quality and precision, the set of 8-bit image signals becomes a set of 10-bit image signals 19 after the set of 8-bit image signals 18 is processed by a corresponding image signal preprocessing function and a color adjustment; however, the gray scales of the set of 10-bit images are very likely to drop or to overflow into 11 bits. Under this circumstance, the contrast extension and overflow compensation of the image signal, according to the invention, is required.


The image signal preprocessing unit 10 is used for processing and calculation. The most commonly seen image processing and calculation is on brightness, contrast, hue, saturation, image enhancement, color adjustment, and any combination of the ones described. It can also be the processing and calculation on any possible reduction or overflow of the gray scale value of the pixel. Hence, the image signal preprocessing unit 10, for example, includes a brightness adjustment unit 12, a contrast adjustment unit 13, a hue adjustment unit 14, a saturation adjustment unit 15, an image enhancement unit 16, and a color adjustment unit 17.


The system 20 for contrast extension and the overflow compensation, according to the invention, mainly includes an image signal contrast extension module 222 and an image signal overflow compensation module 22. Overall functions of the two modules can be briefly described in the following. Component properties, parameter settings, decayed transmission, decayed dissection, suppression of noisy signals, and different types of image signal processing (e.g. adjustments on brightness, contrast, hue, and saturation, image enhancement, and color adjustment processing) all affect the range of the image gray scales, causing the image gray scale not being able to completely utilize the 256 gray scales; it also causes the dynamic range of the image signal to decrease, the brightness of color levels to lower, and the contrast to be poorer. Thus, a “contrast extension” function is added after each preprocessing to expand the dynamic range of the gray scale of the image signal, so that the brightness range of the image is expanded to increase the brightness, the contrast, and the image quality. Furthermore, each type of preprocessing of the image signal (e.g. adjustments on brightness, contrast, hue, and saturation, image enhancement, and color adjustment processing) and contrast extension processing are all likely to make the image gray scale overflow, causing a large area of saturated transparency. Because the image signal exceeds the displayable gray scales, the image that has an originally distinguishable brightness and distinct color levels can no longer be distinguished. Thus, an “overflow compensation” function is needed for adjustment, making the gray scale that is originally overflowed to adequately drop, maintaining the original proportion of the three colors of the image signal, restoring the original brightness levels, and maintaining the original color correctness.


The image signal contrast extension module 222 mainly includes a memory 230 and an image signal processor 240. The memory 230 therein stores a predetermined contrast extension look-up table 232, which includes a plurality of contrast extension parameters, such as contrast extension offset values 234 and contrast extension gain values 236. The image signal processor 240, including an image gray scale boundary determining unit 242 and a contrast extension unit 244, is used for receiving an image signal 19 including a plurality of pixels and subsequently processing the pixels of the image signal 19. The pixels of the image signal 19 include a predetermined number of bits (for example, the image signal 19 is a 10-bit signal or overflowed into an 11-bit signal) for recording the gray scale value (0-1023) of the pixel. The image signal 19 can be a single-colored black-and-white image signal or a colored image signal. If the image signal 19 is a colored image signal, each of the pixels respectively includes a red, a green, and a blue gray scale value. Unless noted particularly, the specifications below use the most commonly seen color image signals as examples for illustration. The image gray scale boundary determining unit 242 is used for determining the maximum value and the minimum value of the image. The contrast extension unit 244 is used for processing the gray scale value of the image signal by contrast extension. The image gray scale boundary determining unit 242 is used for determining the pixels of the image signal, and from which determining a maximum value (MAX) and a minimum value (MIN) to calculate a difference (DIFF). After the image gray scale boundary determining unit 242 defines or determines the maximum value (MAX) and the minimum value (MIN) of the image, the contrast extension unit 244 selects, according to the maximum gray scale value and the minimum gray scale value, parameters like the corresponding contrast extension offset value 234 and the contrast extension gain value 236 from the contrast extension look-up table 232, so as to calculate the new gray scale value of each of the pixels of the image to adjust the contrast extension on the pixels to reach the effect of a contrast enhancement.


The image signal overflow compensation module 22 includes a memory 30 and an image signal processor 40. The memory 30 therein stores a predetermined overflow compensation look-up table 32, which includes a plurality of overflow compensation parameters 34. The content of the overflow compensation parameters 34 are described in details in FIG. 1 and relevant descriptions. The image signal processor 40 also includes an overflow judging unit 42 and an overflow compensation unit 44. The overflow judging unit 42 is used for judging, according to the gray scale value of the pixel, whether the pixel of the image signal 119 is overflowed. After the image signal 119 is processed by the image signal preprocessor 10 and/or the image signal contrast extension module 222, it is very likely to result in the gray scale value (for example, the gray scale value becomes 1030) of the pixel exceeding the range of the gray scale value (0-1023) defined by the predetermined number of bits (e.g. 10 bits). When the situation described above occurs, the overflow judging unit 42 judges whether the pixel is overflowed, and then the overflow compensation unit 44, according to the invention, is required to be used for compensating and adjusting the pixels of the image signal 119. The overflow judging unit 42 usually judges the level of the overflow of each of the pixels of the received image signal 119, and the overflow compensation unit 44 only adjusts the gray scale value of a pixel when the overflow judging unit 42 judges that a pixel of the image signal 119 is overflowed. The gray scale values of the other pixels, if not judged to be overflowed, remain unchanged. It is also mentioned here for the sake of convenience in FIG. 1, the memories 30 and 230 and the image signaling processors 40 and 240 are drawn separately; however, they can be combined together to execute their predetermined functions in a practical circuit under the practical considerations of cost, design, and assembling, and they not necessarily required to be separated.


When the overflow judging unit 42 judges that a pixel of the image signal 119 is overflowed, the overflow compensation unit 44 selects, according to the gray scale value of the current input pixel, the corresponding overflow compensation parameter 34 from the overflow compensation look-up table 32, so as to lower the gray scale value of the pixel to overcome the problem of overflow. In the case of a colored image signal, if one of the red, green, or blue gray scale values of a pixel exceeds the predetermined number of bits, the overflow judging unit 42 judges if the pixel is overflowed; the overflow compensation unit 44 then selects, according to the maximum among the red, green, and blue gray scale values, the corresponding overflow compensation parameter 34 from the overflow compensation look-up table 32 to proportionally lower the red, green, and blue gray scale values, so that the color performance of the pixel remains substantially the same as prior to the overflow compensation.


Referring to FIG. 2, FIG. 2 is a module context diagram of a method for contrast extension according to the invention. The method for contrast extension of an image signal, according to the invention, is usually used after the preprocessing of an image signal is completed. These functions, for example, include a brightness adjustment function, a contrast adjustment function, a hue adjustment function, a saturation adjustment function, an image enhancement function, and a color adjustment function. They are respectively performed by each corresponding unit 12-17 in the image signal preprocessor 10. In the method for contrast extension of the image signal according to the invention, the required parameters, such as a contrast extension offset value 234 and a contrast extension gain value 236, from the contrast extension look-up table 232 are first stored in the memory 230. However, the pixels of the received image signal are determined to define the maximum value (MAX) and minimum value (MIN), and a difference (DIFF) between the maximum value and the minimum value is calculated.


There are many defining methods for defining the maximum value (MAX) and the minimum value (MIN), and they can be adjusted according to practical situations. For example, the maximum among the gray scale values of all of the pixels of the image signal can be used as the maximum value (MAX), whereas the minimum among the gray scale values of all of the pixels of the image signal can be used as the minimum value (MIN). In order to avoid interruption by noisy signals, another method can be performed to first truncate the maximum and minimum among the gray scale values of all the pixels of the image signal, and the gray scale values of all of the remaining pixels of the image signal can form a histogram. Thus, the average value of the top 5% of the gray scale values is the maximum value (MAX), whereas the average value of the bottom 5% of the gray scale values is the minimum value (MIN).


Then, the contrast extension look-up table 242 is looked up in accordance with the minimum value (MIN) and the difference (DIFF), and the corresponding contrast extension gain value and the corresponding contrast extension offset value are selected. Afterwards, the contrast extension on each of the pixels of the image signal 19 is adjusted according to the following formula: gray scale value of the adjusted pixel=a selected corresponding contrast extension gain value*(a raw gray scale value of the pixel−a selected corresponding contrast extension offset value).


Using an embodiment of the invention as a specification, the image gray scale boundary determining unit 242 determines the maximum and the minimum of the image signal 19 received sequentially (or to truncate the maximum gray scale value and the minimum gray scale value, and to adapt the values of the bottom 5% and the top 5% of the histograms to avoid interruption by noisy signals) to confirm the maximum gray scale value, Tm, and the minimum gray scale value, Tn, of an image and to calculate their difference Td=Tm−Tn. The corresponding contrast extension offset value 234 and the contrast extension gain value 236, according to the Tn value and Td value, is looked up from the contrast extension look-up table 232. The raw gray scale values of all of the pixels of the images are subtracted by the looked-up offset value 234, and differences are then multiplied by the looked-up gain value 236 to complete the process of contrast extension on the image signal. The subtractions and multiplications here can be calculated by using a subtractor 237 and a multiplier 238 of the contrast extension unit 244. Hence, a contrast-extended image signal 119 can be obtained.


Using an 8-bit image as an example, if the image gray scale boundary determining unit 242 confirms that the Tm value and Tn value of the image are 200 and 30 respectively, then Td is 170. If the offset value and the gain value of the image are 10 and 1.2 respectively after looking up the look-up table, then the new gray scale is Gray′=Gain*(Gray-Offset). The gray scale value of each of the pixels of the image is calculated using the formula to obtain a new gray scale value. Hence, the raw ratio is 200/30 (=6.67), and the new ratio is 228/24 (=9.5). The ratio is increased by as much as 42.5%. The stored offset value 234 and gain value 236 in the contrast extension look-up table 232 can be adjusted flexibly in accordance with practical needs when using the display. The only thing that needs to pay attention to is that the value should only be adjusted adequately to avoid unreality caused by over-extension of the image.


Referring to FIG. 3, FIG. 3 is a schematic diagram of an overflow compensation look-up table 32 when a single color is inputted according to the invention. In FIG. 3, the overflow compensation look-up table stored in the memory 30 can include a plurality of columns for recording different overflow compensation parameters. The overflow compensation parameters here are used for expressing a generic term, and the embodying specification of the generic term can be overflow compensation parameters, output gray scale values, or the combination thereof. In the overflow compensation look-up table 32, the column 35 “current input gray scale value (11-bits) (P)”, the column 36 “overflow compensation gain value”, and column 38 “compensated output gray scale value (10-bits) (P*Gain)” are typical columns shown in FIG. 2. These columns can be added or partially abbreviated in regards to practical needs. As long as the function of overflow compensation can be achieved, there are no fixed formats. For the sake of convenience in illustrating the embodiment, the column 33 “current input gray scale value (8-bit)”, the column 31 “raw output gray scale value (10-bit)”, and the column 37 “compensated output gray scale value (18-bit) (P*Gain)” are added. In practice, for the sake of saving capacity of the memory 30, the columns are not necessarily required; thus, the function and the effect of the invention is totally unaffected if they are abbreviated.


The overflow compensation gain value differs by the extent of the overflow of the corresponding pixel. In equivalence, the gain value lower than 1.0 causes the output gray scale value to drop after the input gray scale value with saturated overflow is multiplied by the gain value lower than 1.0. Besides using the overflow compensation gain value, the relationship between the current input gray scale value and the compensated corresponding output gray scale value can be directly defined in the overflow compensation look-up table 32, wherein the corresponding output gray scale value can be obtained by experiments first. That is, the ranges of the input gray scales which can generate saturated overflows are found first by experiments (such as 1024-1031 and 1032-1036 shown in FIG. 2), and overflow compensation calculations are performed on different input gray scale values. The overflow compensation gain value (254/256) is selected by the range of the input gray scale value (1024/1031) in the first stage, thus obtaining the corresponding output gray scale value range (1016.0-1022.9); then, the overflow compensation gain value (252/256) is selected by the range of the input gray scale value (1032-1036) in the second stage; thus, the range of the corresponding output gray scale value is (1015.9-1019.8). The relationship between input and output, as shown in FIG. 3, is obtained by selecting different compensation gain values using dissecting. This is a nonlinear correlation, and the advantage of such is that the output level in each section becomes more distinct. If this consideration is not important in a practical embodiment of the invention, the same overflow compensation value can be easily selected without dissecting to obtain the linear output gray scale value corresponding to a linearity. Under the premise of not violating the spirit of the invention, how to obtain the relationship between input and output depends on how many ways and how much flexibility an individual case needs to lower the maximum input gray scale value, which generates a saturated overflow, to fall within a predetermined number of bits of the image signal, so as to effectively overcome the problem of overflow and to restore the original brightness level of the image.


Referring to FIGS. 4A through 4D, FIGS. 4A through 4D are schematic diagrams showing the overflow compensation calculation of the inputting of many colors. For a color display system, color correctness is very important. Traditional overflow processing only compensates the color of the overflow, and this causes the proportion of the three basic colors to differ from the proportion of the original three colors, which causes abnormality in colors. The method for overflow compensation of an image, according to the invention, processes the three colors of the same pixel in the same way, so that the proportion of the three colors prior to or after the processing will not change. Besides restoring the original brightness levels, a correct color performance can also be ensured.


The columns shown in FIG. 4A include the column 202 “current input gray scale value (11-bit) (P)”, the column 204 “current input gray scale value (8-bit) (P)”, the column 206 “traditional output gray scale value (10-bit)”, the column 208 “overflow compensation gain value”, and the column 210 “compensated output gray scale value according to the invention (P*Gain) (10-bit)”. The column 202 in FIG. 4A shows the current image signal with the three inputted colors (R, B, G) and the corresponding maximum value (MAX) (In this case, it is the image signal R). After each row of signals is normalized using the image signal R as a denominator, all of the image signals R become 1. The image signal G and the image signal B are calculated proportionally; thus, the “current output gray scale proportion (R=1.0)” in FIG. 4B is 212. The column 204 and the column 202 in FIG. 4A are similar, but they differ from each other in that the current input gray scale value is 8 bits. When the image signal R in the column 202 exceeds the maximum upper limit of the 10 bits, the image signal R is directly set to the maximum upper limit value (1023) in accordance with the prior art. The image signal G and the image signal B do not exceed the maximum upper limit of the 10 bits, so they remain unchanged. Similarly, after a normalized calculation is performed, the result can be shown in the column 216 “traditional output gray scale value proportion (R=1.0)” in FIG. 4C. The overflow compensation gain value, according to the invention, can be shown in the column 208 after calculation. The column 210 “compensated output gray scale value according to the invention (P*Gain) (10-bit)” can be obtained by calculating a set of gain values with the “current input gray scale values (P)” in the column 202. Similarly, after a normalized calculation, the result can be shown in the column 220 “compensated output gray scale value proportion according to the invention” in FIG. 4D. It can be observed through FIGS. 4A-4D that when there is an overflow, according to prior art, the proportion of the three outputted colors differs from the raw gray scale proportion, causing color deviations. This invention made an improvement to the situation, so that when there is an overflow, the proportion of the three colors outputted by image signal overflow compensation method, according to the invention, has the same proportion as the raw gray scale proportion. Thus, color deviations will not occur.


Referring to FIG. 5, FIG. 5 is a module context diagram of the method for overflow compensation according to the invention. The rationale of the method for overflow compensation, according to the invention, is to multiply the gray scale value of an pixel, which is saturated and overflowed, by a gain value lower than 1.0, so that the output gray scales are lowered; furthermore, the gain value can be different according to the different values of the gray scale value of the pixel, so that image which is originally saturated and overflowed and displays the highest gray scales, can be restored to its original gray scales and brightness levels.


Image signals include two main parts: brightness and color. Any single pixel is a combination of different basic colors in unique proportions (for example, most displays use RGB as basic colors, whereas most printers use CMYK as basic colors). The color performances (RGB or CMYK proportions) of the pixels are ruined if processing is done according to a single gray scale value of an overflowed basic color. Thus, in order to maintain color correctness, the overflow compensation of the image signal, according to the invention, is processed on the gray scale values of all of the basic colors of each of the pixels, so that each basic color can still maintain the original proportion of the brightness of the gray scale, and the color performance remains substantially the same as the original signals.


Using a 10-bit image signal having RGB as basic colors as an example, the compensation method for overflow of an image signal, according the invention, can be illustrated in the following with cross-referencing to FIG. 5:


Step 110: Image signal preprocessing. There are several reasons which cause overflow in gray scale values of pixels of an image signal. For example, the image signal is possibly processed through a brightness adjustment, a contrast adjustment, a hue adjustment, a saturation adjustment, an image enhancement, a color adjustment, or any combination among these processes, or any other processing and calculation which can cause the gray scale value of a pixel to overflow.


Step 120: Overflow judgment. The gray scale value of a 10-bit image must fall between 0 (the binary expression is 0000000000) and 1023 (1111111111), and after preprocessing by the image signal preprocessor 110, the 10-bit image can be 10 bits or 11 bits. Only when the pixel of the image signal is overflowed does the gray scale value of the overflowed image is lowered by using the method according to the invention. The gray scale values of the pixels which are not overflowed remain unchanged. Thus, step 122 must be performed first to find the maximum value P (P=MAX (R, G, B) among the RGB colors. Then, step 124 is performed to judge if P is overflowed (exceeding 10 bits). If P is not overflowed, the gray scale value of the pixel remains unchanged and is directly outputted through the signaling route 126. If P is greater or equal to the gray scale 1024 (10000000000), it indicates that the gray scale value of the pixel is overflowed to greater than 10 bits, and then the overflow compensation look-up table 32 is used for calculating the compensation.


Step 130: Using an overflow compensation look-up table to calculate compensations. The image signal that has gone through step 120 must be 11 bits. That is, the highest significant bits (HSB) must be 1. In order to save the capacity of the memory used by the overflow compensation look-up table 32, only 8 bits from the HSB are used for looking up the overflow compensation look-up table 32. Therefore, the input of the overflow compensation look-up table 32 is from 128 (10000000) to 255 (11111111). Assuming that the corresponding output gain value shown in FIG. 4 (for the sake of increasing precision and considering digital calculations, the overflow compensation gain value that is originally smaller than 1.0 is magnified 256 times, so the final result is divided by 256), when the gray scale value of one of the basic colors of the displayed pixel is overflowed, the maximum gray scale value P of all basic colors is used to look up the corresponding overflow compensation gain value from the look-up table and to multiply the RGB gray scale value of the image signal by this overflow compensation gain value. Thus, after an overflow calculation, the original gray scale value of the RGB of the overflowed image pixel becomes:






R′=R*Gain;






G′=G*Gain;






B′=B*Gain:


In this case, R′, G′ and B′ are obtained by multiplying the 11-bit image gray scale value with the 8-bit overflow compensation gain value. Thus, the gray scale value after calculation in step 130 is 19 bits.


The step 140: Output bits restoration. Although the image gray scale value after calculation in step 130 is 19 bits, the image gray scale value is already multiplied by an overflow compensation gain value lower than 1.0 (but magnified 256 times), so the image gray scale value must be smaller than 262144 (=2̂18), as shown in the column 37 “compensated output gray scale value (18-bit) (P*Gain)” in FIG. 3. Thus, in step 142, the HSB of the 19-bit image gray scale value image is directly truncated to become an 18-bit image. Because the overflow compensation gain value is magnified 256 times in step 130, step 144 is performed, and then 256 (28) is divided. In mathematical calculations, the step can be achieved by truncating the lowest 8 bits of the gray scale value of the image, so that the gray scale value of the image is restored to the 10-bit information prior to overflow compensation. It can be seen clearly from FIG. 3 and FIG. 6 that the output of the gray scale values 1024-1036 (the column 35 and the symbol label 52), which are originally overflowed, are all 1023 (the column 31 and symbol label 54), if the invention is not used for performing an overflow compensation. This causes the original gray scale levels to be indistinguishable. But after using the invention to perform an overflow compensation, the originally overflowed gray scale values 1024-1036 fall into the range between 1015 to 1023 (the column 38 and the symbol label 56), so that the original gray scales, brightness levels, and color performance can be restored.


Referring to FIG. 6, FIG. 6 is a schematic diagram of the result of the overflow compensation calculation when a single color is inputted according to the invention. FIG. 6 uses a diagram to show the results of different input gray scale values in FIG. 3 by an overflow compensation calculation. The symbol label 52 represents “current input gray scale value (11-bit) (P)” to generate the range of input gray scale values (1024-1036) of an image, which is saturated and overflowed, as an example for illustration. The symbol signal 54 shows “original output gray scale value (10-bit)”. That is, before using the method for overflow compensation of this invention, if the input gray scale values fall into the range of 1024-1036, their output gray scale values (10-bit) are all equal to 1023, and if the pixels are distributed so that they are concentrated in certain areas in the image, then these areas become transparent in a large area, causing a poor image quality. The symbol label 56 represents “compensated output gray scale value (10-bit) (P*Gain)”. That is, after using the method for overflow compensation, according to the invention, if the input gray scale value falls into the ranges of 1024-1031 and 1032-1036, the output gray scale values are respectively lowered to fall into the ranges of 1016.0-1022.9 and 1015.9-1019.8. Even if the pixels are distributed so that they are concentrated in certain areas of the image, the brightness levels of these areas of the original image can be restored, instead of showing a large area of transparency prior to compensation. Referring to FIG. 7, FIG. 7 is a schematic diagram of the result of the proportion of three colors prior to and after overflow compensation calculation on the three inputted colors. As shown in FIG. 7, the result of the proportion of the image signal G using the image signal R as 1.0, prior to or after overflow compensation calculation on the three inputted colors, is drawn in a diagram. To draw a diagram on the image signal G from the result in FIG. 4D, the horizontal axis represents the input gray scale value of the image signal R, and the vertical axis represents the proportion of the output gray scale value of the image signal G. The curve 252 represents the current proportion of the input gray scale value (R=1.0). The curve 254 represents the proportion of the output gray scale value (P=1.0) according to prior art. The curve 256 represents the proportion of the compensated output gray scale value (R=1.0) according to the invention. Based on the combining of the curve 252 and the curve 256, the proportion of the G color in the overflow compensation method, according to the invention, is completely identical to the raw data. Hence, the method can ensure that the proportion of each color is the same as the original signal. It is obvious to see from the difference between the curve 254 and the curve 252 that the G color proportion, according to prior art, differs from the raw data; thus, color deviations may occur.


Referring to FIG. 8, FIG. 8 is a flowchart of the method for contrast extension and overflow compensation of an image signal. If the specification described above is further illustrated by a simple way, the method for contrast extension and overflow compensation of an image signal, according to the invention, can be summarized into two main parts: contrast extension and overflow compensation.


The contrast extension part of an image signal includes the following important steps:


Step 302: Preparing a predetermined contrast extension offset value and gain value look-up table, and storing it in a memory.


Step 304: Receiving a plurality of pixels of an image signal sequentially.


Step 306: Determining, according to the gray scale value of each of the received pixels of the image, the maximum gray scale value and the minimum gray scale value of each image.


Step 308: Selecting, according to the maximum gray scale value and the minimum gray scale value of each image, the corresponding offset value and gain value from the contrast extension look-up table to calculate a new gray scale value, so as to reach the effect of contrast extension.


The overflow compensation part for an image signal includes the following important steps:


Step 312: Preparing a predetermined overflow compensation look-up table, and storing it in a memory.


Step 314: Receiving a plurality of pixels of an image signal sequentially.


Step 316: Judging, according to the gray scale value of each of the received pixels, whether the pixel is overflowed.


Step 318: If the pixel is overflowed, the corresponding overflow compensation parameter from the overflow compensation look-up table is selected, according to the gray scale value of the pixel, to overcome the problem of overflow.


Compared with prior art, the characteristic of the invention can be analyzed in the following:


The gray scale range of an image is extended to the maximum gray scale range of 0-255 by contrast extension. The biggest goal is to increase the dynamic range of the distribution of the gray scales of the image to increase image contrast in visual effects.


An overflow compensation look-up table and a set of gain values lower than 1.0 established in the overflow compensation look-up table are used to reach the function of overflow compensation. If a pixel is judged to be overflowed, the overflow compensation module selects, according to the gray scale value of the pixel, the corresponding overflow compensation parameters to lower the gray scale value of the pixel to overcome the problem of overflow.


A substantial amount of flexibility, according to the invention, is kept for how to define overflow compensation parameters and for establishing an overflow compensation look-up table. The overflow gain parameters can be overflow compensation gain values, output gray scale values, or any combination of the two. The columns in the overflow compensation look-up table 32 can be increased or partially abbreviated, in regards to practical needs. As long as the overflow compensation can be achieved, there are no fixed formats. Furthermore, in order to save the capacity of the memory 30 in practice, unnecessary columns can be further abbreviated without affecting the function and the effect of the invention at all.


A substantial amount of flexibility, according to the invention, is also kept for deciding how to use the overflow compensation look-up table and the overflow compensation parameters. The overflow compensation module looks up, according the gray scale value of the overflowed image, from the overflow compensation look-up table and the corresponding overflow compensation parameter to adjust the gray scale value of the pixel. The overflowed gray scale value and the corresponding overflow compensation gain value can be multiplied by each other, and an output bits restoration is performed by the method for lowering compensation, so that the image, which is originally saturated and overflowed and displays the highest gray scale, is restored to its original gray scales and brightness levels.


The overflow compensation, according to the invention, judges and compensates the overflow of each of the pixels of the image pixel respectively, so that each basic color can still maintain the original gray scale brightness proportion to ensure that the color performance is the same as the original signal.


With the example and explanations above, the features and spirits of the invention will be hopefully well described. Those skilled in the art will readily observe that numerous modifications and alterations of the device may be made while retaining the teaching of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.

Claims
  • 1. An image signal processing system, comprising: a memory therein storing a predetermined overflow compensation look-up table comprising a plurality of overflow compensation parameters; andan image signal processor for receiving an image signal comprising a plurality of pixels, and processing the pixels of the image signal, the image signal processor comprising: an overflow judging unit for judging, according to the gray scale value of an pixel, whether the pixel of the image signal is overflowed; andan overflow compensation unit for compensating the pixels of the image signal;
  • 2. The image signal processing system of claim 1, further comprising: a predetermined contrast extension look-up table comprising a plurality of contrast extension parameters;an image gray scale boundary determining unit for determining the pixels of the image signal to define a maximum value and a minimum value thereamong, and to calculate a difference between the maximum value and the minimum value; anda contrast extension unit for looking up, according to the minimum value and the difference, the contrast extension look-up table, and selecting the corresponding contrast extension parameters to adjust the contrast extension on the pixels.
  • 3. The image signal processing system of claim 2, wherein said system is connected to an image signal preprocessing unit for performing a corresponding image signal preprocessing function on the image signal, and the image signal preprocessing unit comprises a brightness adjustment unit, a contrast adjustment unit, a hue adjustment unit, a saturation adjustment unit, an image enhancement unit, a color adjustment unit, and any combination therebetween.
  • 4. The image signal processing system of claim 3, wherein the pixel of the image signal comprises a predetermined number of bits for recording the gray scale value of the pixel, and the overflow judging unit judges that the pixel is overflowed if the gray scale value of the pixel exceeds the predetermined number of bits after the image signal is processed by the image signal preprocessing unit or is adjusted by the contrast extension.
  • 5. The image signal processing system of claim 4, wherein the contrast extension parameter comprises at least one contrast extension offset value and a contrast extension gain value, the contrast extension unit adjusts a pixel of the image signal by the contrast extension using the following formula: the gray scale value of the adjusted pixel=a selected corresponding contrast extension gain value*(a raw gray scale value of the pixel−a selected corresponding contrast extension offset value).
  • 6. The image signal processing system of claim 5, wherein the image gray scale boundary determining unit defines the maximum value and the minimum value by the following formulae: the maximum value=the maximum among the gray scale values of all of the pixels of the image signal; andthe minimum value=the minimum among the gray scale values of all of the pixels of the image signal.
  • 7. The image signal processing system of claim 5, wherein the image gray scale boundary determining unit first truncates the maximum value and the minimum value among the gray scale values of all of the pixels of the image signal, and then defines the maximum value and the minimum value by the following formulae: the maximum value=the average value of the top 5% of the gray scale values of all the rest remaining pixels of the image signal; andthe minimum value=the average value of the bottom 5% of the gray scale values of all the rest remaining pixels of the image signal.
  • 8. The image signal processing system of claim 4, wherein each of the pixels respectively comprises a red, a green, and a blue gray-scale value, and if one of the red, the green, or the blue gray-scale values exceeds the predetermined number of bits, the overflow judging unit judges that the pixel is overflowed, and the overflow judging unit then selects, according to the maximum among the red, the green, and the blue gray scale values of the overflowed pixel, the corresponding overflow compensation parameter from the overflow compensation look-up table to proportionally lower the red, the green, and the blue gray scale values, so that the color performance of the pixel remains substantially the same as prior to the overflow compensation.
  • 9. The image signal processing system of claim 1, wherein the overflow judging unit judges each of the pixels of the image signal sequentially, and the overflow compensation unit lowers the gray scale value of the overflowed pixel only when the overflow judging unit judges that one of the pixels of the image signal is overflowed, and the gray scale value of the pixel, if not overflowed, remains unchanged.
  • 10. The image signal processing system of claim 9, wherein the overflow compensation parameters are ones selected from the group consisting of an overflow compensation gain value, an output gray scale value, and any combination therebetween, and the overflow compensation gain value differs from and depends on the extent that the pixel value is overflowed, and the overflow compensation gain value is lower than 1.0.
  • 11. The image signal processing system of claim 9, wherein the output gray scale value is obtained by dissecting the gray scale value of the overflowed pixel, and selecting different overflow compensation gain values for different sections of the gray scale values.
  • 12. An image signal processing method, a predetermined overflow compensation look-up table, comprising a plurality of overflow compensation parameters, being previously provided, said method comprising the steps of: receiving a plurality of pixels of an image signal sequentially;judging, according to the gray scale value of each of the received pixel, whether the pixel is overflowed; and if YESselecting, according to the gray scale value of the pixel, the corresponding overflow compensation parameter from the overflow compensation look-up table to lower the gray scale value of the pixel to overcome the problem of overflow.
  • 13. The image signal processing method of claim 12, further comprising the steps of: pre-storing a contrast extension look-up table comprising a plurality of contrast extension parameters;judging the pixels of the image signal to define a maximum value and a minimum value thereamong, and calculating a difference between the maximum value and the minimum value; andlooking-up, according to the minimum value and the difference, the contrast extension look-up table, and selecting the corresponding contrast extension parameter to adjust the contrast extension on the pixels.
  • 14. The image signal processing method of claim 13, wherein the pixel of the image signal comprises a predetermined number of bits for recording the gray scale value of the pixel, and the pixel is overflowed if the gray scale value exceeds the predetermined number of bits after the image signal is processed by an image signal preprocessing unit or is adjusted by the contrast extension.
  • 15. The image signal processing method of claim 13, wherein the contrast extension parameter comprises at least one contrast extension offset value and a contrast extension gain value, and the contrast extension on a pixel of the image signal is adjusted using the following formula using the following formula: the gray scale value of the adjusted pixel=a selected corresponding contrast extension gain value*(a raw gray scale value of the pixel−a selected corresponding contrast extension offset value).
  • 16. The image signal processing method of claim 13, wherein the maximum value and the minimum value are defined by the following formulae: the maximum value=the maximum among the gray scale values of all of the pixels of the image signal; andthe minimum value=the minimum among the gray scale values of all of the pixels of the image signal.
  • 17. The image signal processing method of claim 13, wherein said method first truncates the maximum value and the minimum value among the gray scale values of all of the pixels of the image signal and defines the maximum value and the minimum value using the following formulae: the maximum value=the average value of the top 5% of the gray scale values of all the rest remaining pixels of the image signal; andthe minimum value=the average value of the bottom 5% of the gray scale values of all the rest remaining pixels of the image signal.
  • 18. The image signal processing method of claim 14, wherein each of the pixels respectively comprises a red, a green, and a blue gray-scale value, and if one of the red, the green, or the blue gray-scale values exceeds the predetermined number of bits, the pixel is overflowed, and said method then selects, according to the maximum among the red, the green, and the blue gray scale values of the overflowed pixel, the corresponding overflow compensation parameter from the overflow compensation look-up table to proportionally lower the red, the green, and the blue gray scale values, so that the color performance of the pixel remains substantially the same as prior to the overflow compensation.
  • 19. The image signal processing method of claim 14, wherein said method lowers of the gray scale value of the overflowed pixel only when one of the pixels of the image signal is overflowed, and the gray scale value of the pixel, if not overflowed, remains unchanged.
  • 20. The image signal processing method of claim 19, wherein the overflow compensation parameters are ones selected from the group consisting of an overflow compensation gain value, an output gray scale value, and any combination therebetween, and the overflow compensation gain value differs from and depends on the extent that the pixel value is overflowed, and the overflow compensation gain value is lower than 1.0.
  • 21. The image signal processing method of claim 19, wherein the output gray scale value is obtained by dissecting the gray scale value of the overflowed pixel, and selecting different overflow compensation gain values for different sections of the gray scale values.
Priority Claims (1)
Number Date Country Kind
095122841 Jun 2006 TW national