JP2009188624A - Image processor and electronic camera, and allowable value setting method - Google Patents

Image processor and electronic camera, and allowable value setting method Download PDF

Info

Publication number
JP2009188624A
JP2009188624A JP2008025209A JP2008025209A JP2009188624A JP 2009188624 A JP2009188624 A JP 2009188624A JP 2008025209 A JP2008025209 A JP 2008025209A JP 2008025209 A JP2008025209 A JP 2008025209A JP 2009188624 A JP2009188624 A JP 2009188624A
Authority
JP
Japan
Prior art keywords
pixel value
correction
value
pixel
correction pixel
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
JP2008025209A
Other languages
Japanese (ja)
Other versions
JP5186937B2 (en
Inventor
Akihiko Utsuki
暁彦 宇津木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nikon Corp
Original Assignee
Nikon Corp
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 Nikon Corp filed Critical Nikon Corp
Priority to JP2008025209A priority Critical patent/JP5186937B2/en
Publication of JP2009188624A publication Critical patent/JP2009188624A/en
Application granted granted Critical
Publication of JP5186937B2 publication Critical patent/JP5186937B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To solve the following problem in a conventional image processing technology for correcting the pixel value of defective pixel: an appropriate corrected pixel value is not always obtained and the image quality of photographed images is damaged at a part where an image structure is flat and a part provided with high frequency components. <P>SOLUTION: The image processor includes: a first corrected pixel value calculation part for calculating a prescribed correction amount for the pixel value of the defective pixel of an imaging device and calculating a first corrected pixel value; a corrected pixel value allowable range setting part for setting a corrected pixel value allowable range including the first corrected pixel value; a second corrected pixel value calculation part for performing an interpolating operation using the pixel values of pixels around the defective pixel and calculating a second corrected pixel value; a third corrected pixel value calculation part for comparing the second corrected pixel value with the corrected pixel value allowable range and calculating a third corrected pixel value; and a correction value substituting part for replacing the pixel value of the defective pixel by the third corrected pixel value as. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、撮像素子の欠陥画素の画素値を補正する画像処理技術に関する。   The present invention relates to an image processing technique for correcting pixel values of defective pixels of an image sensor.

近年、CCD型撮像素子やCMOS型撮像素子などを用いた電子カメラが広く普及している。ところが、これらの撮像素子を製造する過程において、正常な出力が得られない欠陥画素が発生する場合がある。このような欠陥画素を有する撮像素子で撮影された画像は、欠陥画素部分が固定的なノイズとなって撮影画像に現れる。   In recent years, electronic cameras using a CCD image sensor, a CMOS image sensor, or the like have become widespread. However, in the process of manufacturing these image sensors, defective pixels for which normal output cannot be obtained may occur. In an image shot with an image pickup device having such defective pixels, the defective pixel portion appears as fixed noise and appears in the shot image.

このような画質劣化を改善するために、出力が低下した欠陥画素値に所定の補正量を演算して正常な画素値に近づける方法や、撮像素子の欠陥画素の画素値をその周辺画素の画素値から補間する画像処理技術が考えられている(例えば、特許文献1参照)。
特開2005−175547号公報
In order to improve such image quality degradation, a method of calculating a predetermined correction amount to a defective pixel value whose output has been reduced to bring it close to a normal pixel value, or a pixel value of a defective pixel of an image sensor is set to a pixel of its surrounding pixels An image processing technique for interpolating from values is considered (see, for example, Patent Document 1).
JP 2005-175547 A

ところが、単純に欠陥画素の画素値に所定の補正量を演算して欠陥画素の補正画素値とする従来の方法は、補正画素値が欠陥画素周辺の正常な画素値に比べて若干の補正誤差を生じるため、高周波成分が少ない平坦な画像で欠陥画素を補正する場合、補正後の欠陥画素が目立ってしまうという問題が生じる。特に、欠陥画素が連続している線キズを補正する場合に上記不具合が顕著である。   However, the conventional method of simply calculating a predetermined correction amount on the pixel value of the defective pixel to obtain the corrected pixel value of the defective pixel has a slight correction error compared to the normal pixel value around the defective pixel. Therefore, when a defective pixel is corrected with a flat image with few high-frequency components, there arises a problem that the defective pixel after correction becomes conspicuous. In particular, the above-mentioned problem is remarkable when correcting a line flaw in which defective pixels are continuous.

また、周辺画素の画素値から補間する従来の方法は、欠陥画素と周辺画素との画素値が大きく異なる高周波成分の多い画像の場合、補正後の画素値が本来の画素値とは大きく異なってしまう恐れがある。   In addition, the conventional method of interpolating from the pixel values of the peripheral pixels is that the corrected pixel value is significantly different from the original pixel value in the case of an image with many high-frequency components in which the pixel values of the defective pixel and the peripheral pixel are significantly different. There is a risk.

このように、従来の欠陥画素の画素値を補正する画像処理技術は、画像構造が平坦な箇所や高周波成分を有する箇所において、必ずしも適正な補正画素値が得られず、撮影画像の画質が損われるという問題があった。   As described above, the conventional image processing technique for correcting the pixel value of the defective pixel cannot always obtain an appropriate correction pixel value at a portion where the image structure is flat or a portion having a high frequency component, and the image quality of the captured image is deteriorated. There was a problem of being.

本発明の目的は、撮像素子に欠陥画素がある場合でも、画像構造が平坦な箇所や高周波成分を有する箇所において、欠陥画素の適正な補正画素値を得ることができ、撮影画像の画質が損われない画像処理装置および電子カメラ、並びに許容値設定方法を提供することを目的とする。   An object of the present invention is to obtain an appropriate corrected pixel value of a defective pixel in a portion where the image structure is flat or a portion having a high frequency component even when the image pickup device has a defective pixel, and the image quality of the photographed image is deteriorated. An object of the present invention is to provide an image processing apparatus, an electronic camera, and an allowable value setting method.

第1の発明に係る画像処理装置は、撮像素子の欠陥画素の画素値に対して所定の補正量を演算し、第1の補正画素値を算出する第1の補正画素値算出部と、前記第1の補正画素値を含む補正画素値許容範囲を設定する補正画素値許容範囲設定部と、前記欠陥画素の周辺の画素の画素値を用いて補間演算し、第2の補正画素値を算出する第2の補正画素値算出部と、前記第2の補正画素値と前記補正画素値許容範囲とを比較して第3の補正画素値を算出する第3の補正画素値算出部と、前記第3の補正画素値を前記欠陥画素の画素値とする補正値代入部とを有することを特徴とする。   An image processing apparatus according to a first invention calculates a first correction amount for a pixel value of a defective pixel of an image sensor and calculates a first correction pixel value; A correction pixel value allowable range setting unit that sets a correction pixel value allowable range including the first correction pixel value and a pixel value of pixels around the defective pixel are subjected to an interpolation calculation to calculate a second correction pixel value A second correction pixel value calculation unit that compares the second correction pixel value with the correction pixel value allowable range to calculate a third correction pixel value; and And a correction value substitution unit that uses a third correction pixel value as a pixel value of the defective pixel.

第2の発明は、第1の発明において、前記補正画素値許容範囲設定部が設定する前記補正画素値許容範囲の上限値および下限値は、予め複数の撮影条件について前記第1の補正画素値の正常画素値に対する補正誤差を評価した結果に基づいて設定されることを特徴とする。   According to a second invention, in the first invention, the upper limit value and the lower limit value of the correction pixel value allowable range set by the correction pixel value allowable range setting unit are the first correction pixel values for a plurality of shooting conditions in advance. It is set based on the result of evaluating the correction error with respect to the normal pixel value.

第3の発明は、第1または第2の発明において、前記第3の補正画素値算出部は、前記第2の補正画素値が前記補正画素値許容範囲の前記上限値より大きい場合に前記上限値を前記第3の補正画素値として算出し、前記第2の補正画素値が前記補正画素値許容範囲の前記下限値より小さい場合に前記下限値を前記第3の補正画素値として算出し、前記第2の補正画素値が前記補正画素許容範囲内にある場合は前記第2の補正画素値を前記第3の補正画素値として算出することを特徴とする。   According to a third invention, in the first or second invention, the third correction pixel value calculation unit is configured to determine the upper limit when the second correction pixel value is larger than the upper limit value of the correction pixel value allowable range. A value is calculated as the third correction pixel value, and when the second correction pixel value is smaller than the lower limit value of the correction pixel value allowable range, the lower limit value is calculated as the third correction pixel value. When the second correction pixel value is within the correction pixel allowable range, the second correction pixel value is calculated as the third correction pixel value.

第4の発明は、第1から第3の発明のいずれかの発明において、前記第2の補正画素値算出部は、前記欠陥画素の周囲の画素の画素値に基づいて画素値の類似性を判定し、該類似性が高い方向に隣接する画素値に基づいて、前記欠陥画素に対する補間演算を行い、前記第2の補正画素値を算出することを特徴とする。   In a fourth aspect based on any one of the first to third aspects, the second correction pixel value calculation unit calculates similarity of pixel values based on pixel values of pixels around the defective pixel. The second correction pixel value is calculated by performing an interpolation operation on the defective pixel based on a pixel value that is determined and adjacent in a direction in which the similarity is high.

第5の発明に係る電子カメラは、上記の発明に、欠陥画素を有する撮像素子を用いて被写体画像を撮影して前記画像処理部に撮影画像を出力する撮像部と、前記画像処理部が処理した撮影画像を記憶する記憶部とを更に設けたことを特徴とする。   According to a fifth aspect of the present invention, there is provided an electronic camera according to the above invention, wherein the image processing unit captures a subject image using an image sensor having a defective pixel and outputs the captured image to the image processing unit, and the image processing unit performs processing. And a storage unit for storing the captured image.

第6の発明に係る許容値設定方法は、第1の発明に係る画像処理装置に用いられる許容値設定方法であって、予め複数の撮影条件について前記第1の補正画素値の正常画素値に対する補正誤差の程度を評価し、その評価結果に基づいて前記補正画素値許容範囲を決定することを特徴とする。   An allowable value setting method according to a sixth aspect of the present invention is an allowable value setting method used in the image processing apparatus according to the first aspect of the present invention, wherein the first corrected pixel value with respect to the normal pixel value for a plurality of photographing conditions in advance. The degree of correction error is evaluated, and the correction pixel value allowable range is determined based on the evaluation result.

本発明によれば、欠陥画素の補正画素値を求める場合に、周辺画素の類似性の評価や算出した補正画素値の許容値を設けることによって、画像構造が平坦な箇所や高周波成分を有する箇所によらず、欠陥画素の適正な補正画素値を得ることができる。   According to the present invention, when a corrected pixel value of a defective pixel is obtained, a portion where the image structure is flat or a portion having a high frequency component is provided by evaluating the similarity of neighboring pixels or by providing an allowable value of the calculated corrected pixel value. Regardless, an appropriate corrected pixel value of the defective pixel can be obtained.

以下、本発明に係る画像処理装置および電子カメラ、並びに許容値設定方法に関する実施形態について説明する。   Embodiments relating to an image processing apparatus, an electronic camera, and an allowable value setting method according to the present invention will be described below.

(第1の実施形態)
第1の実施形態に係る電子カメラ101について図面を用いて詳しく説明する。図1は、本実施形態に係る電子カメラ101の構成を示すブロック図である。電子カメラ101は、レンズ102と、撮像素子103と、アナログフロントエンド(AFE)104と、A/D変換部105と、RAWメモリ106と、画像処理回路107と、システムバス108と、メモリ109と、フラッシュメモリ110と、メモリカードIF111と、メモリカード112と、操作パネル113と、CPU(中央演算処理部)114と、表示回路115と、液晶モニタ116と、タイミングジェネレータ(TG)117とで構成される。
(First embodiment)
The electronic camera 101 according to the first embodiment will be described in detail with reference to the drawings. FIG. 1 is a block diagram illustrating a configuration of an electronic camera 101 according to the present embodiment. The electronic camera 101 includes a lens 102, an image sensor 103, an analog front end (AFE) 104, an A / D converter 105, a RAW memory 106, an image processing circuit 107, a system bus 108, a memory 109, and the like. , A flash memory 110, a memory card IF 111, a memory card 112, an operation panel 113, a CPU (central processing unit) 114, a display circuit 115, a liquid crystal monitor 116, and a timing generator (TG) 117. Is done.

尚、第1の実施形態に係る電子カメラ101は、本発明に係る許容値設定方法を用いた画像処理装置の機能を含んでいる。特に、撮像素子103は線キズなどの欠陥画素を有するBayer(ベイヤー)配列の撮像素子である。また、これらの欠陥画素の画素値を補正する処理は画像処理回路107およびCPU114のソフトウェアによって行われる。詳細な補正処理については後で説明する。   Note that the electronic camera 101 according to the first embodiment includes the function of an image processing apparatus using the allowable value setting method according to the present invention. In particular, the image sensor 103 is a Bayer array image sensor having defective pixels such as line scratches. Further, processing for correcting the pixel values of these defective pixels is performed by software of the image processing circuit 107 and the CPU 114. Detailed correction processing will be described later.

図1において、レンズ102から入射する被写体光は、撮像素子103の受光面に結像される。撮像素子103は結像された被写体光を電気信号に変換し、AFE104に出力する。   In FIG. 1, the subject light incident from the lens 102 forms an image on the light receiving surface of the image sensor 103. The image sensor 103 converts the formed subject light into an electrical signal and outputs it to the AFE 104.

AFE104は、撮像素子103で光電変換されたアナログの電気信号のノイズ除去やレベル調整を行ってA/D変換部105に出力する。   The AFE 104 performs noise removal and level adjustment of the analog electrical signal photoelectrically converted by the image sensor 103 and outputs the result to the A / D converter 105.

A/D変換部105は、AFE104から入力するアナログの電気信号をデジタルの画像データに変換する。A/D変換部105が変換したデジタルの画像データは、RAWメモリ106に一時的に記憶される。尚、RAWメモリ106には、撮像素子103から読み出した生の画像データが記憶される。本実施形態では、ベイヤー配列のカラーフィルタを介して得られるカラーの画像データが記憶される。   The A / D converter 105 converts an analog electric signal input from the AFE 104 into digital image data. The digital image data converted by the A / D conversion unit 105 is temporarily stored in the RAW memory 106. Note that the raw image data read from the image sensor 103 is stored in the RAW memory 106. In the present embodiment, color image data obtained via a Bayer color filter is stored.

画像処理回路107は、システムバス108を介して、RAWメモリ106から画像データを読み出し、ホワイトバランス処理や色補間処理などの画像処理を行った後、メモリ109に記憶する。また、画像処理回路107は、メモリ109に記憶された画像データにJPEG規格などによる画像圧縮処理を行って、フラッシュメモリ110や、メモリカードI/F111を介して着脱可能なメモリカード112に保存する。   The image processing circuit 107 reads image data from the RAW memory 106 via the system bus 108, performs image processing such as white balance processing and color interpolation processing, and stores the image data in the memory 109. Further, the image processing circuit 107 performs image compression processing according to the JPEG standard or the like on the image data stored in the memory 109 and saves it in the flash memory 110 or the memory card 112 that can be detached via the memory card I / F 111. .

CPU114は、予めCPU114内部に記憶されたプログラムに従って動作し、撮影者が操作パネル113から入力する操作情報に応じて、電子カメラ101全体を制御する。例えば、システムバス108を介して画像処理回路107に画像処理内容(ホワイトバランス処理,色補間処理,JPEG圧縮処理,欠陥画素補正処理など)を指令したり、表示回路115に液晶モニタ116に表示する画像や文字を出力する。また、操作パネル113のレリーズボタンが押された場合は、撮像素子103が撮影する被写体画像の読み出しをTG117に指令する。   The CPU 114 operates in accordance with a program stored in the CPU 114 in advance, and controls the entire electronic camera 101 in accordance with operation information input from the operation panel 113 by the photographer. For example, the image processing contents (white balance processing, color interpolation processing, JPEG compression processing, defective pixel correction processing, etc.) are instructed to the image processing circuit 107 via the system bus 108 or displayed on the liquid crystal monitor 116 on the display circuit 115. Output images and text. When the release button on the operation panel 113 is pressed, the TG 117 is instructed to read out the subject image captured by the image sensor 103.

TG117は、CPU114からの指令に応じて、撮像素子103,AFE104,A/D変換部105に動作のタイミング信号を与える。撮像素子103,AFE104,A/D変換部105はTG117からのタイミング信号に従って、撮像素子103からの画像信号の読み出し動作や、AFE104でのノイズ除去動作や、A/D変換部105でのアナログ信号からデジタルデータへの変換動作などが行われる。   The TG 117 gives an operation timing signal to the image sensor 103, the AFE 104, and the A / D converter 105 in accordance with a command from the CPU 114. The image sensor 103, the AFE 104, and the A / D converter 105 read an image signal from the image sensor 103, a noise removal operation at the AFE 104, and an analog signal at the A / D converter 105 according to the timing signal from the TG 117. Is converted into digital data.

ここで、RAWメモリ106に記憶される画像データについて詳しく説明する。先に説明したように、撮像素子103は、ベイヤー配列のカラーフィルタを介して画像を撮影する。図2(a)は、撮像素子103が撮影してRAWメモリ106に記憶された画像データの様子を描いた図である。尚、図2(a)は、分かり易いように、横方向に6画素、縦方向に5画素として描いてあるが、実際の撮像素子103には数百万画素が配置されている。   Here, the image data stored in the RAW memory 106 will be described in detail. As described above, the image sensor 103 captures an image through a color filter with a Bayer array. FIG. 2A illustrates a state of image data captured by the image sensor 103 and stored in the RAW memory 106. 2A is drawn as 6 pixels in the horizontal direction and 5 pixels in the vertical direction for easy understanding, but the actual image sensor 103 has millions of pixels.

ベイヤー配列のカラーフィルタは、例えば、Y1行目には緑(G)の画素と青(B)の画素が交互に配置され、Y2行目には赤(R)の画素と緑の画素が交互に配置されている。さらに、Y3行目とY5行目とは、Y1行目と同じ配置の緑の画素と青の画素が交互に配置されている。また、Y4行目には、Y2行目と同じ配置の赤の画素と緑の画素が交互に配置されている。   The Bayer color filter, for example, has green (G) pixels and blue (B) pixels alternately arranged in the Y1 row, and red (R) pixels and green pixels alternately in the Y2 row. Is arranged. Further, in the Y3rd row and the Y5th row, green pixels and blue pixels having the same arrangement as the Y1th row are alternately arranged. In the Y4th row, red pixels and green pixels having the same arrangement as in the Y2th row are alternately arranged.

ここで、図2(b)において、Y3行目でX3列目の画素G8が欠陥画素であったと仮定し、従来技術で欠陥画素の画素値を求める場合について説明する。尚、分かり易いように、Y1行目とY2行目およびX1列目とX2列目の各画素は非常に暗い被写体像が投影され、Y3行目からY5行目の画素のうちX3列目からX5列目の12個の画素は非常に明るい被写体像が投影されている場合について説明する。つまり、欠陥画素G8は本来は明るい画素値を有し、欠陥画素G8の周囲の画素B5,画素G11,画素R5も明るい画素値である。また、画素G5,画素R2,画素G4,画素B4,画素G10は暗い画素値である。   Here, in FIG. 2B, it is assumed that the pixel G8 in the Y3th row and the X3th column is a defective pixel, and the case where the pixel value of the defective pixel is obtained by the conventional technique will be described. For easy understanding, a very dark subject image is projected on each pixel in the Y1 and Y2 rows and in the X1 and X2 columns, and from the X3 column among the Y3 to Y5 pixels. A case where a very bright subject image is projected on the 12 pixels in the X5 column will be described. That is, the defective pixel G8 originally has a bright pixel value, and the pixels B5, G11, and R5 around the defective pixel G8 also have bright pixel values. The pixel G5, the pixel R2, the pixel G4, the pixel B4, and the pixel G10 have dark pixel values.

図5は、図2(b)の欠陥画素G8を従来技術で補正する画像処理装置200の処理を示したブロック図である。尚、図5の処理は、例えば、図1の画像処理回路107およびCPU114によってソフトウェア処理される。   FIG. 5 is a block diagram showing processing of the image processing apparatus 200 that corrects the defective pixel G8 of FIG. 5 is processed by software by the image processing circuit 107 and the CPU 114 in FIG. 1, for example.

以下、RAWメモリ106に一時的に記憶された欠陥画素のある画像データが、補正画素値算出部S201と、補正値代入部S202とに入力されている状態からの処理を順に説明する。   Hereinafter, processing from a state in which image data with defective pixels temporarily stored in the RAW memory 106 is input to the correction pixel value calculation unit S201 and the correction value substitution unit S202 will be described in order.

(補正画素値算出部S201)図2(b)において、欠陥画素G8の補正画素値を算出する。従来の補正画素値の算出方法は、欠陥画素の画素値を測定して、測定した欠陥画素の画素値と正常な画素値とを比較して補正量を求める。例えば、欠陥画素の画素値は、正常画素の画素値の20%出力低下や50%出力低下として現れるので、この出力低下分を補正して100%になるような乗算値を補正量とする。この場合、20%出力低下の欠陥画素に対する補正量は5倍となり、50%の出力低下の欠陥画素に対する補正量は2倍となる。このようにして、欠陥画素の画素値に対する補正量を予めメモリに記憶しておき、撮影時に入力する画像の欠陥画素の画素値にこの補正量を乗算して補正画素値を算出する。この方法では、周囲の正常な画素値に対して若干の補正誤差が生じ、画像構造が平坦な領域において欠陥画素が目立つという問題が生じる。   (Correction Pixel Value Calculation Unit S201) In FIG. 2B, the correction pixel value of the defective pixel G8 is calculated. In a conventional method for calculating a correction pixel value, the pixel value of a defective pixel is measured, and the correction value is obtained by comparing the measured pixel value of the defective pixel with a normal pixel value. For example, since the pixel value of the defective pixel appears as a 20% output decrease or 50% output decrease of the pixel value of the normal pixel, the multiplication value that corrects this output decrease to 100% is set as the correction amount. In this case, the correction amount for a defective pixel with a 20% output decrease is five times, and the correction amount for a defective pixel with a 50% output decrease is doubled. In this way, the correction amount for the pixel value of the defective pixel is stored in the memory in advance, and the correction pixel value is calculated by multiplying the pixel value of the defective pixel of the image input at the time of shooting by this correction amount. In this method, a slight correction error occurs with respect to surrounding normal pixel values, and there is a problem that defective pixels stand out in a region where the image structure is flat.

或いは、別の従来技術として、例えば、周辺の画素の平均値を補正画素値とする方法がある。この場合は次のように計算する。欠陥画素G8は緑の画素なので、周辺の4つの緑の画素G4,画素G5,画素G10,画素G11の平均値を求め、欠陥画素G8の補正画素値とする。   Alternatively, as another conventional technique, for example, there is a method in which an average value of surrounding pixels is used as a correction pixel value. In this case, the calculation is performed as follows. Since the defective pixel G8 is a green pixel, the average value of the surrounding four green pixels G4, G5, G10, and G11 is obtained and used as the corrected pixel value of the defective pixel G8.

(補正値代入部S202)ステップS201で求めた補正画素値を欠陥画素G8の画素値として置き換えた画像を補正後の画像としてメモリ109に記憶する。ところが、補正画素値算出部S201で説明した前者の従来技術は、周囲の正常な画素値に対して若干の補正誤差が生じ、画像構造が平坦な領域において欠陥画素が目立つという問題がある。また、後者の従来技術は、例えば図2(b)の場合、画素G4,画素G5,画素G10が暗い画素で、画素G11だけが明るい画素なので、欠陥画素G8は本来は明るい画素値であるべきなのに、この方法で求めた補正画素値はかなり暗い画素値になってしまう。このため、メモリ109に記憶される補正後の画像は、図6に示すように、本来の欠陥画素G8とは異なる非常に暗い画素値に置き換えられてしまい、画像構造が大きな高周波成分を持つ領域では問題が生じる。   (Correction value substitution unit S202) The image obtained by replacing the correction pixel value obtained in step S201 as the pixel value of the defective pixel G8 is stored in the memory 109 as a corrected image. However, the former prior art described in the correction pixel value calculation unit S201 has a problem that a slight correction error occurs with respect to surrounding normal pixel values, and defective pixels are conspicuous in a region where the image structure is flat. In the latter prior art, for example, in the case of FIG. 2B, the pixel G4, the pixel G5, and the pixel G10 are dark pixels, and only the pixel G11 is a bright pixel. Therefore, the defective pixel G8 should originally have a bright pixel value. However, the corrected pixel value obtained by this method is a considerably dark pixel value. Therefore, the corrected image stored in the memory 109 is replaced with a very dark pixel value different from the original defective pixel G8, as shown in FIG. 6, and the image structure has a large high-frequency component. Then problems arise.

このように、図5に示した従来技術による欠陥画素の補正は、必ずしも本来の画素値が得られず、誤って補正されてしまうという問題があった。上記の説明では、分かり易いように、欠陥画素が画素G8だけの点欠陥画素の場合について説明したが、欠陥画素が連続する線キズの場合、特に画像構造が平坦な部分で補正誤差が目立ってしまう。一般に、線キズの性質は、線キズ上の画素出力は正常な画素に比べて低下しているが露光量にほぼ比例する出力があり、同じ線キズ上の各画素の出力低下の割合はほぼ同じであることが多い。このため線キズ領域を一定の補正量で補正する方法の場合、特に線キズ領域の周辺画素との誤差が目立つことになる。   As described above, the correction of the defective pixel according to the conventional technique shown in FIG. 5 has a problem that the original pixel value is not necessarily obtained and is corrected erroneously. In the above description, the case where the defective pixel is a point defect pixel including only the pixel G8 has been described for easy understanding. However, when the defective pixel is a continuous line defect, a correction error is particularly noticeable in a portion where the image structure is flat. End up. In general, the characteristics of line scratches are such that the pixel output on line scratches is lower than that on normal pixels, but there is an output that is roughly proportional to the amount of exposure, and the rate of output drop for each pixel on the same line scratch is approximately Often the same. For this reason, in the case of the method of correcting the line flaw region with a fixed correction amount, an error with the peripheral pixels in the line flaw region is particularly noticeable.

これに対して、本実施形態に係る電子カメラ101は、画像構造が平坦な領域であっても、大きな高周波成分を有する領域であっても、適切に欠陥画素の画素値を補正することができ、補正誤差の少ない画像を得ることができるようになっている。次に、本発明に係る画像処理装置および許容値設定方法を用いた第1の実施形態の電子カメラ101の処理について図3を用いて詳しく説明する。   On the other hand, the electronic camera 101 according to the present embodiment can appropriately correct the pixel value of the defective pixel regardless of whether the image structure is a flat region or a region having a large high-frequency component. Thus, an image with little correction error can be obtained. Next, processing of the electronic camera 101 according to the first embodiment using the image processing apparatus and the allowable value setting method according to the present invention will be described in detail with reference to FIG.

図3は、本実施形態に係る電子カメラ101の画像処理装置100の処理を示したブロック図である。尚、図3の画像処理装置100は、図1の画像処理回路107およびCPU114によってソフトウェア処理される。図3において、RAWメモリ106に一時的に記憶されている欠陥画素のある画像データは、第1の補正画素値算出部S101と、第2の補正画素値算出部S103と、補正値代入部S105とに入力されている。以下、この状態からの補正処理を順に説明する。   FIG. 3 is a block diagram illustrating processing of the image processing apparatus 100 of the electronic camera 101 according to the present embodiment. Note that the image processing apparatus 100 in FIG. 3 is processed by software by the image processing circuit 107 and the CPU 114 in FIG. In FIG. 3, image data with defective pixels temporarily stored in the RAW memory 106 includes a first correction pixel value calculation unit S101, a second correction pixel value calculation unit S103, and a correction value substitution unit S105. And have been entered. Hereinafter, correction processing from this state will be described in order.

(第1の補正画素値算出部S101)第1の補正画素値算出部S101は、入力する画像の欠陥画素に対する第1の補正画素値を算出する。尚、欠陥画素の位置は前工程において既知であるものとし、フラッシュメモリ110などに予め記憶されている。   (First Correction Pixel Value Calculation Unit S101) The first correction pixel value calculation unit S101 calculates a first correction pixel value for the defective pixel of the input image. The position of the defective pixel is assumed to be known in the previous process and is stored in advance in the flash memory 110 or the like.

例えば、図2(b)において、欠陥画素G8の第1の補正画素値を算出する場合、この欠陥画素G8を補正するために予め設定された所定の補正量を欠陥画素G8の画素値に乗算し、これを第1の補正画素値とする。尚、所定の補正量は、例えば、電子カメラ101が工場で製造出荷される前の調整工程などにおいて求められ、フラッシュメモリ110などに記憶されている。   For example, in FIG. 2B, when calculating the first correction pixel value of the defective pixel G8, the pixel value of the defective pixel G8 is multiplied by a predetermined correction amount set in advance to correct the defective pixel G8. This is the first corrected pixel value. The predetermined correction amount is obtained, for example, in an adjustment process before the electronic camera 101 is manufactured and shipped at the factory, and is stored in the flash memory 110 or the like.

ここで、所定の補正量の決め方について説明する。先ず、露光量など様々な撮影条件で撮影した複数の画像のそれぞれについて、欠陥画素における画素値を測定する。線キズの場合は、線キズ上の複数の欠陥画素における画素値を測定する。次に、求める補正量を未知変数として、例えば最小二乗法などの数学的手法を用いて、補正量を測定した画素値に乗算した補正結果と正常な画素値との補正誤差が最も小さくなるように未知変数である補正量を求める。   Here, how to determine the predetermined correction amount will be described. First, the pixel value in the defective pixel is measured for each of a plurality of images shot under various shooting conditions such as the exposure amount. In the case of a line flaw, the pixel values at a plurality of defective pixels on the line flaw are measured. Next, using the correction amount to be obtained as an unknown variable, for example, using a mathematical method such as a least square method, the correction error between the correction result obtained by multiplying the pixel value obtained by measuring the correction amount and the normal pixel value is minimized. A correction amount that is an unknown variable is obtained.

このようにして求めた補正量は、所定の補正量として欠陥画素位置毎(撮像素子103のアドレス毎)に対応させてフラッシュメモリ110に記憶しておく。尚、線キズなど連続する画素の場合は、線キズ領域毎(撮像素子104のアドレス範囲毎)に1つの値を所定の補正量としてフラッシュメモリ110に記憶しておいても構わない。   The correction amount obtained in this way is stored in the flash memory 110 as a predetermined correction amount in association with each defective pixel position (for each address of the image sensor 103). In the case of continuous pixels such as line scratches, one value may be stored in the flash memory 110 as a predetermined correction amount for each line scratch area (for each address range of the image sensor 104).

このように、第1の補正画素値算出部S101では、工場出荷時にフラッシュメモリ110に記憶された所定の補正量を欠陥画素の画素値に乗算して第1の補正画素値を求め、次の処理ステップに引き渡す。   As described above, the first correction pixel value calculation unit S101 obtains the first correction pixel value by multiplying the pixel value of the defective pixel by the predetermined correction amount stored in the flash memory 110 at the time of shipment from the factory. Deliver to processing step.

(補正画素値許容範囲設定部S102)補正画素値許容範囲設定部S102は、第1の補正画素値算出部S101で算出された第1の補正画素値に基づいて、補正画素値の許容範囲を表す上限値と下限値とを算出する。   (Correction pixel value allowable range setting unit S102) The correction pixel value allowable range setting unit S102 sets the allowable range of correction pixel values based on the first correction pixel value calculated by the first correction pixel value calculation unit S101. An upper limit value and a lower limit value to be expressed are calculated.

補正画素値の許容範囲の上限値と下限値は、例えば、欠陥画素の画素値を補正するために設定された所定の許容率を用いて次式により算出できる。
上限値 = 第1の補正画素値 × (1+許容率) ・・・(式1)
下限値 = 第1の補正画素値 × (1−許容率) ・・・(式2)
ここで、許容率は、電子カメラ101が工場で製造され出荷前に行われる調整工程において求められ、フラッシュメモリ110などに記憶されている。例えば、許容率を求める方法として、先ず、露光量などを変えた様々な撮影条件で撮影した複数の画像について、線キズ上の複数の画素位置における画素値を測定する。尚、点欠陥画素の場合はその画素位置における画素値を測定する。次に、測定した画素値を第1の補正画素値算出部S101で算出した第1の補正画素値で補正した補正値と正常画素値との比率を求める。例えば、第1の補正画素値で補正した補正値が256階調の画素値の200で、正常画素値が220であった場合、その比率は200/220≒0.91となる。尚、比率は分母と分子を逆にして220/200=1.1としても構わず、いずれかに決めて用いればよい。また、比率が1になるのは補正値と正常画素値とが等しい場合だけである。本実施形態では、このようにして求めた比率が1から外れる誤差の最大値を許容率とする。尚、必ずしも比率が1から外れる誤差の最大値を許容率とする必要はなく、最大値の10%や最大値の1/2など所定割合を減じた値を許容率として設定しても構わない。求めた許容率は、所定の許容率として欠陥画素位置毎(撮像素子103のアドレス毎)に対応させてフラッシュメモリ110に記憶しておく。尚、線キズの場合は、線キズ領域毎(撮像素子104のアドレス範囲毎)に1つの値を所定の許容率としてフラッシュメモリ110に記憶しておいても構わない。
For example, the upper limit value and the lower limit value of the allowable range of the correction pixel value can be calculated by the following equation using a predetermined allowable rate set to correct the pixel value of the defective pixel.
Upper limit value = first correction pixel value × (1 + allowance rate) (Expression 1)
Lower limit value = first correction pixel value × (1−allowance rate) (Expression 2)
Here, the allowable rate is obtained in an adjustment process performed before the electronic camera 101 is manufactured at the factory and is stored in the flash memory 110 or the like. For example, as a method for obtaining the tolerance, first, pixel values at a plurality of pixel positions on a line scratch are measured for a plurality of images photographed under various photographing conditions with different exposure amounts and the like. In the case of a point defect pixel, the pixel value at the pixel position is measured. Next, a ratio between a correction value obtained by correcting the measured pixel value with the first correction pixel value calculated by the first correction pixel value calculation unit S101 and a normal pixel value is obtained. For example, when the correction value corrected with the first correction pixel value is 200, which is a pixel value of 256 gradations, and the normal pixel value is 220, the ratio is 200 / 220≈0.91. The ratio may be set to 220/200 = 1.1 by reversing the denominator and the numerator, and any ratio may be used. The ratio is 1 only when the correction value is equal to the normal pixel value. In the present embodiment, the maximum value of the error in which the ratio obtained in this way deviates from 1 is set as the allowable rate. Note that it is not always necessary to set the maximum value of the error whose ratio deviates from 1 as the allowable rate, and a value obtained by subtracting a predetermined ratio such as 10% of the maximum value or 1/2 of the maximum value may be set as the allowable rate. . The obtained allowable rate is stored in the flash memory 110 as a predetermined allowable rate corresponding to each defective pixel position (for each address of the image sensor 103). In the case of a line flaw, one value may be stored in the flash memory 110 as a predetermined allowable rate for each line flaw region (for each address range of the image sensor 104).

例えば、図2(b)において、欠陥画素G8の第1の補正画素値が200で、許容率が0.2であった場合、(式1)より上限値は240となり、(式2)より下限値は160となる。   For example, in FIG. 2B, when the first correction pixel value of the defective pixel G8 is 200 and the allowable rate is 0.2, the upper limit value is 240 from (Expression 1), and from (Expression 2). The lower limit value is 160.

このように、補正画素値許容範囲設定部S102では、工場出荷時にフラッシュメモリ110に記憶された所定の許容率を用いて、欠陥画素毎或いは線キズ毎に上限値および下限値を(式1)および(式2)によって算出し、次の処理ステップに引き渡す。上記の処理が本発明に係る許容値設定方法である。   As described above, the correction pixel value allowable range setting unit S102 sets the upper limit value and the lower limit value for each defective pixel or each line scratch using the predetermined allowable rate stored in the flash memory 110 at the time of factory shipment (Formula 1). And it calculates by (Formula 2), and hands it over to the next processing step. The above processing is the allowable value setting method according to the present invention.

(第2の補正画素値算出部S103)第2の補正画素値算出部S103は、補正対象画素の周辺の画素を用いて補正対象画素位置における画素値を所定の補間方法で算出し、これを第2の補正画素値として次の処理ステップに出力する。   (Second correction pixel value calculation unit S103) The second correction pixel value calculation unit S103 calculates a pixel value at the correction target pixel position by using a pixel around the correction target pixel by a predetermined interpolation method, and calculates this. The second corrected pixel value is output to the next processing step.

ここで、所定の補間方法とは、例えば、補間対象画素の横方向に隣接する2つの同色画素の差分の絶対値と、補間対象画素の縦方向に隣接する2つの同色画素の差分の絶対値と、補間対象画素の斜め45度方向に隣接する2つの同色画素の差分の絶対値と、補間対象画素の斜め135度方向に隣接する2つの同色画素の差分の絶対値とを求め、これらの差分の絶対値が最も小さくなる方向を「類似性が高い方向」であると判定する。そして、この「類似性が高い方向」に隣接する同色画素の平均値を求めて第2の補正画素値とする。   Here, the predetermined interpolation method is, for example, the absolute value of the difference between two same color pixels adjacent in the horizontal direction of the interpolation target pixel and the absolute value of the difference between two same color pixels adjacent in the vertical direction of the interpolation target pixel. And the absolute value of the difference between the two same color pixels adjacent to the interpolation target pixel in the oblique 45 degree direction and the absolute value of the difference between the two same color pixels adjacent to the interpolation target pixel in the oblique 135 degree direction. The direction in which the absolute value of the difference is the smallest is determined as the “direction with high similarity”. Then, an average value of pixels of the same color that are adjacent to each other in the “high similarity direction” is obtained as a second corrected pixel value.

例えば、図2(b)の場合、補正対象画素である欠陥画素G8の横方向に隣接する2つの同色画素は画素G7と画素G9なので、|G7の画素値−G9の画素値|を求める。同様に、欠陥画素G8の縦方向に隣接する2つの同色画素は画素G2と画素G14なので、|G2の画素値−G14の画素値|を求める。また、欠陥画素G8の斜め45度方向に隣接する2つの同色画素は画素G5と画素G10なので、|G5の画素値−G10の画素値|を求める。さらに、欠陥画素G8の斜め135度方向に隣接する2つの同色画素は画素G4と画素G11なので、|G4の画素値−G11の画素値|を求める。そして、これらの差分の絶対値が最も小さくなる方向を判別する。上記の場合は、欠陥画素G8の斜め45度方向に隣接する2つの同色画素の画素G5と画素G10の組み合わせは共に暗い画素値なので差分の絶対値は小さくなるが、これ以外の組み合わせは、いずれも暗い画素値と明るい画素値との組み合わせなので、差分の絶対値は斜め45度方向の場合に比べて大きくなる。よって、「類似性が高い方向」は斜め45度方向であることがわかり、欠陥画素G8の斜め45度方向に隣接する2つの同色画素の画素G5と画素G10との平均値を求め、これを第2の補正画素値とする。例えば、画素G5の256階調の画素値を24、画素G10を22とした場合、画素G5と画素G10との平均値は23となり、第2の補正画素値を23として次の処理ステップに出力する。   For example, in the case of FIG. 2B, the two pixels of the same color that are adjacent in the horizontal direction of the defective pixel G8, which is the correction target pixel, are the pixel G7 and the pixel G9, and thus | pixel value of G7−pixel value of G9 | Similarly, since two pixels of the same color adjacent to the defective pixel G8 in the vertical direction are the pixel G2 and the pixel G14, the pixel value | G2−the pixel value | G14 is obtained. Also, since the two pixels of the same color adjacent to the defective pixel G8 in the oblique 45-degree direction are the pixel G5 and the pixel G10, | the pixel value of G5−the pixel value of G10 | is obtained. Further, since the two pixels having the same color adjacent to the defective pixel G8 in the diagonal direction of 135 degrees are the pixel G4 and the pixel G11, the pixel value | G4−the pixel value | G11 is obtained. Then, the direction in which the absolute value of these differences is minimized is determined. In the above case, since the combination of two pixels G5 and G10 of the same color adjacent to the defective pixel G8 in the oblique 45 degree direction is a dark pixel value, the absolute value of the difference is small. Since the combination of the dark pixel value and the bright pixel value is also the absolute value of the difference is larger than that in the case of 45 degrees oblique direction. Therefore, it is understood that the “direction with high similarity” is a 45-degree oblique direction, and an average value of the pixels G5 and G10 of two same-color pixels adjacent to the defective pixel G8 in the oblique 45-degree direction is obtained. The second correction pixel value is used. For example, when the pixel value of 256 gradations of the pixel G5 is 24 and the pixel G10 is 22, the average value of the pixel G5 and the pixel G10 is 23, and the second correction pixel value is 23 and output to the next processing step. To do.

(補正画素値許容範囲設定部S104)補正画素値範囲制限部(第3の補正画素値算出部)S104は、第2の補正画素値算出部S103で算出された第2の補正画素値と、補正画素値許容範囲設定部S102で算出された補正画素値許容範囲とを比較して、第3の補正画素値を算出して出力する。   (Correction pixel value allowable range setting unit S104) The correction pixel value range restriction unit (third correction pixel value calculation unit) S104 includes the second correction pixel value calculated by the second correction pixel value calculation unit S103, and The corrected pixel value allowable range calculated in the corrected pixel value allowable range setting unit S102 is compared to calculate and output a third corrected pixel value.

具体的には、第2の補正画素値が補正画素値許容範囲の上限値よりも大きい場合には上限値を第3の補正画素値として出力し、下限値よりも小さい場合は下限値を第3の補正画素値として出力し、下限値よりも大きく上限値よりも小さい場合は第2の補正画素値をそのまま第3の補正画素値として出力する。   Specifically, when the second correction pixel value is larger than the upper limit value of the correction pixel value allowable range, the upper limit value is output as the third correction pixel value, and when the second correction pixel value is smaller than the lower limit value, the lower limit value is set. 3 is output as the third correction pixel value, and when it is larger than the lower limit value and smaller than the upper limit value, the second correction pixel value is output as it is as the third correction pixel value.

例えば、図2(b)において、補正画素値許容範囲設定部S102で算出した欠陥画素G8の上限値が240,下限値が160で、第2の補正画素値算出部S103で算出した欠陥画素G8の第2の補正画素値が23の場合、下限値160を下回るので、第3の補正画素値として下限値の160を次のステップに出力する。   For example, in FIG. 2B, the upper limit value of the defective pixel G8 calculated by the correction pixel value allowable range setting unit S102 is 240, the lower limit value is 160, and the defective pixel G8 is calculated by the second correction pixel value calculation unit S103. When the second correction pixel value is 23, it is below the lower limit value 160, so the lower limit value 160 is output as the third correction pixel value to the next step.

(補正値代入部S105)補正値代入部S105は、補正画素値範囲制限部S104が出力する第3の補正画素値を欠陥画素の画素値に置き換える。上記の例の場合、欠陥画素G8は下限値160の明るい画素値に補正されるので、図4に示すように、本来の画素G8の明るさに近くなる。従来の場合は、図6で説明したように、欠陥画素G8は暗い画素値に誤って補正されてしまう恐れがあったが、本実施形態では本来の画素値に近い値に補正することができる。以降、同様の処理を全ての欠陥画素や線キズに対して行った画像を撮影画像としてメモリ109またはメモリカード112に保存する。   (Correction Value Substitution Unit S105) The correction value substitution unit S105 replaces the third correction pixel value output from the correction pixel value range restriction unit S104 with the pixel value of the defective pixel. In the case of the above example, since the defective pixel G8 is corrected to a bright pixel value of the lower limit value 160, as shown in FIG. 4, it becomes close to the original brightness of the pixel G8. In the conventional case, as described with reference to FIG. 6, the defective pixel G8 may be erroneously corrected to a dark pixel value, but in this embodiment, it can be corrected to a value close to the original pixel value. . Thereafter, an image obtained by performing the same processing on all defective pixels and line scratches is stored in the memory 109 or the memory card 112 as a captured image.

このように、本実施形態に係る電子カメラ101は、点欠陥画素や線キズを持つ撮像素子103を用いているが、上記に説明した処理ステップS101からS105を有する画像処理装置100によって、欠陥画素の画素値を適切に補正することができ、高品質な画像を撮影することができる。   As described above, the electronic camera 101 according to the present embodiment uses the image sensor 103 having point defect pixels and line scratches. However, the image processing apparatus 100 including the above-described processing steps S101 to S105 causes the defective pixels to be detected. The pixel value can be appropriately corrected, and a high-quality image can be taken.

以下、本実施形態の特徴および効果について説明する。本実施形態に係る電子カメラ101の図3に示した画像処理装置100において、先ず欠陥画素である補正対象画素値に対して、第1の補正画素値算出部が所定の補正量を乗算することにより、第1の補正画素値を算出している。ところが、第1の補正画素値は若干の誤差を含むので、従来技術のように、その値をそのまま補正値として採用することは望ましくない。第1の補正画素値は、その近傍の範囲内に真の画素値が含まれていることが期待できる。   Hereinafter, features and effects of the present embodiment will be described. In the image processing apparatus 100 shown in FIG. 3 of the electronic camera 101 according to the present embodiment, first, the first correction pixel value calculation unit multiplies the correction target pixel value, which is a defective pixel, by a predetermined correction amount. Thus, the first correction pixel value is calculated. However, since the first correction pixel value includes a slight error, it is not desirable to directly adopt the value as the correction value as in the prior art. It can be expected that the first corrected pixel value includes a true pixel value within the vicinity thereof.

そこで、本実施形態の補正画素値許容範囲設定部S102は、第1の補正画素値を内側に含む所定許容幅の範囲(上限値および下限値)を補正画素値許容範囲として設定する。特に、補正画素値許容範囲は、第1の補正画素値による誤差が最大の場合であっても、真の画素値が補正画素値許容範囲内に含まれるように誤差の最大値で上限値および下限値を設定する。   Therefore, the correction pixel value allowable range setting unit S102 of the present embodiment sets a range (upper limit value and lower limit value) of a predetermined allowable width including the first correction pixel value as the correction pixel value allowable range. In particular, the correction pixel value allowable range is the maximum error and the upper limit value so that the true pixel value is included in the correction pixel value allowable range even when the error due to the first correction pixel value is maximum. Set the lower limit.

さらに、補正画素値範囲制限部S104は、第2の補正画素値を補正画素値許容範囲内に制限することにより第3の補正画素値を出力しているが、第2の補正画素値が真の画素値に近い場合には、その値が補正画素値許容範囲内に含まれるのでそのままの値を第3の補正画素値として出力する。   Further, the correction pixel value range limiting unit S104 outputs the third correction pixel value by limiting the second correction pixel value within the correction pixel value allowable range, but the second correction pixel value is true. If the pixel value is close to this pixel value, the value is included in the correction pixel value allowable range, and the value is output as the third correction pixel value.

一方、第2の補正画素値が真の画素値から大きく外れてしまった場合は、その画素値は補正画素値許容範囲から外れてしまうので、第2の補正画素値を補正画素値許容範囲内に制限して第3の補正画素値として出力する。この結果、第3の補正画素値は第2の補正画素値よりも必ず真の画素値に近くなり、補正誤差を少なくすることができる。   On the other hand, if the second correction pixel value deviates greatly from the true pixel value, the pixel value falls outside the correction pixel value allowable range, so that the second correction pixel value falls within the correction pixel value allowable range. Output as a third corrected pixel value. As a result, the third correction pixel value is always closer to the true pixel value than the second correction pixel value, and correction errors can be reduced.

このように、実施形態に係る電子カメラ101の画像処理装置100は、画像構造が平坦な箇所においては第2の補正画素値算出部S103が求めた補正値をそのまま用いるので、適正な補正結果が得られる。一方、画像構造が大きな高周波成分を有する場合に、第2の補正画素値算出部S103が求めた補正値が不適切な値となる箇所においては、補正画素値範囲制限部S104が補正値を補正画素値許容範囲内に制限するので、真の画素値に近いほぼ適切な補正結果を得ることができる。   As described above, since the image processing apparatus 100 of the electronic camera 101 according to the embodiment uses the correction value obtained by the second correction pixel value calculation unit S103 as it is in a place where the image structure is flat, an appropriate correction result is obtained. can get. On the other hand, when the image structure has a large high-frequency component, the correction pixel value range limiting unit S104 corrects the correction value at a location where the correction value obtained by the second correction pixel value calculation unit S103 is inappropriate. Since the pixel value is limited within the allowable range, an almost appropriate correction result close to the true pixel value can be obtained.

尚、本実施形態の第1の補正画素値算出部S101では、欠陥画素のある補正対象画素値に所定の補正量を乗算することによって第1の補正画素値を算出するようにしたが、演算処理は乗算に限定されない。例えば、補正量を乗算する代わりに、加減算あるいはその他の演算処理を行うことにより第1の補正画素値を算出するようにしてもよい。   In the first correction pixel value calculation unit S101 of the present embodiment, the first correction pixel value is calculated by multiplying the correction target pixel value having a defective pixel by a predetermined correction amount. Processing is not limited to multiplication. For example, instead of multiplying the correction amount, the first correction pixel value may be calculated by performing addition / subtraction or other arithmetic processing.

また、本実施形態の補正画素値許容範囲設定部S102では、第1の補正画素値に対して所定の許容率を乗算することによって補正画素値許容範囲の上限値や下限値を決めるようにしたが、演算処理は乗算に限定されない。例えば、第1の補正画素値に対して加減算あるいはその他の演算を行うことにより補正画素値許容範囲を決めるようにしてもよい。   In the correction pixel value allowable range setting unit S102 of this embodiment, the upper limit value and the lower limit value of the correction pixel value allowable range are determined by multiplying the first correction pixel value by a predetermined allowable rate. However, the arithmetic processing is not limited to multiplication. For example, the correction pixel value allowable range may be determined by performing addition / subtraction or other operations on the first correction pixel value.

また、本実施形態の補正画素値範囲制限部S104では、第2の補正画素値を制限する場合に、補正画素値許容範囲の上限値または下限値を出力するようにしたが、本発明はこれに限定されない。例えば、上限値よりやや小さい値や下限値よりもやや大きい値を出力するようにしてもよい。   In addition, in the correction pixel value range limiting unit S104 of the present embodiment, when the second correction pixel value is limited, the upper limit value or the lower limit value of the correction pixel value allowable range is output. It is not limited to. For example, a value slightly smaller than the upper limit value or a value slightly larger than the lower limit value may be output.

また、本実施形態では、点欠陥画素や線キズを補正する場合について説明したが、本発明はこれに限定されず、任意の形状の画素欠陥補正などについて適用可能である。   In the present embodiment, the case of correcting point defect pixels and line flaws has been described. However, the present invention is not limited to this, and can be applied to pixel defect correction of an arbitrary shape.

第1の実施形態に係る電子カメラ101のブロック図である。1 is a block diagram of an electronic camera 101 according to a first embodiment. 画素配列を示す説明図である。It is explanatory drawing which shows a pixel arrangement | sequence. 第1の実施形態に係る電子カメラ101の画像処理装置100の処理を示すブロック図である。It is a block diagram which shows the process of the image processing apparatus 100 of the electronic camera 101 which concerns on 1st Embodiment. 第1の実施形態での補正例を示す説明図である。It is explanatory drawing which shows the example of a correction | amendment in 1st Embodiment. 従来の画像処理装置200の処理を示すブロック図である。It is a block diagram which shows the process of the conventional image processing apparatus. 従来の補正例を示す説明図である。It is explanatory drawing which shows the example of a conventional correction | amendment.

符号の説明Explanation of symbols

100・・・画像処理装置 101・・・電子カメラ
102・・・レンズ 103・・・撮像素子
106・・・RAWメモリ 107・・・画像処理回路
109・・・メモリ 110・・・フラッシュメモリ
112・・・メモリカード 114・・・CPU
116・・・液晶モニタ
S101・・・第1の補正画素値算出部
S102・・・補正画素値許容範囲設定部
S103・・・第2の補正画素値算出部
S104・・・補正画素値範囲制限部
S105・・・補正値代入部
DESCRIPTION OF SYMBOLS 100 ... Image processing apparatus 101 ... Electronic camera 102 ... Lens 103 ... Imaging device 106 ... Raw memory 107 ... Image processing circuit 109 ... Memory 110 ... Flash memory 112- ..Memory card 114 ... CPU
116: Liquid crystal monitor S101: First correction pixel value calculation unit S102: Correction pixel value allowable range setting unit S103: Second correction pixel value calculation unit S104: Correction pixel value range limitation Part S105... Correction value substitution part

Claims (6)

撮像素子の欠陥画素の画素値に対して所定の補正量を演算し、第1の補正画素値を算出する第1の補正画素値算出部と、
前記第1の補正画素値を含む補正画素値許容範囲を設定する補正画素値許容範囲設定部と、
前記欠陥画素の周辺の画素の画素値を用いて補間演算し、第2の補正画素値を算出する第2の補正画素値算出部と、
前記第2の補正画素値と前記補正画素値許容範囲とを比較して第3の補正画素値を算出する第3の補正画素値算出部と、
前記第3の補正画素値を前記欠陥画素の画素値とする補正値代入部と
を有することを特徴とする画像処理装置。
A first correction pixel value calculation unit that calculates a first correction pixel value by calculating a predetermined correction amount with respect to the pixel value of the defective pixel of the image sensor;
A correction pixel value allowable range setting unit for setting a correction pixel value allowable range including the first correction pixel value;
A second correction pixel value calculation unit that performs an interpolation operation using pixel values of pixels around the defective pixel and calculates a second correction pixel value;
A third correction pixel value calculating unit that calculates a third correction pixel value by comparing the second correction pixel value and the correction pixel value allowable range;
An image processing apparatus comprising: a correction value substitution unit that uses the third correction pixel value as a pixel value of the defective pixel.
請求項1に記載の画像処理装置において、
前記補正画素値許容範囲設定部が設定する前記補正画素値許容範囲の上限値および下限値は、予め複数の撮影条件について前記第1の補正画素値の正常画素値に対する補正誤差を評価した結果に基づいて設定される
ことを特徴とする画像処理装置。
The image processing apparatus according to claim 1.
The upper limit value and the lower limit value of the correction pixel value allowable range set by the correction pixel value allowable range setting unit are obtained as a result of evaluating a correction error with respect to the normal pixel value of the first correction pixel value in advance for a plurality of shooting conditions. An image processing apparatus that is set based on the above.
請求項1または2に記載の画像処理装置において、
前記第3の補正画素値算出部は、前記第2の補正画素値が前記補正画素値許容範囲の前記上限値より大きい場合に前記上限値を前記第3の補正画素値として算出し、前記第2の補正画素値が前記補正画素値許容範囲の前記下限値より小さい場合に前記下限値を前記第3の補正画素値として算出し、前記第2の補正画素値が前記補正画素許容範囲内にある場合は前記第2の補正画素値を前記第3の補正画素値として算出する
ことを特徴とする画像処理装置。
The image processing apparatus according to claim 1 or 2,
The third correction pixel value calculation unit calculates the upper limit value as the third correction pixel value when the second correction pixel value is larger than the upper limit value of the correction pixel value allowable range, When the second correction pixel value is smaller than the lower limit value of the correction pixel value allowable range, the lower limit value is calculated as the third correction pixel value, and the second correction pixel value falls within the correction pixel allowable range. In some cases, the second correction pixel value is calculated as the third correction pixel value.
請求項1から3のいずれか一項に記載の画像処理装置において、
前記第2の補正画素値算出部は、前記欠陥画素の周囲の画素の画素値に基づいて画素値の類似性を判定し、該類似性が高い方向に隣接する画素値に基づいて、前記欠陥画素に対する補間演算を行い、前記第2の補正画素値を算出する
ことを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 1 to 3,
The second correction pixel value calculation unit determines similarity of pixel values based on pixel values of pixels around the defective pixel, and determines the defect based on pixel values adjacent in a direction in which the similarity is high. An image processing apparatus that performs an interpolation operation on a pixel to calculate the second corrected pixel value.
請求項1から4のいずれか一項に記載の画像処理装置に、欠陥画素を有する撮像素子を用いて被写体画像を撮影して前記画像処理部に撮影画像を出力する撮像部と、前記画像処理部が処理した撮影画像を記憶する記憶部とを更に設けたことを特徴とする電子カメラ。   5. The image processing apparatus according to claim 1, wherein the image processing unit captures a subject image using an image sensor having a defective pixel and outputs the captured image to the image processing unit, and the image processing. An electronic camera, further comprising a storage unit that stores a captured image processed by the unit. 請求項1に記載の画像処理装置に用いられる許容値設定方法であって、
予め複数の撮影条件について前記第1の補正画素値の正常画素値に対する補正誤差の程度を評価し、その評価結果に基づいて前記補正画素値許容範囲を決定する
ことを特徴とする許容値設定方法。
An allowable value setting method used in the image processing apparatus according to claim 1,
An allowable value setting method characterized by evaluating a degree of correction error of the first correction pixel value with respect to a normal pixel value in advance for a plurality of photographing conditions and determining the correction pixel value allowable range based on the evaluation result .
JP2008025209A 2008-02-05 2008-02-05 Image processing apparatus, electronic camera, and allowable value setting method Active JP5186937B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008025209A JP5186937B2 (en) 2008-02-05 2008-02-05 Image processing apparatus, electronic camera, and allowable value setting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008025209A JP5186937B2 (en) 2008-02-05 2008-02-05 Image processing apparatus, electronic camera, and allowable value setting method

Publications (2)

Publication Number Publication Date
JP2009188624A true JP2009188624A (en) 2009-08-20
JP5186937B2 JP5186937B2 (en) 2013-04-24

Family

ID=41071466

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008025209A Active JP5186937B2 (en) 2008-02-05 2008-02-05 Image processing apparatus, electronic camera, and allowable value setting method

Country Status (1)

Country Link
JP (1) JP5186937B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015185887A (en) * 2014-03-20 2015-10-22 株式会社ソシオネクスト Defective pixel correction device, imaging apparatus, and defective pixel correction method
JP7419307B2 (en) 2021-09-07 2024-01-22 キヤノン株式会社 Image processing device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07236093A (en) * 1994-02-21 1995-09-05 Toshiba Medical Eng Co Ltd Image pickup device
JP2007124056A (en) * 2005-10-25 2007-05-17 Canon Inc Image processor, control method and program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07236093A (en) * 1994-02-21 1995-09-05 Toshiba Medical Eng Co Ltd Image pickup device
JP2007124056A (en) * 2005-10-25 2007-05-17 Canon Inc Image processor, control method and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015185887A (en) * 2014-03-20 2015-10-22 株式会社ソシオネクスト Defective pixel correction device, imaging apparatus, and defective pixel correction method
JP7419307B2 (en) 2021-09-07 2024-01-22 キヤノン株式会社 Image processing device

Also Published As

Publication number Publication date
JP5186937B2 (en) 2013-04-24

Similar Documents

Publication Publication Date Title
US7876369B2 (en) Image processing apparatus, image processing method, and program
US8922680B2 (en) Image processing apparatus and control method for image processing apparatus
US8922681B2 (en) Image processing device that performs image processing to correct target pixels in a region surrounding a defective pixel
JP6300529B2 (en) Imaging apparatus, control method therefor, program, and storage medium
JP5541205B2 (en) Image processing apparatus, imaging apparatus, image processing program, and image processing method
JP6351271B2 (en) Image composition apparatus, image composition method, and program
JP2018207413A (en) Imaging apparatus
JP2005328421A (en) Imaging apparatus and imaging method
JP4591046B2 (en) Defect detection correction circuit and defect detection correction method
JP2004320128A (en) Defective pixel correction device
JP5262953B2 (en) Image processing apparatus, image processing method, and program
JP5186937B2 (en) Image processing apparatus, electronic camera, and allowable value setting method
US20200045256A1 (en) Defect pixel correction apparatus, defect pixel correction method, non-transitory computer-readable medium storing computer program
JPWO2012147337A1 (en) Flicker detection apparatus, flicker detection method, and flicker detection program
JP2006041687A (en) Image processing apparatus, image processing method, image processing program, electronic camera, and scanner
JP2010130289A (en) Solid-state imaging apparatus, semiconductor integrated circuit and defective pixel correction method
JP2006166194A (en) Pixel defect detection circuit and pixel defect detection method
JP2009105872A (en) Defective pixel correction circuit and solid-state imaging device
JP5299159B2 (en) Imaging apparatus and program
JP2011114473A (en) Pixel defect correction device
JP5640316B2 (en) Imaging device
JP2009232200A (en) Method for correcting pixel defect of image pickup device
US20110122299A1 (en) Image processing apparatus, image processing method, and camera module
JP6118133B2 (en) Signal processing apparatus and imaging apparatus
JP6704611B2 (en) Imaging device and imaging method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110120

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110323

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120525

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120529

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120717

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20121225

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130107

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160201

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5186937

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250