TWI689890B - Noise equalization method and de-noise method - Google Patents

Noise equalization method and de-noise method Download PDF

Info

Publication number
TWI689890B
TWI689890B TW107123689A TW107123689A TWI689890B TW I689890 B TWI689890 B TW I689890B TW 107123689 A TW107123689 A TW 107123689A TW 107123689 A TW107123689 A TW 107123689A TW I689890 B TWI689890 B TW I689890B
Authority
TW
Taiwan
Prior art keywords
value
values
noise
block
equalized
Prior art date
Application number
TW107123689A
Other languages
Chinese (zh)
Other versions
TW202006661A (en
Inventor
唐婉儒
李宗軒
陳世澤
Original Assignee
瑞昱半導體股份有限公司
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 瑞昱半導體股份有限公司 filed Critical 瑞昱半導體股份有限公司
Priority to TW107123689A priority Critical patent/TWI689890B/en
Publication of TW202006661A publication Critical patent/TW202006661A/en
Application granted granted Critical
Publication of TWI689890B publication Critical patent/TWI689890B/en

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

The present disclosure provides a noise equalization method and a de-noise method. The noise equalization method simulates degrees of noise magnitudes corresponding to different signal magnitudes by a smooth curve, and implements noise equalization corresponding to different signal magnitudes by an equalization curve, such that the noise magnitudes corresponding to different signal magnitudes become the same or close. In other words, the signal-dependent noise (SDN) is converted to the signal-independent noise (SIN), and SDN characteristic of the real noise-free signal can be estimated more precisely based on noisy signals. In addition, using the equalization curve to perform the de-noise method can lower the computational complexity and calculate better noise parameters, thereby improving noise removal for each input pixel value in an input image and generating an output image with lower noise.

Description

雜訊等化方法與雜訊去除方法 Noise equalization method and noise removal method

本案提供一種雜訊等化方法與雜訊去除方法,且特別是關於一種雜訊等化方法以及根據雜訊等化後的像素值進行雜訊去除的方法。 This case provides a noise equalization method and a noise removal method, and particularly relates to a noise equalization method and a noise removal method based on the pixel values after the noise equalization.

電子裝置(如智慧型手機、照相機、攝影機等)在擷取影像的過程中會產生複雜的雜訊。這種雜訊並不是簡單的加性高斯白雜訊(Additive Gaussian White Noise,AWGN),而是一種與訊號相關的雜訊(Signal-Dependent Noise,SDN),即其雜訊大小與訊號強度有關。因此,不同的像素值會存在有不同強度的雜訊。 Electronic devices (such as smart phones, cameras, cameras, etc.) generate complex noise during the process of capturing images. This kind of noise is not a simple additive Gaussian White Noise (AWGN), but a signal-related noise (Signal-Dependent Noise, SDN), that is, its noise size is related to the signal strength . Therefore, different pixel values will have noise with different intensities.

舉例來說,圖1顯示輸入影像的多個區域標準差的示意圖。輸入影像Fr0具有多個影像區塊EN1與EN2。影像區塊EN1與EN2皆具有多個像素值,且影像區塊EN1的整體像素值低於影像區塊EN2的整體像素值。如圖1所示,由於輸入影像會有SDN的現象發生,電子裝置將計算出影像區塊EN1中的這些像素值的區域標準差Std為1.15,且計算出影像區塊EN2中的這些像素值的區域標準差Std為2.95,意即同一張輸入影像會存在有不同強度的雜訊。 For example, FIG. 1 shows a schematic diagram of standard deviations of multiple regions of an input image. The input image Fr0 has multiple image blocks EN1 and EN2. Both image blocks EN1 and EN2 have multiple pixel values, and the overall pixel value of image block EN1 is lower than the overall pixel value of image block EN2. As shown in FIG. 1, due to the SDN phenomenon in the input image, the electronic device will calculate the regional standard deviation Std of the pixel values in the image block EN1 to 1.15, and calculate the pixel values in the image block EN2 The regional standard deviation of Std is 2.95, which means that the same input image will have different intensity of noise.

常見的雜訊估測(Noise Estimation)都是針對高斯白雜訊來設計且大致上可分成兩種。一種為即時(Real-time)雜訊估測,另 一種為離線(Offline)雜訊估測。 Common Noise Estimation is designed for Gaussian white noise and can be roughly divided into two types. One is real-time noise estimation, the other One is offline (Offline) noise estimation.

即時雜訊估測為根據經過高通濾波器(High-Pass Filter)轉換後的影像來進行雜訊估測。然而,轉換後的影像只有在變異數較小的區域(即影像中的平滑區)才比較能表現出雜訊的特性,且即時雜訊估測是針對高斯白雜訊設計,又高通濾波器的影像參考範圍也會影響雜訊估測的準確度,故習知的即時雜訊估測並無法估測出貼近真實訊號的SDN特性。 The real-time noise estimation is to estimate the noise based on the image converted by the high-pass filter. However, the converted image only exhibits noise characteristics in areas with small variances (ie, smooth areas in the image), and the real-time noise estimation is designed for Gaussian white noise and has a high-pass filter The reference range of the image will also affect the accuracy of noise estimation, so the conventional real-time noise estimation cannot estimate the SDN characteristics close to the real signal.

離線雜訊估測則是預先建立SDN模組,以統計雜訊在不同像素值下的分布特性。接著具有雜訊的輸入影像再根據SDN模組來產生一去雜訊的輸出影像。然而,習知SDN模組為利用線性方式來描述真實SDN的分布特性,但真實SDN在不同像素值下的分布特性為非線性關係,此外,SDN模組用以模擬在不同真實訊號強度(Noise-Free Signal)下雜訊大小的分布特性,但實際使用SDN模組時,僅能根據受雜訊影響的像素值(Noisy Signal)使用SDN模組來做查詢,並無法取得該像素的真實訊號(Noise-Free Signal)。故習知的離線雜訊估測同樣也無法從受雜訊影響的像素精準地估測出真實訊號的SDN特性。 Offline noise estimation is to pre-establish an SDN module to calculate the distribution characteristics of noise under different pixel values. Then the input image with noise is generated according to the SDN module to generate an output image with no noise. However, the conventional SDN module uses a linear method to describe the distribution characteristics of the real SDN, but the distribution characteristics of the real SDN at different pixel values are nonlinear. In addition, the SDN module is used to simulate the different real signal strengths (Noise -Free Signal), the distribution characteristics of the noise size, but when actually using the SDN module, you can only use the SDN module to query based on the pixel value (Noisy Signal) affected by the noise, and you cannot get the true signal of the pixel (Noise-Free Signal). Therefore, the conventional offline noise estimation also cannot accurately estimate the SDN characteristics of real signals from pixels affected by noise.

若電子裝置無法估測出真實訊號的SDN特性,其將無法估測出較佳的雜訊參數(如標準差與變異數等參數),進而影響輸入影像的雜訊去除(Denoise)效果。因此,若電子裝置可以估測出貼近真實SDN的特性,將可以提升雜訊去除效果,進而提升輸入影像品質。 If the electronic device cannot estimate the SDN characteristics of the real signal, it will not be able to estimate better noise parameters (such as standard deviation and variance), which will affect the noise reduction effect of the input image (Denoise). Therefore, if the electronic device can estimate the characteristics close to the real SDN, the noise removal effect can be improved, thereby improving the input image quality.

為了提升雜訊去除效果,進而提升輸入影像品質,本案提供了一種雜訊等化方法,適用於一電子裝置,用以等化不同數值下的雜訊。此種雜訊等化方法包含:取得一數值區間中多個代表數值與該些代表數值對應的多個代表標準差;根據該些代表數值與 對應的該些代表標準差計算該些代表像素值之間的每一中間數值對應的一中間標準差,且將該些代表像素值、該些代表標準差、該些中間數值與該些中間標準差分別映射到一平滑曲線中的多個數值與多個標準差;以及根據該平滑曲線中的每一數值與對應的標準差計算一等化曲線,以將每一數值對應到一等化後數值。於此種雜訊等化方法中,該些數值的一目前數值加上對應的標準差為一調整數值,且該等化曲線滿足調整數值對應的等化後數值減去目前數值對應的等化後數值為1個單位。 In order to improve the noise removal effect, and thus improve the input image quality, this case provides a noise equalization method, suitable for an electronic device, used to equalize the noise at different values. The noise equalization method includes: obtaining a plurality of representative values corresponding to a plurality of representative values in a numerical interval and the representative values; according to the representative values and The corresponding representative standard deviations calculate an intermediate standard deviation corresponding to each intermediate value between the representative pixel values, and the representative pixel values, the representative standard deviations, the intermediate values and the intermediate standards The difference is mapped to multiple values and multiple standard deviations in a smooth curve; and an equalization curve is calculated according to each value in the smooth curve and the corresponding standard deviation to correspond each value to an equalization Value. In this noise equalization method, a current value of these values plus the corresponding standard deviation is an adjusted value, and the equalization curve satisfies the equalized value corresponding to the adjusted value minus the equalized value corresponding to the current value The latter value is 1 unit.

本案提供了一種雜訊去除方法,適用於一電子裝置。此種雜訊去除方法包括:接收一輸入影像;於該輸入影像中擷取一目前位置區塊,其中目前位置區塊對應到一或多個輸入像素值;擷取鄰近目前位置區塊的多個鄰近區塊;經由一等化曲線映射目前位置區塊與該些鄰近區塊中的每一輸入像素值,以取得每一輸入像素值對應的等化後數值,其中,等化曲線包含多個數值以及對應的多個等化後數值,該些數值的一目前數值加上對應的一標準差為一調整數值,且該等化曲線滿足調整數值對應的等化後數值減去目前數值對應的等化後數值為1個單位;根據該些等化後數值,分別計算每一鄰近區塊與目前位置區塊的一差異程度;根據每一差異程度決定對應鄰近區塊的一權重值;根據該些權重值將對應的該些鄰近區塊中的一主像素值進行加權平均以產生一修正像素值。 This case provides a noise removal method suitable for an electronic device. Such a noise removal method includes: receiving an input image; extracting a current position block from the input image, wherein the current position block corresponds to one or more input pixel values; and extracting multiple blocks adjacent to the current position block Adjacent blocks; mapping each input pixel value in the current position block and the adjacent blocks through an equalization curve to obtain the equalized value corresponding to each input pixel value, wherein the equalization curve includes multiple Values and corresponding multiple equalized values, a current value of these values plus a corresponding standard deviation is an adjusted value, and the equalized curve satisfies the equalized value corresponding to the adjusted value minus the current value The equalized value of is 1 unit; based on these equalized values, a degree of difference between each neighboring block and the current location block is calculated; according to each degree of difference, a weight value corresponding to the neighboring block is determined; According to the weight values, a main pixel value in the corresponding neighboring blocks is weighted and averaged to generate a modified pixel value.

本案提供了一種雜訊去除方法,適用於一電子裝置。此種雜訊去除方法包括:接收一輸入影像;於輸入影像中擷取一目前位置區塊,其中目前位置區塊對應到多個輸入像素值;根據該些輸入像素值決定一主像素值;將該些輸入像素值經由一等化曲線映射,以取得對應的多個等化後數值,其中,該等化曲線包含多個數值以及對應的多個等化後數值,該些數值的一目前數值加上對應的一標準差為一調整數值,且該等化曲線滿足調整數值對應的 等化後數值減去目前數值對應的等化後數值為1個單位;平均該些等化後數值以產生一低頻成分值;計算該些輸入像素值對應的該些等化後數值與低頻成分值之間的一變異數;根據低頻成分值計算目前位置區塊中的主像素值的一高頻成分值;根據變異數計算主像素值的高頻成分值的一高頻比例;以及將低頻成分值加上高頻比例的高頻成分值以產生對應主像素值的一輸出像素值。 This case provides a noise removal method suitable for an electronic device. Such a noise removal method includes: receiving an input image; capturing a current position block in the input image, wherein the current position block corresponds to a plurality of input pixel values; and determining a main pixel value according to the input pixel values; The input pixel values are mapped through an equalization curve to obtain corresponding multiple equalized values, wherein the equalized curve includes multiple values and corresponding multiple equalized values. The value plus a corresponding standard deviation is an adjustment value, and the equalization curve satisfies the adjustment value The equalized value minus the equalized value corresponding to the current value is 1 unit; the equalized values are averaged to produce a low-frequency component value; the equalized values and low-frequency components corresponding to the input pixel values are calculated A variation between the values; a high-frequency component value of the main pixel value in the current location block is calculated from the low-frequency component value; a high-frequency component value of the high-frequency component value of the main pixel value is calculated from the variation number; and the low frequency The component value is added to the high-frequency component value of the high-frequency ratio to generate an output pixel value corresponding to the main pixel value.

Fr0‧‧‧輸入影像 Fr0‧‧‧ input image

EN1‧‧‧影像區塊 EN1‧‧‧Image block

EN2‧‧‧影像區塊 EN2‧‧‧Image block

ZN1‧‧‧影像區塊 ZN1‧‧‧Image block

ZN2‧‧‧影像區塊 ZN2‧‧‧Image block

100‧‧‧電子裝置 100‧‧‧Electronic device

110‧‧‧影像擷取裝置 110‧‧‧Image capture device

120‧‧‧影像處理器 120‧‧‧Image processor

Fr1‧‧‧輸入影像 Fr1‧‧‧ input image

P0-Pn‧‧‧輸入像素值 P0-Pn‧‧‧Input pixel value

P0’-Pn’‧‧‧輸出像素值 P0’-Pn’‧‧‧ output pixel value

Re0、Re1、Re2、Re3、Re4、Re5、Re6、Re7、Re8、Re9、Re10、Re11‧‧‧灰階區塊 Re0, Re1, Re2, Re3, Re4, Re5, Re6, Re7, Re8, Re9, Re10, Re11‧‧‧ Grayscale block

Fd0‧‧‧目標區塊 Fd0‧‧‧Target block

I0、I1、I2、I3、I4、I5、I6、I7、I8、I9、I10、I11‧‧‧代表像素值 I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, I11‧‧‧ represent pixel values

σ0、σ1、σ2、σ3、σ4、σ5、σ6、σ7、σ8、σ9、σ10、σ11‧‧‧代表標準差 σ0, σ1, σ2, σ3, σ4, σ5, σ6, σ7, σ8, σ9, σ10, σ11‧‧‧ represents the standard deviation

NTC‧‧‧測試影像 NTC‧‧‧ test image

Crv1‧‧‧平滑曲線 Crv1‧‧‧Smooth curve

Crv2‧‧‧等化曲線 Crv2‧‧‧Equalization curve

Fr1’‧‧‧經等化曲線映射後之輸入影像 Fr1’‧‧‧ input image after equalization curve mapping

S310、S320、S330‧‧‧步驟 S310, S320, S330 ‧‧‧ steps

S410、S420、S430‧‧‧步驟 S410, S420, S430 ‧‧‧ steps

S460、S470、S480、S490‧‧‧步驟 S460, S470, S480, S490

S910~S980‧‧‧步驟 S910~S980‧‧‧Step

Pch‧‧‧目前位置區塊 Pch‧‧‧Current location block

Qch1、Qch2‧‧‧鄰近區塊 Qch1, Qch2 ‧‧‧ neighboring blocks

Fr‧‧‧輸入影像 Fr‧‧‧ input image

P0、P17、P18、P19、P25、P26、P27、P28、P33、P34、P35、P36、P37、P42、P43、P44、P45、P51、P52、P53、P63‧‧‧輸入像素值 P0, P17, P18, P19, P25, P26, P27, P28, P33, P34, P35, P36, P37, P42, P43, P44, P45, P51, P52, P53, P63

S1110、S1120、S1130、S1140、S1150、S1160、S1170、S1180‧‧‧步驟 S1110, S1120, S1130, S1140, S1150, S1160, S1170, S1180

圖1是輸入影像的多個區域標準差的示意圖。 FIG. 1 is a schematic diagram of standard deviations of multiple regions of an input image.

圖2是根據本案一實施例所繪示之電子裝置的示意圖。 FIG. 2 is a schematic diagram of an electronic device according to an embodiment of this case.

圖3是根據本案一實施例所繪示之雜訊等化方法的流程圖。 3 is a flowchart of a noise equalization method according to an embodiment of the present invention.

圖4A是根據本案一實施例所繪示之步驟S310的細部流程圖。 4A is a detailed flowchart of step S310 according to an embodiment of the present invention.

圖4B是根據本案一實施例所繪示之測試影像的示意圖。 FIG. 4B is a schematic diagram of a test image according to an embodiment of the present case.

圖4C是根據本案另一實施例所繪示之步驟S310的細部流程圖。 4C is a detailed flowchart of step S310 according to another embodiment of the present case.

圖5是根據本案一實施例所繪示之代表像素值與代表標準差對應到動態範圍中的像素值與標準差。 FIG. 5 illustrates the representative pixel value and the representative standard deviation according to an embodiment of the present invention corresponding to the pixel value and the standard deviation in the dynamic range.

圖6是根據本案一實施例所繪示之平滑曲線的示意圖。 6 is a schematic diagram of a smooth curve drawn according to an embodiment of the present case.

圖7是根據本案一實施例所繪示之等化曲線的示意圖。 7 is a schematic diagram of an equalization curve according to an embodiment of the present invention.

圖8是根據本案一實施例所繪示之輸入影像經等化曲線映射後之訊號分布示意圖。 8 is a schematic diagram of signal distribution of an input image according to an embodiment of the present invention after being mapped by an equalization curve.

圖9是根據本案一實施例之雜訊去除方法的流程圖。 9 is a flowchart of a noise removal method according to an embodiment of the present case.

圖10是根據本案一實施例所繪示之輸入影像的目前位置區塊與鄰近區塊的示意圖。 FIG. 10 is a schematic diagram of the current location block and adjacent blocks of the input image according to an embodiment of the present invention.

圖11是根據本案另一實施例所繪示之雜訊去除方法的流程圖。 11 is a flowchart of a noise removal method according to another embodiment of the present invention.

在下文中,將藉由圖式說明本案之各種例示實施例來詳細描述本案。然而,本案概念可以不同形式來體現,且不應解釋為限於本文中所闡述之例示性實施例。此外,圖式中相同參考數字可表示類似的元件。 In the following, the present case will be described in detail by illustrating various exemplary embodiments of the case. However, the concept of the present case can be embodied in different forms and should not be interpreted as being limited to the exemplary embodiments set forth herein. In addition, the same reference numerals in the drawings may indicate similar elements.

本案實施例所提供的雜訊等化方法利用一平滑曲線來模擬真實SDN在不同像素值下的非線性關係。接著再透過一等化曲線(由多個像素值與對應的等化後數值組成)來將不同像素值下的雜訊轉換成相同或相近的數值,即等化曲線滿足一目前像素值移動一個標準差的距離,對應的等化後數值移動一個單位。藉此,雜訊等化方法可以將與訊號相關的雜訊(Signal-Dependent Noise,SDN)轉換成與訊號無關的雜訊(Signal-Dependent Noise,SIN),進而從受雜訊影響的像素(noisy signal)更精準地估測出真實訊號(noise-free signal)的SDN特性。 The noise equalization method provided by the embodiment of the present invention uses a smooth curve to simulate the nonlinear relationship of the real SDN under different pixel values. Then, through an equalization curve (consisting of multiple pixel values and corresponding equalized values), the noise under different pixel values is converted to the same or similar values, that is, the equalization curve satisfies a current pixel value to move one The distance of the standard deviation corresponds to the value shifted by one unit after equalization. In this way, the noise equalization method can convert signal-related noise (Signal-Dependent Noise, SDN) into signal-independent noise (Signal-Dependent Noise, SIN), and then from pixels affected by noise ( noisy signal) more accurately estimates the SDN characteristics of a noise-free signal.

另外,本案實施例所提供的雜訊去除方法利用上述雜訊等化方法計算出的等化曲線來取得一輸入影像中每一個輸入像素值的SIN,以簡化雜訊去除方法並計算出較佳的雜訊參數(如標準差與變異數等參數),進而產生較低雜訊的輸出影像。 In addition, the noise removal method provided by the embodiment of the present invention uses the equalization curve calculated by the above noise equalization method to obtain the SIN of each input pixel value in an input image to simplify the noise removal method and calculate a better Noise parameters (such as parameters such as standard deviation and variance), which in turn produces a lower noise output image.

首先,圖2為根據本案一實施例所繪示之電子裝置100的示意圖。如圖2所示,在雜訊等化方法中,電子裝置100藉由一等化曲線(由多個像素值與對應的等化後數值所組成)的映射將不同訊號強度下的雜訊予以等化,進而將與訊號相關的雜訊轉換成與訊號無關的雜訊。而在雜訊去除方法中,電子裝置100將根據上述等化曲線來取得一輸入影像Fr1中每一個輸入像素值P0-Pn對應的等化後數值,以產生較低雜訊的輸出像素值P0’-Pn’。在本實施例中,電子裝置100可為智慧型手機、照相機、攝影機、平板電腦、筆記型電腦或其他具有影像擷取功能的電子裝置,本案對此不作限制。 First, FIG. 2 is a schematic diagram of an electronic device 100 according to an embodiment of the present case. As shown in FIG. 2, in the noise equalization method, the electronic device 100 uses the mapping of an equalization curve (composed of multiple pixel values and corresponding equalized values) to apply noise under different signal intensities Equalization, and then convert the noise related to the signal into noise independent of the signal. In the noise removal method, the electronic device 100 will obtain the equalized value corresponding to each input pixel value P0-Pn in an input image Fr1 according to the above equalization curve to generate a lower noise output pixel value P0 '-Pn'. In this embodiment, the electronic device 100 may be a smart phone, a camera, a video camera, a tablet computer, a notebook computer, or other electronic devices with image capturing functions, which is not limited in this case.

<雜訊等化方法的一實施例> <An embodiment of a noise equalization method>

參考圖2,電子裝置100包括影像擷取器110與影像處理器120。影像處理器120耦接影像擷取器110,且用以執行下列雜訊等化方法的步驟,藉以產生所需的等化曲線(由多個像素值與對應的等化後數值組成)。同時參考圖3,其顯示本案一實施例之雜訊等化方法的流程圖。首先,電子裝置100的影像處理器120將取得一像素值區間中的多個代表像素值與每一個代表像素值對應的一代表標準差(步驟S310)。 Referring to FIG. 2, the electronic device 100 includes an image capturer 110 and an image processor 120. The image processor 120 is coupled to the image capturer 110 and is used to perform the following steps of the noise equalization method to generate a desired equalization curve (consisting of multiple pixel values and corresponding equalized values). Referring also to FIG. 3, which shows a flowchart of a noise equalization method according to an embodiment of the present case. First, the image processor 120 of the electronic device 100 will obtain a plurality of representative pixel values in a pixel value interval and a representative standard deviation corresponding to each representative pixel value (step S310).

在本實施例中,像素值區間可以根據像素值的動態範圍(dynamic range)來作設計。舉例來說,像素值的動態範圍為0-255,其代表像素值有可能出現的數值為0-255。0代表最暗,255代表最亮。因此,像素值區間將設定為0-255。而電子裝置100再從像素值區間中選擇多個合適的數值作為代表像素值(例如選擇5個代表像素值,分別為數值為0、50、150、100、255)並據此計算出對應的代表標準差。 In this embodiment, the pixel value interval can be designed according to the dynamic range of the pixel value. For example, the dynamic range of pixel values is 0-255, which represents the possible values of pixel values 0-255. 0 represents the darkest and 255 represents the brightest. Therefore, the pixel value interval will be set to 0-255. The electronic device 100 then selects a plurality of suitable values from the pixel value interval as representative pixel values (for example, selects 5 representative pixel values with the values of 0, 50, 150, 100, and 255, respectively) and calculates the corresponding Stands for standard deviation.

更進一步來說,多個代表像素值與對應的代表標準差可以透過一測試影像來取得。如圖4A與4B所示,影像處理器120首先接收一測試影像NTC(此處以灰階影像為例,但本案不以此為限),且測試影像NTC具有多個不同灰階區塊Re0、Re1、Re2、Re3、Re4、Re5、Re6、Re7、Re8、Re9、Re10、Re11(步驟S410),其中一個灰階區塊對應的顏色為白色,另一個灰階區塊對應的顏色為黑色,且其他的灰階區塊則是對應到白色和黑色之間的顏色。在本實施例中,灰階區塊Re0對應的顏色為白色,灰階區塊Re11對應的顏色為黑色,而其他灰階區塊Re1-Re10則是對應到白色和黑色之間的顏色。 Furthermore, multiple representative pixel values and corresponding representative standard deviations can be obtained through a test image. As shown in FIGS. 4A and 4B, the image processor 120 first receives a test image NTC (here, a grayscale image is used as an example, but this case is not limited to this), and the test image NTC has a plurality of different grayscale blocks Re0, Re1, Re2, Re3, Re4, Re5, Re6, Re7, Re8, Re9, Re10, Re11 (step S410), the color corresponding to one gray-scale block is white, and the color corresponding to the other gray-scale block is black, And the other gray scale blocks correspond to the colors between white and black. In this embodiment, the color corresponding to the gray-scale block Re0 is white, the color corresponding to the gray-scale block Re11 is black, and the other gray-scale blocks Re1-Re10 correspond to the colors between white and black.

在一些實施例中,在接收到測試影像(步驟S410)後,影像處理器120將分別於每一個灰階區塊中擷取多個像素值(步驟S420)。在步驟S410與S420中間,若測試影像NTC有鏡頭暗角 (shading)的問題,影像處理器120會先對測試影像NTC進行一暗角補償(shading compensation),接著再執行步驟S420。若測試影像NTC沒有鏡頭暗角的問題,影像處理器120將直接執行步驟S420。 In some embodiments, after receiving the test image (step S410), the image processor 120 will capture multiple pixel values in each grayscale block (step S420). Between steps S410 and S420, if the test image NTC has lens vignetting (shading) problem, the image processor 120 first performs shading compensation on the test image NTC, and then executes step S420. If the test image NTC has no lens vignetting problem, the image processor 120 will directly execute step S420.

在一些實施例中,灰階區塊Re0-Re11的邊緣很容易受到雜訊的影響而形成鋸齒狀的區塊。為了在灰階區塊Re0-Re11中取得較穩定的多個像素值(如對應的灰階區塊中數值相近的像素值,換句話說,在對應的灰階區塊中之平坦區取得多個像素值),影像處理器120也可以在每一個灰階區塊Re0-Re11中內縮一預定距離(例如2個像素個數的距離)以形成一目標區塊,接著分別在每一個目標區塊內擷取像素值。以灰階區塊Re0為例作說明,影像處理器120在小於灰階區塊Re0的一目標區塊Fd0內擷取每一個像素值,以作為灰階區塊Re0中較穩定的多個像素值。當然,影像處理器120也可以擷取每一個灰階區塊Re0-Re11中的每一個像素值或者數值相近的像素值,本案對此不作限制。 In some embodiments, the edges of the gray-scale blocks Re0-Re11 are easily affected by noise to form jagged blocks. In order to obtain more stable multiple pixel values in the gray-scale blocks Re0-Re11 (such as pixel values with similar values in the corresponding gray-scale block, in other words, more flat areas in the corresponding gray-scale block are obtained Pixel values), the image processor 120 may also shrink a predetermined distance (for example, a distance of 2 pixels) in each gray-scale block Re0-Re11 to form a target block, and then separately at each target Retrieve pixel values within the block. Taking the gray-scale block Re0 as an example for illustration, the image processor 120 extracts each pixel value in a target block Fd0 smaller than the gray-scale block Re0 to serve as more stable pixels in the gray-scale block Re0 value. Of course, the image processor 120 can also capture each pixel value or pixel value with a similar value in each gray-scale block Re0-Re11, which is not limited in this case.

在擷取每一個灰階區塊Re0-Re11中的多個像素值(步驟S420)後,影像處理器120將在每一個灰階區塊Re0-Re11中,根據所擷取的像素值計算對應灰階區塊的代表像素值與代表標準差(步驟S430)。以灰階區塊Re0為例作說明,若影像處理器120所擷取到的像素值共有81個,影像處理器120將平均81個像素值以產生一平均像素值作為灰階區塊Re0的代表像素值I0,並根據上述平均像素值計算81個像素值的一標準差作為灰階區塊Re0的代表標準差σ0。而灰階區塊Re0-Re11對應的代表像素值與代表標準差整理如下表<一>。 After retrieving a plurality of pixel values in each gray-scale block Re0-Re11 (step S420), the image processor 120 will calculate a correspondence according to the retrieved pixel values in each gray-level block Re0-Re11 The representative pixel value and the representative standard deviation of the gray scale block (step S430). Taking the gray-scale block Re0 as an example for illustration, if the image processor 120 captures a total of 81 pixel values, the image processor 120 averages 81 pixel values to generate an average pixel value as the gray-scale block Re0 It represents the pixel value I0, and calculates a standard deviation of 81 pixel values according to the above average pixel value as the representative standard deviation σ0 of the gray scale block Re0. The representative pixel values and standard deviations corresponding to the gray-scale blocks Re0-Re11 are organized in the following table <1>.

Figure 107123689-A0101-12-0008-1
Figure 107123689-A0101-12-0008-1

而在圖3的步驟S310的其他實施例中,影像處理器120也可以透過多個測試影像NTC來取得多個代表像素值與對應的代表標準差。如圖4C所示,影像處理器120首先將在多個時間點接收一測試影像,且測試影像具有多個不同灰階區塊(步驟S460)。舉例來說,影像處理器120在80個不同時間點擷取測試影像NTC,且測試影像NTC具有多個不同灰階區塊Re0-Re11。 In other embodiments of step S310 in FIG. 3, the image processor 120 can also obtain multiple representative pixel values and corresponding representative standard deviations through multiple test images NTC. As shown in FIG. 4C, the image processor 120 will first receive a test image at multiple time points, and the test image has multiple gray-scale blocks (step S460). For example, the image processor 120 captures the test image NTC at 80 different time points, and the test image NTC has a plurality of different gray-scale blocks Re0-Re11.

接著,影像處理器120將分別在每一個測試影像的每一個灰階區塊中擷取至少一個像素值(步驟S470)。而有關影像處理器120於灰階區塊中擷取多個像素值的實施方式大致上可由圖4A的步驟S420推得,故在此不再贅述。此外,因有多個時間點的測試影像,故在一些實施例中,也可在每一測試影像的各灰階區塊中,擷取一個像素值即可。 Next, the image processor 120 will capture at least one pixel value in each grayscale block of each test image (step S470). The implementation of the image processor 120 for extracting multiple pixel values in the gray-scale block can be generally derived from step S420 of FIG. 4A, and will not be described here. In addition, since there are test images at multiple time points, in some embodiments, one pixel value may be captured in each grayscale block of each test image.

再來,影像處理器120將在每一個測試影像中,根據擷取的像素值計算每一個灰階區塊的一區塊像素值與一區塊標準差(步驟S480)。而有關影像處理器120在每一個比較影像中計算每一個灰階區塊的區塊像素值與區塊標準差的實施方式大致上與圖4A的步驟S430的代表像素值(對應到區塊像素值)與代表標準差(對應到區塊標準差)的實施方式相同,故在此不再贅述。 Next, in each test image, the image processor 120 calculates a block pixel value and a block standard deviation of each gray-scale block according to the captured pixel values (step S480). The implementation of the image processor 120 calculating the block pixel value and the block standard deviation of each grayscale block in each comparison image is roughly the same as the representative pixel value of step S430 in FIG. 4A (corresponding to the block pixel Value) is the same as the implementation of the representative standard deviation (corresponding to the block standard deviation), so it will not be repeated here.

最後,影像處理器120將在每一個測試影像中,平均同一個位置的灰階區塊的區塊像素值作為對應的代表像素值,且平均同一個位置的灰階區塊的區塊標準差作為對應的代表標準差(步驟S490)。以測試影像NTC的灰階區塊Re0為例作說明,影像處理器120將在每一個測試影像NTC中,平均同一個位置的灰階區塊Re0的區塊像素值作為對應的代表像素值I0,且平均同一個位置的灰階區塊Re0的區塊標準差作為對應的代表標準差σ0。而灰階區塊Re0-Re11對應的代表像素值與代表標準差顯示如上表<一>。 Finally, in each test image, the image processor 120 averages the block pixel values of the gray-scale blocks at the same position as the corresponding representative pixel values, and averages the block standard deviation of the gray-scale blocks at the same position As the corresponding representative standard deviation (step S490). Taking the grayscale block Re0 of the test image NTC as an example for illustration, the image processor 120 averages the block pixel values of the grayscale block Re0 at the same position in each test image NTC as the corresponding representative pixel value I0 , And the average block standard deviation of the gray-scale block Re0 at the same position is taken as the corresponding representative standard deviation σ0. The representative pixel values and standard deviations corresponding to the gray-scale blocks Re0-Re11 are shown in the above table <1>.

如圖5所示,在本實施例中,像素值區間設定為與動態範圍相同,即0-255。而影像處理器120將灰階區塊Re0-Re11的代表像素值I0-I11與對應的代表標準差σ0-σ11對應到像素值區間中的部分像素值與對應的標準差。 As shown in FIG. 5, in this embodiment, the pixel value interval is set to be the same as the dynamic range, that is, 0-255. The image processor 120 corresponds the representative pixel values I0-I11 of the gray-scale blocks Re0-Re11 and the corresponding representative standard deviations σ0-σ11 to the partial pixel values in the pixel value interval and the corresponding standard deviations.

同時參考圖3與5-6,為了找出像素值區間中的每一個像素值對應的標準差,影像處理器120將計算這些代表像素值I0-I11之間的多個中間像素值對應的中間標準差,以形成一平滑曲線Crv1。更進一步來說,影像處理器120將根據這些代表像素值與對應的代表標準差計算代表像素值之間的每一個中間像素值對應的中間標準差,且將代表像素值、對應的代表標準差、中間像素值與中間標準差分別映射到平滑曲線Crv1中的多個像素值與多個標準差,藉此找出像素值區間中的每一個像素值對應的標準差(步驟S320)。 3 and 5-6 at the same time, in order to find the standard deviation corresponding to each pixel value in the pixel value interval, the image processor 120 will calculate the intermediate values corresponding to the multiple intermediate pixel values between these representative pixel values I0-I11 Standard deviation to form a smooth curve Crv1. Furthermore, the image processor 120 will calculate the intermediate standard deviation corresponding to each intermediate pixel value between the representative pixel values according to these representative pixel values and the corresponding representative standard deviation, and will represent the representative pixel value and the corresponding representative standard deviation 3. The intermediate pixel value and the intermediate standard deviation are respectively mapped to the multiple pixel values and the multiple standard deviations in the smooth curve Crv1, thereby finding the standard deviation corresponding to each pixel value in the pixel value interval (step S320).

值得注意的是,兩個相鄰的像素值會有雜訊大小接近的特性。因此,平滑曲線Crv1中每一個像素值對應的標準差要和代表像素值I0-I11對應的代表標準差σ0-σ11越接近越好(以下稱為資料契合(data fitness)),且每一個像素值對應的標準差之間的變化要越平滑越好(以下稱平滑性(smoothness))。因此,在本實施例中,電子裝置100將透過一平滑曲線函數來估計每一個中間像 素值對應的中間標準差。本實施例的平滑曲線函數如式(1)。 It is worth noting that two adjacent pixel values will have the characteristics of close noise size. Therefore, the standard deviation corresponding to each pixel value in the smooth curve Crv1 should be as close as possible to the representative standard deviation σ0-σ11 corresponding to the representative pixel values I0-I11 (hereinafter referred to as data fitness), and each pixel The change between the standard deviations corresponding to the values should be as smooth as possible (hereinafter referred to as smoothness). Therefore, in this embodiment, the electronic device 100 will estimate each intermediate image through a smooth curve function The median standard deviation corresponding to the prime value. The smooth curve function of this embodiment is as shown in equation (1).

Figure 107123689-A0101-12-0010-2
其中,n為代表像素值的個數(本實施例的代表像素值I0-I11的個數為12),m為像素值區間內像素值的個數(本實施例的個數為256),λ為一平滑程度的控制參數,x為描述動態範圍內每一訊號之對應標準差(本實施的像素值0-255分別對應的標準差)的一標準差向量,A1為描述每一個代表像素值的一第一矩陣(本實施例的代表像素值I0-I11),b1為描述每一個代表標準差的一第一向量(本實施例的代表標準差為σ0-σ11),A2為描述每一個標準差對應的前一個標準差與下一個標準差為一平滑關係的一第二矩陣,第二向量b2為0向量。
Figure 107123689-A0101-12-0010-2
Where n is the number of representative pixel values (the number of representative pixel values I0-I11 in this embodiment is 12), and m is the number of pixel values in the pixel value interval (the number of pixel values in this embodiment is 256), λ is a control parameter for the degree of smoothness, x is a standard deviation vector describing the corresponding standard deviation of each signal in the dynamic range (the standard deviation corresponding to pixel values 0-255 in this implementation), and A 1 is a description of each representative A first matrix of pixel values (representing pixel values I0-I11 in this embodiment), b1 is a first vector describing each representative standard deviation (representing standard deviation in this embodiment is σ0-σ11), A 2 is A second matrix describing a smooth relationship between the previous standard deviation and the next standard deviation corresponding to each standard deviation, the second vector b2 is a zero vector.

更進一步來說,第一矩陣A1與對應的第一向量b1用來描述資料契合。故在本實施例中,第一矩陣A1與第一向量b1分別如式(2)與式(3)所示。 Furthermore, the first matrix A 1 and the corresponding first vector b1 are used to describe data matching. Therefore, in this embodiment, the first matrix A 1 and the first vector b1 are as shown in equations (2) and (3), respectively.

Figure 107123689-A0101-12-0010-3
Figure 107123689-A0101-12-0010-3

Figure 107123689-A0101-12-0010-4
於式(2)中,當第i個取樣像素值屬於像素區間內第j個像素值時,V1(i,j)=1;其他情形,V1(i,j)=0。於式(3)中,n為代表像素值的個數,且σ0-σn-1為代表標準差的數值。第一矩陣A1的矩陣大小為(代表像素值的個數*像素區間內像素值的個數),且第 一向量b1的大小為(代表像素值的個數*1)。然而,第一矩陣A1與第一向量b1也可以其他描述方式來作設計,本案對此不作限制。
Figure 107123689-A0101-12-0010-4
In equation (2), when the i-th sampled pixel value belongs to the j-th pixel value in the pixel interval, V 1 (i,j)=1; otherwise, V 1 (i,j)=0. In equation (3), n is the number representing the pixel value, and σ0-σn-1 is the value representing the standard deviation. The matrix size of the first matrix A 1 is (representing the number of pixel values*the number of pixel values in the pixel interval), and the size of the first vector b1 is (representing the number of pixel values*1). However, the first matrix A 1 and the first vector b1 can also be designed in other description manners, which is not limited in this case.

此外,第二矩陣A2(表示每一個標準差對應的前一個標準差與下一個標準差為平滑關係)與對應的第二向量b2為用來描述資料平滑。故在本實施例中,第二矩陣A2與第二向量可分別如下式(4)與(5)所示。 In addition, the second matrix A 2 (indicating that the previous standard deviation and the next standard deviation corresponding to each standard deviation are in a smooth relationship) and the corresponding second vector b2 are used to describe data smoothing. Therefore, in this embodiment, the second matrix A 2 and the second vector can be represented by the following equations (4) and (5), respectively.

Figure 107123689-A0101-12-0011-5
Figure 107123689-A0101-12-0011-5

Figure 107123689-A0101-12-0011-6
其中,V2(i,j)為第二矩陣A2中的第i行第j列的數值,m為像素值區間內像素值的個數。故第二矩陣A2的矩陣大小為(像素區間內像素值的個數*像素區間內像素值的個數),且第二向量b2的大小為(像素區間內像素值的個數*1)。而第二矩陣A2與第二向量b2也可以其他描述方式來作設計,本案對此不作限制。
Figure 107123689-A0101-12-0011-6
Where V 2 (i, j) is the value of the i-th row and j-th column in the second matrix A 2 , and m is the number of pixel values in the pixel value interval. Therefore, the matrix size of the second matrix A 2 is (the number of pixel values in the pixel interval*the number of pixel values in the pixel interval), and the size of the second vector b2 is (the number of pixel values in the pixel interval*1) . The second matrix A 2 and the second vector b2 can also be designed by other description methods, which is not limited in this case.

藉此,影像處理器120將根據式(1)的平滑曲線函數估測出像素區間中的每一個像素值(本實施例為0-255)與對應的標準差(即向量x),以形成平滑曲線Crv1,如圖6所示。此時,平滑曲線Crv1是代表模擬真實SDN在不同像素值下的非線性關係。 Therefore, the image processor 120 estimates each pixel value (0-255 in this embodiment) and the corresponding standard deviation (ie vector x) in the pixel interval according to the smooth curve function of formula (1) to form Smooth the curve Crv1, as shown in Figure 6. At this time, the smooth curve Crv1 represents the non-linear relationship of the simulated real SDN under different pixel values.

同時參考圖3與圖7,為了將與訊號相關的雜訊(SDN)轉換成與訊號無關的雜訊(SIN),影像處理器120接著將根據平滑曲線Crv1中每一個像素值與對應的標準差計算一等化曲線Crv2,以將每一個像素值對應到一等化後數值(步驟S330)。更進一步來 說,影像處理器120是透過等化曲線Crv2將不同像素值下的雜訊轉換成相同或相近的數值。故等化曲線Crv2需要滿足一目前像素值移動一個標準差的距離,對應的等化後數值移動一個單位。 3 and 7 at the same time, in order to convert signal-related noise (SDN) into signal-independent noise (SIN), the image processor 120 will then follow the smoothing curve Crv1 for each pixel value and the corresponding standard The difference calculates an equalization curve Crv2 to correspond each pixel value to an equalized value (step S330). Go further That is to say, the image processor 120 converts the noise under different pixel values into the same or similar values through the equalization curve Crv2. Therefore, the equalization curve Crv2 needs to satisfy a distance that the current pixel value moves by one standard deviation, and the corresponding value after the equalization moves by one unit.

據此,在本實施例中,等化曲線Crv2需要滿足一調整像素值對應的等化後數值減去目前像素值對應的等化後數值為1個單位,其中,調整像素值代表一目前像素值加上對應的標準差。而此滿足條件可以整理為式(6),且如下所示。 According to this, in this embodiment, the equalization curve Crv2 needs to satisfy an equalized value corresponding to an adjusted pixel value minus the equalized value corresponding to the current pixel value to 1 unit, where the adjusted pixel value represents a current pixel Value plus corresponding standard deviation. And this satisfying condition can be sorted into formula (6), as shown below.

Figure 107123689-A0101-12-0012-9
其中,Teq為等化後數值,a為等化曲線Crv2中的一目前像素值,Xa為目前像素值對應的標準差,且m為像素區間內像素值的個數。
Figure 107123689-A0101-12-0012-9
Where Teq is the value after equalization, a is a current pixel value in the equalization curve Crv2, Xa is the standard deviation corresponding to the current pixel value, and m is the number of pixel values in the pixel interval.

更進一步來說,等化曲線Crv2亦滿足,下一個像素值對應的等化後數值和前一個像素值對應的等化後數值在相減後除以2(可視為曲線在目前像素值a時的斜率)為目前像素值對應的標準差的倒數。而此滿足條件可以整理為式(7),且如下所示。 Furthermore, the equalization curve Crv2 is also satisfied. The equalized value corresponding to the next pixel value and the equalized value corresponding to the previous pixel value are subtracted and divided by 2 (can be regarded as the curve at the current pixel value a Is the reciprocal of the standard deviation corresponding to the current pixel value. And this satisfying condition can be sorted into equation (7), as shown below.

Figure 107123689-A0101-12-0012-7
另外,當a=0時,Teq(1)-Teq(0)=1/X0;當a=m-1時,Teq(m-1)-Teq(m-2)=1/Xm-1,其中,Teq為等化後數值,a為等化曲線Crv2中的一目前像素值,Xa為目前像素值對應的標準差,且m為動態範圍內訊號的個數。
Figure 107123689-A0101-12-0012-7
In addition, when a=0, Teq(1)-Teq(0)=1/X0; when a=m-1, Teq(m-1)-Teq(m-2)=1/Xm-1, Where Teq is the value after equalization, a is a current pixel value in the equalization curve Crv2, Xa is the standard deviation corresponding to the current pixel value, and m is the number of signals in the dynamic range.

因此,在本實施例中,電子裝置100可以透過式(7)來計算出每一個像素值對應到的一等化後數值,且整理如式(8)。 Therefore, in this embodiment, the electronic device 100 can calculate the equalized value corresponding to each pixel value through Equation (7), and the arrangement is as in Equation (8).

Figure 107123689-A0101-12-0012-8
Figure 107123689-A0101-12-0012-8

影像處理器120將式(8)進行矩陣運算得到每一個像素值(即0-255)對應的等化後數值Teq(0)、Teq(1)...、Teq(255),使得等化曲線Crv2可以滿足一目前像素值移動一個標準差的距離,對應的等化後數值為移動一個單位的條件,進而將與訊號相關的雜訊(SDN)轉換成與訊號無關的雜訊(SIN)。 The image processor 120 performs matrix operation of equation (8) to obtain the equalized values Teq(0), Teq(1)..., Teq(255) corresponding to each pixel value (ie 0-255), so that the equalization Curve Crv2 can satisfy the condition that a current pixel value moves by one standard deviation, and the corresponding equalized value is the condition of moving one unit, and then convert signal-related noise (SDN) into signal-independent noise (SIN) .

以影像處理器120接收到一目前像素值為30為例說明。參考圖6-7,電子裝置100根據平滑曲線Crv1取得目前像素值30對應的標準差為2.37(如圖6及表<一>),下一個像素值31對應的等化後數值Teq(31)=22.31,且前一個像素值29對應的等化後數值Teq(29)=21.47。影像處理器120根據式(7)計算出[Teq(31)-Teq(29)]/2=(22.31-21.47)/2=0.42,且1/2.37=0.42,即等化曲線Crv2符合式(7)的條件。 Take the image processor 120 receiving a current pixel value of 30 as an example. 6-7, the electronic device 100 obtains a standard deviation corresponding to the current pixel value 30 of 2.37 according to the smoothing curve Crv1 (see FIG. 6 and table <1>), and the equalized value Teq(31) corresponding to the next pixel value 31 =22.31, and the equalized value Teq(29)=21.47 corresponding to the previous pixel value 29. The image processor 120 calculates [Teq(31)-Teq(29)]/2=(22.31-21.47)/2=0.42, and 1/2.37=0.42 according to equation (7), that is, the equalization curve Crv2 meets the equation ( 7) Conditions.

據此,如圖8所示,影像處理器120在接收到圖2的輸入影像Fr1的每一個輸入像素值P0-Pn後,將透過等化曲線Crv2取得每一個輸入像素值P0-Pn對應的等化後數值,以藉此產生等化後的輸入影像Fr1’,使得不同像素值下的雜訊的數值相同或接近。如圖8所示,在等化後的輸入影像Fr1’中,影像處理器120將計算出影像區塊ZN1中的這些像素值的區域標準差Std為4.32,且計算出影像區塊ZN2中的這些像素值的區域標準差Std為4.33,意即等化後的輸入影像Fr1’存在有相同或接近強度的雜訊。故影像處理器120對等化後的輸入影像Fr1’去除雜訊可以有較佳的雜訊去除效果。 Accordingly, as shown in FIG. 8, after receiving each input pixel value P0-Pn of the input image Fr1 of FIG. 2, the image processor 120 obtains the corresponding value of each input pixel value P0-Pn through the equalization curve Crv2. The equalized value is used to generate the equalized input image Fr1′, so that the noise value under different pixel values is the same or close. As shown in FIG. 8, in the equalized input image Fr1′, the image processor 120 calculates the regional standard deviation Std of these pixel values in the image block ZN1 to be 4.32, and calculates the The regional standard deviation Std of these pixel values is 4.33, which means that the equalized input image Fr1' has noise of the same or close intensity. Therefore, the image processor 120 has better noise removal effect on the equalized input image Fr1' to remove noise.

影像處理器120在取得等化曲線後,將儲存在電子裝置100內的儲存器(未繪於圖式)或一外部儲存器(未繪於圖式)中。當影像處理器120接收到一輸入影像中的每一個輸入像素值時,可以根據上述等化曲線來取得每一個輸入像素值對應的等化後數值,並藉由雜訊去除方法產生較低雜訊的輸出像素值P0’-Pn’。 After obtaining the equalization curve, the image processor 120 stores the memory (not shown in the drawings) or an external storage (not shown in the drawings) in the electronic device 100. When the image processor 120 receives each input pixel value in an input image, it can obtain the equalized value corresponding to each input pixel value according to the above equalization curve, and generate lower noise by the noise removal method The output pixel value of the signal is P0'-Pn'.

<雜訊去除方法的一實施例> <An embodiment of the noise removal method>

同時參考圖2、9,圖9根據本案一實施例所繪示之雜訊去除方法的流程圖。首先,電子裝置100的影像處理器120將接收一輸入影像中每一個像素位置的一輸入像素值(步驟S910)。舉例來說,如圖10所示,輸入影像Fr的大小為8*8且具有64個輸入像素值。而影像處理器120將接收輸入影像Fr中每一個像素位置的輸入像素值P0-P63。 Reference is also made to FIGS. 2 and 9, which are flowcharts of the noise removal method according to an embodiment of the present invention. First, the image processor 120 of the electronic device 100 will receive an input pixel value at each pixel position in an input image (step S910). For example, as shown in FIG. 10, the size of the input image Fr is 8*8 and has 64 input pixel values. The image processor 120 will receive the input pixel values P0-P63 at each pixel position in the input image Fr.

接下來,影像處理器120將在輸入影像的這些像素位置中,依序擷取一目前位置區塊(步驟S920)。而目前位置區塊可以對應到一個輸入像素值或多個輸入像素值。更進一步來說,目前位置區塊的形狀可為正方形。輸入影像的大小為M*M,且目前位置區塊的大小為K*K,其中1<=K<M且K與M為正整數。因此,影像處理器120將根據目前位置區塊的形狀與大小依序擷取目前位置區塊中對應的輸入像素值。舉例來說,若目前位置區塊的大小為1*1,影像處理器120將以1個像素位置大小為單位依序擷取對應的輸入像素值。再舉例來說,若目前位置區塊的大小為3*3,影像處理器120將以9個像素位置大小為單位依序擷取對應的輸入像素值。 Next, the image processor 120 will sequentially extract a current position block among the pixel positions of the input image (step S920). The current location block can correspond to one input pixel value or multiple input pixel values. Furthermore, the shape of the current location block may be a square. The size of the input image is M*M, and the size of the current location block is K*K, where 1<=K<M and K and M are positive integers. Therefore, the image processor 120 will sequentially retrieve the corresponding input pixel values in the current location block according to the shape and size of the current location block. For example, if the size of the current location block is 1*1, the image processor 120 will sequentially capture the corresponding input pixel values in units of one pixel location size. For another example, if the size of the current location block is 3*3, the image processor 120 will sequentially capture the corresponding input pixel values in units of 9 pixel location sizes.

而在其他實施例中,目前位置區塊也可以是其他形狀。影像處理器120於每一次擷取目前位置區塊時也可以有重複的輸入像素值,本案對此不作限制。 In other embodiments, the current location block may also have other shapes. The image processor 120 may also have repeated input pixel values each time the current location block is captured, which is not limited in this case.

在取得目前位置區塊(步驟S920)後,影像處理器120將擷取鄰近目前位置區塊的多個鄰近區塊(步驟S930)。而目前位置區塊與鄰近區塊的形狀與大小相同。更進一步來說,在擷取鄰近區塊的過程中,影像處理器120將會判斷目前位置區塊具有一個輸入像素值或多個輸入像素值。若影像處理器120判斷目前位置區塊僅具有一個輸入像素值時,影像處理器120將根據鄰近區塊的數量擷取鄰近目前位置區塊的輸入像素值,並分別將擷取的輸入像 素值作為鄰近區塊。 After obtaining the current location block (step S920), the image processor 120 will capture multiple adjacent blocks adjacent to the current location block (step S930). The shape and size of the current location block and the neighboring block are the same. Furthermore, during the process of capturing neighboring blocks, the image processor 120 will determine that the current block has an input pixel value or multiple input pixel values. If the image processor 120 determines that the current location block has only one input pixel value, the image processor 120 will capture the input pixel value of the neighboring current location block according to the number of neighboring blocks, and separately capture the captured input images Prime values are used as neighboring blocks.

而若影像處理器120判斷目前位置區塊具有多個輸入像素值,影像處理器120將根據目前位置區域的大小,於鄰近區域中尋找相同大小之區塊以產生對應的鄰近區塊。 If the image processor 120 determines that the current location block has a plurality of input pixel values, the image processor 120 will search for blocks of the same size in the neighboring area according to the size of the current location area to generate corresponding neighboring blocks.

以目前位置區塊Pch對應到9個輸入像素值P26-P28、P34-P36、P42-P44且鄰近區塊的數量為2個來作例子說明。如圖10所示,影像處理器120將根據輸入像素值P26與P44為中心向外擴散1個像素位置的距離以產生對應的鄰近區塊Qch1與Qch2。鄰近區塊Qch1對應到9個輸入像素值P17-P19、P25-P27、P33-P35。鄰近區塊Qch2對應到9個輸入像素值P35-P37、P43-P45、P51-P53。此時,目前位置區塊Pch與鄰近區塊Qch1與Qch2的形狀與大小相同。 The current location block Pch corresponds to 9 input pixel values P26-P28, P34-P36, P42-P44 and the number of neighboring blocks is 2 as an example. As shown in FIG. 10, the image processor 120 diffuses the distance of 1 pixel position outward based on the input pixel values P26 and P44 to generate corresponding adjacent blocks Qch1 and Qch2. The neighboring block Qch1 corresponds to nine input pixel values P17-P19, P25-P27, P33-P35. The neighboring block Qch2 corresponds to 9 input pixel values P35-P37, P43-P45, P51-P53. At this time, the shape and size of the current location block Pch and the neighboring blocks Qch1 and Qch2 are the same.

回到圖9,在取得多個鄰近區塊(步驟S930)後,影像處理器120接著將目前位置區塊與這些鄰近區塊中的每一個輸入像素值經由等化曲線映射,以取得每一個輸入像素值對應的某一個等化後數值(步驟S940)。在本實施例中,同時參考圖7,影像處理器120將目前位置區塊Pch與鄰近區塊Qch1-Qch2中的每一個輸入像素值P17-P19、P25-P28、P33-P37、P42-P45、P51-P53經由等化曲線Crv2映射,以取得對應的等化後數值Teq(P17)-Teq(P19)、Teq(P25)-Teq(P28)、Teq(P33)-Teq(P37)、Teq(P42)-Teq(P45)、Teq(P51)-Teq(P53)。 Returning to FIG. 9, after obtaining a plurality of neighboring blocks (step S930), the image processor 120 then maps the input pixel values of the current position block and each of the neighboring blocks via an equalization curve to obtain each A certain equalized value corresponding to the pixel value is input (step S940). In this embodiment, referring to FIG. 7 at the same time, the image processor 120 inputs each pixel value P17-P19, P25-P28, P33-P37, P42-P45 in the current position block Pch and the adjacent blocks Qch1-Qch2 , P51-P53 are mapped via the equalization curve Crv2 to obtain the corresponding equalized values Teq(P17)-Teq(P19), Teq(P25)-Teq(P28), Teq(P33)-Teq(P37), Teq (P42)-Teq(P45), Teq(P51)-Teq(P53).

接下來,影像處理器120分別計算每一個鄰近區塊與目前位置區塊之間的一差異程度(步驟S950)。更進一步來說,影像處理器120將計算目前位置區塊中各訊號等化後數值與每一鄰近區塊中各訊號等化後數值之差異為幾個標準差的大小,以對應產生每一個鄰近區塊的差異程度。承接上述例子,影像處理器120將計算目前位置區塊Pch中的等化後數值與鄰近區塊Qch1中的等化後數值之間差距為幾個標準差,以對應產生鄰近區塊Qch1 的差異程度Diff(Qch1)。而影像處理器120也將計算目前位置區塊Pch中的等化後數值與鄰近區塊Qch2中的等化後數值之間差異為幾個標準差,以對應產生鄰近區塊Qch2的差異程度Diff(Qch2)。 Next, the image processor 120 separately calculates a degree of difference between each neighboring block and the current location block (step S950). Furthermore, the image processor 120 calculates the difference between the equalized value of each signal in the current location block and the equalized value of each signal in each neighboring block as the size of several standard deviations to generate each correspondingly The degree of difference between neighboring blocks. Following the above example, the image processor 120 will calculate the difference between the equalized value in the current location block Pch and the equalized value in the neighboring block Qch1 by several standard deviations to correspondingly generate the neighboring block Qch1 The degree of difference Diff(Qch1). The image processor 120 will also calculate the difference between the equalized value in the current location block Pch and the equalized value in the neighboring block Qch2 as several standard deviations to correspond to the difference degree Diff generated in the neighboring block Qch2 (Qch2).

在本實施例中,鄰近區塊的差異程度係透過一差異程度函數來計算,且如下式(9)所示。 In this embodiment, the degree of difference between neighboring blocks is calculated by a degree of difference function, and is shown in the following formula (9).

Figure 107123689-A0101-12-0016-10
其中S為目前位置區塊Pch中的像素個數,Teq(Pch)為目前位置區塊的等化後數值,Teq(Qchn)為第n個鄰近區塊中的等化後數值,|Teq(Pch)-Teq(Qchn)|為目前位置區塊中的等化後數值與第n個鄰近區塊中的等化後數值之間的幾個標準差的差距,Diff(Qchn)為第n個鄰近區塊與目前位置區塊Pch的差異程度。
Figure 107123689-A0101-12-0016-10
Where S is the number of pixels in the current location block Pch, Teq(Pch) is the equalized value of the current location block, Teq(Qchn) is the equalized value in the nth neighboring block, Teq( Pch)-Teq(Qchn)| is the difference of several standard deviations between the equalized value in the current location block and the equalized value in the nth neighboring block, Diff(Qchn) is the nth The degree of difference between the adjacent block and the current location block Pch.

以影像處理器120計算鄰近區塊Qch1的差異程度Diff(Qch1)為例作說明。目前位置區塊Pch中的像素個數S為9。|Teq(Pch)-Teq(Qchn)|的總合為|Teq(P26)-Teq(P17)|+|Teq(P27)-Teq(P18)|+|Teq(P28)-Teq(P19)|+|Teq(P34)-Teq(P25)|+|Teq(P35)-Teq(P26)|+|Teq(P36)-Teq(P27)|+|Teq(P42)-Teq(P33)|+|Teq(P43)-Teq(P34)|+|Teq(P44)-Teq(P35)|。藉此,影像處理器120可透過|Teq(Pch)-Teq(Qchn)|的總合除以個數S來計算出鄰近區塊Qch1的差異程度Diff(Qch1)。 The image processor 120 calculates the difference degree Diff(Qch1) of the adjacent block Qch1 as an example for illustration. The number S of pixels in the current position block Pch is 9. |The total of Teq(Pch)-Teq(Qchn)| is |Teq(P26)-Teq(P17)|+|Teq(P27)-Teq(P18)|+|Teq(P28)-Teq(P19)| +|Teq(P34)-Teq(P25)|+|Teq(P35)-Teq(P26)|+|Teq(P36)-Teq(P27)|+|Teq(P42)-Teq(P33)|+| Teq(P43)-Teq(P34)|+|Teq(P44)-Teq(P35)|. In this way, the image processor 120 can calculate the difference Diff(Qch1) of the neighboring block Qch1 by dividing the total of |Teq(Pch)-Teq(Qchn)| by the number S.

在取得每一個鄰近區塊的差異程度後,影像處理器120將根據每一個差異程度來決定對應的鄰近區塊的一權重值(步驟S960)。更進一步來說,若差異程度越小,代表鄰近區塊Qch1和目前位置區塊Pch越相似。此時,影像處理器120將根據差異程度決定出越大的權重值。反之,若差異程度越大,代表鄰近區塊Qch1和目前位置區塊Pch越不像。此時,影像處理器120將根據差異程度決定出越小的權重值。 After obtaining the difference degree of each neighboring block, the image processor 120 will determine a weight value of the corresponding neighboring block according to each difference degree (step S960). Furthermore, if the difference is smaller, it means that the neighboring block Qch1 is more similar to the current block Pch. At this time, the image processor 120 will determine a larger weight value according to the degree of difference. Conversely, if the difference is larger, it means that the neighboring block Qch1 is less like the current block Pch. At this time, the image processor 120 will determine the smaller weight value according to the degree of difference.

在本實施例中,影像處理器120係透過一權重值函數來計算權重值,且如下式(10)所示。 In this embodiment, the image processor 120 calculates the weight value through a weight value function, as shown in the following formula (10).

Figure 107123689-A0101-12-0017-11
其中,ω(Qchn)為第n個鄰近區塊的權重值,Diff(Qchn)為第n個鄰近區塊的差異程度,k為相似與不相似的基準常數,物理意義上為k個標準差。
Figure 107123689-A0101-12-0017-11
Among them, ω(Qchn) is the weight value of the nth neighboring block, Diff(Qchn) is the degree of difference of the nth neighboring block, k is the reference constant of similarity and dissimilarity, and is k standard deviations in the physical sense .

以影像處理器120決定鄰近區塊Qch1的權重值ω(Qch1)與鄰近區塊Qch2的權重值ω(Qch2)為例作說明。在此例中,k為2、差異程度Diff(Qch1)為2且差異程度Diff(Qch2)為3。因此,鄰近區塊Qch1的權重值ω(Qch1)=exp(-2/4)=0.6。鄰近區塊Qch2的權重值ω(Qch2)=exp(-7/4)=0.17。據此,由上述例子可知,當鄰近區塊Qch1和目前位置區塊Pch的差異程度越小時,表示鄰近區塊Qch1和目前位置區塊Pch越相似,於是影像處理器120將決定出較大的權重,此較大的權重代表較高的參考價值。 For example, the image processor 120 determines the weight value ω (Qch1) of the neighboring block Qch1 and the weight value ω (Qch2) of the neighboring block Qch2. In this example, k is 2, the degree of difference Diff(Qch1) is 2 and the degree of difference Diff(Qch2) is 3. Therefore, the weight value ω(Qch1)=exp(-2/4)=0.6 of the neighboring block Qch1. The weight value ω(Qch2)=exp(-7/4)=0.17 of the neighboring block Qch2. According to the above example, the smaller the difference between the adjacent block Qch1 and the current location block Pch, the more similar the adjacent block Qch1 and the current location block Pch are, so the image processor 120 will determine the larger Weight, this larger weight represents a higher reference value.

而在決定出每一個鄰近區塊的權重值(步驟S960)後,影像處理器120根據這些權重值將對應的鄰近區塊中的一主像素值進行加權平均以產生一修正像素值(步驟S970)。在本實施例中,鄰近區塊中的主像素值可以是位於一中間像素位置的輸入像素值,或者是平均鄰近區塊中每一個輸入像素值後的平均值。當然,鄰近區塊中的主像素值也可以透過其他方式來取得,本案對此不作限制。 After determining the weight value of each neighboring block (step S960), the image processor 120 weights and averages a main pixel value in the corresponding neighboring block according to these weight values to generate a modified pixel value (step S970) ). In this embodiment, the main pixel value in the neighboring block may be the input pixel value at an intermediate pixel position, or the average value after averaging each input pixel value in the neighboring block. Of course, the main pixel value in the neighboring block can also be obtained by other means, and this case does not limit it.

此外,本實施例的影像處理器120係透過一修正函數來計算修正像素值,且如下式(11)所示。 In addition, the image processor 120 of this embodiment calculates the corrected pixel value through a correction function, as shown in the following formula (11).

Figure 107123689-A0101-12-0017-12
其中,COR為修正像素值,ω(Qchn)為第n個鄰近區塊的權重值,M(Qchn)為第n個鄰近區塊中的一主像素值。
Figure 107123689-A0101-12-0017-12
Where COR is the corrected pixel value, ω(Qchn) is the weight value of the nth neighboring block, and M(Qchn) is a main pixel value in the nth neighboring block.

承接上述例子,鄰近區塊Qch1的權重值ω(Qch1)=0.6,且鄰近區塊Qch2的權重值ω(Qch2)=0.17。鄰近區塊Qch1的主像素值例如為一中間像素位置的輸入像素值P26,且鄰近區塊Qch1的主像素值例如為一中間像素位置的輸入像素值P44。因此,修正像素值COR=[(0.6*P26)+(0.17*P44)]/(0.6+0.17)。 Following the above example, the weight value ω(Qch1) of the neighboring block Qch1=0.6, and the weight value ω(Qch2) of the neighboring block Qch2=0.17. The main pixel value of the adjacent block Qch1 is, for example, an input pixel value P26 at an intermediate pixel position, and the main pixel value of the adjacent block Qch1 is, for example, an input pixel value P44 of an intermediate pixel position. Therefore, the corrected pixel value COR=[(0.6*P26)+(0.17*P44)]/(0.6+0.17).

在一些實施例中,目前位置區塊Pch本身也可視為鄰近區塊之一,其對應的權重值可自行設定,如0.8,因此,修正像素值COR=[(0.8*P35)+(0.6*P26)+(0.17*P44)]/(0.8+0.6+0.17)。 In some embodiments, the current position block Pch itself can also be regarded as one of the neighboring blocks, and its corresponding weight value can be set by itself, such as 0.8, therefore, the corrected pixel value COR=[(0.8*P35)+(0.6* P26)+(0.17*P44)]/(0.8+0.6+0.17).

接下來,影像處理器120分別以修正像素值對應產生目前位置區塊中的每一個輸出像素值(步驟S980)。在一些實施例中,如只對目前位置區塊的特定像素產生修正像素值,步驟S980亦可忽略,而本案不以此為限。 Next, the image processor 120 generates each output pixel value in the current location block corresponding to the corrected pixel value (step S980). In some embodiments, if the corrected pixel value is only generated for the specific pixel of the current location block, step S980 can also be ignored, and this case is not limited to this.

因此,當影像處理器120將輸入影像Fr1中每一個輸入像素值P0-Pn執行上述雜訊去除方法(即步驟S910-S970)後,影像處理器120將會產生較低雜訊的輸出像素值P0’-Pn’。 Therefore, after the image processor 120 executes the above noise removal method (ie steps S910-S970) on each input pixel value P0-Pn in the input image Fr1, the image processor 120 will generate a lower noise output pixel value P0'-Pn'.

<雜訊去除方法的另一實施例> <Another embodiment of noise removal method>

參考圖2與11,圖11顯示本案另一實施例之雜訊去除方法的流程圖。首先,電子裝置100的影像處理器120接收一輸入影像中每一個像素位置的一輸入像素值(步驟S1110)。舉例來說,如圖10所示,輸入影像Fr的大小為8*8且具有64個輸入像素值。而影像處理器120將接收輸入影像Fr中每一個像素位置的輸入像素值P0-P63。 2 and 11, FIG. 11 shows a flowchart of a noise removal method according to another embodiment of the present case. First, the image processor 120 of the electronic device 100 receives an input pixel value at each pixel position in an input image (step S1110). For example, as shown in FIG. 10, the size of the input image Fr is 8*8 and has 64 input pixel values. The image processor 120 will receive the input pixel values P0-P63 at each pixel position in the input image Fr.

接下來,影像處理器120將在輸入影像的這些像素位置中,依序擷取一目前位置區塊(步驟S1120)。而目前位置區塊係對應到多個輸入像素值,且這些輸入像素值中具有一個主像素值。更 進一步來說,目前位置區塊的形狀為正方形。輸入影像的大小為M*M,且目前位置區塊的大小為K*K,其中1<K<M且K與M為正整數。因此,影像處理器120將根據目前位置區塊的形狀與大小依序擷取目前位置區塊中對應的輸入像素值。舉例來說,若目前位置區塊的大小為3*3,影像處理器120將以9個像素位置大小為單位依序擷取對應的輸入像素值。 Next, the image processor 120 will sequentially extract a block of the current position among the pixel positions of the input image (step S1120). The current location block corresponds to multiple input pixel values, and one of the input pixel values has a main pixel value. more Further, the shape of the current location block is a square. The size of the input image is M*M, and the size of the current location block is K*K, where 1<K<M and K and M are positive integers. Therefore, the image processor 120 will sequentially retrieve the corresponding input pixel values in the current location block according to the shape and size of the current location block. For example, if the size of the current location block is 3*3, the image processor 120 will sequentially capture the corresponding input pixel values in units of 9 pixel location sizes.

而在其他實施例中,目前位置區塊也可以是其他形狀。影像處理器120於每一次擷取目前位置區塊時也可以有重複的輸入像素值,本案對此不作限制。此外,在本實施例中,主像素值可以是位於對應的目前位置區塊中的一中間像素位置的輸入像素值,或者是目前位置區塊中每一個輸入像素值的平均值。當然,目前位置區塊中的主像素值也可以透過其他方式來取得,本案對此不作限制。 In other embodiments, the current location block may also have other shapes. The image processor 120 may also have repeated input pixel values each time the current location block is captured, which is not limited in this case. In addition, in this embodiment, the main pixel value may be an input pixel value at an intermediate pixel position in the corresponding current position block, or an average value of each input pixel value in the current position block. Of course, the main pixel value in the current location block can also be obtained by other means, and this case does not limit it.

而在取得目前位置區塊(步驟S1120)後,影像處理器120接著將目前位置區塊中的每一個輸入像素值經由等化曲線映射,以取得每一個輸入像素值對應的某一個等化後數值(步驟S1130)。請同時參考圖7與圖10,以目前位置區塊Pch為例來作說明。影像處理器120將目前位置區塊Pch中的每一個輸入像素值P26-P28、P34-P36、P42-P44經由等化曲線Crv2映射,以取得對應的等化後數值Teq(P26)-Teq(P28)、Teq(P34)-Teq(P36)、Teq(P42)-Teq(P44)。 After obtaining the current position block (step S1120), the image processor 120 then maps each input pixel value in the current position block through an equalization curve to obtain a certain equalization corresponding to each input pixel value The value (step S1130). Please refer to FIG. 7 and FIG. 10 at the same time, taking the current position block Pch as an example for illustration. The image processor 120 maps each input pixel value P26-P28, P34-P36, P42-P44 in the current position block Pch through the equalization curve Crv2 to obtain the corresponding equalized value Teq(P26)-Teq( P28), Teq(P34)-Teq(P36), Teq(P42)-Teq(P44).

接下來,影像處理器120將平均目前位置區塊中這些輸入像素值對應的這些等化後數值,以產生一低頻成分值(步驟S1140)。承接上述例子,目前位置區塊Pch的低頻成分值E[Teq(Pch)]=[(Teq(P26)+Teq(P27)+Teq(P28)+Teq(P34)+Teq(P35)+Teq(P36)+Teq(P42)+Teq(P43)+Teq(P44)]/9。 Next, the image processor 120 averages the equalized values corresponding to the input pixel values in the current position block to generate a low-frequency component value (step S1140). Following the above example, the low-frequency component value E[Teq(Pch)]=[(Teq(P26)+Teq(P27)+Teq(P28)+Teq(P34)+Teq(P35)+Teq( P36)+Teq(P42)+Teq(P43)+Teq(P44)]/9.

再來,影像處理器120將計算目前位置區塊中輸入像素值對應的等化後數值與低頻成分值之間的一變異數(步驟S1150)。更 進一步來說,影像處理器120係透過一變異數函數來計算變異數,且如下式(12)所示。 Next, the image processor 120 calculates a variation between the equalized value corresponding to the input pixel value in the current location block and the low-frequency component value (step S1150). more Further, the image processor 120 calculates the variance through a variance function, as shown in the following formula (12).

Figure 107123689-A0101-12-0020-13
其中,Var(Pch)為目前位置區塊中的變異數,Teq(x)為某一個輸入像素值對應的等化後數值,E[Teq(Pch)]為目前位置區塊中的低頻成分值,且P為目前位置區塊中的這些輸入像素值的個數。
Figure 107123689-A0101-12-0020-13
Among them, Var(Pch) is the number of mutations in the current location block, Teq(x) is the equalized value corresponding to a certain input pixel value, and E[Teq(Pch)] is the low-frequency component value in the current location block And P is the number of these input pixel values in the current location block.

承接上述例子,目前位置區塊Pch的變異數Var(Pch)=[(Teq[P26]-E[Teq(Pch)])^2+(Teq[P27]-E[Teq(Pch)])^2+(Teq[P28]-E[Teq(Pch)])^2+(Teq[P34]-E[Teq(Pch)])^2+(Teq[P35]-E[Teq(Pch)])^2+(Teq[P36]-E[Teq(Pch)])^2+(Teq[P42]-E[Teq(Pch)])^2+(Teq[P43]-E[Teq(Pch)])^2+(Teq[P44]-E[Teq(Pch)])^2]/9。 Following the above example, the number of variations of the current location block Pch Var(Pch)=[(Teq[P26]-E[Teq(Pch)])^2+(Teq[P27]-E[Teq(Pch)])^ 2+(Teq[P28]-E[Teq(Pch)])^2+(Teq[P34]-E[Teq(Pch)])^2+(Teq[P35]-E[Teq(Pch)]) ^2+(Teq[P36]-E[Teq(Pch)])^2+(Teq[P42]-E[Teq(Pch)])^2+(Teq[P43]-E[Teq(Pch)] )^2+(Teq[P44]-E[Teq(Pch)])^2]/9.

再來,影像處理器120將根據低頻成分值計算目前位置區塊中的主像素值的一高頻成分值(步驟S1160)。更進一步來說,影像處理器120將主像素值減去低頻成分值以產生高頻成分值。承接上述例子,目前位置區塊Pch中的主像素值例如為輸入像素值P35。因此,高頻成分值H(Teq(Pch))=輸入像素值P35-低頻成分值E[Teq(Pch)]。 Next, the image processor 120 calculates a high-frequency component value of the main pixel value in the current location block according to the low-frequency component value (step S1160). Furthermore, the image processor 120 subtracts the low-frequency component value to generate the high-frequency component value. Following the above example, the main pixel value in the current position block Pch is, for example, the input pixel value P35. Therefore, the high-frequency component value H(Teq(Pch))=input pixel value P35−low-frequency component value E[Teq(Pch)].

值得注意的是,目前位置區塊Pch的主像素值是由低頻成分值E[Teq(Pch)]與高頻成分值H(Teq(Pch))組成。低頻成分值E[Teq(Pch)]描述了主像素值中的平坦部分。高頻成分值H(Teq(Pch))描述了主像素值中的細節與紋理部分。然而,主像素值中的雜訊(noise)也有可能存在於高頻成分值H(Teq(Pch))中。 It is worth noting that the main pixel value of the current position block Pch is composed of the low-frequency component value E[Teq(Pch)] and the high-frequency component value H(Teq(Pch)). The low-frequency component value E[Teq(Pch)] describes the flat part in the main pixel value. The high-frequency component value H(Teq(Pch)) describes the details and texture in the main pixel value. However, the noise in the main pixel value may also exist in the high-frequency component value H(Teq(Pch)).

因此,影像處理器120將在目前位置區塊中,根據變異數來計算主像素值的高頻成分值的一高頻比例,以藉此得到去除雜訊的高頻成分值(步驟S1170)。在本實施例中,高頻成分值的高頻 比例係透過一高頻比例函數來計算,且如下式(13)所示。 Therefore, the image processor 120 will calculate a high-frequency ratio of the high-frequency component value of the main pixel value according to the variance in the current location block to obtain the high-frequency component value for removing noise (step S1170). In this embodiment, the high frequency of the high-frequency component value The ratio is calculated by a high-frequency proportional function and is shown in the following formula (13).

Figure 107123689-A0101-12-0021-14
其中,RTO(Pch)為目前位置區塊中高頻成分值的高頻比例,Var(Pch)為目前位置區塊中的變異數,而”1”則代表一雜訊分布常數。
Figure 107123689-A0101-12-0021-14
Among them, RTO (Pch) is the high-frequency proportion of the high-frequency component value in the current location block, Var (Pch) is the variation in the current location block, and "1" represents a noise distribution constant.

藉此,若變異數與雜訊分布常數的差距越小,代表有越多的雜訊存在於高頻成分值H(Teq(Pch))中。此時,影像處理器120將計算出越低的高頻比例RTO(Pch),以減少高頻成分值H(Teq(Pch))。反之,若變異數與雜訊分布常數的差距越大,代表有越多的細節與紋理存在於高頻成分值H(Teq(Pch))中。此時,影像處理器120將計算出越高的高頻比例RTO(Pch),以增加高頻成分值H(Teq(Pch))。 In this way, if the difference between the variance and the noise distribution constant is smaller, it means that more noise exists in the high-frequency component value H(Teq(Pch)). At this time, the video processor 120 will calculate the lower high-frequency ratio RTO(Pch) to reduce the high-frequency component value H(Teq(Pch)). Conversely, if the difference between the variance and the noise distribution constant is larger, it means that more details and textures are present in the high-frequency component value H(Teq(Pch)). At this time, the image processor 120 will calculate a higher high-frequency ratio RTO(Pch) to increase the high-frequency component value H(Teq(Pch)).

最後,影像處理器120在目前位置區塊中,將低頻成分值加上高頻比例的高頻成分值以產生對應主像素值的一輸出像素值(步驟S1180)。而承接上述例子,以目前位置區塊Pch中的主像素值為輸入像素值P35作說明。影像處理器120將低頻成分值E[Teq(Pch)]加上高頻比例RTO(Pch)的高頻成分值H(Teq(Pch)),以產生輸入像素值P35的一輸出像素值輸入像素值P35’。 Finally, the image processor 120 adds the low-frequency component value to the high-frequency component high-frequency component value in the current location block to generate an output pixel value corresponding to the main pixel value (step S1180). Following the above example, the main pixel value in the current position block Pch is the input pixel value P35. The image processor 120 adds the low frequency component value E[Teq(Pch)] to the high frequency component value H(Teq(Pch)) of the high frequency ratio RTO(Pch) to generate an output pixel value input pixel value P35 Value P35'.

因此,當影像處理器120將輸入影像Fr1中每一個輸入像素值P0-Pn執行上述雜訊去除方法(即步驟S1110-S1180)後,影像處理器120將會產生較低雜訊的輸出像素值P0’-Pn’。 Therefore, when the image processor 120 executes the above noise removal method (ie steps S1110-S1180) on each input pixel value P0-Pn in the input image Fr1, the image processor 120 will generate a lower noise output pixel value P0'-Pn'.

綜上所述,本案實施例所提供的一種不同像素值的雜訊等化方法與雜訊去除方法。本案的雜訊等化方法是透過一平滑曲線來模擬不同像素值下的雜訊程度,接著再透過一等化曲線來實現不同像素值下的雜訊等化程度,使得不同像素值下的雜訊的數值相同或接近(例如數值為1),意即將與訊號相關的雜訊(SDN)轉換成與訊號無關的雜訊(Signal-Independent Noise,SIN),進而從受 雜訊影響的訊號更精準地估測出真實訊號的SDN特性。此外,利用上述等化曲線來執行本案的雜訊去除方法可以簡化計算複雜度並計算出較佳的雜訊參數(如標準差與變異數等參數),不僅對不同訊號強度下的像素值有一致的去雜訊能力外,也可藉此提升一輸入影像中每一個輸入像素值的雜訊去除效果,進而產生較低雜訊的輸出像素值。 In summary, a noise equalization method and noise removal method for different pixel values provided by the embodiments of the present invention. The noise equalization method in this case is to simulate the degree of noise under different pixel values through a smooth curve, and then to achieve the degree of noise equalization under different pixel values through an equalization curve, so that the noise under different pixel values The value of the signal is the same or close (for example, the value is 1), which means that the signal-related noise (SDN) is converted into signal-independent noise (SIN), and then received from Signals affected by noise can more accurately estimate the SDN characteristics of real signals. In addition, using the above-mentioned equalization curve to perform the noise removal method in this case can simplify the calculation complexity and calculate better noise parameters (such as standard deviation and variance), not only for pixel values under different signal strengths In addition to the consistent noise reduction capability, it can also improve the noise removal effect of each input pixel value in an input image, thereby producing a lower noise output pixel value.

100‧‧‧電子裝置 100‧‧‧Electronic device

110‧‧‧影像擷取裝置 110‧‧‧Image capture device

120‧‧‧影像處理器 120‧‧‧Image processor

Fr1‧‧‧輸入影像 Fr1‧‧‧ input image

P0-Pn‧‧‧輸入像素值 P0-Pn‧‧‧Input pixel value

P0’-Pn’‧‧‧輸出像素值 P0’-Pn’‧‧‧ output pixel value

Claims (10)

一種影像的雜訊等化方法,適用於一電子裝置,用以等化不同數值下的雜訊,該雜訊等化方法包含:取得一數值區間中多個代表數值與該些代表數值對應的多個代表標準差;根據該些代表數值與對應的該些代表標準差計算該些代表像素值之間的每一中間數值對應的一中間標準差,且將該些代表像素值、該些代表標準差、該些中間數值與該些中間標準差分別映射到一平滑曲線中的多個數值與多個標準差;以及根據該平滑曲線中的每一該數值與對應的該標準差計算一等化曲線,以將每一該數值對應到一等化後數值;其中,該些數值的一目前數值加上對應的該標準差為一調整數值,且該等化曲線滿足該調整數值對應的該等化後數值減去該目前數值對應的該等化後數值為1個單位。 An image noise equalization method is suitable for an electronic device to equalize noise under different values. The noise equalization method includes: obtaining a plurality of representative values in a value interval corresponding to the representative values A plurality of representative standard deviations; calculate an intermediate standard deviation corresponding to each intermediate value between the representative pixel values according to the representative values and the corresponding representative standard deviations, and the representative pixel values and the representative Standard deviation, the intermediate values and the intermediate standard deviations are mapped to multiple values and multiple standard deviations in a smooth curve, respectively; and a first class is calculated based on each of the values in the smooth curve and the corresponding standard deviation Curve to correspond each value to an equalized value; where a current value of the values plus the corresponding standard deviation is an adjusted value, and the equalized curve satisfies the corresponding value of the adjusted value The equalized value minus the equalized value corresponding to the current value is 1 unit. 如請求項1之雜訊等化方法,其中,該目前數值於該等化曲線的斜率為該目前數值對應之該標準差的倒數。 As in the noise equalization method of claim 1, wherein the slope of the current value on the equalization curve is the reciprocal of the standard deviation corresponding to the current value. 如請求項1之雜訊等化方法,其中,於取得該些代表數值與對應的該些代表標準差的步驟中,更包括:接收一測試影像,其中該測試影像具有多個不同區塊;分別於每一該區塊中擷取多個第一數值;以及於每一該區塊中,根據擷取的該些第一數值計算對應該區塊的該代表數值與該代表標準差,以取得該些代表數值與對應的該些代表標準差。 For example, the noise equalization method of claim 1, wherein the step of obtaining the representative values and the corresponding standard deviations further includes: receiving a test image, wherein the test image has multiple different blocks; Retrieving a plurality of first values in each of the blocks; and in each of the blocks, calculating the representative value and the standard deviation of the corresponding block based on the retrieved first values, to Obtain the representative values and the corresponding standard deviations. 如請求項1之雜訊等化方法,其中,於取得該些代表數值與對應的該些代表標準差的步驟中,更包括:於多個時間點接收一測試影像,其中該測試影像具有多個不同區塊;分別於每一該測試影像的每一該區塊中擷取至少一第一數值;於每一該測試影像中,根據擷取的該些第一數值計算出每一該區塊的一區塊數值與一區塊標準差;以及根據同一個位置的該些區塊的該些區塊數值計算出對應的該代表數值,且根據同一個位置的該些區塊的該些區塊標準差作為對應的該代表標準差。 The noise equalization method of claim 1, wherein the step of obtaining the representative values and the corresponding standard deviations further comprises: receiving a test image at multiple time points, wherein the test image has multiple Different blocks; at least one first value is captured in each of the blocks of each of the test images; in each of the test images, each area is calculated based on the captured first values A block value of a block and a block standard deviation; and the corresponding representative value is calculated according to the block values of the blocks at the same position, and according to the blocks of the blocks at the same position The block standard deviation serves as the corresponding representative standard deviation. 一種影像的雜訊去除方法,適用於一電子裝置,且該雜訊去除方法包括:接收一輸入影像;於該輸入影像中擷取一目前位置區塊,其中該目前位置區塊對應到一或多個輸入像素值;擷取鄰近該目前位置區塊的多個鄰近區塊;經由一等化曲線映射該目前位置區塊與該些鄰近區塊中的每一輸入像素值,以取得每一該輸入像素值對應的該等化後數值,其中,該等化曲線包含多個數值以及對應的多個等化後數值,該些數值的一目前數值加上對應的一標準差為一調整數值,且該等化曲線滿足該調整數值對應的該等化後數值減去該目前數值對應的該等化後數值為1個單位;根據該些等化後數值,分別計算每一該鄰近區塊與該目前位置區塊的一差異程度;根據每一該差異程度決定對應該鄰近區塊的一權重值;根據該些權重值將對應的該些鄰近區塊中的一主像素值進行加權平均以產生一修正像素值。 An image noise removal method is suitable for an electronic device, and the noise removal method includes: receiving an input image; capturing a current location block in the input image, wherein the current location block corresponds to one or Multiple input pixel values; extract multiple adjacent blocks adjacent to the current position block; map each input pixel value in the current position block and the adjacent blocks through an equalization curve to obtain each The equalized value corresponding to the input pixel value, wherein the equalization curve includes multiple values and corresponding multiple equalized values, a current value of the values plus a corresponding standard deviation is an adjusted value , And the equalization curve satisfies the equalized value corresponding to the adjusted value minus the equalized value corresponding to the current value is 1 unit; based on the equalized values, each of the neighboring blocks is calculated separately A degree of difference from the current location block; according to each degree of difference, a weight value corresponding to adjacent blocks is determined; according to the weight values, a corresponding main pixel value in the adjacent blocks is weighted and averaged To generate a modified pixel value. 如請求項5之雜訊去除方法,其中,根據該些權重值將對應的該些鄰近區塊中的該主像素值進行加權平均以產生該修正像素值的步驟中,更包括:設定該目前位置區塊的一目前權重值;根據該些權重值及該目前權重值將對應的該些鄰近區塊中的該主像素值及該目前位置區塊的一主像素進行加權平均以產生該修正像素值。 The noise removal method of claim 5, wherein the step of weighting and averaging the main pixel values in the corresponding neighboring blocks to generate the corrected pixel value according to the weight values further includes: setting the current A current weight value of the position block; according to the weight values and the current weight value, the weighted average of the corresponding main pixel value in the adjacent blocks and the main pixel of the current position block is generated to generate the correction Pixel values. 如請求項5之雜訊去除方法,其中,於決定每一該鄰近區塊的該權重值的步驟中,更包括:分別計算該目前位置區塊中的該些等化後數值與每一該鄰近區塊中的該些等化後數值之間的一標準差誤差,以對應產生每一該鄰近區塊的該差異程度,其中,若該差異程度越小,該差異程度對應的該權重值越大,且若該差異程度越大,該差異程度對應的該權重值越小。 As in the noise removal method of claim 5, in the step of determining the weight value of each of the neighboring blocks, the method further includes: separately calculating the equalized values and each of the equalized values in the current location block A standard deviation error between the equalized values in the neighboring blocks to correspondingly generate the degree of difference for each of the neighboring blocks, wherein, if the degree of difference is smaller, the weight value corresponding to the degree of difference corresponds to The larger, and if the degree of difference is greater, the weight value corresponding to the degree of difference is smaller. 如請求項5之雜訊去除方法,其中,每一該鄰近區塊中的該主像素值為位於每一該鄰近區塊之一中間像素位置的該輸入像素值,或者是每一該鄰近區塊中每一該輸入像素值的平均值。 The noise removal method according to claim 5, wherein the main pixel value in each of the adjacent blocks is the input pixel value at an intermediate pixel position of each of the adjacent blocks, or each of the adjacent areas The average value of each of the input pixel values in the block. 一種影像的雜訊去除方法,適用於一電子裝置,且該雜訊去除方法包括:接收一輸入影像;於該輸入影像中擷取一目前位置區塊,其中該目前位置區塊對應到多個輸入像素值;根據該些輸入像素值決定一主像素值;將該些輸入像素值經由一等化曲線映射,以取得對應的多個等 化後數值,其中,該等化曲線包含多個數值以及對應的多個等化後數值,該些數值的一目前數值加上對應的一標準差為一調整數值,且該等化曲線滿足該調整數值對應的該等化後數值減去該目前數值對應的該等化後數值為1個單位;平均該些等化後數值以產生一低頻成分值;計算該些輸入像素值對應的該些等化後數值與該低頻成分值之間的一變異數;根據該低頻成分值計算該目前位置區塊中的該主像素值的一高頻成分值;根據該變異數計算該主像素值的該高頻成分值的一高頻比例;以及將該低頻成分值加上該高頻比例的該高頻成分值以產生對應該主像素值的一輸出像素值。 An image noise removal method is suitable for an electronic device, and the noise removal method includes: receiving an input image; capturing a current location block from the input image, wherein the current location block corresponds to multiple Input pixel values; determine a main pixel value according to the input pixel values; map the input pixel values through an equalization curve to obtain corresponding multiple The normalized value, where the equalization curve includes multiple values and corresponding multiple equalized values, a current value of the values plus a corresponding standard deviation is an adjusted value, and the equalization curve satisfies the Adjust the equalized value corresponding to the value minus the equalized value corresponding to the current value to 1 unit; average the equalized values to generate a low-frequency component value; calculate the corresponding values of the input pixel values A variation between the equalized value and the low-frequency component value; calculating a high-frequency component value of the main pixel value in the current location block according to the low-frequency component value; calculating the main pixel value based on the variation number A high frequency ratio of the high frequency component value; and adding the low frequency component value to the high frequency component value of the high frequency ratio to generate an output pixel value corresponding to the main pixel value. 如請求項9之雜訊去除方法,其中,該主像素值是該些輸入像素值之其中一者,或者該些輸入像素值的一平均值。 The noise removal method of claim 9, wherein the main pixel value is one of the input pixel values, or an average value of the input pixel values.
TW107123689A 2018-07-09 2018-07-09 Noise equalization method and de-noise method TWI689890B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW107123689A TWI689890B (en) 2018-07-09 2018-07-09 Noise equalization method and de-noise method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW107123689A TWI689890B (en) 2018-07-09 2018-07-09 Noise equalization method and de-noise method

Publications (2)

Publication Number Publication Date
TW202006661A TW202006661A (en) 2020-02-01
TWI689890B true TWI689890B (en) 2020-04-01

Family

ID=70413022

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107123689A TWI689890B (en) 2018-07-09 2018-07-09 Noise equalization method and de-noise method

Country Status (1)

Country Link
TW (1) TWI689890B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060139494A1 (en) * 2004-12-29 2006-06-29 Samsung Electronics Co., Ltd. Method of temporal noise reduction in video sequences
CN1866294A (en) * 2005-05-18 2006-11-22 光宝科技股份有限公司 Method and apparatus for clearing image noise
TW201525940A (en) * 2013-12-31 2015-07-01 Faraday Tech Corp Method and apparatus for estimating image noise

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060139494A1 (en) * 2004-12-29 2006-06-29 Samsung Electronics Co., Ltd. Method of temporal noise reduction in video sequences
CN1866294A (en) * 2005-05-18 2006-11-22 光宝科技股份有限公司 Method and apparatus for clearing image noise
TW201525940A (en) * 2013-12-31 2015-07-01 Faraday Tech Corp Method and apparatus for estimating image noise

Also Published As

Publication number Publication date
TW202006661A (en) 2020-02-01

Similar Documents

Publication Publication Date Title
WO2022179335A1 (en) Video processing method and apparatus, electronic device, and storage medium
US10127635B2 (en) Method and device for image noise estimation and image capture apparatus
CN109871845B (en) Certificate image extraction method and terminal equipment
JP2016525840A (en) System and method for correcting image artifacts
CN113313661B (en) Image fusion method, device, electronic equipment and computer readable storage medium
KR101225056B1 (en) Apparatus and method for reducing noise from image sensor
CN108537758B (en) Image contrast enhancement method based on display and human eye visual characteristics
CN112651903B (en) Thermal infrared imager image preprocessing system and preprocessing method thereof
WO2020010638A1 (en) Method and device for detecting defective pixel in image
WO2019056549A1 (en) Image enhancement method, and image processing device
CN107610093B (en) Full-reference image quality evaluation method based on similarity feature fusion
CN114972085B (en) Fine granularity noise estimation method and system based on contrast learning
WO2023005818A1 (en) Noise image generation method and apparatus, electronic device, and storage medium
CN109697738A (en) Image processing method, device, terminal device and storage medium
WO2022116104A1 (en) Image processing method and apparatus, and device and storage medium
CN113962859B (en) Panorama generation method, device, equipment and medium
JP7024713B2 (en) Image processing device and image processing method
CN110766153A (en) Neural network model training method and device and terminal equipment
CN117974512A (en) Image processing method and device
TWI689890B (en) Noise equalization method and de-noise method
CN113066020A (en) Image processing method and device, computer readable medium and electronic device
WO2021016846A1 (en) Image processing method and system, movable platform, and storage medium
JP2020181402A (en) Image processing system, image processing method and program
CN110730280B (en) Noise equalization method and noise removal method
WO2019178717A1 (en) Binocular matching method, visual imaging device and device with storage function