TWI448154B - Method of detecting a bad pixel of a sensed image - Google Patents

Method of detecting a bad pixel of a sensed image Download PDF

Info

Publication number
TWI448154B
TWI448154B TW100100060A TW100100060A TWI448154B TW I448154 B TWI448154 B TW I448154B TW 100100060 A TW100100060 A TW 100100060A TW 100100060 A TW100100060 A TW 100100060A TW I448154 B TWI448154 B TW I448154B
Authority
TW
Taiwan
Prior art keywords
value
pixel
detected
bad
point
Prior art date
Application number
TW100100060A
Other languages
Chinese (zh)
Other versions
TW201230792A (en
Inventor
Yi Lin Tsai
Yuan Chih Peng
Original Assignee
Himax Imaging Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Himax Imaging Inc filed Critical Himax Imaging Inc
Priority to TW100100060A priority Critical patent/TWI448154B/en
Publication of TW201230792A publication Critical patent/TW201230792A/en
Application granted granted Critical
Publication of TWI448154B publication Critical patent/TWI448154B/en

Links

Landscapes

  • Image Processing (AREA)
  • Color Television Image Signal Generators (AREA)

Description

影像感測壞像素點的檢測方法 Image sensing method for detecting bad pixel points

本發明係有關一種影像處理,特別是關於一種影像感測壞像素點(bad pixel)的檢測方法。 The present invention relates to an image processing, and more particularly to an image sensing method for detecting bad pixels.

彩色影像的每一個像素可以使用含三顏色成分的向量來表示,例如使用可見光譜中的紅、綠、藍波段之光強度。為了降低尺寸大小及成本,在一般影像感測器中,針對每一個像素僅使用一個光濾波單元以擷取單一的色彩(chromatic)值。接著,再根據鄰近相同顏色的像素值以內插方法來得到其他的色彩值。 Each pixel of a color image can be represented using a vector containing three color components, such as the intensity of light in the red, green, and blue bands in the visible spectrum. In order to reduce size and cost, in a general image sensor, only one optical filtering unit is used for each pixel to capture a single chromatic value. Then, other color values are obtained by interpolation according to pixel values adjacent to the same color.

第一圖顯示一影像感測器的光感元件(photosensor)陣列10,其上覆蓋有彩色濾波陣列(CFA)12。彩色濾波陣列12的每一彩色濾波器(CF)僅能讓一種顏色光受到相應光感元件的感測。由於彩色濾波陣列12的特殊嵌合(mosaic)圖樣(pattern)排列並非人眼一般所觀看之完整圖像,所以必須藉由色彩內插以重建出人眼可觀看之圖像。因此,色彩內插一般又稱為CFA內插、色彩重建或去嵌合(demosaicking)。 The first figure shows a photosensor array 10 of an image sensor covered with a color filter array (CFA) 12. Each color filter (CF) of the color filter array 12 is only capable of sensing one color of light by the corresponding light sensing element. Since the particular mosaic pattern arrangement of the color filter array 12 is not a complete image viewed by the human eye, color interpolation is necessary to reconstruct an image viewable by the human eye. Therefore, color interpolation is also commonly referred to as CFA interpolation, color reconstruction, or demosaicking.

第一圖所例示之彩色濾波陣列12為拜耳(Bayer)濾波器之一 種,其普遍使用於數位相機或攝影機。拜耳(Bayer)濾波器之圖樣係由紅(R)、綠(G)、藍(B)濾波器依圖示規則排列,其含有50%綠(G)、25%紅(R)、25%藍(B)濾波器。每一像素點位置的其他顏色可由其四周像素點來得到。即使拜耳圖案內插法在影像處理領域被普遍使用,然而其具有一些缺點,例如因色彩混疊(aliasing)現象造成高頻細節的消失,甚至產生新頻率而嚴重破壞影像。 The color filter array 12 illustrated in the first figure is one of Bayer filters. Kind, it is commonly used in digital cameras or cameras. The Bayer filter pattern is arranged by the red (R), green (G), and blue (B) filters as shown in the figure, which contains 50% green (G), 25% red (R), 25%. Blue (B) filter. The other color at each pixel location can be obtained from the surrounding pixels. Even though Bayer pattern interpolation is commonly used in the field of image processing, it has some disadvantages, such as the disappearance of high frequency details due to aliasing phenomena, and even the generation of new frequencies that severely damage the image.

此外,影像感測器通常會具有瑕疵的像素點或壞點(bad pixel)。傳統內插法無法有效分辨壞點與邊緣(edge)影像,因此容易將邊緣影像誤判為壞點,或者將壞點誤認為邊緣影像。 In addition, image sensors typically have defective pixels or bad pixels. The traditional interpolation method cannot effectively distinguish the dead point and the edge image, so it is easy to misjudge the edge image as a bad point or mistake the dead point as an edge image.

因此亟需提出一種有效分辨壞點與邊緣影像的方法,於補償壞點時也能保留影像細節。 Therefore, it is urgent to propose a method for effectively distinguishing between dead pixels and edge images, and to preserve image details when compensating for dead pixels.

鑑於上述,本發明實施例的目的之一在於提出一種影像感測壞點的檢測方法,用以有效分辨壞點與邊緣影像,因而得以正確地進行壞點校正或補償。 In view of the above, one of the objects of the embodiments of the present invention is to provide a method for detecting image dead pixels, which is used to effectively distinguish between dead pixels and edge images, thereby correctly correcting or compensating for dead pixels.

根據本發明實施例,檢視待檢測像素值與複數鄰近位置像素值的差異性。接著,檢視待檢測像素值與複數鄰近同色像素值於特定方向的連續性並得到一特定方向。最後,根據得到之特定方向,檢視待檢測像素值於該特定方向之平滑性。當該待檢測像素值被判定為壞點時,更可根據壞點的複數鄰近同色像素值以進行壞點的補償。 According to an embodiment of the invention, the difference between the pixel value to be detected and the pixel value of the plurality of adjacent positions is examined. Then, the continuity between the pixel value to be detected and the plurality of adjacent color pixel values in a specific direction is examined and a specific direction is obtained. Finally, according to the specific direction obtained, the smoothness of the pixel value to be detected in the specific direction is examined. When the pixel value to be detected is determined to be a dead point, the pixel of the same color pixel value may be adjacent according to the complex point of the bad point to perform the compensation of the dead pixel.

10‧‧‧光感元件陣列 10‧‧‧Light sensor array

12‧‧‧彩色濾波陣列 12‧‧‧Color Filter Array

21-23‧‧‧步驟 21-23‧‧‧Steps

211-215‧‧‧步驟 211-215‧‧‧Steps

221-224‧‧‧步驟 221-224‧‧‧Steps

231-232‧‧‧步驟 231-232‧‧‧Steps

91-92‧‧‧步驟 91-92‧‧‧Steps

101-104‧‧‧步驟 101-104‧‧‧Steps

Nc‧‧‧待檢測像素/壞點 Nc‧‧‧ pixels to be detected / dead pixels

N0-N7‧‧‧像素 N0-N7‧‧‧ pixels

R‧‧‧紅色 R‧‧‧Red

G‧‧‧綠色 G‧‧‧Green

B‧‧‧藍色 B‧‧‧Blue

第一圖顯示一影像感測器的光感元件陣列及彩色濾波陣列。 The first figure shows an array of light sensing elements and a color filter array of an image sensor.

第二圖顯示本發明實施例之影像感測壞像素點(bad pixel)檢測方法的流程圖。 The second figure shows a flow chart of an image sensing bad pixel detection method according to an embodiment of the present invention.

第三A圖至第三D圖顯示待檢測像素值與鄰近位置像素值。 The third to third D-pictures show the pixel value to be detected and the pixel value of the adjacent position.

第四圖顯示第二圖之步驟21的細部流程圖。 The fourth figure shows a detailed flow chart of step 21 of the second figure.

第五A圖至第五C圖顯示待檢測像素值與鄰近同色像素值。 The fifth to fifth C charts show the pixel values to be detected and the adjacent color pixel values.

第六A圖及第六B圖顯示水平方向增強權重、垂直方向增強權重、右上方向增強權重及左上方向增強權重。 The sixth A diagram and the sixth B diagram show the horizontal direction enhancement weight, the vertical direction enhancement weight, the upper right direction enhancement weight, and the upper left direction enhancement weight.

第七圖顯示第二圖之步驟22的細部流程圖。 The seventh diagram shows a detailed flow chart of step 22 of the second figure.

第八圖顯示第二圖之步驟23的細部流程圖。 The eighth figure shows a detailed flow chart of step 23 of the second figure.

第九圖顯示當壞點為藍色或紅色時的補點流程。 The ninth figure shows the fill point flow when the dead point is blue or red.

第十圖顯示當壞點為綠色時的補點流程。 The tenth figure shows the fill point flow when the dead point is green.

第十一圖顯示綠色壞點像素值與鄰近同色像素值。 The eleventh figure shows the green dead pixel value and the adjacent color pixel value.

第二圖顯示本發明實施例之影像感測壞像素點(bad pixel)檢測方法的流程圖。本實施例可適用於各種影像感測器,例如互補式金屬氧化物半導體(CMOS)影像感測器。在本實施例中,各像素點的感測影像值係經由拜耳(Bayer)圖案彩色濾波陣列所得到。若檢測有壞像素點(簡稱“壞點”),可進一步對壞點進行校正或補償。經校正後的壞點像素值於輸出後,可儲存、顯示或作進一步影像處理。 The second figure shows a flow chart of an image sensing bad pixel detection method according to an embodiment of the present invention. This embodiment is applicable to various image sensors such as a complementary metal oxide semiconductor (CMOS) image sensor. In this embodiment, the sensed image values of the respective pixels are obtained via a Bayer pattern color filter array. If a bad pixel ("bad point") is detected, the bad point can be further corrected or compensated. The corrected dead pixel values can be stored, displayed or further image processed after being output.

於步驟21,檢視待檢測像素值與鄰近位置像素值的差異性, 其中,鄰近位置像素點可與待檢測像素點分屬不同顏色。在本實施例中,若以待檢測像素點作為中心,則其與鄰近位置像素點將形成3x3陣列,如第三A圖所示之藍色(B)待檢測像素值Nc與綠色(G)、紅色(R)鄰近位置像素值N0-N7。 In step 21, the difference between the pixel value to be detected and the pixel value of the adjacent location is examined, Wherein, the pixel adjacent to the location may be in a different color from the pixel to be detected. In this embodiment, if the pixel to be detected is taken as the center, it will form a 3×3 array with the adjacent position pixel, as shown in the third A (blue) to be detected pixel value Nc and green (G), Red (R) adjacent position pixel values N0-N7.

第四圖顯示步驟21的細部流程圖。首先,於步驟211,取得待檢測像素值Nc與垂直鄰近位置像素值N1、N6平均值的差值,作為垂直鄰近度量值BM1。其中,若該差值小於0,則令垂直鄰近度量值BM1為0。本步驟211可表示如下:BM1=Nc-(N1+N6)/2 if BM1<0 then BM1=0. The fourth figure shows a detailed flow chart of step 21. First, in step 211, a difference between the average value of the pixel value Nc to be detected and the vertical neighboring pixel values N1, N6 is obtained as the vertical neighboring metric value BM1. Wherein, if the difference is less than 0, the vertical neighboring metric value BM1 is 0. This step 211 can be expressed as follows: BM1=Nc-(N1+N6)/2 if BM1<0 then BM1=0.

於步驟212,取得待檢測像素值Nc與水平鄰近位置像素值N3、N4平均值的差值,作為水平鄰近度量值BM2。其中,若該差值小於0,則令水平鄰近度量值BM2為0。本步驟212可表示如下:BM2=Nc-(N3+N4)/2 if BM2<0 then BM2=0. In step 212, a difference between the average value of the pixel value to be detected Nc and the horizontal neighboring position pixel values N3, N4 is obtained as the horizontal neighboring metric value BM2. Wherein, if the difference is less than 0, the horizontal neighboring metric value BM2 is 0. This step 212 can be expressed as follows: BM2=Nc-(N3+N4)/2 if BM2<0 then BM2=0.

於步驟213,取得待檢測像素值Nc與四個角落鄰近位置像素值N0、N2、N5、N7平均值的差值,作為角落鄰近度量值BM3。其中,若該差值小於0,則令角落鄰近度量值BM3為0。本步驟213可表示如下:BM3=Nc-(N0+N2+N5+N7)/4 if BM3<0 then BM3=0. In step 213, the difference between the average value of the pixel values Nc to be detected and the four corner neighboring position pixel values N0, N2, N5, and N7 is obtained as the corner neighboring metric value BM3. Wherein, if the difference is less than 0, the corner neighboring metric value BM3 is 0. This step 213 can be expressed as follows: BM3=Nc-(N0+N2+N5+N7)/4 if BM3<0 then BM3=0.

接著,於步驟214,根據垂直鄰近度量值BM1、水平鄰近度量值BM2及角落鄰近度量值BM3,以得到綜合鄰近度量值BM4。其中,若該值大於待檢測像素值Nc,則令綜合鄰近度量值BM4等於待檢測像素值Nc。本步驟214可表示如下:BM4=(BM1+BM2)/2+BM3 if BM4>Nc then BM4=Nc. Next, in step 214, the integrated neighboring metric value BM4 is obtained according to the vertical neighboring metric value BM1, the horizontal neighboring metric value BM2, and the corner neighboring metric value BM3. Wherein, if the value is greater than the pixel value to be detected Nc, the integrated neighboring metric value BM4 is equal to the pixel value to be detected Nc. This step 214 can be expressed as follows: BM4 = (BM1 + BM2) / 2 + BM3 if BM4 > Nc then BM4 = Nc.

最後,於步驟215,判定綜合鄰近度量值BM4與待檢測像素 值Nc之絕對差值是否小於鄰近度量臨界值B_TH。若判定為是,則待檢測像素點可能為壞點。本步驟215可表示如下:if ABS(BM4-Nc)<B_TH then Nc可能為壞點. Finally, in step 215, determining the integrated neighboring metric value BM4 and the pixel to be detected Whether the absolute difference of the value Nc is less than the neighboring metric threshold B_TH. If the determination is yes, the pixel to be detected may be a dead pixel. This step 215 can be expressed as follows: if ABS(BM4-Nc)<B_TH then Nc may be a dead point.

上述步驟211-215雖以待檢測像素值Nc為藍色(B)時作為說明,然而,該些步驟同樣適用於待檢測像素值Nc為紅色(R)之情形,如第三B圖所示之紅色(R)待檢測像素值Nc與綠色(G)、藍色(B)鄰近位置像素值N0-N7。不同的地方僅在於將BM1-BM4置換為RM1-RM4,且B_TH置換為R_TH。 The above steps 211-215 are described with the pixel value Nc to be detected as blue (B). However, the steps are equally applicable to the case where the pixel value Nc to be detected is red (R), as shown in FIG. The red (R) pixel value to be detected Nc and the green (G), blue (B) adjacent position pixel values N0-N7. The only difference is that BM1-BM4 is replaced by RM1-RM4, and B_TH is replaced by R_TH.

當待檢測像素值Nc為綠色(G)時,如第三C圖或第三D圖所示,其中,第三C圖中的綠色待檢測像素值Nc與藍色水平相鄰,而第三D圖中的綠色待檢測像素值Nc則與紅色水平相鄰。對於第三C圖所示情形,需將BM1-BM4置換為GM1-GM4,B_TH置換為GB_TH,且步驟214可表示如下:GM4=GM1+GM2+GM3 if GM4>Nc then GM4=Nc. When the pixel value to be detected Nc is green (G), as shown in the third C diagram or the third D diagram, wherein the green to-be-detected pixel value Nc in the third C diagram is adjacent to the blue level, and the third The green to-be-detected pixel value Nc in the D picture is adjacent to the red level. For the case shown in the third C picture, BM1-BM4 needs to be replaced by GM1-GM4, B_TH is replaced by GB_TH, and step 214 can be expressed as follows: GM4=GM1+GM2+GM3 if GM4>Nc then GM4=Nc.

對於第三D圖所示情形,需將BM1-BM4置換為GM1-GM4,B_TH置換為GR_TH,且步驟214可表示如下:GM4=GM1+GM2+GM3 if GM4>Nc then GM4=Nc. For the case shown in the third D picture, BM1-BM4 needs to be replaced by GM1-GM4, B_TH is replaced by GR_TH, and step 214 can be expressed as follows: GM4=GM1+GM2+GM3 if GM4>Nc then GM4=Nc.

接下來,回到第二圖所示流程,於步驟22,檢視待檢測像素值與鄰近同色像素值於特定方向的連續性(continuity)。本步驟22可減少或避免前一步驟21所造成的誤判情形。舉例來說,如果通過待檢測像素值Nc存在一斜向的亮線條,其經前一步驟21檢視後,可能誤判該待檢測像素值Nc為壞點。藉由執行本步驟22後,如果待檢測像素值Nc具非連續性, 則可能為壞點,否則就不是壞點。在本實施例中,若以待檢測像素點作為中心,則其與鄰近同色像素點將形成3x3陣列,如第五A圖所示之藍色(B)待檢測像素值Nc與鄰近同色像素值D0-N7。 Next, returning to the flow shown in the second figure, in step 22, the continuity of the pixel value to be detected and the adjacent color pixel value in a specific direction is examined. This step 22 can reduce or avoid the misjudgment caused by the previous step 21. For example, if there is an oblique bright line through the pixel value to be detected Nc, after the previous step 21 is examined, the pixel value Nc to be detected may be misjudged as a bad point. After performing step 22, if the pixel value to be detected Nc is discontinuous, It may be a bad point, otherwise it is not a bad point. In this embodiment, if the pixel to be detected is taken as the center, it will form a 3×3 array with adjacent pixels of the same color, as shown in FIG. 5A, the blue (B) pixel value to be detected Nc and the adjacent color pixel value D0. -N7.

在本實施例中,特定方向係指水平方向(H)、垂直方向(V)、右上方向(NE)及左上方向(NW)。為了檢視特定方向的特性,本實施例使用增強權重對所欲檢視方向增強其像素值。第六A圖分別顯示水平方向增強權重(B_H)、垂直方向增強權重(B_V)、右上方向增強權重(B_NE)及左上方向增強權重(B_NW)。 In the present embodiment, the specific direction refers to the horizontal direction (H), the vertical direction (V), the upper right direction (NE), and the upper left direction (NW). In order to view the characteristics of a particular direction, the present embodiment uses enhanced weights to enhance its pixel values for the desired viewing direction. The sixth graph A shows the horizontal direction enhancement weight (B_H), the vertical direction enhancement weight (B_V), the upper right direction enhancement weight (B_NE), and the upper left direction enhancement weight (B_NW), respectively.

第七圖顯示步驟22的細部流程圖。首先,於步驟221使用B_H對每一行像素值進行加權後,取其絕對和值。本步驟221可表示如下:BH_1=ABS[(-1)*D0+2*D3+(-1)*D5];BH_2=ABS[(-1)*D1+2*Nc+(-1)*D6];BH_3=ABS[(-1)*D2+2*D4+(-1)*D7]. The seventh diagram shows a detailed flow chart of step 22. First, in step 221, B_H is used to weight each row of pixel values, and the absolute sum value is taken. This step 221 can be expressed as follows: BH_1=ABS[(-1)*D0+2*D3+(-1)*D5]; BH_2=ABS[(-1)*D1+2*Nc+(-1)*D6] ;BH_3=ABS[(-1)*D2+2*D4+(-1)*D7].

接著,於步驟222,使用B_V對每一行之絕對和值進行加權後,取其絕對和值,作為水平方向的連續度量值B_H。至於垂直方向的連續度量值B_V、右上方向的連續度量值B_NE及左上方向的連續度量值B_NW,可依類似原則獲得。本步驟222可表示如下:B_H=ABS[(-1)*BH_1+2*BH_2+(-1)*BH_3]. Next, in step 222, the absolute sum value of each row is weighted using B_V, and the absolute sum value is taken as the continuous metric value B_H in the horizontal direction. As for the continuous metric B_V in the vertical direction, the continuous metric B_NE in the upper right direction, and the continuous metric B_NW in the upper left direction, it can be obtained by a similar principle. This step 222 can be expressed as follows: B_H=ABS[(-1)*BH_1+2*BH_2+(-1)*BH_3].

接著,於步驟223,取得水平方向的連續度量值B_H、垂直方向的連續度量值B_V、右上方向的連續度量值B_NE及左上方向的連續度量值B_NW當中的最大值或最小值,作為綜合連續度量值B(X,Y)。 Next, in step 223, the maximum or minimum value among the continuous metric B_H in the horizontal direction, the continuous metric B_V in the vertical direction, the continuous metric B_NE in the upper right direction, and the continuous metric B_NW in the upper left direction is obtained as a comprehensive continuous metric. The value B (X, Y).

最後,於步驟224,判定綜合連續度量值B(X,Y)是否大於連續 度量臨界值B_Line_TH。若判定為是,則待檢測像素點具有非連續性。步驟223和224可表示如下:B(X,Y)_max=max(B_H,B_V,B_NE,B_NW);B(X,Y)_min=min(B_H,B_V,B_NE,B_NW);B(X,Y)=select_max_min?B(X,Y)_max:B(X,Y)_min;If B(X,Y)>B_Line_TH then Nc具非連續性;其中,變數select_max_min係用以選擇B(X,Y)_max或B(X,Y)_min。若選擇B(X,Y)_min,一般可保留較多的影像細節,但較易誤判。 Finally, in step 224, it is determined whether the integrated continuous metric value B(X, Y) is greater than continuous Measure the threshold B_Line_TH. If the determination is YES, the pixel to be detected has discontinuity. Steps 223 and 224 can be expressed as follows: B(X, Y)_max=max(B_H, B_V, B_NE, B_NW); B(X, Y)_min=min(B_H, B_V, B_NE, B_NW); B(X, Y)=select_max_min? B(X,Y)_max: B(X,Y)_min; If B(X,Y)>B_Line_TH then Nc has discontinuity; wherein the variable select_max_min is used to select B(X,Y)_max or B( X, Y)_min. If you select B(X,Y)_min, you can generally retain more image details, but it is easier to misjudge.

上述步驟221-224雖以待檢測像素值Nc為藍色(B)時作為說明,然而,該些步驟同樣適用於待檢測像素值Nc為紅色(R)之情形,如第五B圖所示之紅色(R)待檢測像素值Nc與鄰近同色像素值D0-N7。不同的地方僅在於將各變數中的B置換為R。 The above steps 221-224 are described with the pixel value Nc to be detected as blue (B). However, the steps are equally applicable to the case where the pixel value Nc to be detected is red (R), as shown in FIG. The red (R) pixel value to be detected Nc and the adjacent color pixel value D0-N7. The only difference is that the B in each variable is replaced by R.

雖然第五A圖也可適用於待檢測像素值Nc為綠色(G)的情形,然而,由於綠色像素點的數量為藍色或紅色像素點的二倍,因此,可使用第五C圖所示的綠色(G)待檢測像素值Nc與鄰近同色像素值D0-N7。第六A圖所示的水平方向增強權重(B_H)、垂直方向增強權重(B_V)、右上方向增強權重(B_NE)及左上方向增強權重(B_NW)也可適用於待檢測像素值Nc為綠色(B)的情形。此外,也可使用第六B圖所示的水平方向增強權重(G_H)、垂直方向增強權重(G_V)、右上方向增強權重(G_NE)及左上方向增強權重(G_NW)。 Although the fifth A picture is also applicable to the case where the pixel value Nc to be detected is green (G), however, since the number of green pixel points is twice the number of blue or red pixel points, the fifth C picture can be used. The green (G) to be detected pixel value Nc and the adjacent color pixel values D0-N7 are shown. The horizontal direction enhancement weight (B_H), the vertical direction enhancement weight (B_V), the upper right direction enhancement weight (B_NE), and the upper left direction enhancement weight (B_NW) shown in FIG. 6A are also applicable to the pixel value to be detected Nc being green ( B). Further, the horizontal direction enhancement weight (G_H), the vertical direction enhancement weight (G_V), the upper right direction enhancement weight (G_NE), and the upper left direction enhancement weight (G_NW) shown in FIG. 6B may be used.

接下來,回到第二圖所示流程,於步驟23,根據前一步 驟22所得到之特定方向,檢視待檢測像素值於該特定方向之平滑性。藉由執行本步驟23後,如果待檢測像素值Nc具非平滑性,則可確定為壞點,否則就不是壞點。 Next, return to the flow shown in the second figure, in step 23, according to the previous step In a specific direction obtained in step 22, the smoothness of the pixel value to be detected in the specific direction is examined. After performing this step 23, if the pixel value to be detected Nc is non-smooth, it can be determined as a bad point, otherwise it is not a bad point.

第八圖顯示步驟23的細部流程圖。首先,於步驟231運算得到各特定方向的邊緣(edge)值。如前所述,本實施例之特定方向係指水平方向(H)、垂直方向(V)、右上方向(NE)及左上方向(NW)。當待檢測像素值Nc為藍色(B)時,如第五A圖所示,各方向的邊緣值可由以下各式得到:V=[ABS(Nc-D1)+ABS(Nc-D6)]/2;H=[ABS(Nc-D3)+ABS(Nc-D4)]/2;NE=[ABS(Nc-D2)+ABS(Nc-D5)]/2;NW=[ABS(Nc-D0)+ABS(Nc-D7)]/2. The eighth diagram shows a detailed flow chart of step 23. First, in step 231, an edge value for each specific direction is obtained. As described above, the specific direction of the present embodiment refers to the horizontal direction (H), the vertical direction (V), the upper right direction (NE), and the upper left direction (NW). When the pixel value to be detected Nc is blue (B), as shown in FIG. 5A, the edge values in each direction can be obtained by the following equations: V=[ABS(Nc-D1)+ABS(Nc-D6)] /2;H=[ABS(Nc-D3)+ABS(Nc-D4)]/2; NE=[ABS(Nc-D2)+ABS(Nc-D5)]/2; NW=[ABS(Nc- D0)+ABS(Nc-D7)]/2.

接著,根據步驟22所得到之特定方向,於步驟232,判定該方向之邊緣值是否大於一臨界值。在本實施例中,係判定邊緣值edge_value的一半是否大於邊緣臨界值B_edge_value_th。若判定為是,則待檢測像素點具有非平滑性。步驟231-232可表示如下:if B(X,Y)=B_H then edge_value=H;else if B(X,Y)=B_V thenedge_value=V;else if B(X,Y)=B_NE thenedge_value=NE;else edge_value=NW;if edge_value/2>B_edge_value_th then Nc具非平滑性. Next, according to the specific direction obtained in step 22, in step 232, it is determined whether the edge value of the direction is greater than a critical value. In this embodiment, it is determined whether half of the edge value edge_value is greater than the edge threshold B_edge_value_th. If the determination is YES, the pixel to be detected has non-smoothness. Steps 231-232 can be expressed as follows: if B(X,Y)=B_H then edge_value=H; else if B(X,Y)=B_V thenedge_value=V;else if B(X,Y)=B_NE thenedge_value=NE; Else edge_value=NW; if edge_value/2>B_edge_value_th then Nc is non-smooth.

上述步驟231-232雖以待檢測像素值Nc為藍色(B)時作為說明,然而,該些步驟同樣適用於待檢測像素值Nc為紅色(R)之情形,如第 五B圖所示。不同的地方僅在於將各變數中的B置換為R。上述步驟231-232也可適用於待檢測像素值Nc為綠色(G)之情形,如第五C圖所示。不同的地方僅在於將各變數中的B置換為G。 The above steps 231-232 are described with the pixel value Nc to be detected as blue (B). However, the steps are equally applicable to the case where the pixel value Nc to be detected is red (R), as in the first case. Figure 5B shows. The only difference is that the B in each variable is replaced by R. The above steps 231-232 are also applicable to the case where the pixel value Nc to be detected is green (G), as shown in FIG. 5C. The only difference is that the B in each variable is replaced by G.

根據上述第二圖所示流程,若能符合步驟21至23的各種判定,即能判定待檢測像素值Nc為壞點。當其被判定為壞點時,接下來可以對壞點像素值進行校正或補償(簡稱“補點”)。在本實施例中,係根據壞點的鄰近同色像素值以進行壞點的補償。 According to the flow shown in the second figure above, if the various determinations of steps 21 to 23 can be met, it can be determined that the pixel value Nc to be detected is a bad point. When it is judged to be a dead point, the pixel value of the dead pixel can be corrected or compensated (referred to as "complement point"). In this embodiment, the compensation of the dead pixels is performed according to the adjacent color pixel values of the dead pixels.

第九圖顯示當壞點Nc為藍色(如第五A圖所示)或者為紅色(如第五B圖所示)時的補點流程。首先,於步驟91,將八個鄰近同色像素值D0-D7進行排序,以得到最大值。接著,於步驟92,根據該最大值,將距離該最大值較遠的五個鄰近同色像素值,連同壞點的像素值Nc進行加權平均,以得到壞點的補償值。例如,當D0為最大值時,則五個鄰近同色像素值即為D2、D5、D4、D6、D7;當D1為最大值時,則五個鄰近同色像素值即為D3、D4、D5、D6、D7。在一實施例中,壞點的權重為3/8,而五個鄰近同色像素點的權重皆為1/8。在另一實施例中,壞點的權重為1/16,而五個鄰近同色像素點的權重皆為3/16。 The ninth figure shows the fill point flow when the dead point Nc is blue (as shown in Figure 5A) or red (as shown in Figure 5B). First, in step 91, eight adjacent color-matching pixel values D0-D7 are sorted to obtain a maximum value. Next, in step 92, according to the maximum value, five adjacent color-matching pixel values far from the maximum value are weighted and averaged together with the pixel value Nc of the dead pixels to obtain a compensation value of the dead pixels. For example, when D0 is the maximum value, the values of five adjacent color pixels are D2, D5, D4, D6, and D7; when D1 is the maximum value, the values of five adjacent color pixels are D3, D4, and D5. D6, D7. In one embodiment, the weight of the dead pixels is 3/8, and the weights of the five adjacent pixels of the same color are both 1/8. In another embodiment, the weight of the dead pixels is 1/16, and the weights of the five adjacent pixels of the same color are both 3/16.

第十圖顯示當壞點Nc為綠色時的補點流程。第十一圖顯示綠色(G)壞點像素值Nc與鄰近同色像素值N0-N7。首先,於步驟101,將四個距壞點Nc最近的同色像素值D0-D3進行排序,以得到排序最小值min1_g,可表示如下:min1_g=sorting(D0-D3). The tenth graph shows the fill point flow when the dead point Nc is green. The eleventh figure shows the green (G) dead pixel value Nc and the adjacent color pixel values N0-N7. First, in step 101, the same color pixel values D0-D3 closest to the dead point Nc are sorted to obtain a sorting minimum value min1_g, which can be expressed as follows: min1_g=sorting(D0-D3).

於步驟102,對前述四個距壞點Nc最近的同色像素值D0-D3進 行運算,以得到最近像素平均值avg_g,可表示如下:avg_g=avg(D0-D3). In step 102, the same color pixel values D0-D3 closest to the four dead pixels Nc are entered. Row operation to get the nearest pixel average avg_g, which can be expressed as follows: avg_g=avg(D0-D3).

於步驟103,得到四個距壞點Nc最近的同色像素值D0-D3連同壞點Nc的平均中值(median),且得到四個距壞點Nc次近的同色像素值D4-D7連同壞點Nc的平均中值。接著,取得此二平均中值之平均值median_g。 In step 103, the same color pixel values D0-D3 closest to the dead point Nc are obtained together with the median of the dead pixels Nc, and the same color pixel values D4-D7 near the bad point Nc are obtained. The average median of points Nc. Next, the average median_g of the two average medians is obtained.

最後,於步驟104,根據上述步驟101-103所得到的部分統計值,以得到該壞點的補償值。在一實施例中,壞點的補償值等於平均中值之平均值median_g以及排序最小值min1_g兩者的平均值,亦即avg(media_g,min1_g)。在另一實施例中,壞點的補償值等於最近像素平均值avg_g以及排序最小值min1_g兩者的平均值,亦即avg(avg_g,min1_g)。在又一實施例中,壞點的補償值等於排序最小值min1_g;或等於平均中值之平均值median_g;或等於最近像素平均值avg_g。 Finally, in step 104, according to the partial statistical values obtained in the above steps 101-103, the compensation value of the dead point is obtained. In an embodiment, the compensation value of the dead point is equal to the average of both the average median_g of the average median and the minimum value of the order min1_g, that is, avg (media_g, min1_g). In another embodiment, the compensation value of the dead pixel is equal to the average of both the nearest pixel average value avg_g and the sort minimum value min1_g, that is, avg(avg_g, min1_g). In yet another embodiment, the compensation value of the dead point is equal to the ranking minimum min1_g; or equal to the average median_g of the average median; or equal to the nearest pixel average avg_g.

以上所述僅為本發明之較佳實施例而已,並非用以限定本發明之申請專利範圍;凡其它未脫離發明所揭示之精神下所完成之等效改變或修飾,均應包含在下述之申請專利範圍內。 The above description is only the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention; all other equivalent changes or modifications which are not departing from the spirit of the invention should be included in the following Within the scope of the patent application.

21-23‧‧‧步驟 21-23‧‧‧Steps

Claims (12)

一種影像感測壞像素點的檢測方法,包含:檢視一待檢測像素值與複數鄰近位置像素值的差異性;檢視該待檢測像素值與複數鄰近同色像素值於特定方向的連續性並得到一特定方向;及根據得到之該特定方向,檢視該待檢測像素值於該特定方向之平滑性;其中上述連續性之檢視步驟包含:使用一增強權重對所欲檢視之特定方向增強其像素值;其中上述之特定方向包含水平方向、垂直方向、右上方向及左上方向。 A method for detecting a bad pixel point of an image, comprising: checking a difference between a pixel value to be detected and a pixel value of a plurality of adjacent positions; and checking continuity of the pixel value to be detected and a plurality of adjacent color pixels in a specific direction and obtaining a continuity a specific direction; and, according to the specific direction obtained, the smoothness of the pixel value to be detected in the specific direction; wherein the step of viewing the continuity includes: using an enhancement weight to enhance the pixel value of the specific direction to be inspected; The specific direction described above includes a horizontal direction, a vertical direction, an upper right direction, and an upper left direction. 如申請專利範圍第1項所述影像感測壞像素點的檢測方法,其中至少部分該鄰近位置像素點與該待檢測像素點分屬不同顏色。 The method for detecting an image of a bad pixel in the image of claim 1, wherein at least a portion of the adjacent pixel is in a different color from the pixel to be detected. 如申請專利範圍第1項所述影像感測壞像素點的檢測方法,其中上述之待檢測像素點作為中心,其與該鄰近位置像素點形成3x3陣列。 The method for detecting an image of a bad pixel according to claim 1, wherein the pixel to be detected is centered, and forms a 3×3 array with the pixel at the adjacent position. 如申請專利範圍第1項所述影像感測壞像素點的檢測方法,其中上述差異性的檢視步驟包含:取得該待檢測像素值與該垂直鄰近位置像素值之平均值的差值,作為一垂直鄰近度量值;取得該待檢測像素值與該水平鄰近位置像素值之平均值的差值,作為一水平鄰近度量值;取得該待檢測像素值與該四個角落鄰近位置像素值之平均值的差值,作為一角落鄰近度量值; 根據該垂直鄰近度量值、該水平鄰近度量值及該角落鄰近度量值,以得到一綜合鄰近度量值;及判定該綜合鄰近度量值與該待檢測像素值之絕對差值是否小於一鄰近度量臨界值,若判定為是,則該待檢測像素點可能為壞點。 The method for detecting an image of a bad pixel according to the first aspect of the invention, wherein the step of detecting the difference comprises: obtaining a difference between an average value of the pixel value to be detected and a pixel value of the vertical adjacent position, as a a vertical neighboring metric value; obtaining a difference between the pixel value to be detected and an average value of the horizontal neighboring pixel values as a horizontal neighboring metric value; obtaining an average value of the pixel value to be detected and the pixel value of the four corner neighboring positions The difference, as a corner neighbor metric; Obtaining a comprehensive neighboring metric value according to the vertical neighboring metric value, the horizontal neighboring metric value, and the corner neighboring metric value; and determining whether the absolute difference between the integrated neighboring metric value and the to-be-detected pixel value is less than a neighboring metric threshold The value, if the determination is yes, the pixel to be detected may be a bad point. 如申請專利範圍第4項所述影像感測壞像素點的檢測方法,更包含:若該待檢測像素值與該垂直鄰近位置像素值之平均值的差值小於0,則令該垂直鄰近度量值為0;若該待檢測像素值與該水平鄰近位置像素值之平均值的差值小於0,則令該水平鄰近度量值為0;若該待檢測像素值與該四個角落鄰近位置像素值之平均值的差值小於0,則令該角落鄰近度量值為0;及若該綜合鄰近度量值大於該待檢測像素值,則令該綜合鄰近度量值等於該待檢測像素值。 The method for detecting a bad pixel point of the image according to claim 4, further comprising: if the difference between the average value of the pixel value to be detected and the pixel value of the vertical adjacent position is less than 0, the vertical proximity metric is obtained The value is 0; if the difference between the pixel value to be detected and the average value of the horizontal neighboring pixel values is less than 0, the horizontal neighboring metric value is 0; if the pixel value to be detected is adjacent to the pixel in the four corners The difference between the average values of the values is less than 0, so that the corner neighboring metric value is 0; and if the integrated neighboring metric value is greater than the to-be-detected pixel value, the integrated neighboring metric value is made equal to the to-be-detected pixel value. 如申請專利範圍第1項所述影像感測壞像素點的檢測方法,其中上述之待檢測像素點作為中心,其與該鄰近同色像素點形成3x3陣列。 The method for detecting an image of a bad pixel according to claim 1, wherein the pixel to be detected is centered, and forms a 3×3 array with the adjacent pixel of the same color. 如申請專利範圍第1項所述影像感測壞像素點的檢測方法,其中上述連續性之檢視步驟包含:對每一行像素值進行加權後,取其絕對和值;對每一行之該絕對和值進行加權後,取其絕對和值,取得一水平方向的連續度量值、一垂直方向的連續度量值、一右上方向的連續度量值及一左上方向的連續度量值;取得該水平方向的連續度量值、該垂直方向的連續度量值、該右上 方向的連續度量值及該左上方向的連續度量值當中的最大值或最小值,作為一綜合連續度量值;及判定該綜合連續度量值是否大於一連續度量臨界值,若判定為是,則該待檢測像素點具有非連續性。 The method for detecting an image of a bad pixel according to the first aspect of the patent application, wherein the step of checking the continuity comprises: weighting each row of pixel values, and taking an absolute sum; and the absolute sum of each row After the values are weighted, the absolute sum value is obtained, and a continuous metric value in the horizontal direction, a continuous metric value in the vertical direction, a continuous metric value in the upper right direction, and a continuous metric value in the upper left direction are obtained; the continuous direction in the horizontal direction is obtained. Metric value, continuous measure of the vertical direction, the upper right a continuous measure of the direction and a maximum or minimum value of the continuous measure in the upper left direction as a comprehensive continuous measure; and determining whether the integrated continuous measure is greater than a continuous measure threshold, and if the determination is yes, The pixel to be detected has discontinuity. 如申請專利範圍第1項所述影像感測壞像素點的檢測方法,其中上述平滑性的檢視步驟包含:得到各該特定方向的邊緣(edge)值;及判定該特定方向之邊緣值是否大於一臨界值,若判定為是,則該待檢測像素點具有非平滑性。 The method for detecting an image of a bad pixel according to the first aspect of the invention, wherein the step of detecting the smoothness comprises: obtaining an edge value of each specific direction; and determining whether an edge value of the specific direction is greater than A threshold value, if the determination is YES, the pixel to be detected has non-smoothness. 如申請專利範圍第1項所述影像感測壞像素點的檢測方法,當該待檢測像素值與該鄰近位置像素值具差異性,該待檢測像素值與該鄰近同色像素值於特定方向具非連續性,且該待檢測像素值於該特定方向具非平滑性,則判定該待檢測像素值為一壞點。 The method for detecting a bad pixel point of the image according to the first aspect of the invention, wherein the pixel value to be detected is different from the pixel value of the adjacent position, and the pixel value to be detected and the pixel value of the adjacent color are in a specific direction. If the pixel value to be detected is non-smooth in the specific direction, it is determined that the pixel value to be detected is a bad point. 如申請專利範圍第9項所述影像感測壞像素點的檢測方法,更包含:根據該壞點的複數鄰近同色像素值以進行壞點的補償。 The method for detecting a bad pixel point of the image according to claim 9 further includes: compensating for a dead pixel according to a plurality of adjacent color pixel values of the dead point. 如申請專利範圍第10項所述影像感測壞像素點的檢測方法,當該壞點為藍色或紅色時,該補點步驟包含:將複數鄰近同色像素值進行排序,以得到一排序最大值;及根據該排序最大值,將距離該排序最大值較遠的該複數鄰近同色像素值,連同該壞點的像素值進行加權平均,以得到該壞點的補償值。 The method for detecting a bad pixel point of the image according to claim 10, wherein when the dead point is blue or red, the step of complementing comprises: sorting the plurality of adjacent pixels of the same color to obtain a maximum sorting. a value; and according to the sorted maximum value, the complex adjacent color pixel values that are farther from the sorted maximum value are weighted and averaged together with the pixel value of the bad point to obtain a compensation value of the bad point. 如申請專利範圍第10項所述影像感測壞像素點的檢測方法,當該壞點為綠色時,該補點步驟包含:將距該壞點最近的複數同色像素值進行排序,以得到一排序最小值;對距該壞點最近的該同色像素值進行運算,以得到一最近像素平均值;得到距該壞點最近的複數同色像素值連同該壞點的一平均中值(median),且得到距該壞點次近的複數同色像素值連同該壞點的一平均中值,再取得該二平均中值之平均值;及根據該排序最小值、該最近像素平均值、該二平均中值之平均值的部分,以得到該壞點的補償值。 The method for detecting a bad pixel point of the image according to claim 10, wherein when the dead point is green, the step of complementing comprises: sorting the plurality of same-color pixel values closest to the bad point to obtain a Sorting the minimum value; calculating the same-color pixel value closest to the bad point to obtain a nearest pixel average value; obtaining a complex same-color pixel value closest to the bad point together with an average median value of the bad point (median), And obtaining a plurality of same-color pixel values that are next to the bad point together with an average median value of the bad points, and then obtaining an average of the two average median values; and according to the sorted minimum value, the nearest pixel average value, and the two averages The portion of the average of the median values to obtain the compensation value for the bad point.
TW100100060A 2011-01-03 2011-01-03 Method of detecting a bad pixel of a sensed image TWI448154B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW100100060A TWI448154B (en) 2011-01-03 2011-01-03 Method of detecting a bad pixel of a sensed image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW100100060A TWI448154B (en) 2011-01-03 2011-01-03 Method of detecting a bad pixel of a sensed image

Publications (2)

Publication Number Publication Date
TW201230792A TW201230792A (en) 2012-07-16
TWI448154B true TWI448154B (en) 2014-08-01

Family

ID=46934240

Family Applications (1)

Application Number Title Priority Date Filing Date
TW100100060A TWI448154B (en) 2011-01-03 2011-01-03 Method of detecting a bad pixel of a sensed image

Country Status (1)

Country Link
TW (1) TWI448154B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200620979A (en) * 2004-12-09 2006-06-16 Agilent Technologies Inc System and method for detecting and correcting defective pixels in a digital image sensor
TW200634373A (en) * 2005-03-22 2006-10-01 Dynacolor Inc Defective pixel tester for flat panel display and the measuring method thereof
TW200828982A (en) * 2006-12-22 2008-07-01 Altek Corp Real-time detection method for bad pixel of image
TW200951537A (en) * 2008-06-13 2009-12-16 Chroma Ate Inc Method and apparatus for detecting dead pixels of a flat panel display

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200620979A (en) * 2004-12-09 2006-06-16 Agilent Technologies Inc System and method for detecting and correcting defective pixels in a digital image sensor
TW200634373A (en) * 2005-03-22 2006-10-01 Dynacolor Inc Defective pixel tester for flat panel display and the measuring method thereof
TW200828982A (en) * 2006-12-22 2008-07-01 Altek Corp Real-time detection method for bad pixel of image
TW200951537A (en) * 2008-06-13 2009-12-16 Chroma Ate Inc Method and apparatus for detecting dead pixels of a flat panel display

Also Published As

Publication number Publication date
TW201230792A (en) 2012-07-16

Similar Documents

Publication Publication Date Title
CN102625133B (en) Detection method of image sensing of bad pixel
JP4374488B2 (en) Digital image system and method for combining demosaicing and bad pixel correction
JP5454075B2 (en) Image processing apparatus, image processing method, and program
TWI547169B (en) Image processing method and module
JP5697353B2 (en) Image processing apparatus, image processing apparatus control method, and program
US7366347B2 (en) Edge detecting method
JP2004112802A (en) Digital image sensor for detecting defective pixel and the method
US20100166305A1 (en) Method for detecting and correcting chromatic aberration, and apparatus and method for processing image using the same
US9041854B2 (en) Image-pickup apparatus and method of detecting defective pixel thereof
KR20010108262A (en) Hi-speed deterministic approach in detecting defective pixels within an image sensor
JP2013048410A (en) Color imaging apparatus
JP2011101359A (en) Method of modeling integrated noise in image sensor and method of reducing noise using the same
TWI449027B (en) Adaptive pixel compensation method
TWI542217B (en) Pixel value calibration device and method
JP2013066157A (en) Image processing apparatus, image processing method, and program
CN106937064A (en) The detection method of digital picture bad point, bearing calibration and device
US20120257825A1 (en) Method for correcting a defect pixel
JP2013168793A (en) Image processor
US20150139554A1 (en) Consecutive thin edge detection system and method for enhancing a color filter array image
KR101945408B1 (en) Apparatus and method for determining defect pixel
JPWO2013099917A1 (en) Imaging device
TWI448154B (en) Method of detecting a bad pixel of a sensed image
US20130168795A1 (en) Color Image Sensing
JP6091807B2 (en) Defective pixel determination device and defective pixel determination method
KR100776379B1 (en) Bad pixel interpolation device using color difference signal and method thereof

Legal Events

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