TWI414180B - Apparatus and method for contrast enhancement - Google Patents
Apparatus and method for contrast enhancement Download PDFInfo
- Publication number
- TWI414180B TWI414180B TW97111979A TW97111979A TWI414180B TW I414180 B TWI414180 B TW I414180B TW 97111979 A TW97111979 A TW 97111979A TW 97111979 A TW97111979 A TW 97111979A TW I414180 B TWI414180 B TW I414180B
- Authority
- TW
- Taiwan
- Prior art keywords
- contrast
- curve
- function
- linear
- contrast enhancement
- Prior art date
Links
Landscapes
- Image Processing (AREA)
- Apparatus For Radiation Diagnosis (AREA)
Abstract
Description
本發明係有關於對比增強(contrast enhancement),特別是使用可調(adjustable)及可適(adaptable)轉換函數之對比增強。The present invention relates to contrast enhancement, particularly contrast enhancement using an adjustable and adaptable transfer function.
對比增強為一種重要的數位影像處理,通常係用以改善不良強度(intensity)分佈之影像的視覺品質。例如,一個褪色的影像,其強度的分佈會侷限於一部份的灰階值。Contrast enhancement is an important digital image processing that is often used to improve the visual quality of images with poor intensity distribution. For example, a faded image whose intensity distribution is limited to a portion of the grayscale value.
傳統的色譜等化(histogram equalization)方法常用以重新分配或等化整個影像的色譜曲線。然而,由於其需要大量的計算,因此是一種耗時緩慢的運算方法。二元(binary)對比增強或臨界法(thresholding)也是傳統的對比增強方法之一。在此方法中,所有小於臨界值的亮度值被設為黑(0),而所有大於臨界值的亮度值則被設為白(255)。由於二元對比增強方法產生極為高對比的影像,因此其應用受到限制,例如用於辨識影像中物件的輪 廓或形狀。鑑於此,一般的對比增強係使用較不陡峻的轉換曲線。Traditional chromatographic equalization methods are often used to redistribute or equalize the chromatographic curve of the entire image. However, because it requires a lot of calculations, it is a slow and time-consuming operation. Binary contrast enhancement or thresholding is also one of the traditional contrast enhancement methods. In this method, all luminance values less than the threshold are set to black (0), and all luminance values greater than the threshold are set to white (255). Because the binary contrast enhancement method produces extremely high contrast images, its application is limited, such as the wheel used to identify objects in the image. Profile or shape. In view of this, the general contrast enhancement uses a less steep transition curve.
查表(lookup table)方式也是傳統對比增強的常用方式之一。然而,此查表方式需要相當大的記憶空間,且自記憶體讀取資料時需要耗用許多的讀取週期。片段式線性近似法(piecewise linear approximation)是傳統對比增強的另一種常用方式。然而,此種方式需要許多的暫存器以儲存片段之端點(end points),且容易產生近似誤差。The lookup table method is also one of the common ways of traditional contrast enhancement. However, this method of looking up requires a considerable amount of memory space, and it takes a lot of read cycles to read data from the memory. Piecewise linear approximation is another common way of traditional contrast enhancement. However, this approach requires a lot of registers to store the end points of the segments and is prone to approximation errors.
因此,亟需提出一種快速且簡便方式來進行對比增強。Therefore, there is a need for a quick and easy way to perform contrast enhancement.
鑑於上述,本發明的目的之一為提供一種快速且簡便的對比增強方式。此種對比增強方法及其轉換曲線所需之計算遠比傳統方法來得少。再者,使用者也可方便地縮放(scale)轉換曲線之形狀,調整其強度(strength),且可改變其臨界點(或轉換點(transitional point))。In view of the above, it is an object of the present invention to provide a quick and easy way of contrast enhancement. The calculations required for such contrast enhancement methods and their conversion curves are much less than those of conventional methods. Furthermore, the user can conveniently scale the shape of the conversion curve, adjust its strength, and change its critical point (or transitional point).
根據本發明實施例,使用一可調混合單元以混合線性對比函數與非線性對比函數,因而形成一可調對比曲線。該非線性對比函數可藉由混合參數來作調整,使得對比曲線至線性對比曲線之距離得以改變。該對比曲線還可藉由強度參數來作調整,使得對比曲線之轉換點或臨界點受到改變。In accordance with an embodiment of the invention, an adjustable mixing unit is used to mix the linear contrast function with the nonlinear contrast function, thereby forming an adjustable contrast curve. The nonlinear contrast function can be adjusted by mixing parameters such that the distance from the contrast curve to the linear contrast curve is changed. The contrast curve can also be adjusted by the intensity parameter such that the transition point or critical point of the contrast curve is changed.
第一圖之方塊圖顯示本發明實施例之一的對比增強(contrast enhancement)裝置100,第二圖則顯示本發明實施例之對比增強方法200。本實施例之裝置100及方法200係用以改善不良強度(intensity)分佈之影像的視覺品質。本實施例使用8位元來表示亮度值,因此總共有256灰階(亦即,0至255)。然而,也可根據特定系統設計需求而使用其他的位元數。The block diagram of the first diagram shows a contrast enhancement device 100 in accordance with one embodiment of the present invention, and the second diagram shows a contrast enhancement method 200 in accordance with an embodiment of the present invention. The apparatus 100 and method 200 of the present embodiment are used to improve the visual quality of images with poor intensity distribution. This embodiment uses 8-bit to represent the luminance value, so there are a total of 256 gray levels (i.e., 0 to 255). However, other bit numbers can also be used depending on the specific system design requirements.
在本實施例中,對比增強轉換函數定義如下:
第(3)式中的avgBrightness代表目前影像的平均亮度值。在本實施例中,於步驟20(第二圖)中,針對整個影像圖框或欲進行對比增強之影像視窗部分的像素,以可適(adaptable)亮度值單元10(第一圖)來取得平均亮度值。在本說明書中,”單元”一詞可用以指電路、程式片段或其組合。此平均亮度值藉由亮度值”a”以影響式(1)的輸出值Y’,並進一步影響式(2)的Y”。裝置100及方法200可調適地(adaptable)針對變化之平均亮度值以自動改變其對比增強。此可適性尤其在裝置100係從不同影像裝置輸入不同平均亮度之影像時特別有用。The avgBrightness in the equation (3) represents the average luminance value of the current image. In this embodiment, in step 20 (second figure), the pixels of the entire image frame or the image window portion to be contrast-enhanced are obtained by an adaptable brightness value unit 10 (first image). Average brightness value. In this specification, the term "unit" can be used to refer to a circuit, a program segment, or a combination thereof. The average luminance value is influenced by the luminance value "a" to affect the output value Y' of the equation (1), and further affects the Y" of the equation (2). The apparatus 100 and the method 200 adaptively (adaptable) the average luminance for the variation The value is automatically changed by its contrast enhancement. This suitability is especially useful when the device 100 is input images of different average brightness from different imaging devices.
藉由步驟21至22對亮度值”a”作進一步調整。其中,於步驟21中,當需要調整對比增強之強度時,以步驟22取得強度參數p或由使用者輸入此參數,並傳送至可適 (adaptable)亮度值單元10。在本實施例中,係使用式(3)將平均亮度值(avgBrightness)乘以強度參數p。式(3)中的運算子”round”係進行數學捨入(rounding)運算。然而,如果裝置100係為非整數系統,則捨入運算即可省略。至於強度參數p對於對比增強之影響將於後面詳述。The luminance value "a" is further adjusted by steps 21 to 22. Wherein, in step 21, when it is necessary to adjust the intensity of the contrast enhancement, the intensity parameter p is obtained in step 22 or input by the user, and transmitted to the appropriate (adaptable) luminance value unit 10. In the present embodiment, the average luminance value (avgBrightness) is multiplied by the intensity parameter p using equation (3). The operator "round" in equation (3) performs a mathematical rounding operation. However, if the device 100 is a non-integer system, the rounding operation can be omitted. The effect of the intensity parameter p on contrast enhancement will be detailed later.
式(1)中的Y’函數代表一基本(base)對比曲線(步驟23及方塊12),其對應至第三圖中b=1之對比曲線。式(2)中的Y”函數代表一般對比曲線,其係由線性部分Y及非線性部分(Y’-Y)所組合或混合(blend)而成。函數Y”之混合(步驟25)係將非線性部分(Y’-Y)乘以一混合參數b,其可由使用者輸入(步驟24)至可調混合單元14中。當b=1時,一般對比曲線Y”即變為基本對比曲線Y’;當b=0時,一般對比曲線Y”即變為線性對比曲線。如第三圖所示,對比曲線Y”(b≠0)至線性對比曲線(b=0,亦即,未作任何對比增強)之距離會隨混合參數b之增加而增加,反之,則隨混合參數b之減小而減小。第三圖也顯示出各對比曲線會收斂於兩端(亦即圖例中的0和255),且所有對比曲線具有相同的轉換點”a”。每一對比曲線包含一第一曲線,其具有面對線性對比曲線之第一方向;且包含 一第二曲線,其具有面對線性對比曲線之第二方向,其中第二方向大致相反於第一方向。The Y' function in equation (1) represents a base contrast curve (steps 23 and 12), which corresponds to the contrast curve of b=1 in the third graph. The Y" function in the formula (2) represents a general contrast curve which is combined or blended by the linear portion Y and the nonlinear portion (Y'-Y). The mixing of the function Y" (step 25) is The non-linear portion (Y'-Y) is multiplied by a mixing parameter b, which can be input (step 24) by the user into the adjustable mixing unit 14. When b = 1, the general comparison curve Y" becomes the basic contrast curve Y'; when b = 0, the general comparison curve Y" becomes the linear contrast curve. As shown in the third figure, the distance from the comparison curve Y"(b≠0) to the linear contrast curve (b=0, that is, without any contrast enhancement) increases with the increase of the mixing parameter b, and vice versa. The mixing parameter b decreases and decreases. The third graph also shows that each comparison curve converges to both ends (ie, 0 and 255 in the legend), and all of the comparison curves have the same transition point "a". The comparison curve includes a first curve having a first direction facing the linear contrast curve; and including A second curve having a second direction facing the linear contrast curve, wherein the second direction is substantially opposite to the first direction.
如前所述,基本對比曲線為亮度值”a”的函數,而當選擇強度調整時,亮度值”a”又為強度參數p的函數。第四圖顯示各種強度參數p所相對應的對比曲線。對比曲線Y”的強度隨強度參數p之增加而增加,反之,強度隨強度參數p之減小而減小。在本實施例中,大於1的參數p使得對比增強變得更強勢(aggressive)或較大強度,而小於1的參數p使得對比增強變得較不強勢或較小強度。As previously mentioned, the basic contrast curve is a function of the luminance value "a", and when the intensity adjustment is selected, the luminance value "a" is again a function of the intensity parameter p. The fourth graph shows the contrast curves corresponding to the various intensity parameters p. The intensity of the contrast curve Y" increases as the intensity parameter p increases, whereas the intensity decreases as the intensity parameter p decreases. In the present embodiment, the parameter p greater than 1 makes the contrast enhancement become more aggressive (aggressive). Or a larger intensity, while a parameter p of less than 1 makes the contrast enhancement less intense or less intense.
藉此,本發明實施例提出一種快速且簡便以進行對比增強的裝置及方法。本發明實施例所揭露之對比增強及其對比曲線所需之計算量遠比傳統對比增強方法來得少。再者,使用者也可方便地縮放(scale)對比曲線之形狀並調整其強度。另外,在本實施例中,使用單一的6位元暫存器即足以同時儲存混合參數b及強度參數p。本發明實施例之裝置及方法可調適地(adaptable)針對變化之平均亮度值以自動改變其對比增強。Accordingly, the embodiments of the present invention provide an apparatus and method that are fast and simple to perform contrast enhancement. The amount of calculation required for the contrast enhancement and its contrast curve disclosed in the embodiments of the present invention is much less than that of the conventional contrast enhancement method. Furthermore, the user can conveniently scale and adjust the intensity of the contrast curve. In addition, in the present embodiment, the use of a single 6-bit register is sufficient to simultaneously store the mixing parameter b and the intensity parameter p. The apparatus and method of an embodiment of the present invention adaptably adjusts the contrast enhancement for the varying average brightness value.
以上所述僅為本發明之較佳實施例而已,並非用以限定本發明之申請專利範圍;凡其它未脫離發明所揭示之精神下所完成之等效改變或修飾,均應包含在下述之申請專利範圍內。The above description is only the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention; all other equivalent changes or modifications which are not departing from the spirit of the invention should be included in the following Within the scope of the patent application.
100‧‧‧對比增強裝置100‧‧‧ contrast enhancement device
10‧‧‧可適(adaptable)亮度值單元10‧‧‧adaptable brightness value unit
12‧‧‧基本對比曲線12‧‧‧Basic comparison curve
14‧‧‧可調混合14‧‧‧Adjustable mixing
200‧‧‧對比增強方法200‧‧‧ contrast enhancement method
20-25‧‧‧對比增強方法之步驟20-25‧‧‧Steps to compare enhancement methods
第一圖之方塊圖顯示本發明實施例之一的對比增強裝置。The block diagram of the first figure shows a contrast enhancement apparatus according to one embodiment of the present invention.
第二圖顯示本發明實施例之對比增強方法。The second figure shows a contrast enhancement method of an embodiment of the present invention.
第三圖顯示各種混合參數所相對應的對比曲線。The third graph shows the corresponding curves for the various mixing parameters.
第四圖顯示各種強度參數所相對應的對比曲線。The fourth graph shows the contrast curves for the various intensity parameters.
100‧‧‧對比增強裝置100‧‧‧ contrast enhancement device
10‧‧‧可適(adaptable)亮度值單元10‧‧‧adaptable brightness value unit
12‧‧‧基本對比曲線12‧‧‧Basic comparison curve
14‧‧‧可調混合14‧‧‧Adjustable mixing
Claims (16)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW97111979A TWI414180B (en) | 2008-04-02 | 2008-04-02 | Apparatus and method for contrast enhancement |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW97111979A TWI414180B (en) | 2008-04-02 | 2008-04-02 | Apparatus and method for contrast enhancement |
Publications (2)
Publication Number | Publication Date |
---|---|
TW200943944A TW200943944A (en) | 2009-10-16 |
TWI414180B true TWI414180B (en) | 2013-11-01 |
Family
ID=44869141
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW97111979A TWI414180B (en) | 2008-04-02 | 2008-04-02 | Apparatus and method for contrast enhancement |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI414180B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020008784A1 (en) * | 2000-03-14 | 2002-01-24 | Yoshinari Shirata | Video processing method and device |
US20020186387A1 (en) * | 2000-03-31 | 2002-12-12 | Moroney Nathan M. | Local color correction |
US20050128496A1 (en) * | 2003-12-11 | 2005-06-16 | Xerox Corporation | Spatially varying luminance compression gamut mapping system and method |
-
2008
- 2008-04-02 TW TW97111979A patent/TWI414180B/en not_active IP Right Cessation
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020008784A1 (en) * | 2000-03-14 | 2002-01-24 | Yoshinari Shirata | Video processing method and device |
US20020186387A1 (en) * | 2000-03-31 | 2002-12-12 | Moroney Nathan M. | Local color correction |
US20050128496A1 (en) * | 2003-12-11 | 2005-06-16 | Xerox Corporation | Spatially varying luminance compression gamut mapping system and method |
Also Published As
Publication number | Publication date |
---|---|
TW200943944A (en) | 2009-10-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108876742B (en) | Image color enhancement method and device | |
KR100916073B1 (en) | Apparatus and method of stretching histogram for enhancing contrast of image | |
US9165210B1 (en) | Systems and methods for localized contrast enhancement | |
CN107888943B (en) | Image processing | |
CN109243384B (en) | Display device, driving method thereof, driving apparatus thereof, and computer readable medium | |
TWI666921B (en) | Method and device for tone-mapping a high dynamic range image | |
US11010880B2 (en) | Image processing apparatus, image processing method, and storage medium that generate compression curves of respective divided regions so that respective slopes of the compression curves match in a particular luminance range | |
EP2953340B1 (en) | Image processing device, image processing method, program, and recording medium | |
TWI404413B (en) | Methods and devices for adjusting display characteristic of a video frame | |
WO2018035879A1 (en) | Image processing method and device | |
US8154565B2 (en) | Apparatus and method for gamma correction | |
KR20160068627A (en) | Image processing device, image processing method and display device | |
US7289666B2 (en) | Image processing utilizing local color correction and cumulative histograms | |
CN104240666A (en) | Video processing method and device | |
US8086065B2 (en) | Apparatus and method for contrast enhancement | |
US7978927B2 (en) | Image processing apparatus | |
US8203574B2 (en) | Dynamic softclipping of video levels | |
CN1664858A (en) | Image contrast intensifying method | |
TWI414180B (en) | Apparatus and method for contrast enhancement | |
CN116489377A (en) | Image processing method and electronic device | |
TWI601122B (en) | Image compensation method applied to display and associated control circuit | |
CN111615714A (en) | Color adjustment method for RGB data | |
KR102270230B1 (en) | Image process device and image proccessing method | |
WO2023020705A1 (en) | Method, computer program and electronic device for tone mapping | |
CN113724638A (en) | Demura method of display panel |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
MM4A | Annulment or lapse of patent due to non-payment of fees |