TW201408059A - Image noise filtering method and device - Google Patents
Image noise filtering method and device Download PDFInfo
- Publication number
- TW201408059A TW201408059A TW101127788A TW101127788A TW201408059A TW 201408059 A TW201408059 A TW 201408059A TW 101127788 A TW101127788 A TW 101127788A TW 101127788 A TW101127788 A TW 101127788A TW 201408059 A TW201408059 A TW 201408059A
- Authority
- TW
- Taiwan
- Prior art keywords
- input
- elements
- block
- difference
- offset
- Prior art date
Links
- 238000001914 filtration Methods 0.000 title claims abstract description 60
- 238000000034 method Methods 0.000 title claims abstract description 21
- 238000004364 calculation method Methods 0.000 claims description 14
- 230000000694 effects Effects 0.000 claims description 5
- 238000005303 weighing Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
Landscapes
- Image Processing (AREA)
Abstract
Description
本發明是有關於一種影像處理方法,特別是指一種影像雜訊濾除方法。 The invention relates to an image processing method, in particular to an image noise filtering method.
影像在擷取、轉換或傳輸過程中,無可避免地引進了一些不期望的雜訊干擾,所以通常會先對受干擾的影像進行雜訊濾除處理來提升畫面品質,再進行後續的監視系統影像分析或其他影像優化處理。 During the process of capturing, converting or transmitting images, some undesired noise interference is inevitably introduced. Therefore, the interference image is usually filtered to improve the picture quality, and then the subsequent monitoring is performed. System image analysis or other image optimization processing.
參閱圖1,習知一種雜訊濾除方法是採用非區域平均(Non-Local Means,NLM),為影像內一待處理畫素配置一個以其為中心且具有p×p個畫素的濾波視窗,並為濾波視窗內各畫素(下稱濾波視窗畫素)配置一個以其為中心且具有q×q個畫素的比對區塊,q<p。然後,使待處理畫素的比對區塊相比於各濾波視窗畫素的比對區塊,以算出待處理畫素經雜訊濾除後所對應的一輸出畫素。 Referring to FIG. 1, a conventional noise filtering method uses a non-local average (Non-Local Means (NLM)) to configure a filter with a p×p pixel centered on a pixel to be processed in an image. Window, and configure a pixel (centered as filtered window pixel) in the filtering window with a matching block centered on it and having q×q pixels, q<p. Then, the comparison block of the pixel to be processed is compared with the comparison block of each filter window pixel to calculate an output pixel corresponding to the pixel to be processed after the noise filtering.
其中,求取輸出畫素的計算方法是:計算待處理畫素的比對區塊和其中一濾波視窗畫素的比對區塊兩者位於對應位置的畫素差異總和,再計算待處理畫素的比對區塊和另一濾波視窗畫素的比對區塊兩者間位於對應位置的畫素差異總和,直到算出關於所有濾波視窗畫素的畫素差異總和,然後使用這些算出的區塊間畫素差異總和,對該等濾波視窗畫素進行加權平均來得到該輸出畫素。不過,相鄰畫素的比對區塊多有重疊,所以前述方法存在許多重複運 算,導致運算效率低落,徒然浪費計算成本。 The calculation method for obtaining the output pixel is: calculating the sum of the pixel differences of the comparison block of the pixel to be processed and the comparison block of one of the filtered window pixels at the corresponding position, and then calculating the to-be-processed picture The sum of the pixel differences between the aligned blocks of the prime and the other block of the filtered window pixels at the corresponding positions until the sum of the pixel differences for all filtered window pixels is calculated, and then the calculated regions are used The sum of pixel differences between blocks, weighted average of the filtered window pixels to obtain the output pixels. However, there are many overlapping blocks of adjacent pixels, so there are many duplicates in the above methods. Counting, resulting in inefficient computing, wastes computational costs in vain.
因此,本發明之目的,即在提供一種影像雜訊濾除方法及裝置,能有效降低計算成本。 Therefore, the object of the present invention is to provide an image noise filtering method and apparatus, which can effectively reduce the calculation cost.
於是,本發明影像雜訊濾除方法,適用於濾除一輸入影像的雜訊而得到一輸出影像,該輸入影像的H×W個畫素形成一輸入陣列的H×W個輸入元素I(x,y),該輸出影像的H×W個畫素形成一輸出陣列的H×W個輸出元素O(x,y),0≦x<W,0≦y<H,該影像雜訊濾除方法包含以下步驟:(A)組配一偏移陣列產生器,為各輸入元素I(x,y)計算一偏移元素,且各輸入元素I(x,y)對應的偏移元素代表該輸入元素I(x,y)和另一輸入元素的差異,0<p<W,0<p<H,p為正奇數;(B)組配一差額產生單元,為各輸入元素I(x,y),使該輸入元素之一比對區塊所對應的那些偏移元素相比於相鄰輸入元素之一比對區塊所對應的那些偏移元素,來求出一差額元素,其中該輸入元素的比對區塊包括有該輸入元素和鄰近的多個輸入元素;(C)組配一計算單元,為各輸入元素I(x,y),根據該等差額元素計算出一區塊元素,其中該區塊元素代表基於該輸入元素I(x,y)之比對區塊所對應的所有偏移元素總和;及(D)組配一輸出單元,為各輸入元素I(x,y),基於對應區塊元素和該另一輸入元素,計算該輸入元素I(x,y)對應的輸出元素O(x,y)。 Therefore, the image noise filtering method of the present invention is suitable for filtering out noise of an input image to obtain an output image, wherein the H×W pixels of the input image form an H×W input element I of an input array ( x , y ), the H×W pixels of the output image form an H×W output elements O( x , y ) of an output array, 0≦x<W, 0≦y<H, the image noise filter The dividing method comprises the following steps: (A) assembling an offset array generator, calculating an offset element for each input element I( x , y ), and the offset element corresponding to each input element I( x , y ) represents The input element I( x , y ) and another input element The difference, 0<p<W, 0<p<H, p is a positive odd number; (B) is combined with a difference generating unit for each input element I( x , y ), making one of the input elements aligned Those offset elements corresponding to the block are compared to those corresponding to one of the adjacent input elements, and a difference element is obtained, wherein the comparison element of the input element includes the input element And a plurality of adjacent input elements; (C) a computing unit, for each input element I( x , y ), a block element is calculated according to the difference element, wherein the block element represents based on the input element I( x , y ) is the sum of all the offset elements corresponding to the block; and (D) is an output unit for each input element I( x , y ), based on the corresponding block element and the other Input element , the output element O( x , y ) corresponding to the input element I( x , y ) is calculated.
而本發明影像雜訊濾除裝置,適用於濾除一輸入影像的雜訊而得到一輸出影像,該輸入影像的H×W個畫素形成 一輸入陣列的H×W個輸入元素I(x,y),該輸出影像的H×W個畫素形成一輸出陣列的H×W個輸出元素O(x,y),0≦x<W,0≦y<H,該影像雜訊濾除裝置包含:一偏移陣列產生器,為各輸入元素I(x,y)計算一偏移元素,且各輸入元素I(x,y)對應的偏移元素代表該輸入元素I(x,y)和另一輸入元素的差異,0<p<W,0<p<H,p為正奇數;一差額產生單元,為各輸入元素I(x,y),使該輸入元素之一比對區塊所對應的那些偏移元素相比於相鄰輸入元素之一比對區塊所對應的那些偏移元素,來求出一差額元素,其中該輸入元素的比對區塊包括有該輸入元素和鄰近的多個輸入元素;一計算單元,為各輸入元素I(x,y),根據該等差額元素計算出一區塊元素,其中該區塊元素代表基於該輸入元素I(x,y)之比對區塊所對應的所有偏移元素總和;及一輸出單元,為各輸入元素I(x,y),基於對應區塊元素和該另一輸入元素,計算該輸入元素I(x,y)對應的輸出元素O(x,y)。 The image noise filtering device of the present invention is adapted to filter out noise of an input image to obtain an output image, wherein the H×W pixels of the input image form an H×W input element I of the input array ( x) , y ), the H×W pixels of the output image form an H×W output element O( x , y ) of an output array, 0≦x<W, 0≦y<H, the image noise filtering The apparatus includes: an offset array generator that calculates an offset element for each input element I( x , y ), and an offset element corresponding to each input element I( x , y ) represents the input element I( x , y And another input element The difference, 0<p<W, 0<p<H, p is a positive odd number; a difference generating unit, for each input element I( x , y ), such that one of the input elements corresponds to the corresponding block The offset element obtains a difference element compared to the offset elements corresponding to one of the adjacent input elements, wherein the comparison element of the input element includes the input element and the adjacent plurality of An input element; a calculation unit, for each input element I( x , y ), calculates a block element according to the difference element, wherein the block element represents an alignment area based on the input element I( x , y ) The sum of all offset elements corresponding to the block; and an output unit for each input element I( x , y ) based on the corresponding block element and the other input element , the output element O( x , y ) corresponding to the input element I( x , y ) is calculated.
有關本發明之前述及其他技術內容、特點與功效,在以下配合參考圖式之二個較佳實施例的詳細說明中,將可清楚的呈現。 The above and other technical contents, features and advantages of the present invention will be apparent from the following detailed description of the preferred embodiments of the invention.
在本發明被詳細描述之前,要注意的是,在以下的說明內容中,類似的元件是以相同的編號來表示。 Before the present invention is described in detail, it is noted that in the following description, similar elements are denoted by the same reference numerals.
參閱圖2和圖3,本發明影像雜訊濾除裝置100之第一 較佳實施例適用於濾除一輸入影像的雜訊來獲取一輸出影像。輸入影像的H×W個畫素構成一個具有H×W個輸入元素I(x,y)的輸入陣列,輸出影像的H×W個畫素構成一個具有H×W個輸出元素O(x,y)的輸出陣列,且以下稱位於相同陣列位置的不同陣列元素彼此對應。 Referring to FIG. 2 and FIG. 3, the first preferred embodiment of the image noise filtering device 100 of the present invention is adapted to filter out noise of an input image to obtain an output image. The H×W pixels of the input image form an input array with H×W input elements I( x , y ), and the H×W pixels of the output image form one H×W output elements O( x , The output array of y ), and the different array elements hereinafter referred to as the same array location, correspond to each other.
影像雜訊濾除裝置100為各輸入元素I(x,y)配置一個以其為中心且具有p×p個輸入元素的濾波視窗,並為濾波視窗內各輸入元素配置一個以其為左上角的比對區塊,其中比對區塊具有r×r個輸入元素,0<r<p<W,0<r<p<H,r與p皆為正奇數,0≦x<W,0≦y<H。請注意,為示圖方便,圖2僅繪出輸入元素I(x,y)和的比對區塊,但實際上濾波視窗內各輸入元素都配置有一比對區塊。 The image noise filtering device 100 configures each input element I( x , y ) with a filtering window centered on it and having p×p input elements, and configures one input element in the filtering window as the upper left corner. Alignment block, wherein the comparison block has r × r input elements, 0 < r < p < W, 0 < r < p < H, r and p are both positive odd numbers, 0 ≦ x < W, 0 ≦y<H. Note that for the convenience of the diagram, Figure 2 only depicts the input elements I( x , y ) and Aligned blocks, but in fact each input element in the filter window is configured with a matching block.
影像雜訊濾除裝置100的運作原理是:使待處理輸入元素的比對區塊相比於其濾波視窗內各輸入元素的比對區塊,並使其濾波視窗內各輸入元素根據相比結果進行加權平均來得到對應的輸出元素。但是,就待處理輸入元素和相鄰輸入元素來說,兩者的濾波視窗多有重疊,且比對區塊交疊處也多,所以求取兩者對應輸出元素的計算過程重複性極高,運算效率不佳。為此,本實施例特別根據相鄰比對區塊的差異逐步拼湊出待處理輸入元素的比對區塊之於濾波視窗內各輸入元素的比對區塊的相比結果,進而求取輸出元素。 The image noise filtering device 100 operates on the principle that the comparison block of the input element to be processed is compared with the comparison block of each input element in the filtering window, and the input elements in the filtering window are compared according to each other. The result is weighted averaged to get the corresponding output element. However, as for the input elements and adjacent input elements to be processed, the filtering windows of the two overlap and there are more overlaps between the blocks, so the calculation process of the corresponding output elements is extremely repetitive. The calculation efficiency is not good. Therefore, in this embodiment, the comparison result of the comparison block of the input element to be processed and the comparison block of each input element in the filtering window is gradually pieced together according to the difference of the adjacent comparison block, and the output is obtained. element.
詳細來說,圖3的影像雜訊濾除裝置100包含一設定單元1,以及依序電連接的一接收單元2、一偏移陣列產生 器3、一區塊計算器4、一權重處理器5和一輸出單元6。 In detail, the image noise filtering device 100 of FIG. 3 includes a setting unit 1 and a receiving unit 2 and an offset array sequentially connected in sequence. The unit 3, a block calculator 4, a weight processor 5 and an output unit 6.
接收單元2接收有H列W行的該輸入陣列。設定單元1決定濾波視窗的輸入元素數目(即p×p)和比對區塊的輸入元素數目(即r×r)。偏移陣列產生器3為輸入陣列的各輸入元素I(x,y)配置一個濾波元素,且根據輸入陣列得到一個陣列大小相同的偏移陣列,其中各偏移陣列元素D(x,y)(下稱偏移元素)是對應輸入元素I(x,y)和濾波元素的差異。區塊計算器4則根據偏移陣列求出一個陣列大小1×W的區塊陣列,且為偏移陣列的每一列更新區塊陣列,其中為各列所更新的區塊陣列元素N(x)(下稱區塊元素)相當於該列中對應輸入元素I(x,y)的比對區塊內所有對應偏移元素的總和。接著,權重處理器5使用該等區塊元素求出一個陣列大小H×W的權重陣列,且使用該等對應的區塊元素和濾波元素求出一個陣列大小H×W的加權陣列。最後,輸出單元6根據權重陣列和加權陣列進行除法運算,而得到輸出陣列的該等輸出元素。 The receiving unit 2 receives the input array having H columns and W rows. The setting unit 1 determines the number of input elements of the filter window (i.e., p × p) and the number of input elements of the aligned block (i.e., r × r). The offset array generator 3 configures a filter element for each input element I( x , y ) of the input array And obtaining an offset array of the same array size according to the input array, wherein each offset array element D( x , y ) (hereinafter referred to as an offset element) is a corresponding input element I( x , y ) and a filter element The difference. The block calculator 4 then finds a block array of array size 1×W according to the offset array, and updates the block array for each column of the offset array, wherein the block array element N ( x ) updated for each column (hereinafter referred to as a block element) is equivalent to the sum of all corresponding offset elements in the aligned block of the corresponding input element I( x , y ) in the column. Next, the weight processor 5 uses the block elements to find a weight array of array size H×W, and uses the corresponding block elements and filtering elements to find a weighted array of array size H×W. Finally, the output unit 6 performs a division operation based on the weight array and the weighted array to obtain the output elements of the output array.
較特別的是,為了有效減少求取區塊陣列的計算成本,本實施例的區塊計算器4包括一差額產生單元41和一計算單元42。差額產生單元41基於偏移陣列求出一個具有H×W個差額元素M(x,y)的差額陣列,再供計算單元42計算出各列輸入元素I(x,y)對應的區塊元素N(x)。 More specifically, the block calculator 4 of the present embodiment includes a difference generating unit 41 and a calculating unit 42 in order to effectively reduce the computational cost of the obtained block array. The difference generating unit 41 finds a difference array having H × W difference elements M( x , y ) based on the offset array, and then supplies the calculation unit 42 to calculate the block elements corresponding to the input elements I( x , y ) of the respective columns. N( x ).
參閱圖4,接下來介紹影像雜訊濾除裝置100執行本發明影像雜訊濾除方法之較佳實施例所包含的步驟。 Referring to FIG. 4, the steps involved in the preferred embodiment of the image noise filtering apparatus 100 for performing the image noise filtering method of the present invention will be described next.
步驟70:設定單元1決定濾波視窗的輸入元素數目p× p,並決定比對區塊的輸入元素數目r×r。 Step 70: The setting unit 1 determines the number of input elements of the filtering window p× p, and determine the number of input elements r × r of the comparison block.
步驟71:接收單元2接收輸入陣列的輸入元素I(x,y),O≦x<W,0≦y<H。 Step 71: The receiving unit 2 receives the input element I( x , y ) of the input array, O≦x<W, 0≦y<H.
步驟72:偏移陣列產生器3為各輸入元素I(x,y)配置一個濾波元素,且計算元素I(x,y)和 的差異來得到輸入元素I(x,y)對應的偏移元 素D(x,y)。 Step 72: Offset Array Generator 3 configures a filter element for each input element I( x , y ) And calculate the elements I( x , y ) and Difference to obtain the input element I (x, y) corresponding to the deviation element D (x, y).
請注意,當或時,偏移元素D(x,y)=0。 Please note that when or The offset element D( x , y )=0.
步驟73:針對每一個輸入元素I(x,y),差額產生單元41使用對應於輸入元素I(x,y)、I(x-1,y)、I(x,y-1)之比對區塊的那些偏移元素,求出差額元素M(x,y)。由於處理影像邊界的差額元素M(x,y)需考量邊界問題,所以步驟73分成以下子步驟: Step 73: For each input element I( x , y ), the difference generating unit 41 uses a ratio corresponding to the input elements I( x , y ), I( x -1, y ), I( x , y -1) For those offset elements of the block, the difference element M( x , y ) is found. Since the difference element M( x , y ) for processing the image boundary needs to consider the boundary problem, step 73 is divided into the following sub-steps:
子步驟731:差額產生單元41計算首列差額元素M(x,0)。 Sub-step 731: The difference generating unit 41 calculates the first column difference element M( x , 0).
也就是說,當x=0,會加總輸入元素I(x,y)的比對區塊內所有對應偏移元素D(x+△x,y+△y)來獲得差額元素M(x,0)。當 0<x≦r,則只加總r個D(x+r,y+△y)。當r<x≦(W-1-r),除了加總r個D(x+r,y+△y),更扣去r個D(x-1,y+△y)。而x>(W-1-r)時,僅扣去r個D(x-1,y+△y)。簡言之,處理第一列差額元素時,只在x=0的情況下,完整求出比對區塊內所有對應偏移元素D(x+△x,y+△y)的總和來當作M(x,0),其他情況則是計算「目前比對區塊偏移元素總和」相較於「I(x-1,y)比對區塊偏移元素總和」的差異,此可參考圖5。又,為了便於示圖,圖5以r=5為例,但實際應用不以此為限,隨後介紹的圖6~8也以r=5來簡化示圖。 That is to say, when x=0, all the corresponding offset elements D( x + △ x , y + Δ y ) in the aligned block of the input elements I( x , y ) are added to obtain the difference element M ( x , 0). When 0 < x ≦ r, only r D ( x + r , y + Δ y ) are added. When r < x ≦ (W-1-r), in addition to adding r D ( x + r , y + Δ y ), r D ( x -1, y + Δ y ) are deducted. When x>(W-1-r), only r D ( x -1, y + Δ y ) are deducted. In short, when processing the first column difference element, only in the case of x=0, the sum of all corresponding offset elements D( x + △ x , y + Δ y ) in the comparison block is completely obtained. For M( x , 0), the other case is to calculate the difference between the "currently the sum of the block offset elements" compared to the "I( x -1, y ) comparison block offset element sum". Refer to Figure 5. Moreover, in order to facilitate the illustration, FIG. 5 takes r=5 as an example, but the actual application is not limited thereto, and the following FIGS. 6-8 also simplifies the diagram with r=5.
子步驟732:差額產生單元41計算第y列差額元素M(x,y),0<y≦r。 Sub-step 732: The difference generating unit 41 calculates the yth column difference element M( x , y ), 0<y≦r.
處理第y(0<y≦r)列差額元素時,只在x=0的情況下,加總r個D(x+△x,y+r)來當作M(x,y),其他情況則是隨著x遞增而計算「目前比對區塊偏移元素總和」相較於「I(x-1,y)比對區塊偏移元素總和」的差異,此可參考圖6。 When processing the y (0 < y ≦ r) column difference element, only in the case of x = 0, add r D ( x + △ x , y + r ) as M ( x , y ), other The case is to calculate the difference between "the sum of the current comparison block offset elements" as compared with the "I( x -1, y ) comparison block offset element sum" as x increases, which can be referred to FIG.
子步驟733:差額產生單元41計算第y列差額元素M(x,y),r<y≦(H-r-1)。 Sub-step 733: The difference generating unit 41 calculates the yth column difference element M( x , y ), r<y≦(Hr-1).
處理第y(r<y≦(H-r-1))列差額元素時,只在x=0的情況下,加總r個D(x+△x,y+r)且扣去r個D(x+△x,y-1)來當作M(x,y),其他情況則是計算「目前比對區塊偏移元素總和」相較於「相鄰比對區塊偏移元素總和」的差異,這裡所稱相鄰比對區塊是指I(x-1,y)、I(x,y-1)的比對區塊,此可參考圖7。 When processing the y (r<y≦(Hr-1)) column difference element, only in the case of x=0, add r D ( x + △ x , y + r ) and deduct r D ( x + △ x , y -1) are treated as M( x , y ), and in other cases, the sum of the current matching block offset elements is calculated as compared with the "adjacent comparison block offset element sum" The difference between the adjacent alignment blocks referred to herein is the alignment block of I( x -1, y ), I( x , y -1), which can be referred to FIG.
子步驟734:差額產生單元41計算第y列差額元素M(x,y),(H-r-1)<y≦(H-1)。 Sub-step 734: The difference generating unit 41 calculates the yth column difference element M( x , y ), (Hr-1) < y ≦ (H-1).
處理第y((H-r-1)<y≦(H-1))列差額元素時,只在x=0的情況下,扣去r個D(x+△x,y-1)來當作M(x,y),其他情況則是計算「目前比對區塊偏移元素總和」相較於「相鄰比對區塊偏移元素總和」的差異,這裡所稱相鄰比對區塊是指I(x-1,y)、I(x,y-1)的比對區塊,此可參考圖8。 When processing the difference element of the y((Hr-1)<y≦(H-1)) column, only r ( X + △ x , y -1) is deducted as x = 0 M( x , y ), in other cases, the difference between the current sum of the block offset elements and the sum of the adjacent block offset elements. The adjacent block is called here. It refers to the alignment block of I( x -1, y ), I( x , y -1), which can be referred to Figure 8.
步驟74:接下來,流程逐列地為每一個輸入元素I(x,y) 計算對應的權重元素W(x,y)和加權元素S(x,y),其中權重元素W(x,y)是權重陣列的元素,加權元素S(x,y)是加權陣列的元素。 Step 74: Next, the flow calculates a corresponding weight element W( x , y ) and a weighting element S( x , y ) for each input element I( x , y ) column by column, wherein the weight element W( x , y) ) is an element of the weight array, and the weighting elements S( x , y ) are elements of the weighted array.
在處理每一列時,流程有以下四個子步驟。 When processing each column, the process has the following four substeps.
子步驟740:計算單元42先令暫存元素N_tmp(0)、N_tmp(1)...N_tmp(W-1)均為0。 Sub-step 740: The computing unit 42 first causes the temporary storage elements N_tmp(0), N_tmp(1)...N_tmp( W -1) to be 0.
子步驟741:計算單元42為該列(假設為第y列)的目前輸入元素I(x,y),使用對應差額元素M(x,y)和暫存元素N_tmp(x)求出區塊元素N(x)=N_tmp(x)+M(x,y),並令暫存元素N_tmp(x)=N(x)。也就是說,第y列區塊元素。 Sub-step 741: The calculation unit 42 is the current input element I( x , y ) of the column (assumed to be the yth column), and uses the corresponding difference element M( x , y ) and the temporary storage element N_tmp( x ) to find the block. The element N( x )= N _ tmp ( x )+M(x,y), and the temporary element N_tmp( x )= N (x). That is, the yth column block element .
子步驟742:權重處理器5為該列的目前輸入元素I(x,y),使用對應區塊元素N(x)更新一權重前置信號LW=exp(-N(x)/(p 2 σ)),且設定權重元素W(x,y)如式(5),其中σ為一個可以控制濾波效果的調整參數。也就是說,第y列權重元素。 Sub-step 742: The weight processor 5 updates the current pre-signal LW=exp(- N ( x )/( p 2 ) for the current input element I( x , y ) of the column using the corresponding block element N( x ) σ )), and the weight element W( x , y ) is set as in equation (5), where σ is an adjustment parameter that can control the filtering effect. In other words, the y column weight element .
子步驟743:權重處理器5為該列的目前輸入元素I(x,y),使用對應的權重前置信號和濾波元素更 新一加權前置信號,且設定加權元 素S(x,y)如式(6)。也就是說,第y列加權元素 。 Sub-step 743: The weight processor 5 is the current input element I( x , y ) of the column, using the corresponding weight preamble and filtering elements Update a weighted preamble And set the weighting element S( x , y ) as in equation (6). In other words, the y column weighting element .
然後,重複子步驟740~743來計算下一列輸入元素的權重元素和加權元素。直到處理完所有列,權重處理器5即可取得權重陣列和加權陣列的所有元素。 Then, sub-steps 740-743 are repeated to calculate the weight elements and weighting elements of the next column of input elements. Until all columns have been processed, the weight processor 5 can take all the elements of the weighted array and the weighted array.
步驟75:輸出單元6使各輸入元素I(x,y)對應的加權元素除以權重元素來得到輸出元素O(x,y),並集合所有輸出元素O(x,y)形成雜訊濾除後的輸出影像。 Step 75: The output unit 6 divides the weighting elements corresponding to the input elements I(x, y) by the weight elements to obtain the output elements O(x, y), and aggregates all the output elements O(x, y) to form a noise filter. The output image after the removal.
總結來說,步驟73對於第y列差額元素M(x,y)的計算原則如下述。在y=0的情況下,當x=0,該差額元素代表該輸入元素I(x,y)之比對區塊對應的所有偏移元素總和;當0<x<W,該差額元素代表「該輸入元素I(x,y)之比對區塊對應的所有偏移元素總和」相較於「該輸入元素I(x-1,y)之比對區塊對應的所有偏移元素總和」的差異。 In summary, the calculation principle of step 73 for the yth column difference element M( x , y ) is as follows. In the case of y=0, when x=0, the difference element represents the sum of all the offset elements corresponding to the block of the input element I( x , y ); when 0<x<W, the difference element represents "The sum of the input elements I( x , y ) corresponds to the sum of all offset elements of the block" compared to the sum of the input elements I( x -1, y ) for all offset elements corresponding to the block The difference.
另一方面,在0<y≦r的情況下,當x=0,該差額元素代表「該輸入元素I(x,y)之比對區塊對應的所有偏移元素總和」相較於「該輸入元素I(x,y-1)之比對區塊對應的所有偏移元素總和」的差異;當0<x<W,該差額元素代表「該輸入元素I(x,y)之比對區塊對應的所有偏移元素總和」相較於「該輸入元素I(x-1,y)之比對區塊對應的所有偏移元素總和」的差異。 On the other hand, in the case of 0 < y ≦ r, when x = 0, the difference element represents "the sum of all the offset elements corresponding to the block of the input element I ( x , y )" compared to " The difference between the input element I( x , y -1) and the sum of all offset elements corresponding to the block; when 0<x<W, the difference element represents the ratio of the input element I( x , y ) The sum of all the offset elements corresponding to the block is compared to the sum of the ratios of the input elements I( x -1, y ) to the total of all the offset elements corresponding to the block.
又,在r<y<H的情況下,當x=0,該差額元素代表「該輸入元素I(x,y)之比對區塊對應的所有偏移元素總和」相較於「該輸入元素I(x,y-1)之比對區塊對應的所有偏移元素總和」的差異;當0<x<W,該差額元素代表「該輸入元素I(x,y)之比對區塊對應的所有偏移元素總和」相較於「輸入元素 I(x-1,y)和I(x,y-1)之比對區塊對應的所有偏移元素總和」的差異。 Moreover, in the case of r<y<H, when x=0, the difference element represents “the sum of all the offset elements corresponding to the block of the input element I( x , y )” compared to the “input” The difference between the ratio of the elements I( x , y -1) to the sum of all offset elements corresponding to the block; when 0<x<W, the difference element represents the comparison region of the input element I( x , y ) The sum of all offset elements corresponding to the block is compared to the sum of the ratios of the input elements I( x -1, y ) and I( x , y -1) to all offset elements corresponding to the block.
此外,步驟74中,權重前置信號LW=exp(-N(x)/(p 2 σ)),這暗示著較大的區塊元素N(x)會對應較小的LW。而調整參數σ的較佳值=5.5,σ越大,濾波效果越佳。 Furthermore, in step 74, the weight preamble signal LW = exp(- N ( x ) / ( p 2 σ )), which implies that the larger block element N( x ) will correspond to a smaller LW. The preferred value of the adjustment parameter σ is 5.5, and the larger the σ, the better the filtering effect.
相較於第一較佳實施例,本發明影像雜訊濾除裝置100之第二較佳實施例不同處有下列三點。 Compared with the first preferred embodiment, the second preferred embodiment of the image noise filtering device 100 of the present invention differs in the following three points.
(一)第一實施例的偏移陣列大小H×W,而第二實施例因為子步驟731~734對於第y列的差額元素計算最多參考第(y-1)~(y+r-1)列偏移元素,所以僅儲存這(r+1)列偏移元素當作偏移陣列的第0~r列,即偏移陣列大小(r+1)×W。 (1) The offset array size H×W of the first embodiment, and the second embodiment calculates the most reference to the (y-1)~(y+r-1) for the difference element of the yth column in the sub-steps 731-734. The column offset element, so only the (r+1) column offset element is stored as the 0th to the rth columns of the offset array, that is, the offset array size (r+1)×W.
(二)第一實施例的差額陣列大小H×W,而第二實施例因為子步驟741對於區塊元素計算只有參考第y列差額元素,所以僅儲存最近的1列差額元素當作差額陣列,即差額陣列大小1×W。 (b) The difference array size H×W of the first embodiment, and the second embodiment only stores the nearest one column difference element as the difference array because the sub-step 741 calculates only the reference element of the yth column for the block element calculation. That is, the difference array size is 1×W.
(三)第一實施例的權重陣列和加權陣列各有陣列大小H×W,而第二實施例則調整步驟流程,僅儲存最近的1列權重元素當作權重陣列,且僅儲存最近的1列加權元素當作加權陣列,即權重陣列和加權陣列的陣列大小皆為1×W。 (3) The weight array and the weighting array of the first embodiment each have an array size H×W, and the second embodiment adjusts the flow of steps, storing only the nearest one column weight element as a weight array, and storing only the most recent one. The column weighting elements are treated as a weighted array, that is, the array size of the weighted array and the weighted array are both 1×W.
詳細來說,第二實施例調整的步驟如下。 In detail, the steps of the second embodiment adjustment are as follows.
步驟72’:偏移陣列產生器3求出的偏移元素D'(x,i)=D(x,y+i-1),0≦i≦r。 Step 72': The offset element D'( x , i )= D ( x , y + i -1), 0≦i≦r obtained by the offset array generator 3.
步驟73’:差額產生單元41為第y列的目前輸入元素 I(x,y),使用對應於該輸入元素I(x,y)之比對區塊的那些偏移元素求出差額元素M'(x),其中y=0時是根據式(7),0<y≦r時是根據式(8),r<y≦(H-r-1)時是根據式(9),(H-r-1)<y≦(H-1)時是根據式(10)。 Step 73': the difference generating unit 41 is the current input element I( x , y ) of the yth column, and finds the difference element M using those offset elements corresponding to the comparison block of the input element I( x , y ) '( x ), where y=0 is based on equation (7), 0<y≦r is based on equation (8), and r<y≦(Hr-1) is according to equation (9), (Hr- 1) <y≦(H-1) is based on equation (10).
子步驟740’:計算單元42令暫存元素N_tmp(0)、N_tmp(1)...N_tmp(W-1)均為0。 Sub-step 740': The calculation unit 42 causes the temporary elements N_tmp(0), N_tmp(1)...N_tmp( W -1) to be 0.
子步驟741’:計算單元42為該列的目前輸入元素I(x,y),使用對應差額元素M'(x)和暫存元素N_tmp(x)求出區塊元素N(x)=N_tmp(x)+M'(x),並令暫存元素N_tmp(x)=N(x)。 Sub-step 741': the calculation unit 42 is the current input element I( x , y ) of the column, and uses the corresponding difference element M'( x ) and the temporary storage element N_tmp( x ) to find the block element N( x )= N _ tmp ( x )+M'(x) and let the scratch element N_tmp( x )= N (x).
子步驟742’:權重處理器5為該列的目前輸入元素I(x,y),使用對應區塊元素N(x)更新權重前置信號LW=exp(-N(x)/(p 2 σ)),且設定權重元素W'(x)如式(7),其中σ為控制濾波效果的調整參數。 Sub-step 742': The weight processor 5 is the current input element I( x , y ) of the column, and updates the weight preamble signal LW=exp(- N ( x )/( p 2 ) using the corresponding block element N( x ) σ )), and the weight element W'( x ) is set as in equation (7), where σ is an adjustment parameter that controls the filtering effect.
子步驟743’:權重處理器5為該列的目前輸入元素I(x,y),使用對應的權重前置信號和濾波元素更新加權前置信號,且設定加權元素S'(x)如式(8)。 Sub-step 743': weight processor 5 is the current input element I( x , y ) of the column, using the corresponding weight preamble and filtering elements Update weighted preamble And set the weighting element S'( x ) as in equation (8).
接著執行步驟75’:輸出單元6使該列的各輸入元素I(x,y)所對應的加權元素除以權重元素來得到第y列的輸出元素O(x,y)。 Next, step 75' is performed: the output unit 6 divides the weighting element corresponding to each input element I(x, y) of the column by the weight element to obtain the output element O(x, y) of the yth column.
然後,再次執行子步驟步驟73’、740’、741’、742’、743’和步驟75’,以計算第(y+1)列的輸出元素O(x,y)。直到處理完所有列,就可以集合所有輸出元素O(x,y)形成雜訊濾除 後的輸出影像。 Then, sub-steps 73', 740', 741', 742', 743' and step 75' are performed again to calculate the output element O(x, y) of the (y+1)th column. Until all columns are processed, all output elements O(x, y) can be aggregated to form noise filtering. After the output image.
需提醒的是,前述流程是以逐列方式來進行,但熟於本技藝者也可以輕易推論出如何逐行算出權重元素和加權元素進而得到濾除雜訊的輸出影像,所以這裡不再多加說明。 It should be reminded that the foregoing process is performed in a column-by-column manner, but those skilled in the art can easily infer how to calculate the weighting elements and weighting elements line by line to obtain the output image for filtering noise, so no more is added here. Description.
再者,雖然本實施例說明濾波視窗和比對區塊均為正方形,但在其他應用中,濾波視窗和比對區塊也可以是矩形或其他,只要比對區塊<濾波視窗即可。 Furthermore, although the present embodiment illustrates that both the filtering window and the comparison block are square, in other applications, the filtering window and the comparison block may also be rectangular or other, as long as the comparison block <filter window.
此外,雖然本實施例說明濾波視窗是以對應輸入元素為中心,比對區塊是以對應輸入元素為左上角,但在其他應用中,對應輸入元素於濾波視窗和比對區塊的位置並不限於上述,只要濾波視窗是由對應輸入元素的鄰近元素構成,比對區塊是由對應輸入元素的鄰近元素構成即可。需注意,倘若輸入元素是位於比對區塊的另一特定位置,則必須依據區塊大小調整濾波元素位置。例如:當輸入元素I(x,y)位於比對區塊的右下角,可以挑選當作濾波元素。 In addition, although the embodiment illustrates that the filtering window is centered on the corresponding input element, the comparison block is the upper left corner of the corresponding input element, but in other applications, the corresponding input element is in the filtering window and the position of the comparison block. It is not limited to the above, as long as the filter window is composed of adjacent elements of the corresponding input elements, and the comparison block is composed of adjacent elements of the corresponding input elements. It should be noted that if the input element is located at another specific location of the aligned block, the filter element position must be adjusted according to the block size. For example, when the input element I( x , y ) is in the lower right corner of the comparison block, you can choose Used as a filter element.
綜上所述,前述較佳實施例中,區塊計算器4使用差額產生單元41求出相鄰比對區塊內偏移元素D(x,y)總和的差異,再使用計算單元42組合出各比對區塊內偏移元素D(x,y)總和,即區塊元素,再交由權重處理器5以累加方式求出權重元素和加權元素,以供輸出單元6獲得輸出影像,計算成本明顯少於習知技術,故確實能達成本發明之目的。 In summary, in the foregoing preferred embodiment, the block calculator 4 uses the difference generating unit 41 to find the difference between the sum of the offset elements D(x, y) in the adjacent matching block, and then combines using the calculating unit 42. The sum of the offset elements D(x, y) in each of the aligned blocks, that is, the block elements, is further calculated by the weight processor 5 to obtain the weight elements and the weighting elements in an accumulated manner, so that the output unit 6 obtains the output image. The calculation cost is significantly less than the conventional technology, so the object of the present invention can be achieved.
惟以上所述者,僅為本發明之較佳實施例而已,當不能以此限定本發明實施之範圍,即大凡依本發明申請專利範圍及發明說明內容所作之簡單的等效變化與修飾,皆仍屬本發明專利涵蓋之範圍內。 The above is only the preferred embodiment of the present invention, and the scope of the invention is not limited thereto, that is, the simple equivalent changes and modifications made by the scope of the invention and the description of the invention are All remain within the scope of the invention patent.
100‧‧‧影像雜訊濾除裝置 100‧‧‧Image noise filtering device
1‧‧‧設定單元 1‧‧‧Setting unit
2‧‧‧接收單元 2‧‧‧ Receiving unit
3‧‧‧偏移陣列產生器 3‧‧‧Offset Array Generator
4‧‧‧區塊計算器 4‧‧‧block calculator
41‧‧‧差額產生單元 41‧‧‧balance generating unit
42‧‧‧計算單元 42‧‧‧Computation unit
5‧‧‧權重處理器 5‧‧‧weight processor
6‧‧‧輸出單元 6‧‧‧Output unit
70~75‧‧‧步驟 70~75‧‧‧Steps
圖1是一示意圖,說明習知技術為輸入元素配置的濾波視窗和比對區塊;圖2是一示意圖,說明本較佳實施例為輸入元素配置的濾波視窗和比對區塊;圖3是一方塊圖,說明第一較佳實施例的影像雜訊濾除裝置;圖4是一流程圖,說明本較佳實施例的影像雜訊濾除方法;及圖5~8是示意圖,說明根據偏移元素求出差額元素。 1 is a schematic diagram illustrating a filtering window and a comparison block configured by an input technique for an input element; FIG. 2 is a schematic diagram illustrating a filtering window and a comparison block configured for an input element in the preferred embodiment; FIG. Is a block diagram illustrating the image noise filtering device of the first preferred embodiment; FIG. 4 is a flow chart illustrating the image noise filtering method of the preferred embodiment; and FIGS. 5-8 are schematic diagrams illustrating Find the difference element based on the offset element.
100‧‧‧影像雜訊濾除裝置 100‧‧‧Image noise filtering device
1‧‧‧設定單元 1‧‧‧Setting unit
2‧‧‧接收單元 2‧‧‧ Receiving unit
3‧‧‧偏移陣列產生器 3‧‧‧Offset Array Generator
4‧‧‧區塊計算器 4‧‧‧block calculator
41‧‧‧差額產生單元 41‧‧‧balance generating unit
42‧‧‧計算單元 42‧‧‧Computation unit
5‧‧‧權重處理器 5‧‧‧weight processor
6‧‧‧輸出單元 6‧‧‧Output unit
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW101127788A TW201408059A (en) | 2012-08-01 | 2012-08-01 | Image noise filtering method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW101127788A TW201408059A (en) | 2012-08-01 | 2012-08-01 | Image noise filtering method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TW201408059A true TW201408059A (en) | 2014-02-16 |
| TWI507025B TWI507025B (en) | 2015-11-01 |
Family
ID=50550661
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW101127788A TW201408059A (en) | 2012-08-01 | 2012-08-01 | Image noise filtering method and device |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TW201408059A (en) |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1499817A (en) * | 2002-11-11 | 2004-05-26 | 力捷电脑股份有限公司 | Method of lowering noise in image |
| TWI430653B (en) * | 2009-03-13 | 2014-03-11 | Asustek Comp Inc | Image processing device and image processing method |
| US8861885B2 (en) * | 2009-08-26 | 2014-10-14 | Apple Inc. | Directional noise filtering |
| TWI390466B (en) * | 2009-09-21 | 2013-03-21 | Pixart Imaging Inc | Image noise filtering method |
-
2012
- 2012-08-01 TW TW101127788A patent/TW201408059A/en not_active IP Right Cessation
Also Published As
| Publication number | Publication date |
|---|---|
| TWI507025B (en) | 2015-11-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7007488B2 (en) | Hardware-based pooling system and method | |
| US10547871B2 (en) | Edge-aware spatio-temporal filtering and optical flow estimation in real time | |
| US8803984B2 (en) | Image processing device and method for producing a restored image using a candidate point spread function | |
| US10356385B2 (en) | Method and device for stereo images processing | |
| JP2017021483A (en) | Arithmetic processing unit | |
| US11238571B2 (en) | Method and device for enhancing image contrast, display apparatus, and storage medium | |
| CN108765282A (en) | Real-time super-resolution method and system based on FPGA | |
| CN110991627A (en) | Information processing apparatus, information processing method, and computer program | |
| CN111953953A (en) | Method and device for adjusting pixel brightness and electronic equipment | |
| CN106415657A (en) | Method and device for enhancing quality of an image | |
| CN102456223B (en) | Device and method for carrying out enhancement and scaling on image details | |
| US20180218477A1 (en) | Data interpolation device, method therefor, and image processing apparatus | |
| WO2018023847A1 (en) | Processor and method for scaling image | |
| CN114943729B (en) | A cell counting method and system for high-resolution cell images | |
| WO2023160426A1 (en) | Video frame interpolation method and apparatus, training method and apparatus, and electronic device | |
| EP3881280B1 (en) | Methods and systems for image processing | |
| CN115004220B (en) | Neural network for raw low-light image enhancement | |
| CN108401125B (en) | Video data processing method, device and storage medium | |
| CN106778550A (en) | A kind of method and apparatus of Face datection | |
| CN104853059A (en) | Super-resolution image processing method and device | |
| TW201408059A (en) | Image noise filtering method and device | |
| CN116074641B (en) | Monitoring equipment point location image correction method and system based on MOSSE algorithm | |
| WO2011121563A1 (en) | Detecting saliency in an image | |
| US11682099B2 (en) | Hardware accelerator for integral image computation | |
| CN111028309A (en) | Insect density map construction method and device based on LoRa node |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| MM4A | Annulment or lapse of patent due to non-payment of fees |