TWI306348B - Device and method for image edge enhancement - Google Patents

Device and method for image edge enhancement Download PDF

Info

Publication number
TWI306348B
TWI306348B TW95105153A TW95105153A TWI306348B TW I306348 B TWI306348 B TW I306348B TW 95105153 A TW95105153 A TW 95105153A TW 95105153 A TW95105153 A TW 95105153A TW I306348 B TWI306348 B TW I306348B
Authority
TW
Taiwan
Prior art keywords
value
pixel
image
sharp
edge enhancement
Prior art date
Application number
TW95105153A
Other languages
Chinese (zh)
Other versions
TW200731767A (en
Inventor
Kun Chou Chen
Alvin Cheng
Ryan Chen
Mk Cheng
Original Assignee
Avermedia Tech Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Avermedia Tech Inc filed Critical Avermedia Tech Inc
Priority to TW95105153A priority Critical patent/TWI306348B/en
Publication of TW200731767A publication Critical patent/TW200731767A/en
Application granted granted Critical
Publication of TWI306348B publication Critical patent/TWI306348B/en

Links

Landscapes

  • Image Processing (AREA)

Description

1306348 九、發明說明 【發明所屬之技術領域】 本發明是有關於一錄甚;# a _ k J 種影像處理裝置與方法,且 關於一種可抑制強化寻彡德沒^ 』疋有 j卻制強化衫像邊緣時在平滑處產 與強化影像邊緣的裝置與方法。 门頻雜訊 【先前技術】 往往:掃描器或數位相機所得到的影像,其銳利度 :不二此時可借助影像處理來改善視覺上的銳利效果。 ㈣性質’ f知之增㈣像銳利度(心啊叫的處 理方法可分為兩大類:空間域的影像銳利增強、和頻率域的 t/像銳利增強、然而’當具有複數塊影像平滑區域之原始影 像經銳利化處理後’雖然可將影像銳利度提高,但亦會將位 於影像平滑區娀$黑4S换_ _ & , i 回頻雜Λ大顯出來,造成影像不平滑現象 的產生,因而導致影像品質下降。 ❿【發明内容】 因此’需要提出一種影像的邊緣強化裝置與方法,以抑 制心銳度化處理後所造成的雜訊,並強化影像邊緣的顯示, 而使衫像銳利度達到更好效果。 本發明的目的就是在提供一種影像的邊緣強化裝置與 方法’藉以在影像經銳利化後,抑制影像平滑處之高頻雜 訊’並強化影像邊緣的顯示,來使影像可達到更好的銳利效 果且仍保有其影像品質。 本發明的另一目的就是在提供一種影像的邊緣強化裝 5 1306348 置與方法,藉由依照所處理影像之銳利或平滑程度,而來調 整銳利濾波器之濾波器係數,使得影像之銳利處或平滑處均 能精確地被強化。 根據本發明之一較佳實施例,在此強化邊緣色彩方法 中,首先,輸入影像,其中此影像係具有複數個像素灰階值。 接著,提供待處理像素灰階值,其中此待處理像素灰階值係 為此些像素灰階值其中之一。然後,獲得第一鄰近像素灰階 值、第二鄰近像素灰階值、第三鄰近像素灰階值和第四鄰近 籲像素灰階值,其中第二鄰近像素灰階值#第三鄰近像素灰階 值係緊鄰於待處理像素灰階值之水平(或垂直)兩側;第一鄰 近像素灰階值與待處理像素灰階值係緊鄰於第二鄰近像素 灰階值之水平(或垂直)兩側;第四鄰近像素灰階值與待處理 像素灰階值係緊鄰於第三鄰近像素灰階值之水平(或垂直) 兩侧。接著,透過第一鄰近像素灰階值、第二鄰近像素灰階 值、第二鄰近像素灰階值和第四鄰近像素灰階值,來決定低 通濾波加權值(LPweight)。然後,進行銳利化處理,其係輸 >入待處理像素灰階值、第一鄰近像素灰階值、第二鄰近像素 灰階值、第三鄰近像素灰階值和第四鄰近像素灰階值做摺積 (C〇nvolution)運算,來獲得銳利像素灰階值。接著,進行内 插運算’其係輸人待處理像素灰階值、低W加權值、銳 利像素灰階值和最大加權值,來計算出強化像素灰階值。 又,本發明之影像邊緣強化裝置至少包含邊緣偵測單 元、銳利濾波器(Sharpness Fiher)和雜訊濾除單元。 【實施方式】 6 !3〇6348 本發明主要是招;考γ λ 、頻雜a ^ . 揭硌可抑制影像銳利化之後所產生的高 的袭置二去化影像邊緣部分’以提高影像之品質和銳利度 較佳:ΐ照第 ' 圖和第3圖’第1圖係繪示根據本發明之一 -麻祕 <列之&像邊緣強化襄置的方塊示意圖;第3圖係緣 - 不根據本發明之V土 & _。 _較佳實施例之邊緣強化方法的流程示意 11 n f圖所不,影像邊緣強化裝置100包含銳利渡波器 邊㈣測單A12G和雜訊㈣單元130。 應用本發明時,首先,提供-影像(步驟205),其中此 象具^複數個像素,而每一個像素具有-像素灰階值。接 者進订步冑210以提供待處理像素灰階值⑻至影像邊緣. 匕裝置100中處理’其中此待處理像素灰階值(X)為此些 像素灰階值其中之一。 /明同時參照第2圖,其係繪示根據本發明之較佳實施例 ,待處理像素灰階值與其相鄰像素灰階值的位置示意圖。接 著進行步驟215,提供與待處理像素灰階值相鄰之數個鄰 參近像素灰階值。如第2圖所示,本發明之較佳實施例係應用 自待處理像素灰階值(X)之水平兩側各延伸二個之像素灰階 值:即第一鄰近像素灰階值(A)、第二鄰近像素灰階值(B)、 第三鄰近像素灰階值(C)和第四鄰近像素灰階值(D)。然而, 上述之數個鄰近像素灰階值亦可為待處理像素灰階值(χ)往 垂直兩側延伸之數個像素灰階值或待處理像素灰階值(χ)往 往對角線兩側延伸之數個像素灰階值,故本發明並不在此 限。 接著’將此較佳實施例中之第一鄰近像素灰階值(Α)、 7 1306348 近像夸:像素灰鸣值⑻、第二鄰近像素灰階值(c)和第四鄰 2:素灰階值⑼輸入至邊緣摘測單&㈣進行步驟 以決定低通濾波加權值(LPWeight)。邊緣制單元12〇 之、則貞測影像邊緣,將與待處理像素灰階值⑻兩側相鄰 〜些鄰近像素灰階值比較其銳利程度(或平滑程度),而產 ,低通遽波加權值^Weight),當某一側鄰近像素灰階值之 -總和與另一側鄰近像素灰階值之總和相異不大時,代表里該 些鄰近像素灰階值與待處理像素灰階值(χ)之銳利程度較 小,即待處理像素灰階值(X)與相鄰之鄰近像素灰階值之間 較平滑;反之,當某一側鄰近像素灰階值之總和與另一側鄰 近像素灰階值之總和相異較大時,代表其該些鄰近像素灰階 值與待處理像素灰階值(X)之銳利程度較大,即待處理像素 灰階值(X)係位於二側相鄰之鄰近像素灰階值之邊緣。當鄰 近像素灰階值較平滑時,會產生較小的低通濾波加權值 (LP Weight),若鄰近像素灰階值較銳利時則產生較大的低通 濾波加權值(LPWeight)。本發明之較佳實施例的邊緣偵測單 鲁元係用公式(1)來判斷影像的銳度程度,其中,公式(1) 中之N係由使用者決定一整數值’然而,此公式僅為了方 便說明此實施例之邊緣偵測單元,故本發明並不限於此。此 公式(1)如下: —⑴ 接著,將X、A、B、C和D輸入至銳利濾波器丨! 〇來 1306348 進行步驟225,針對X、A、B、C和D進行一銳利化處理, 以計算出銳利像素灰階值(SFout)。其中銳利濾波器11 〇包含 複數個濾波器係數,用以針對輸入之像素灰階值進行一摺積 (Convolution)運算。此些濾波器係數可為預設之固定係數, 或者是依照低通濾波加權值(LPWeight)之大小而來決定,因 •- 此濾波器係數係一種動態可變或固定之係數。當濾波器係數 -. 為可變時的情況時,如下所述: 當低通濾波加權值(LPWeight)較大時,銳利濾波器11〇 ^使用銳利化程度較大的濾波器係數,若低通濾波加權值 (LPWeight)較小時’銳利濾波器11〇使用銳利化程度較小的 濾波器係數’如此更能強化影像之平滑處與銳利處。其中決 定濾波器係數之方式可利用對照表(L〇〇k-Up Table; LUT)來 挑選其適當之濾波器係數。將低通濾波加權值(LpWeight) 的大小分成數個區域範圍,銳利濾波器丨丨〇則根據低通濾波 加權值(LPWeight)之大小,來對應至對照表,而來挑選出其 適當之濾波器係數。然而,決定濾波器係數之方式亦可利用 籲低通濾波加權值(LpWeight)透過一個電路(未繪示)的計 算,而來獲得,故本發明之決定濾波器係數之方式不限於此。 再將低通濾波加權值(LPWeight)、銳利像素灰階值 (SFcut)、待處理像素灰階值(χ)和最大加權值(MaxWei^〇送 入至雜訊濾除單元13〇中,來進行步驟23〇,以獲得強化像 素灰階值(Y) ’其中本發明之較佳實施例的雜訊濾除單元 130至少包含一加法器、數個乘法器、—減法器和一除法器 (未繪示)。然而,強化像素灰階值(γ)之公式如式所示: 9 (2) 13063481306348 IX. INSTRUCTIONS OF THE INVENTION [Technical Field to Be Invented by the Invention] The present invention relates to a recording method; # a _ k J kinds of image processing apparatuses and methods, and a method for suppressing the reinforcement of seeking 彡 没 ^ ^ 疋 疋A device and method for enhancing the edge of a image while smoothing the edge of the shirt. Door frequency noise [Prior Art] Often: the image obtained by the scanner or digital camera, its sharpness: In this case, image processing can be used to improve the visual sharpness. (4) Nature 'f knows increase (4) like sharpness (the heart's processing method can be divided into two categories: sharp enhancement of the image in the spatial domain, and sharp enhancement of the t/image in the frequency domain, but 'when there is a smooth area of the complex block image After the original image is sharpened, 'the sharpness of the image can be improved, but it will also be displayed in the image smoothing area 黑$Black 4S for _ _ & , i back-frequency hodgepodge, resulting in image smoothing Therefore, the image quality is degraded. ❿ [Summary] Therefore, it is necessary to propose an image edge enhancement device and method to suppress the noise caused by the sharpening process and enhance the display of the image edge, thereby making the shirt image Sharpness achieves better results. The object of the present invention is to provide an image edge enhancement apparatus and method 'to suppress the high frequency noise of the image smoothing' and to enhance the image edge display after the image is sharpened. The image can achieve a better sharpness and still retain its image quality. Another object of the present invention is to provide an image edge enhancement device 5 1306348 By adjusting the filter coefficients of the sharp filter according to the sharpness or smoothness of the processed image, the sharpness or smoothness of the image can be accurately enhanced. According to a preferred embodiment of the present invention, In the method of enhancing the edge color, first, an image is input, wherein the image has a plurality of pixel grayscale values. Next, a grayscale value of the pixel to be processed is provided, wherein the grayscale value of the pixel to be processed is a grayscale of the pixel. One of the values. Then, obtaining a first neighboring pixel grayscale value, a second neighboring pixel grayscale value, a third adjacent pixel grayscale value, and a fourth adjacent pixel grayscale value, wherein the second neighboring pixel grayscale value# The gray value of the third neighboring pixel is adjacent to the horizontal (or vertical) side of the grayscale value of the pixel to be processed; the grayscale value of the first neighboring pixel and the grayscale value of the pixel to be processed are in close proximity to the grayscale value of the second neighboring pixel. Horizontal (or vertical) sides; the fourth neighboring pixel grayscale value and the pixel grayscale value to be processed are immediately adjacent to the horizontal (or vertical) side of the third neighboring pixel grayscale value. Then, through the first neighbor a pixel grayscale value, a second neighboring pixel grayscale value, a second neighboring pixel grayscale value, and a fourth neighboring pixel grayscale value to determine a low pass filtering weighting value (LPweight). Then, performing a sharpening process, the system is transposed > into the pixel gray value to be processed, the first neighboring pixel grayscale value, the second adjacent pixel grayscale value, the third adjacent pixel grayscale value, and the fourth adjacent pixel grayscale value to perform a convolution (C〇nvolution) operation To obtain the sharp pixel grayscale value. Then, perform the interpolation operation 'the input pixel grayscale value, the low W weighting value, the sharp pixel grayscale value and the maximum weighting value to calculate the enhanced pixel grayscale value. Moreover, the image edge enhancement device of the present invention includes at least an edge detection unit, a sharpness filter (Sharpness Fiher), and a noise filtering unit. [Embodiment] 6 !3〇6348 The present invention is mainly a trick; Frequency miscellaneous a ^ . Uncovering can suppress the sharp edge of the image after the high-resolution of the edge of the image to improve the image quality and sharpness is better: see the 'Figure and Figure 3' 1 The figure is shown in accordance with one of the present invention - Secret < column of & Xiang strengthening opposing edges of the image block schematic; edge line of FIG. 3 - not according to the present invention, the Soil V & _. Flowchart of the edge enhancement method of the preferred embodiment. The image edge enhancement apparatus 100 includes a sharp waver edge (4) meter A12G and a noise (four) unit 130. In applying the present invention, first, an image is provided (step 205), wherein the image has a plurality of pixels, and each pixel has a -pixel grayscale value. The subscriber advances step 210 to provide a pixel grayscale value (8) to be processed to the edge of the image. The device 100 processes the pixel grayscale value (X) to be processed as one of the pixel grayscale values. Referring to FIG. 2 at the same time, it is a schematic diagram showing the position of the grayscale value of the pixel to be processed and the grayscale value of the adjacent pixel according to the preferred embodiment of the present invention. Next, in step 215, a plurality of neighboring near-pixel grayscale values adjacent to the grayscale value of the pixel to be processed are provided. As shown in FIG. 2, the preferred embodiment of the present invention applies two pixel grayscale values extending from both sides of the horizontal grayscale value (X) of the pixel to be processed: that is, the first neighboring pixel grayscale value (A) a second neighboring pixel grayscale value (B), a third neighboring pixel grayscale value (C), and a fourth neighboring pixel grayscale value (D). However, the grayscale values of the plurality of adjacent pixels may also be a plurality of pixel grayscale values of the grayscale value of the pixel to be processed (χ) extending to the vertical sides or a grayscale value of the pixel to be processed (χ) often diagonally two The number of pixel gray scale values extending sideways, so the present invention is not limited thereto. Then, the first neighboring pixel grayscale value (Α), 7 1306348 near image in this preferred embodiment is exaggerated: pixel gray sound value (8), second neighboring pixel grayscale value (c), and fourth neighboring 2: prime The grayscale value (9) is input to the edge extracting list & (4) to perform a step to determine the low pass filtering weighting value (LPWeight). The edge unit 12 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 贞 影像 影像 影像 影像 影像 影像 影像 影像 影像 影像 影像 影像 影像 影像 影像 影像 影像 影像 影像 影像 影像 影像 影像The value ^Weight), when the sum of the grayscale values of the adjacent pixels on one side is not significantly different from the sum of the grayscale values of the neighboring pixels on the other side, the grayscale values of the neighboring pixels and the grayscale values of the pixels to be processed are represented. (χ) has a small degree of sharpness, that is, the gray level value (X) of the pixel to be processed is relatively smooth with the adjacent gray level value of the neighboring pixel; conversely, when the gray level value of the adjacent pixel of one side is the sum of the other side and the other side When the sum of grayscale values of adjacent pixels is different, it represents that the grayscale value of the neighboring pixels is sharper than the grayscale value (X) of the pixel to be processed, that is, the grayscale value (X) of the pixel to be processed is located. The edge of the neighboring pixel grayscale value on the two sides. When the neighboring pixel grayscale value is smoother, a smaller low-pass filtering weighting value (LP Weight) is generated, and if the neighboring pixel grayscale value is sharper, a larger low-pass filtering weighting value (LPWeight) is generated. The edge detection single Luyuan of the preferred embodiment of the present invention uses the formula (1) to determine the degree of sharpness of the image, wherein the N in the formula (1) is determined by the user as an integer value. However, this formula The edge detecting unit of this embodiment is merely described for convenience, and the present invention is not limited thereto. This formula (1) is as follows: —(1) Next, input X, A, B, C, and D to the sharp filter 丨! 1 1306348 proceeds to step 225, performing an sharpening process for X, A, B, C, and D to calculate a sharp pixel grayscale value (SFout). The sharp filter 11 〇 includes a plurality of filter coefficients for performing a Convolution operation on the input pixel grayscale values. These filter coefficients may be preset fixed coefficients or may be determined according to the size of the low pass filter weight value (LPWeight), because - the filter coefficient is a dynamically variable or fixed coefficient. When the filter coefficient -. is variable, as follows: When the low-pass filter weight value (LPWeight) is large, the sharp filter 11 〇^ uses a filter coefficient with a sharper degree of sharpness, if low When the pass filter weight value (LPWeight) is small, the 'sharp filter 11 〇 uses a filter coefficient with a smaller degree of sharpness' so that the smoothness and sharpness of the image can be enhanced. The way in which the filter coefficients are determined can be selected using a look-up table (L〇〇k-Up Table; LUT) to select the appropriate filter coefficients. The size of the low-pass filter weighting value (LpWeight) is divided into several region ranges, and the sharp filter 丨丨〇 is corresponding to the comparison table according to the size of the low-pass filter weighting value (LPWeight), and the appropriate filtering is selected. Factor. However, the manner of determining the filter coefficients can also be obtained by calculating the low-pass filter weighting value (LpWeight) through a circuit (not shown), so the manner of determining the filter coefficients of the present invention is not limited thereto. Then, the low pass filter weight value (LPWeight), the sharp pixel gray level value (SFcut), the pixel gray level value (χ) to be processed, and the maximum weight value (MaxWei^〇 are sent to the noise filtering unit 13〇, Step 23 is performed to obtain an enhanced pixel grayscale value (Y). The noise filtering unit 130 of the preferred embodiment of the present invention includes at least one adder, a plurality of multipliers, a subtractor, and a divider ( Not shown. However, the formula for enhancing the grayscale value (γ) of a pixel is as shown in the formula: 9 (2) 1306348

γ _ LPWeight χ SFnut + (MaxWei^ht -LPWeight)x Xγ _ LPWeight χ SFnut + (MaxWei^ht -LPWeight)x X

MaxWeight 其中最大加權值(MaxWeight)係根據低通濾波加權值 (LPWeight)最大值來決定,而低通濾波加權值(LpWeight)則 根據公式(1)中每一個像素灰階值之位元數來決定。因此, 若公式(1)之N=2,而且若每一個像素灰階值係8位元,則 低通滤波加權值(LPWeight)之最大值係256。MaxWeight where the maximum weight value (MaxWeight) is determined according to the low-pass filter weight value (LPWeight) maximum value, and the low-pass filter weight value (LpWeight) is based on the number of bits of each pixel gray-scale value in formula (1) Decide. Therefore, if N = 2 of the formula (1), and if the gray scale value of each pixel is 8 bits, the maximum value of the low pass filter weight value (LPWeight) is 256.

然而,本發明之上述的較佳實施例,亦可將雜訊濾除單 疋130移除,利用銳利濾波器11〇之可變動濾波器係數來達 到增強影像邊緣及抑制影像銳利化後所產生的高頻雜訊。 為讓本發明之述敘能更加詳盡與完備,下文特舉兩個應 用例,並配合第i圖至第3圖之圖示來詳加說明。而本發明 之兩個應用例中係用8位元來表示每一個像素的灰階程 度,且公式(1)之N=2,低通濾波加權值(LPWeight)之最大值 為256’因此最大加權值(MaxWeight)4 25。每一個像素灰 階值所能表示的灰階程度範圍為G〜255,銳利滤波器⑴的 濾波器係數長度為5,且濾波器係數為卜卜心,5,」, 然而,以上所述之8位元灰階值㈣波器㈣長度為5、此 兩個應用例未將雜訊渡除單元13〇移除、銳利濾波器"〇 採用固定之澹波器係數、僅用以舉例說明,本發明亦可採用 Μ位凡灰階值與據波器係數長度為κ、亦可將雜訊渡除單元 130移除、銳利錢器11G亦可為可變之濾波器係數,故本 發明並不在此限。 1306348 應用例一 此應用例传田,、,+ Λ i J係用以處理在影像平滑處之一點較亮 (即具有較高的像素灰階值),其中待處理像 : 其鄭近四個像素灰階值(A'B、c;foD)时料如/值=〇與 =20 ^、(^和㈣又像素灰階值即為較亮之像 、 ;由八B像素灰階值所組成的區域與c、D傻 階值所組成的區域之間。 豕京及However, in the above preferred embodiment of the present invention, the noise filtering unit 130 can also be removed, and the variable filter coefficient of the sharp filter 11 can be used to achieve enhanced image edges and suppress image sharpening. High frequency noise. In order to make the description of the present invention more detailed and complete, two application examples are specifically described below, and are illustrated in detail in conjunction with the diagrams of Figures i to 3. In the two application examples of the present invention, 8-bit elements are used to represent the gray scale degree of each pixel, and N=2 of the formula (1), and the maximum value of the low-pass filter weighting value (LPWeight) is 256', thus the maximum Weighted value (MaxWeight) 4 25. The gray scale value of each pixel can be expressed in the range of G~255, the filter coefficient length of the sharp filter (1) is 5, and the filter coefficient is Bub, 5,", however, the above 8-bit grayscale value (four) wave (4) length is 5, the two application examples do not remove the noise removal unit 13〇, sharp filter " 〇 use fixed chopper coefficient, only for illustration In the present invention, the grayscale value and the length of the wave coefficient are κ, the noise removal unit 130 can also be removed, and the sharp filter 11G can also be a variable filter coefficient, so the present invention Not limited to this. 1306348 Application Example 1 This application example is transmitted, and + Λ i J is used to process a brighter point at the image smoothing point (ie, has a higher pixel grayscale value), wherein the image to be processed is: The pixel grayscale value (A'B, c; foD) is as follows: /value = 〇 and =20 ^, (^ and (4) and the pixel grayscale value is the brighter image; by the eight B pixel grayscale value The area formed is between the area composed of c and D stupid values.

首先,進行步,驟210冑供一待處理像素灰階值(X)、步 驟215獲得鄰近四個像素灰階值(第一鄰近像素灰階值 ⑷、第二鄰近像素灰階值(B)、第2鄰近像素灰階值⑹和 第四鄰近像素灰階值(D))之後,接著進行步驟22(),將鄰近 四個像素灰階值(A、B、C和端人至邊緣❹】單元12〇中, 將鄰,四個像素灰階值(a、b、qd)代人上述之公式⑴, 以獲知低通濾波加權值(LpWeight),此應用例一之計算低通 滤波加權值(LPWeight)過程如下: 那+20)-(20+叫= M。 再接著進行步驟225,將待處理像素灰階值(X)和鄰近 四個像素灰階值(A、B、C和D)輸入至銳利濾波器11〇中, 做摺積運算,以計算錢利像素灰階值dt),此應用例一 之計算銳利像素灰階值(SF。^)過程如下: 职⑽=划 x(-7)+Mx(-/)+Wx(5)+20x(一 i)+50x(_7)=2 洲。 然而’所計算出的銳利像素灰階值(SF(>ut)為 280已超出 π 1306348 此實施例之像素所能表示的灰階最大值範圍,因此將銳利像 素灰階值(SFout)設成255。因此可看出低通濾波加權值所偵 測出待處理像素灰階值(X)的周圍是屬於較平滑。 然後’將待處理像素灰階值(X)、銳利像素灰階值 (SFDut)、低通濾波加權值(LpWeight)和最大加權值 (MaxWeight)輸入至雜訊濾除單元13〇中,根據上列公式⑺ 以計算出此待處理像素灰階值(χ)經本發明處理後的強化像 素灰階值(Υ) ’其計算出強化像素灰階值(γ)過程如下: υ^1〇χ255 + (256-1〇)χ80 由上述可知,若待處理像素灰階值(χ)經銳利濾波器 no後的銳利像素灰階值(SFc>ut)為255,可查覺此待處理像 素灰階值(X)雖被銳利化,但在其A、B與C、D所組成的 二個平滑區域中,此強化像素灰階值(SF〇ut)將會有較明顯的 高頻雜訊。因此經本發明之雜訊濾除單元13〇處理後,可發 •現本發明能有效地抑制其高頻雜訊,使得A、B與C、D和 X所組成的區域比未使用本發明之渡除濾除單元13〇所處 理的區域還平滑,而且不失其銳利化效果。 應用例二 待處理像素灰階值(X)與其鄰近四個像素灰階值(A、 B、C 和 D)的資料如下:A = 30、B=4〇、x=6〇、C2〇〇 和 d=2〇〇, X、A和B像素屬於較平滑之一區域,而C、D像素屬灰階 值較高的另一區域,因此待處理像素灰階值(χ)恰好位於此 12 1306348 二區域之邊緣。 首先,進行步驟210提供-待處理像素灰階值⑻、步 驟215獲得鄰近四個像素灰階值(_鄰近像素灰階值⑷、第 二鄰近像素灰階值⑻、第三鄰近像素灰階值⑹和第四鄰近 像素灰階值(D))之後,接著進行步驟 7鄉220,將鄰近四個像素 灰階值(A、B、aD)輸入至邊緣偵测單^2〇卜將鄰近 ^固像素灰階值(A、B、C和D)代入上述之公式⑴,以獲 =通濾波加權值(LPWeight),此應用例—之計算低通渡波 加權值(LPWeight)過程如下: are衲r = |(划+祁)—(遍+鹰】/2 = 。 再接著進行步驟225’將待處理像素灰階值(X)和㈣ 2像素Ϊ階值(A、B、°^ D)輸入至銳利遽波器110中, =運算,以計算出銳利像素灰階值(SF_),此應用例一 4叶异銳利像素灰階值(SF<m)過程如下: -170 8Ρ^=30χ(-ή+40χ(-ΐ)+6〇χ(5)+2〇〇χ(-ή+2〇〇χ^ήζ 然而,所計算出的銳利像素灰階值(SFout)為-〗7〇已超 貫施例之像素灰階值所能表示的灰階最小值範圍,因此 ::像素灰階值(SF_)設成〇。因此可看出低通遽波加㈣ 測出的待處理像素灰階值(x)是位於邊緣處。 後,將待處理像素灰階值(x)、銳利像素灰階值 0ut)、低通濾波加權值(LPWeight)和最大加權值 13 1306348 (MaxWeight)輸入至雜訊濾除單元130中’根據上列公式(2) 以計算出此待處理像素灰階值(X)經本發明處理後的強化像 素灰階值(Y),其計算出強化像素灰階值(γ)過程如下: ν_165χ 0 + (256-165)χ60 ~256 ° 由上述可知,若待處理像素灰階值(χ)經銳利濾波器 110後的銳利像素灰階值(SFout)為〇,可查覺此強化像素灰 階值與C、D像素的灰階值差距仍有一段距離,反而降低經 銳利化處理後之銳利度。因此透過本發明之雜訊濾除單元 130’使強化像素灰階值(SF〇ut)變成21,來強化其邊緣,進 而提高影像之銳利度。 本發明之影像邊緣強化裝置與方法,可處理至少一個待 處理像素灰階值(X),亦可將影像中之像素灰階#一 一輸入 至此影像邊緣強化裝置中,來達到本發明之目的及功效。 由上述本發明較佳實施例可知,應用本發明不但具有抑 制影像銳利化之後所產生的高頻雜訊之優點,亦可強㈣像 的邊緣部份’使影像仍保有影像銳利化後的銳利影像。 —雖然本發明已以較佳實施例揭露如上然其並非用以限 疋本發明’任何熟f此技藝者’在不脫離本發明之精神和範 圍内’當可作各種之更動與潤飾’因此本發明之保護範圍當 視後附之申請專利範圍所界定者為準。 田 【圖式簡單說明】 之一較佳實施例之影像邊緣強化 第1圖係繪示本發明 1306348 裝置之方塊示意圖。 圖係繪示依照本發明之較佳實施例之待處理像素 Λ P值與其相鄰像素灰階值的位置示意圖。 第 3 ^ 圖係繪示依照本發明之一較佳實施例之強化邊緣 色彩方法的流程圖。 【主要元件符號說明】 100 ·影像邊緣強化裝置 ® 110:銳利濾波器 120:邊緣偵測單元 13〇 :雜訊濾除單元 X:待處理像素灰階值 Y :強化像素灰階值 SFout :銳利像素灰階值 LPWeight :低通濾低加權值 MaxWeight:最大加權值 籲 A、B、C、D :像素灰階值 205 :提供影像 210 :提供待處理像素灰階值 215:提供鄰近像素灰階值 220 :決定低通濾波加權值 - 225:進行銳利化處理 230:進行内插運算First, step 210 is performed for a pixel grayscale value (X) to be processed, and step 215 is used to obtain four adjacent grayscale values (first neighboring pixel grayscale value (4), second neighboring pixel grayscale value (B) After the second neighboring pixel grayscale value (6) and the fourth neighboring pixel grayscale value (D)), proceeding to step 22(), the adjacent four pixel grayscale values (A, B, C, and end human to edge ❹ In the unit 12〇, the adjacent four pixel grayscale values (a, b, qd) are substituted into the above formula (1) to obtain the low-pass filter weighting value (LpWeight), and the application example 1 calculates the low-pass filter weighting. The value (LPWeight) process is as follows: then +20) - (20 + called = M. Then proceed to step 225, the pixel grayscale value (X) to be processed and the adjacent four pixel grayscale values (A, B, C and D) Input to the sharp filter 11〇, and perform a convolution operation to calculate the grayscale value dt) of the moneyy pixel. The process of calculating the sharp pixel grayscale value (SF.^) in this application example is as follows: Job (10) = stroke x(-7)+Mx(-/)+Wx(5)+20x(一i)+50x(_7)=2 continent. However, the calculated sharp pixel grayscale value (SF(>ut) is 280 has exceeded the grayscale maximum range that π 1306348 can represent in this embodiment, so the sharp pixel grayscale value (SFout) is set. 255. Therefore, it can be seen that the low-pass filter weight value detects that the grayscale value (X) of the pixel to be processed is relatively smooth. Then 'the gray value of the pixel to be processed (X), the sharp grayscale value of the pixel (SFDut), low pass filter weight value (LpWeight) and maximum weight value (MaxWeight) are input to the noise filtering unit 13A, and the gray level value (χ) of the pixel to be processed is calculated according to the above formula (7). The processed pixel grayscale value (Υ) is calculated as follows: The process of calculating the grayscale value (γ) of the enhanced pixel is as follows: υ^1〇χ255 + (256-1〇)χ80 As can be seen from the above, if the grayscale value of the pixel to be processed is (χ) The sharp pixel grayscale value (SFc> ut) after the sharp filter no is 255, and it can be found that the grayscale value (X) of the pixel to be processed is sharpened, but in its A, B and C, In the two smooth regions composed of D, the enhanced pixel grayscale value (SF〇ut) will have obvious high frequency impurities. Therefore, after the noise filtering unit 13 of the present invention is processed, the present invention can effectively suppress the high frequency noise, so that the regions composed of A, B and C, D and X are compared to the unused invention. The area processed by the filtering unit 13 is smooth, and the sharpening effect is not lost. Application Example 2 The gray level value (X) of the pixel to be processed and its neighboring four pixel gray scale values (A, B, C and The data of D) are as follows: A = 30, B=4〇, x=6〇, C2〇〇 and d=2〇〇, X, A and B pixels belong to a smoother area, while C and D pixels are gray. Another region with a higher order value, so the pixel grayscale value (χ) of the pixel to be processed is located just at the edge of the 12 1306348 two region. First, step 210 is provided - the pixel grayscale value to be processed (8), and step 215 is obtained as four neighboring regions. After the pixel grayscale value (_the neighboring pixel grayscale value (4), the second neighboring pixel grayscale value (8), the third neighboring pixel grayscale value (6), and the fourth neighboring pixel grayscale value (D)), then proceed to step 7 township 220 , input four grayscale values (A, B, aD) adjacent to the edge detection unit ^2 〇 将A, B, C, and D) are substituted into the above formula (1) to obtain the pass filter weighting value (LPWeight). The application example—the low pass wave weighting value (LPWeight) process is as follows: are衲r = |祁)—(pass + eagle)/2 =. Then proceed to step 225' to input the pixel grayscale value (X) and (4) 2 pixel Ϊ order value (A, B, °^ D) to the sharp chopper In 110, the = operation is used to calculate the sharp pixel grayscale value (SF_). In this application example, the 4-leaf-sharp pixel grayscale value (SF<m) process is as follows: -170 8Ρ^=30χ(-ή+40χ( -ΐ)+6〇χ(5)+2〇〇χ(-ή+2〇〇χ^ήζ However, the calculated sharp pixel grayscale value (SFout) is -〗 7〇 has been applied The grayscale minimum range that can be represented by the pixel grayscale value, therefore: the pixel grayscale value (SF_) is set to 〇. Therefore, it can be seen that the low-pass chopping plus (4) measured pixel grayscale value (x) is located at the edge. After that, the pixel grayscale value (x), the sharp pixel grayscale value (0), the low-pass filter weighting value (LPWeight), and the maximum weighting value 13 1306348 (MaxWeight) of the pixel to be processed are input into the noise filtering unit 130. Column formula (2) calculates the grayscale value (Y) of the enhanced pixel after the grayscale value (X) of the pixel to be processed is processed by the present invention, and calculates the grayscale value (γ) of the enhanced pixel as follows: ν_165χ 0 + ( 256-165) χ60 ~ 256 ° As can be seen from the above, if the grayscale value (SFout) of the pixel grayscale value (χ) after the sharp filter 110 is 〇, the grayscale value of the enhanced pixel can be detected. There is still a distance between the grayscale values of the C and D pixels, but the sharpness after the sharpening is reduced. Therefore, the noise filtering unit 130' of the present invention makes the enhanced pixel grayscale value (SF〇ut) 21, to strengthen the edge thereof, thereby improving the sharpness of the image. The image edge enhancement device and method of the present invention can process at least one grayscale value (X) of the pixel to be processed, and can also input the pixel grayscale #1 in the image into the image edge enhancement device to achieve the purpose of the present invention. And efficacy. It can be seen from the above preferred embodiments of the present invention that the application of the present invention not only has the advantages of suppressing the high frequency noise generated after the image sharpening, but also can sharpen the edge portion of the image to keep the image sharp after sharpening the image. image. The present invention has been disclosed in its preferred embodiments as a matter of course, and is not intended to limit the invention to the invention. The scope of the invention is defined by the scope of the appended claims. Field [Simplified Description of the Drawings] Image Edge Enhancement of a Preferred Embodiment FIG. 1 is a block diagram showing the apparatus of the present invention 1306348. The figure is a schematic diagram showing the position of a pixel Λ P value to be processed and its neighboring pixel gray scale value in accordance with a preferred embodiment of the present invention. Figure 3 is a flow chart showing a method of enhancing edge color in accordance with a preferred embodiment of the present invention. [Main component symbol description] 100 • Image edge enhancement device® 110: Sharp filter 120: Edge detection unit 13〇: Noise filtering unit X: Pixel grayscale value to be processed Y: Enhanced pixel grayscale value SFout: Sharp Pixel grayscale value LPWeight: low pass filter low weighting value MaxWeight: maximum weighting value A, B, C, D: pixel grayscale value 205: provide image 210: provide pixel grayscale value to be processed 215: provide grayscale of adjacent pixels Value 220: Determine the low pass filter weight value - 225: Perform the sharpening process 230: Perform the interpolation operation

Claims (1)

1306348 十、申請專利範圍 1 · 一種影像的邊緣強化方法,至少包含: 提供一影像,其中該影像具有複數個像素灰階值; 提供一待處理像素灰階值(X),其中該待處理像素灰 階值為該些像素灰階值其中之一者; 提供複數個鄰近像素灰階值,其中每—該些鄰近像素 灰階值係與該待處理像素灰階值(x)相鄰; 決定一低通濾波加權值(Lpweight),其中該低通濾波 加權值係應用該些鄰近像素灰階值來計算出 進行一銳利化處理,藉以輸入該待處理像素灰階值與 該些鄰近像素灰階值做稽積(C〇nv〇iuti〇n)運算,來獲得一 銳利像素灰階值(SF。^);以及 進行一内插運算,該内插運算係藉由該待處理像素灰 階值、該低通濾波加權值、該銳利像素灰階值和一最大加 權值(MaxWeight),來獲得一強化像素灰階值,其中該 最大加權值係由低通濾波加權值之最大表示值來決定。 2. 如申請專利範圍第1項所述之影像的邊緣強化方 法’其中決定該低通濾波加權值之方法係藉由該些鄰近像 素灰階值之銳利程度。 3. 如申請專利範圍第1項所述之影像的邊緣強化方 法’其中該銳利化處理更包含利用複數個銳利濾波器係數 16 1306348 來針對該待處理像素灰階值與該些鄰近像素灰階值做褶 積運算,以計算出該銳利像素灰階值。 4. 如申請專利範圍第3項所述之影像的邊緣強化方 法’其中該些銳利濾波器係數係根據該低通濾波加權值之 大小而來決定。 5. 如申請專利範圍第4項所述之影像的邊緣強化方 法’其中該些銳利濾波器係數係依照該低通濾波加權值之 大小所建立之一對照表(Look-Up Table; LUT)而來選取。 6. 如申請專利範圍第5項所述之影像的邊緣強化方 法,其中建立該對照表的方式係將該低通濾波加權值之大 小分成複數個區域範圍,而該些銳利濾波器係數係從該低 通濾波加權值所對應之該些區域範圍其中之一者來決定。 7. 如申請專利範圍第3項所述之影像的邊緣強化方 法,其中該些銳利濾波器係數係由該低通濾波加權值透過 一運算,而計算出。 8. 如申請專利範圍第1項所述之影像的邊緣強化方 法,其中該内插運算的計算方式係根據下列公式: γ _ LPWeight x SFn,„ + {MaxWeight - LPWeight)x X MaxWeight 17 1306348 、9·如_請專利範圍第1項所述之影像的邊緣強化方 去,其中每—該些像素灰階值係透過馗位元之二進位資 料來記錄。 -. ι〇. 一種影像的邊緣強化裝置,藉以處理一影像之複 數個像素灰階值中之一待處理像素灰階值(X),其中該影 ®像的邊緣強化裝置至少包含: 一邊緣偵測單元,用以輸入與該待處理像素灰階值(χ) 相鄰之複數個鄰近像素灰階值,來獲得一低通濾波加權值 (LPweight); 一銳利濾波器(Sharpness Filter),用以輸入該待處理 像素灰階值與該些鄰近像素灰階值做一銳利化處理,而獲 得一銳利像素灰階值(SFout);以及 一雜訊濾除單元,用以輸入該待處理像素灰階值、該 • 低通濾波加權值、該銳利像素灰階值和一最大加權值 (MaxWeight)做一内插運算,來計算出一強化像素灰階值 (Y),其中該最大加權值係由低通濾波加權值之最大表示 值來決定。 11.如申請專利範圍第10項所述之影像的邊緣強化 裝置,其中該邊緣偵測單元係計算該些鄰近像素灰階值之 銳利程度’而獲得該低通濾波加權值。 18 1306348 12.如申請專利範圍第10項所述之影像的邊緣強化 裝置,其中該銳利濾波器更至少包含複數個銳利濾波器係 數0 1 3 _如申請專利範圍第1 2項所述之影像的邊緣強化 裝置,其中该銳利濾波器之該些銳利濾波器係數,係根據 該低通滤波加權值之大小而決定。 14.如申請專利範圍第12項所述之影像的邊緣強化 方法’其中該些銳利濾、波器係數係由一對照表來決定。 1 5.如申請專利範圍第14項所述之影像的邊緣強化 方法,其中該對照表係將該低通濾波加權值之大小分成複 數個區域範圍’而該些銳利濾波器係數係從該低通濾波加 權值所對應之該些區域範圍其中之—者來決定。 16. 如申請專利範圍第12項所述之影像的邊緣強化 方法’其中該些銳利濾波器係數係將該低通濾波加權值輸 入至一電路來獲得。 17. 如申請專利範圍第1〇項所述之影像的邊緣強化 裝置’其中該雜訊濾除單元至少包含一加法器、複數個乘 法器、一減法器和一除法器,來計算出一強化像素灰階值 (γ) ’而該雜訊濾除單元之計算過程係根據下列公式: 1306348 LPWeight x SFout + {MaxWeight - LPWeight) x X MaxWeight1306348 X. Patent Application No. 1 · An image edge enhancement method includes at least: providing an image, wherein the image has a plurality of pixel grayscale values; providing a pixel grayscale value (X) to be processed, wherein the pixel to be processed The grayscale value is one of the grayscale values of the pixels; providing a plurality of grayscale values of adjacent pixels, wherein each of the grayscale values of the neighboring pixels is adjacent to the grayscale value (x) of the pixel to be processed; a low-pass filtering weighting value (Lpweight), wherein the low-pass filtering weighting value is applied to calculate the grayscale value of the neighboring pixels to perform an sharpening process, thereby inputting the grayscale value of the pixel to be processed and the neighboring pixel grayscale The order value is used as an accumulation (C〇nv〇iuti〇n) operation to obtain a sharp pixel grayscale value (SF.^); and an interpolation operation is performed, the interpolation operation is performed by the gray scale of the pixel to be processed a value, the low pass filter weight value, the sharp pixel gray scale value, and a maximum weight value (MaxWeight) to obtain an enhanced pixel gray scale value, wherein the maximum weight value is determined by a maximum representation value of the low pass filter weight value Decide. 2. The edge enhancement method of the image as described in claim 1 wherein the method of determining the low-pass filter weight value is based on the sharpness of the neighboring pixel grayscale values. 3. The edge enhancement method for image according to claim 1, wherein the sharpening process further comprises using a plurality of sharp filter coefficients 16 1306348 for the gray level value of the pixel to be processed and the gray scale of the adjacent pixels. The value is concatenated to calculate the sharp pixel grayscale value. 4. The edge enhancement method of the image of claim 3, wherein the sharp filter coefficients are determined according to the size of the low pass filter weight value. 5. The edge enhancement method for image according to claim 4, wherein the sharp filter coefficients are based on a look-up table (LUT) of the low-pass filter weight value. To choose. 6. The edge enhancement method for image according to claim 5, wherein the method of establishing the comparison table divides the size of the low-pass filter weight value into a plurality of region ranges, and the sharp filter coefficients are The low pass filter weighting value is determined by one of the range of regions. 7. The edge enhancement method of the image of claim 3, wherein the sharp filter coefficients are calculated by the low pass filter weight value by an operation. 8. The edge enhancement method for an image according to claim 1, wherein the interpolation operation is calculated according to the following formula: γ _ LPWeight x SFn, „ + {MaxWeight - LPWeight) x X MaxWeight 17 1306348 , 9. If you want to use the edge enhancement of the image described in item 1 of the patent scope, each of the pixel grayscale values is recorded by the binary data of the 馗 bit. - ι〇. The edge of an image And an enhancement device for processing one of a plurality of pixel grayscale values of an image to be processed, wherein the edge enhancement device of the image includes at least: an edge detection unit for inputting The gray level value of the pixel to be processed (χ) is adjacent to a plurality of neighboring pixel gray scale values to obtain a low pass filter weight value (LPweight); a sharpness filter is used to input the gray scale of the pixel to be processed The value is sharpened with the grayscale values of the neighboring pixels to obtain a sharp pixel grayscale value (SFout); and a noise filtering unit is configured to input the grayscale value of the pixel to be processed, the low pass Filter plus The weight value, the sharp pixel grayscale value and a maximum weighting value (MaxWeight) are subjected to an interpolation operation to calculate an enhanced pixel grayscale value (Y), wherein the maximum weighting value is the maximum of the low pass filtering weighting value 11. The edge enhancement device of the image of claim 10, wherein the edge detection unit calculates a sharpness degree of the grayscale values of the neighboring pixels to obtain the low pass filter weight value. The edge enhancement device of the image of claim 10, wherein the sharp filter further comprises at least a plurality of sharp filter coefficients 0 1 3 _ as described in claim 12 The image edge enhancement device, wherein the sharp filter coefficients of the sharp filter are determined according to the size of the low pass filter weight value. 14. The image edge enhancement method according to claim 12 of the patent application scope The sharp filter and the wave coefficient are determined by a comparison table. 1 5. The edge enhancement method of the image according to claim 14, wherein the comparison table is low pass The size of the filter weight value is divided into a plurality of region ranges ' and the sharp filter coefficients are determined from the range of regions corresponding to the low-pass filter weight value. 16. As claimed in item 12 of the patent scope The edge enhancement method of the image is described in which the sharp filter coefficients are obtained by inputting the low-pass filter weight value to a circuit. 17. The edge enhancement device of the image according to claim 1 The noise filtering unit includes at least one adder, a plurality of multipliers, a subtractor and a divider to calculate an enhanced pixel gray level value (γ) and the calculation process of the noise filtering unit is based on The following formula: 1306348 LPWeight x SFout + {MaxWeight - LPWeight) x X MaxWeight 2020
TW95105153A 2006-02-15 2006-02-15 Device and method for image edge enhancement TWI306348B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW95105153A TWI306348B (en) 2006-02-15 2006-02-15 Device and method for image edge enhancement

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW95105153A TWI306348B (en) 2006-02-15 2006-02-15 Device and method for image edge enhancement

Publications (2)

Publication Number Publication Date
TW200731767A TW200731767A (en) 2007-08-16
TWI306348B true TWI306348B (en) 2009-02-11

Family

ID=45071356

Family Applications (1)

Application Number Title Priority Date Filing Date
TW95105153A TWI306348B (en) 2006-02-15 2006-02-15 Device and method for image edge enhancement

Country Status (1)

Country Link
TW (1) TWI306348B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI362629B (en) 2008-06-26 2012-04-21 Chunghwa Picture Tubes Ltd Image process method and apparatus
CN102281388A (en) * 2010-06-09 2011-12-14 联咏科技股份有限公司 Method and apparatus for adaptively filtering image noise
TWI485690B (en) * 2013-03-28 2015-05-21 Innolux Corp Display method for use in a display device

Also Published As

Publication number Publication date
TW200731767A (en) 2007-08-16

Similar Documents

Publication Publication Date Title
JP4727720B2 (en) Image processing method and image processing apparatus
CN107527333B (en) Quick image enhancement method based on gamma transformation
Dengwen An edge-directed bicubic interpolation algorithm
US8744206B2 (en) Image processing apparatus, image processing method, and program
KR101112139B1 (en) Apparatus and method for estimating scale ratio and noise strength of coded image
WO2008145072A1 (en) Method and device for removing image noise based on the median filter
CN108038833B (en) Image self-adaptive sharpening method for gradient correlation detection and storage medium
JP2011504682A (en) Resize image sequence
JP2005506724A (en) Method and system for improving appearance and compressibility of digital image
TR201810171T4 (en) A method and apparatus for minimizing annular artifacts in an input image.
US8693783B2 (en) Processing method for image interpolation
JP5076186B2 (en) Image enlargement method
JP2003283878A (en) Method for improving picture quality
TWI306348B (en) Device and method for image edge enhancement
EP2717222A1 (en) Image processing apparatus and program recording medium
WO2005004057A1 (en) Image processor, image processing method, program and recording medium
JP4599457B1 (en) Image processing apparatus, display apparatus, and image processing method
TWI360788B (en) Image processing methods and image processing appa
JP5614550B2 (en) Image processing method, image processing apparatus, and program
CN101212560A (en) Method for improving video image sharpness point by point
JP3625144B2 (en) Image processing method
CN102156973A (en) Image de-noising method and equipment
WO2018099303A1 (en) Image denoising method and device, and computer storage medium
JP4585603B1 (en) Image processing apparatus, display apparatus, and image processing method
JP4104475B2 (en) Contour correction device

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees