JP5299159B2 - Imaging apparatus and program - Google Patents

Imaging apparatus and program Download PDF

Info

Publication number
JP5299159B2
JP5299159B2 JP2009187063A JP2009187063A JP5299159B2 JP 5299159 B2 JP5299159 B2 JP 5299159B2 JP 2009187063 A JP2009187063 A JP 2009187063A JP 2009187063 A JP2009187063 A JP 2009187063A JP 5299159 B2 JP5299159 B2 JP 5299159B2
Authority
JP
Japan
Prior art keywords
defective pixel
correction
defective
data
pixels
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.)
Expired - Fee Related
Application number
JP2009187063A
Other languages
Japanese (ja)
Other versions
JP2011041039A (en
Inventor
渉 菅原
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2009187063A priority Critical patent/JP5299159B2/en
Publication of JP2011041039A publication Critical patent/JP2011041039A/en
Application granted granted Critical
Publication of JP5299159B2 publication Critical patent/JP5299159B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an imaging apparatus in which all defective pixels to be corrected can be corrected, regardless of the limited number of registration in a storage part, and to provide a program for defective pixel correction. <P>SOLUTION: The imaging apparatus includes an image generation means (28) for generating image data, based on a plurality of electrical signals output from an imaging device (20) having a plurality of pixels, wherein the image generation means has a defective pixel correction part 42 which corrects defective pixel of image generation data by a defective pixel correction operation. The image generation means sets the number of correction pixels to be corrected, based on the defective pixel level, associated with criteria of change in influences of the defective pixels; and when the number of correction pixels exceeds the limited number of registration which is the number of pieces of defective pixel data that can be registered in the storage part 43, the image generation means repeats the defective pixel correction operation in the defective pixel correction part 42, while changing the registered content of the defective pixel data in the storage section 43 so as to correct the defective pixel of the number of correction pixels, without making the pixel data to be corrected duplicate. <P>COPYRIGHT: (C)2011,JPO&amp;INPIT

Description

本発明は、撮像装置およびプログラムに関し、特に、欠陥画素補正機能を有するデジタルスチルカメラ等の撮像装置およびその欠陥画素補正のためのプログラムに関する。   The present invention relates to an imaging device and a program, and more particularly to an imaging device such as a digital still camera having a defective pixel correction function and a program for correcting the defective pixel.

デジタルスチルカメラに使用される撮像素子、例えばCCDでは、半導体の製造工程において、全ての画素が完全に同一性能で形成されるわけではなく、欠陥画素もできてしまう。しかし、製品の歩留まり上、所定の数以下の個数の欠陥画素があっても、良品のCCDとしてデジタルスチルカメラ等の商品に使用されるのが一般的である。このため、当該商品では、その欠陥画素のCCD上の縦横座標(アドレス)等(以下、欠陥画素データ)を予め商品に設けられた欠陥画素補正部の記憶部に格納しておき、撮影時に欠陥画素補正部において、撮像データにおける記憶部に格納された欠陥画素のアドレスに相当する画素データを、隣接する同じカラーフィルタの画素データで補間し、その後、静止画画像処理をする等の欠陥画素補正処理を実施することが考えられている。   In an image sensor, such as a CCD, used in a digital still camera, not all pixels are formed with completely the same performance in the semiconductor manufacturing process, and defective pixels are also formed. However, even if there are a predetermined number or less of defective pixels due to the product yield, it is generally used as a good CCD for a product such as a digital still camera. For this reason, in the product, the ordinate and abscissa (address) on the CCD of the defective pixel (hereinafter referred to as defective pixel data) are stored in advance in the storage unit of the defective pixel correction unit provided in the product, and the defect is detected at the time of shooting. In the pixel correction unit, the pixel data corresponding to the address of the defective pixel stored in the storage unit in the imaging data is interpolated with the pixel data of the same adjacent color filter, and then the defective pixel correction such as still image processing It is considered to carry out the processing.

また、CCDでは、上述した欠陥画素とは別に、暗電流特性の悪い画素(温度キズ)である欠陥画素も存在する。この暗電流による欠陥画素は、動的な欠陥要因であるので、上述したように欠陥画素補正処理を実施する際、露光秒時等の撮影パラメータによって、CCDにおいて補正対象とする欠陥画素(およびその数)を変更し、それに応じて欠陥画素補正することが考えられている(例えば、特許文献1参照)。   In addition to the above-described defective pixels, there are also defective pixels that have poor dark current characteristics (temperature scratches) in the CCD. Since the defective pixel due to the dark current is a dynamic defect factor, when the defective pixel correction process is performed as described above, the defective pixel (and its pixel) to be corrected in the CCD is determined by the shooting parameters such as the exposure time. It is considered to change the number) and correct defective pixels accordingly (see, for example, Patent Document 1).

ところで、このような撮像装置では、装置全体としての大きさ寸法を出来る限り小さくすることが要求されているとともに内部には種々の機能のための機構が収容されることから、欠陥画素補正処理のための欠陥画素補正部およびその記憶部の回路等の構成を大規模なものとすることができず、記憶部に格納することができる欠陥画素データの数(欠陥画素数)には限りがある。   By the way, in such an imaging apparatus, it is required to reduce the size of the entire apparatus as much as possible, and a mechanism for various functions is accommodated therein, so that defective pixel correction processing is performed. Therefore, the number of defective pixel data (defective pixel number) that can be stored in the storage unit is limited. .

このため、撮像素子において補正対象とする欠陥画素の数が、欠陥画素補正部の記憶部に登録可能な欠陥画素数(登録限度数)を超えてしまうと、補正対象とするすべての欠陥画素を補正することができなくなってしまう。   For this reason, if the number of defective pixels to be corrected in the imaging device exceeds the number of defective pixels (registration limit number) that can be registered in the storage unit of the defective pixel correcting unit, all defective pixels to be corrected are It becomes impossible to correct.

本発明は、上記の問題に鑑みて為されたもので、記憶部での登録限度数に拘らず、補正対象とするすべての欠陥画素を補正することを可能とする撮像装置およびその欠陥画素補正のためのプログラムを提供することを目的としている。   The present invention has been made in view of the above problems, and an imaging apparatus capable of correcting all defective pixels to be corrected regardless of the registration limit number in the storage unit and the defective pixel correction thereof It aims to provide a program for.

上記課題を解決するため、請求項1に係る発明は、複数の画素を有する撮像素子から出力された複数の電気信号に基づいて画像データを生成する画像生成手段を備え、該画像生成手段が、前記画像データの生成過程における画像生成データが入力されると、該画像生成データにおいて、記憶部に登録された前記撮像素子における各欠陥画素データに相当する画素データを補正する欠陥画素補正動作により、前記画像生成データの欠陥画素補正を行う欠陥画素補正部を有する撮像装置であって、前記画像生成手段は、欠陥画素の影響の変化の判断基準に対応付けた欠陥画素レベルに基づいて補正対象とする補正画素数を設定し、該補正画素数が、前記記憶部に登録可能な前記欠陥画素データの数である登録限度数を超えた場合、補正対象とする画素データを重複させることなく前記補正画素数の欠陥画素補正を行うべく、前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返すとともに、前記画像生成データを、前記補正画素数を前記登録限度数で除算して得られた商の少数以下を切り上げた値で等分して複数の分割画像データに区分けし、各該分割画像データ毎に前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返すことを特徴とする。 In order to solve the above-described problem, the invention according to claim 1 includes image generation means for generating image data based on a plurality of electrical signals output from an imaging device having a plurality of pixels, and the image generation means comprises: When image generation data in the generation process of the image data is input, a defective pixel correction operation for correcting pixel data corresponding to each defective pixel data in the image sensor registered in the storage unit in the image generation data, An imaging apparatus having a defective pixel correction unit that performs defective pixel correction of the image generation data, wherein the image generation means is a correction target based on a defective pixel level associated with a determination criterion for a change in the influence of a defective pixel. When the number of correction pixels to be set is set and the number of correction pixels exceeds the registration limit number that is the number of the defective pixel data that can be registered in the storage unit, the correction target number is set. In order to perform the correction pixel number of the defective pixel correction without overlapping raw data, with repeating the defective pixel correction operation in the defective pixel correction unit while changing the registration contents of the defective pixel data in the storage unit, The image generation data is divided into a plurality of divided image data by equally dividing the number of corrected pixels by the value obtained by dividing the correction pixel number by the registration limit number, and dividing each divided image data. In addition, the defective pixel correction operation in the defective pixel correction unit is repeated while changing the registration contents of the defective pixel data in the storage unit .

請求項2に係る発明は、複数の画素を有する撮像素子から出力された複数の電気信号に基づいて画像データを生成する画像生成手段を備え、該画像生成手段が、前記画像データの生成過程における画像生成データが入力されると、該画像生成データにおいて、記憶部に登録された前記撮像素子における各欠陥画素データに相当する画素データを補正する欠陥画素補正動作により、前記画像生成データの欠陥画素補正を行う欠陥画素補正部を有する撮像装置であって、前記画像生成手段は、欠陥画素の影響の変化の判断基準に対応付けた欠陥画素レベルに基づいて補正対象とする補正画素数を設定し、該補正画素数が、前記記憶部に登録可能な前記欠陥画素データの数である登録限度数を超えた場合、補正対象とする画素データを重複させることなく前記補正画素数の欠陥画素補正を行うべく、前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返すとともに、前記画像生成データに対して、前記登録限度数の前記欠陥画素データを前記記憶部に登録して前記欠陥画素補正部での前記欠陥画素補正動作を行い、その後、前記画像生成データを、前記補正画素数が前記登録限度数を減算した差分を該登録限度数で除算して得られた商の少数以下を切り上げた値で等分して複数の分割画像データに区分けし、最初の前記欠陥画素補正動作での欠陥画素補正とは補正対象とする画素データが重複しないように各該分割画像データ毎に前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返すことを特徴とする。 The invention according to claim 2 includes image generation means for generating image data based on a plurality of electrical signals output from an imaging device having a plurality of pixels, wherein the image generation means is in the process of generating the image data. When image generation data is input, defective pixels of the image generation data are obtained by a defective pixel correction operation that corrects pixel data corresponding to each defective pixel data in the image sensor registered in the storage unit in the image generation data. An imaging apparatus having a defective pixel correction unit that performs correction, wherein the image generation unit sets the number of correction pixels to be corrected based on a defective pixel level associated with a criterion for determining a change in the influence of a defective pixel. When the number of corrected pixels exceeds the registration limit number that is the number of defective pixel data that can be registered in the storage unit, the pixel data to be corrected may be duplicated. In order to perform defective pixel correction of the number of corrected pixels, the defective pixel correction operation in the defective pixel correction unit is repeated while changing the registered content of the defective pixel data in the storage unit, and the image generation data Then, the defective pixel data of the registration limit number is registered in the storage unit and the defective pixel correction unit performs the defective pixel correction operation, and then the image generation data is stored in the registration limit of the correction pixel number. The difference obtained by subtracting the number is divided by the registration limit number and divided into a plurality of divided image data by equally dividing the value obtained by rounding up the fractional number of the quotient, and defective pixels in the first defective pixel correction operation Correction refers to the previous correction in the defective pixel correction unit while changing the registration contents of the defective pixel data in the storage unit for each divided image data so that the pixel data to be corrected does not overlap. And repeating the defective pixel correction operations.

請求項3に係る発明は、複数の画素を有する撮像素子から出力された複数の電気信号に基づいて画像データを生成する画像生成手段を備え、該画像生成手段が、前記画像データの生成過程における画像生成データが入力されると、該画像生成データにおいて、記憶部に登録された前記撮像素子における各欠陥画素データに相当する画素データを補正する欠陥画素補正動作により、前記画像生成データの欠陥画素補正を行う欠陥画素補正部を有する撮像装置であって、前記画像生成手段は、欠陥画素の影響の変化の判断基準に対応付けた欠陥画素レベルに基づいて補正対象とする補正画素数を設定し、該補正画素数が、前記記憶部に登録可能な前記欠陥画素データの数である登録限度数を超えた場合、補正対象とする画素データを重複させることなく前記補正画素数の欠陥画素補正を行うべく、前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返すとともに、前記画像生成データに対して、前記欠陥画素レベルが高い方から順に前記登録限度数の前記欠陥画素データを前記記憶部に登録して前記欠陥画素補正部での前記欠陥画素補正動作を行い、その後、前記画像生成データを、前記補正画素数が前記登録限度数を減算した差分を該登録限度数で除算して得られた商の少数以下を切り上げた値で等分して複数の分割画像データに区分けし、最初の前記欠陥画素補正動作での欠陥画素補正とは補正対象とする画素データが重複しないように各該分割画像データ毎に前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返すことを特徴とする。 The invention according to claim 3 includes image generation means for generating image data based on a plurality of electrical signals output from an imaging device having a plurality of pixels, wherein the image generation means is in the process of generating the image data. When image generation data is input, defective pixels of the image generation data are obtained by a defective pixel correction operation that corrects pixel data corresponding to each defective pixel data in the image sensor registered in the storage unit in the image generation data. An imaging apparatus having a defective pixel correction unit that performs correction, wherein the image generation unit sets the number of correction pixels to be corrected based on a defective pixel level associated with a criterion for determining a change in the influence of a defective pixel. , this the correction pixel number, if it exceeds registration limit number is the number of the defective pixel data can be registered in the storage unit, to overlap pixel data to be corrected In order to perform defective pixel correction of the number of corrected pixels, the defective pixel correction operation in the defective pixel correction unit is repeated while changing the registered content of the defective pixel data in the storage unit, and the image generation data Then, in order from the highest defective pixel level, the defective pixel data of the registration limit number is registered in the storage unit and the defective pixel correction unit performs the defective pixel correction operation. The difference between the correction pixel number and the registration limit number is divided into a plurality of divided image data by equally dividing the difference obtained by dividing the difference obtained by dividing the registration limit number into a plurality of divided image data . the registration contents of the defective pixel data in the storage unit so that the pixel data to be corrected does not overlap each said divided image data from the defective pixel correction in the defective pixel correction operation Additional and repeating the defective pixel correction operation in the defective pixel correction unit while.

請求項4に係る発明は、請求項1から請求項3のいずれか1項に記載の撮像装置であって、さらに、前記画像生成手段が適宜格納および読出することのできるメモリを備え、前記欠陥画素データは、前記撮像素子から出力される電気信号に基づいて前記欠陥画素レベルを判断し、該欠陥画素レベルが前記判断基準における設定条件に対応付けた補正判断値を超えた前記画素の前記撮像素子上の縦横座標に、対応する前記設定条件および前記欠陥画素レベルを関連付けて生成されて前記メモリに格納され、前記画像生成手段は、前記設定条件に適合する前記欠陥画素データを前記メモリから読み出して前記記憶部に登録することを特徴とする。 The invention according to claim 4 is the imaging apparatus according to any one of claims 1 to 3 , further comprising a memory that can be appropriately stored and read by the image generation unit, and the defect The pixel data determines the defective pixel level based on an electrical signal output from the imaging element, and the imaging of the pixel in which the defective pixel level exceeds a correction determination value associated with a setting condition in the determination criterion The ordinate and abscissa on the element are generated in association with the corresponding setting condition and the defective pixel level and stored in the memory, and the image generation means reads out the defective pixel data that conforms to the setting condition from the memory. And registering in the storage unit .

請求項5に係る発明は、請求項1ないし請求項4のいずれか1項に記載の撮像装置であって、前記欠陥画素データは、等分された前記分割画像データに対応する前記撮像素子上での区画毎に、前記撮像素子から出力される電気信号に基づいて前記欠陥画素レベルを判断し、該欠陥画素レベルが前記判断基準における設定条件に対応付けた補正判断値を超えた前記画素の前記撮像素子上の縦横座標に、対応する前記設定条件および前記欠陥画素レベルを関連付けて生成されて前記メモリに格納されていることを特徴とする。 The invention according to claim 5 is the imaging device according to any one of claims 1 to claim 4, wherein the defective pixel data, on the image sensor corresponding to the divided image data divided equally The defective pixel level is determined on the basis of the electrical signal output from the imaging device for each of the sections, and the defective pixel level exceeds the correction determination value associated with the setting condition in the determination criterion. The vertical and horizontal coordinates on the image sensor are generated in association with the corresponding setting condition and the defective pixel level, and are stored in the memory.

請求項6に係る発明は、請求項1ないし請求項5のいずれか1項に記載の撮像装置であって、前記判断基準は露光時間であり、前記設定条件は露光時間として設定された数値であることを特徴とする。 The invention according to claim 6 is the imaging device according to any one of claims 1 to claim 5, wherein the criterion is the exposure time, the setting condition is a value set as the exposure time It is characterized by being.

請求項7に係る発明は、請求項1ないし請求項5のいずれか1項に記載の撮像装置であって、前記判断基準はISO感度であり、前記設定条件はISO感度として設定された数値であることを特徴とする。 The invention according to claim 7 is the imaging device according to any one of claims 1 to claim 5, wherein the criterion is ISO sensitivity, the setting condition is set number as ISO sensitivity It is characterized by being.

請求項8に係る発明は、複数の画素を有する撮像素子から出力された複数の電気信号に基づいて画像データを生成する画像生成手段を備え、該画像生成手段が、前記画像データの生成過程における画像生成データが入力されると、該画像生成データにおいて、記憶部に登録された前記撮像素子における各欠陥画素データに相当する画素データを補正する欠陥画素補正動作により、前記画像生成データの欠陥画素補正を行う欠陥画素補正部を有する撮像装置の制御部に、前記欠陥画素補正部による欠陥画素を補正する機能を実現させるためのプログラムであって、前記画像生成手段に、欠陥画素の影響の変化の判断基準に対応付けた欠陥画素レベルに基づいて補正対象とする補正画素数を設定させる機能と、該補正画素数が、前記記憶部に登録可能な前記欠陥画素データの数である登録限度数を超えた場合、補正対象とする画素データを重複させることなく前記補正画素数の欠陥画素補正を行うべく、前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返させるとともに、前記画像生成データを、前記補正画素数を前記登録限度数で除算して得られた商の少数以下を切り上げた値で等分して複数の分割画像データに区分けし、各該分割画像データ毎に前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返させる機能と、を実現させることを特徴とする。 The invention according to claim 8 includes image generation means for generating image data based on a plurality of electrical signals output from an imaging device having a plurality of pixels, and the image generation means is in the generation process of the image data. When image generation data is input, defective pixels of the image generation data are obtained by a defective pixel correction operation that corrects pixel data corresponding to each defective pixel data in the image sensor registered in the storage unit in the image generation data. A program for causing a control unit of an imaging apparatus having a defective pixel correction unit to perform correction to realize a function of correcting defective pixels by the defective pixel correction unit. A function for setting the number of correction pixels to be corrected based on the defective pixel level associated with the determination criterion, and the number of correction pixels registered in the storage unit When the registration limit number, which is the number of defective pixel data, is exceeded, the defective pixel data in the storage unit is corrected in order to perform defective pixel correction of the corrected pixel number without overlapping pixel data to be corrected. While repeating the defective pixel correction operation in the defective pixel correction unit while changing the registration content, the image generation data, less than the decimal of the quotient obtained by dividing the correction pixel number by the registration limit number Dividing into a plurality of divided image data by equally dividing by the rounded-up value, and changing the registered content of the defective pixel data in the storage unit for each divided image data, the defective pixel correction in the defective pixel correction unit And a function of repeating the operation .

請求項9に係る発明は、複数の画素を有する撮像素子から出力された複数の電気信号に基づいて画像データを生成する画像生成手段を備え、該画像生成手段が、前記画像データの生成過程における画像生成データが入力されると、該画像生成データにおいて、記憶部に登録された前記撮像素子における各欠陥画素データに相当する画素データを補正する欠陥画素補正動作により、前記画像生成データの欠陥画素補正を行う欠陥画素補正部を有する撮像装置の制御部に、前記欠陥画素補正部による欠陥画素を補正する機能を実現させるためのプログラムであって、前記画像生成手段に、欠陥画素の影響の変化の判断基準に対応付けた欠陥画素レベルに基づいて補正対象とする補正画素数を設定させる機能と、該補正画素数が、前記記憶部に登録可能な前記欠陥画素データの数である登録限度数を超えた場合、補正対象とする画素データを重複させることなく前記補正画素数の欠陥画素補正を行うべく、前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返させるとともに、前記画像生成データに対して、前記登録限度数の前記欠陥画素データを前記記憶部に登録して前記欠陥画素補正部での前記欠陥画素補正動作を行わせ、かつ、その後、前記画像生成データを、前記補正画素数が前記登録限度数を減算した差分を該登録限度数で除算して得られた商の少数以下を切り上げた値で等分して複数の分割画像データに区分けし、最初の前記欠陥画素補正動作での欠陥画素補正とは補正対象とする画素データが重複しないように各該分割画像データ毎に前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返させる機能と、を実現させることを特徴とする。 The invention according to claim 9 includes image generation means for generating image data based on a plurality of electrical signals output from an imaging device having a plurality of pixels, and the image generation means is in the generation process of the image data. When image generation data is input, defective pixels of the image generation data are obtained by a defective pixel correction operation that corrects pixel data corresponding to each defective pixel data in the image sensor registered in the storage unit in the image generation data. the control unit of the imaging apparatus having the defective pixel correction unit that performs correction, a program for realizing a function of correcting defective pixels by the defective pixel correction unit, the image generating means, a change in the influence of the defective pixel A function for setting the number of correction pixels to be corrected based on the defective pixel level associated with the determination criterion, and the number of correction pixels registered in the storage unit When the registration limit number, which is the number of defective pixel data, is exceeded, the defective pixel data in the storage unit is corrected in order to perform defective pixel correction of the corrected pixel number without overlapping pixel data to be corrected. The defective pixel correction operation in the defective pixel correction unit is repeated while changing registration contents, and the defective pixel data of the registration limit number is registered in the storage unit for the image generation data. A quotient obtained by causing the pixel correction unit to perform the defective pixel correction operation and then dividing the image generation data by a difference obtained by subtracting the registration limit number from the correction pixel number by the registration limit number. Are divided into a plurality of divided image data by dividing them by a value rounded up to the nearest decimal number, and the pixel data to be corrected do not overlap with the defective pixel correction in the first defective pixel correction operation. Characterized in that to realize a function of the Ru was repeated defective pixel correction operation in the defective pixel correction unit while changing the registration contents of the defective pixel data in the storage unit for each of the divided image data into .

請求項10に係る発明は、請求項8または請求項9に記載のプログラムであって、前記画像生成手段に、前記撮像素子から出力される電気信号に基づいて前記欠陥画素レベルを判断し、該欠陥画素レベルが前記判断基準における設定条件に対応付けた補正判断値を超えた前記画素の前記撮像素子上の縦横座標に、対応する前記設定条件および前記欠陥画素レベルを関連付けて生成されて前記メモリに格納された前記欠陥画素データのうち、前記設定条件に適合する前記欠陥画素データを前記メモリから読み出して前記記憶部に登録する機能を、実現させることを特徴とする。 The invention according to claim 10 is the program according to claim 8 or 9 , wherein the image generation means determines the defective pixel level based on an electrical signal output from the image sensor, The memory is generated by associating the corresponding setting condition and the defective pixel level with the vertical and horizontal coordinates on the image sensor of the pixel whose defective pixel level exceeds the correction determination value associated with the setting condition in the determination criterion. among the defective pixel data stored in the function to register a compatible the defective pixel data in the storage unit is read out from said memory to said setting condition, characterized in that to realize.

請求項11に係る発明は、請求項8ないし請求項10のいずれか1項に記載のプログラムであって、前記欠陥画素データとして、等分された前記分割画像データに対応する前記撮像素子上での区画毎に、前記撮像素子から出力される電気信号に基づいて前記欠陥画素レベルを判断し、該欠陥画素レベルが前記判断基準における設定条件に対応付けた補正判断値を超えた前記画素の前記撮像素子上の縦横座標に、対応する前記設定条件および前記欠陥画素レベルを関連付けて生成されて前記メモリに格納する機能を、実現させることを特徴とする。 An invention according to an eleventh aspect is the program according to any one of the eighth to tenth aspects , wherein the defective pixel data is divided on the imaging element corresponding to the divided image data equally divided. For each section, the defective pixel level is determined based on the electrical signal output from the imaging device, and the defective pixel level of the pixel whose correction pixel value exceeds the correction determination value associated with the setting condition in the determination criterion A function of associating the corresponding setting condition and the defective pixel level with the vertical and horizontal coordinates on the image sensor and storing them in the memory is realized.

本発明に係る撮像装置によれば、設定した補正対象とする補正画素数が登録限度数を超える場合であっても、欠陥画素補正部での欠陥画素補正動作を繰り返すことにより、その超えた数の画素を2回目以降(設定条件によっては2回)の欠陥画素補正部での欠陥画素補正動作により補正するので、補正が必要とされる補正画素数と記憶部の登録限度数との関係に拘らず、撮像素子の全ての欠陥画素を補正することができる。   According to the imaging apparatus according to the present invention, even when the set number of correction pixels to be corrected exceeds the registration limit number, by repeating the defective pixel correction operation in the defective pixel correction unit, the number exceeding the number Are corrected by the defective pixel correction operation in the defective pixel correction unit for the second time or later (2 times depending on the setting conditions), so the relationship between the number of corrected pixels that need to be corrected and the registration limit number of the storage unit Regardless, all defective pixels of the image sensor can be corrected.

また、欠陥画素補正部での欠陥画素補正動作の繰り返しの際、補正対象とする画素データを重複させることなく補正画素数の欠陥画素補正を行うように、記憶部における欠陥画素データの登録内容を変更させるので、設定した補正画素数だけ補正すること、換言すると過不足なく適切に補正することができ、欠陥画素の補正不足や過補正に基因する画質の低下を防止することができる。   In addition, when repeating the defective pixel correction operation in the defective pixel correction unit, the registration content of the defective pixel data in the storage unit is set so that defective pixel correction of the number of corrected pixels is performed without overlapping pixel data to be corrected. Since the change is made, it is possible to correct only the set number of correction pixels, in other words, to correct appropriately without over- and under-correction, and to prevent the image quality from being deteriorated due to insufficient correction or over-correction of defective pixels.

上記した構成に加えて、さらに、前記画像生成手段が適宜格納および読出することのできるメモリを備え、前記欠陥画素データは、前記撮像素子から出力される電気信号に基づいて前記欠陥画素レベルを判断し、該欠陥画素レベルが前記判断基準における設定条件に対応付けた補正判断値を超えた前記画素の前記撮像素子上の縦横座標に、対応する前記設定条件および前記欠陥画素レベルを関連付けて生成されて前記メモリに格納され、前記画像生成手段は、前記設定条件に適合する前記欠陥画素データを前記メモリから読み出して前記記憶部に登録することとすると、欠陥画素補正部が、欠陥画素補正動作を繰り返す際、記憶部にはメモリから読み出された設定条件に適合する欠陥画素データが登録されているので、設定条件に適合する適切な欠陥画素補正を行うことができる。   In addition to the above-described configuration, the image generation unit further includes a memory that can be appropriately stored and read, and the defective pixel data is determined based on an electric signal output from the image sensor. The defective pixel level is generated by associating the corresponding setting condition and the defective pixel level with the vertical and horizontal coordinates on the image sensor of the pixel whose corrected pixel value exceeds the correction determination value associated with the setting condition in the determination criterion. Stored in the memory, and the image generation means reads out the defective pixel data conforming to the set condition from the memory and registers it in the storage unit, the defective pixel correction unit performs a defective pixel correction operation. When repeating, defective pixel data that matches the setting condition read from the memory is registered in the storage unit. Defective pixel correction can be performed.

上記した構成に加えて、前記画像生成手段は、設定した前記補正画素数が前記登録限度数を超えた場合、前記画像生成データを、前記補正画素数を前記登録限度数で除算して得られた商の少数以下を切り上げた値で等分して複数の分割画像データに区分けし、各該分割画像データ毎に前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返すこととすると、欠陥画素補正部での欠陥画素補正に要する処理時間が入力されるデータ量に略比例することから、撮像素子の全ての欠陥画素を補正する際の処理時間を、欠陥画素補正部での欠陥画素補正動作の回数に拘らず、分割される前の画像生成データを欠陥画素補正部で欠陥画素補正処理させる場合と略等しいものとすることができる。   In addition to the configuration described above, the image generation means can be obtained by dividing the image generation data by dividing the correction pixel number by the registration limit number when the set correction pixel number exceeds the registration limit number. The fractional pixel is divided into a plurality of divided image data by dividing the value by rounding up the decimal number, and the defective pixel correction unit changes the registered content of the defective pixel data in the storage unit for each of the divided image data When the defective pixel correction operation in step S3 is repeated, since the processing time required for defective pixel correction in the defective pixel correction unit is substantially proportional to the amount of input data, when correcting all defective pixels of the image sensor Regardless of the number of defective pixel correction operations in the defective pixel correction unit, the processing time for the image generation data before being divided can be substantially equal to the case of performing defective pixel correction processing in the defective pixel correction unit. That.

上記した構成に加えて、前記画像生成手段は、設定した前記補正画素数が前記登録限度数を超えた場合、前記画像生成データに対して、前記登録限度数の前記欠陥画素データを前記記憶部に登録して前記欠陥画素補正部での前記欠陥画素補正動作を行い、その後、前記画像生成データを、前記補正画素数が前記登録限度数を減算した差分を該登録限度数で除算して得られた商の少数以下を切り上げた値で等分して複数の分割画像データに区分けし、最初の前記欠陥画素補正動作での欠陥画素補正とは補正対象とする画素データが重複しないように各該分割画像データ毎に前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返すこととすると、初めに撮像素子の全領域に対して登録限度数の欠陥画素の補正を行うことにより、より適切に欠陥画素補正をすることができ、その後の残りの補正画素数分の欠陥画素補正を各分割画像データに対して行うことにより、残りの補正画素数分の欠陥画素補正に要する処理時間の増大を抑制することができる。   In addition to the above-described configuration, the image generating means stores the defective pixel data of the registration limit number with respect to the image generation data when the set correction pixel number exceeds the registration limit number. The defective pixel correction unit performs the defective pixel correction operation, and then the image generation data is obtained by dividing the difference obtained by subtracting the registration limit number from the correction pixel number by the registration limit number. Each of the obtained quotients is divided into a plurality of divided image data by dividing the value by rounding up the decimal number, and each of the pixel data to be corrected does not overlap with the defective pixel correction in the first defective pixel correction operation. When the defective pixel correction operation in the defective pixel correction unit is repeated while changing the registration content of the defective pixel data in the storage unit for each divided image data, first, the entire area of the imaging element is applied. By correcting the defective pixels of the recording limit number, it is possible to correct the defective pixels more appropriately, and by performing defective pixel correction for the remaining number of corrected pixels on each divided image data, It is possible to suppress an increase in processing time required for correcting defective pixels for the number of correction pixels.

上記した構成に加えて、前記画像生成手段は、設定した前記補正画素数が前記登録限度数を超えた場合、前記画像生成データに対して、前記欠陥画素レベルが高い方から順に前記登録限度数の前記欠陥画素データを前記記憶部に登録して前記欠陥画素補正部での前記欠陥画素補正動作を行い、その後、前記画像生成データを、前記補正画素数が前記登録限度数を減算した差分を該登録限度数で除算して得られた商の少数以下を切り上げた値で等分して複数の分割画像データに区分けし、最初の前記欠陥画素補正動作での欠陥画素補正とは補正対象とする画素データが重複しないように各該分割画像データ毎に前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返すこととすると、初めに欠陥画素レベルが高い方から順に登録限度数だけ撮像素子の全領域に対して欠陥画素の補正を行うことにより、さらに適切に欠陥画素補正をすることができ、その後の残りの補正画素数分の欠陥画素補正を各分割画像データに対して行うことにより、残りの補正画素数分の欠陥画素補正に要する処理時間の増大を抑制することができる。   In addition to the above-described configuration, when the set number of corrected pixels exceeds the registration limit number, the image generation unit sets the registration limit number in order from the highest defective pixel level with respect to the image generation data. The defective pixel data is registered in the storage unit, the defective pixel correction unit performs the defective pixel correction operation, and then the image generation data is obtained by subtracting the registration limit number from the correction pixel number. Dividing by the value obtained by dividing the quotient obtained by dividing by the registration limit number into equal parts and dividing it into a plurality of divided image data. The defective pixel correction in the first defective pixel correction operation is a correction target. The defective pixel correction operation in the defective pixel correction unit is repeated while changing the registration content of the defective pixel data in the storage unit for each divided image data so that the pixel data to be overlapped does not overlap. First, the defective pixels can be corrected more appropriately by correcting the defective pixels with respect to the entire area of the image sensor by the registration limit number in order from the highest defective pixel level, and the remaining corrected pixels thereafter. By performing defect pixel correction for several divided image data on each divided image data, an increase in processing time required for defect pixel correction for the remaining number of corrected pixels can be suppressed.

上記した構成に加えて、前記欠陥画素データは、等分された前記分割画像データに対応する前記撮像素子上での区画毎に、前記撮像素子から出力される電気信号に基づいて前記欠陥画素レベルを判断し、該欠陥画素レベルが前記判断基準における設定条件に対応付けた補正判断値を超えた前記画素の前記撮像素子上の縦横座標に、対応する前記設定条件および前記欠陥画素レベルを関連付けて生成されて前記メモリに格納されていることとすると、設定条件に応じた各分割画像データでの欠陥画素データを適切に欠陥画素補正部の記憶部に登録することができ、かつ欠陥画素補正処理のための各欠陥画素データを効率よくメモリに格納することができる。   In addition to the above-described configuration, the defective pixel level is determined based on an electrical signal output from the image sensor for each section on the image sensor corresponding to the divided image data that has been equally divided. And correlating the corresponding setting condition and the defective pixel level with the vertical and horizontal coordinates on the image sensor of the pixel whose defective pixel level exceeds the correction determination value associated with the setting condition in the determination criterion. If it is generated and stored in the memory, the defective pixel data in each divided image data according to the setting condition can be appropriately registered in the storage unit of the defective pixel correction unit, and the defective pixel correction process Therefore, it is possible to efficiently store each defective pixel data for the memory in the memory.

上記した構成に加えて、前記判断基準は露光時間であり、前記設定条件は露光時間として設定された数値であることとすると、撮影時の露光時間に応じて適切に欠陥画素を補正することができる。   In addition to the above-described configuration, assuming that the determination criterion is an exposure time and the setting condition is a numerical value set as the exposure time, a defective pixel can be appropriately corrected according to the exposure time at the time of shooting. it can.

上記した構成に加えて、前記判断基準はISO感度であり、前記設定条件はISO感度として設定された数値であることとすると、撮影時のISO感度に応じて適切に欠陥画素を補正することができる。   In addition to the above-described configuration, if the determination criterion is ISO sensitivity and the setting condition is a numerical value set as ISO sensitivity, defective pixels can be corrected appropriately according to the ISO sensitivity at the time of shooting. it can.

本発明の実施例1に係る撮像装置の一例としてのデジタルスチルカメラ(以下、「デジタルカメラ1」という)を示す説明図であり、(a)は正面図であり、(b)は上面図であり、(c)は背面図である。BRIEF DESCRIPTION OF THE DRAWINGS It is explanatory drawing which shows the digital still camera (henceforth "digital camera 1") as an example of the imaging device which concerns on Example 1 of this invention, (a) is a front view, (b) is a top view. (C) is a rear view. 図1のデジタルカメラ1のシステム構成の概要を示すブロック図である。It is a block diagram which shows the outline | summary of the system configuration | structure of the digital camera 1 of FIG. デジタルカメラ1に用いられるRGBフィルタを模式的に示す説明図である。2 is an explanatory diagram schematically showing an RGB filter used in the digital camera 1. FIG. 各優先補正画素群PにおけるRAM44に格納された欠陥画素のアドレス(CCD20上の縦横座標)のデータの個数(欠陥画素のデータ数)等を表で示す説明図である。Each priority number of data of correction stored RAM44 in the pixel group P N defective pixel address (vertical and horizontal coordinates on CCD 20) (the number of data of the defective pixel) or the like is an explanatory diagram showing a table. 制御部28にて実行される実施例1の欠陥画素補正処理内容を示すフローチャートである。3 is a flowchart showing details of defective pixel correction processing of Example 1 executed by a control unit 28; 図5のフローチャートにおけるステップS4の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of step S4 in the flowchart of FIG. 各優先補正画素群PNMにおけるRAM44に格納された欠陥画素のアドレス(CCD20上の縦横座標)のデータの個数(欠陥画素のデータ数)等を表で示す図4と同様の説明図である。FIG. 5 is an explanatory view similar to FIG. 4 showing, in a table form, the number of defective pixel addresses (vertical and horizontal coordinates on the CCD 20) stored in the RAM 44 in each priority correction pixel group NM, and the like. 取得した画像(画像データ)をS等分した様子を説明するための説明図であり、(a)は4分割した様子を示し、(b)は2分割した様子を示している。It is explanatory drawing for demonstrating a mode that the acquired image (image data) was equally divided into S, (a) shows a mode that it divided into 4, (b) has shown a mode that it divided into 2. 制御部28にて実行される実施例2の欠陥画素補正処理内容を示すフローチャートである。10 is a flowchart showing details of defective pixel correction processing according to a second embodiment that is executed by a control unit. 図9のフローチャートにおけるステップS24の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of step S24 in the flowchart of FIG. 各優先補正画素群P´もしくは各優先補正画素群PNM´におけるRAM44に格納された欠陥画素のアドレス(CCD20上の縦横座標)のデータの個数(欠陥画素のデータ数)等を表で示す図4および図7と同様の説明図である。The number of data (number of defective pixel data) of defective pixel addresses (vertical and horizontal coordinates on the CCD 20) stored in the RAM 44 in each priority correction pixel group P N ′ or each priority correction pixel group P NM ′ is shown in a table. It is explanatory drawing similar to FIG. 4 and FIG. 制御部28にて実行される実施例3の欠陥画素補正処理内容を示すフローチャートである。10 is a flowchart showing details of defective pixel correction processing of Example 3 executed by a control unit 28. 図12のフローチャートにおけるステップS56の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of step S56 in the flowchart of FIG.

以下に、本発明に係る撮像装置およびその撮像装置で実行される欠陥画素補正処理のためのプログラムの実施の形態を図面を参照しつつ説明する。   DESCRIPTION OF EMBODIMENTS Embodiments of an imaging apparatus according to the present invention and a program for defective pixel correction processing executed by the imaging apparatus will be described below with reference to the drawings.

図1は、本発明の実施例1に係る撮像装置の一例としてのデジタルスチルカメラ(以下、「デジタルカメラ1」という)を示す説明図であり、(a)は正面図であり、(b)は上面図であり、(c)は背面図である。図2は、図1のデジタルカメラ1のシステム構成の概要を示すブロック図である。図3は、デジタルカメラ1に用いられるRGBフィルタを模式的に示す説明図である。図4は、各優先補正画素群PにおけるRAM44に格納された欠陥画素のアドレス(CCD20上の縦横座標)のデータの個数(欠陥画素のデータ数)等を表で示す説明図である。
(デジタルカメラの外観構成)
実施例1のデジタルカメラ1では、図1に示すように、上面側に、レリーズボタン(シャッタボタン)2、電源ボタン3、撮影・再生切替ダイアル4が設けられ、正面(前面)側に、撮影レンズ系5を有する鏡胴ユニット6、ストロボ発光部(フラッシュ)7、光学ファインダ8が設けられている。
FIG. 1 is an explanatory view showing a digital still camera (hereinafter referred to as “digital camera 1”) as an example of an imaging apparatus according to Embodiment 1 of the present invention, (a) is a front view, and (b). Is a top view, and (c) is a back view. FIG. 2 is a block diagram showing an outline of the system configuration of the digital camera 1 of FIG. FIG. 3 is an explanatory diagram schematically showing an RGB filter used in the digital camera 1. 4, each priority correction number data of the pixel group P N is stored in the RAM44 in a defective pixel address (vertical and horizontal coordinates on CCD 20) (the number of data of the defective pixel) or the like is an explanatory diagram showing a table.
(Appearance structure of digital camera)
In the digital camera 1 according to the first embodiment, as shown in FIG. 1, a release button (shutter button) 2, a power button 3, and a shooting / playback switching dial 4 are provided on the upper surface, and shooting is performed on the front (front) side. A lens barrel unit 6 having a lens system 5, a strobe light emitting unit (flash) 7, and an optical viewfinder 8 are provided.

また、デジタルカメラ1では、背面側に、液晶モニタ(LCD)9、前記光学ファインダ8の接眼レンズ部8a、広角側ズーム(W)スイッチ10、望遠側ズーム(T)スイッチ11、メニュー(MENU)ボタン12、確定ボタン(OKボタン)13等が設けられている。このデジタルカメラ1の側面内部には、撮影した画像データを保存するためのメモリカード14(図2参照)を収納するメモリカード収納部15が設けられている。なお、本発明に係る撮像装置の外観は、必ずしも実施例1に限定されるものではなく、他の外観を備えていてもよい。
(デジタルカメラのシステム構成)
デジタルカメラ1は、図2に示すように、鏡胴ユニット6の撮影レンズ系5を通して入射される被写体画像が受光面上に結像する固体撮像素子としてのCCD20、CCD20から出力される電気信号(アナログRGB画像信号)をデジタル信号に処理するアナログフロントエンド部21(以下、「AFE部21」という)、AFE部21から出力されるデジタル信号を処理する信号処理部22、データを一時的に格納するSDRAM23、制御プログラム等が記憶されたROM24、鏡胴ユニット6を駆動するモータドライバ25、後述する制御部28が適宜データを格納および読み出すことが可能とされたメモリとしてのRAM44等を備えている。
In the digital camera 1, on the rear side, a liquid crystal monitor (LCD) 9, an eyepiece 8a of the optical viewfinder 8, a wide-angle zoom (W) switch 10, a telephoto zoom (T) switch 11, a menu (MENU) A button 12, a confirmation button (OK button) 13, and the like are provided. Inside the side surface of the digital camera 1 is provided a memory card storage unit 15 for storing a memory card 14 (see FIG. 2) for storing captured image data. Note that the appearance of the imaging apparatus according to the present invention is not necessarily limited to the first embodiment, and may have another appearance.
(Digital camera system configuration)
As shown in FIG. 2, the digital camera 1 has a CCD 20 as a solid-state imaging device on which a subject image incident through the photographing lens system 5 of the lens barrel unit 6 forms an image on a light receiving surface, and an electric signal ( Analog front-end unit 21 (hereinafter referred to as “AFE unit 21”) that processes analog RGB image signals) into digital signals, signal processing unit 22 that processes digital signals output from AFE unit 21, and temporarily stores data SDRAM 23 that stores control programs, a motor driver 25 that drives the lens barrel unit 6, and a RAM 44 that can store and read data appropriately by a control unit 28 described later. .

撮影レンズ系5は、ズームレンズやフォーカスレンズ等を有する。鏡胴ユニット6は、撮影レンズ系5、絞りユニット26、メカシャッタユニット27を有し、その撮影レンズ系5、絞りユニット26、メカシャッタユニット27の各駆動ユニットは、モータドライバ25によって駆動される。モータドライバ25は、信号処理部22の制御部(CPU)28からの駆動信号により駆動制御される。   The taking lens system 5 includes a zoom lens, a focus lens, and the like. The lens barrel unit 6 includes a photographic lens system 5, an aperture unit 26, and a mechanical shutter unit 27. The drive units of the photographic lens system 5, the aperture unit 26, and the mechanical shutter unit 27 are driven by a motor driver 25. . The motor driver 25 is driven and controlled by a drive signal from a control unit (CPU) 28 of the signal processing unit 22.

CCD20は、結像された被写体像を電気信号(画像データ)に変換して出力する固体撮像素子である。このCCD20は、受光面全体が画素(ピクセル)と呼ばれる格子状の領域(以下、画素20a(図3参照)ともいう)に分割されており、デジタルデータである画素データの集合で構成される画像データを、電気信号として出力する。CCD20では、分割された各領域(画素)にベイヤー配列を構成するように色フィルタ(RGB、CYM等)が設けられており、実施例1では、図3に示すように、ベイヤー配列のRGB原色フィルタ(以下、「RGBフィルタ」という)が配置されている。このため、CCD20は、各画素20aからRGB3原色に対応した電気信号(アナログRGB画像信号)を出力する。なお、CCD20は、固体撮像素子としてのCMOS型イメージセンサ等で構成することもできる。   The CCD 20 is a solid-state image sensor that converts an imaged subject image into an electrical signal (image data) and outputs it. The CCD 20 has an entire light receiving surface divided into a grid-like area called a pixel (hereinafter also referred to as a pixel 20a (see FIG. 3)), and is an image composed of a set of pixel data that is digital data. Data is output as an electrical signal. In the CCD 20, color filters (RGB, CYM, etc.) are provided in each divided area (pixel) so as to form a Bayer array. In the first embodiment, as shown in FIG. 3, the RGB primary colors of the Bayer array are provided. A filter (hereinafter referred to as “RGB filter”) is arranged. Therefore, the CCD 20 outputs an electrical signal (analog RGB image signal) corresponding to the three primary colors of RGB from each pixel 20a. The CCD 20 can also be configured with a CMOS image sensor or the like as a solid-state image sensor.

AFE部21は、CCD20を駆動するTG(タイミング信号発生部)30、CCD20から出力される電気信号(アナログRGB画像信号)をサンプリングするCDS(相関2重サンプリング部)31、CDS31にてサンプリングされた信号のゲインを調整するAGC(アナログ利得制御部)32、AGC32でゲイン調整された信号をデジタル信号(以下、「RAW−RGBデータ」という)に変換するA/D変換部33を有する。   The AFE unit 21 is sampled by a TG (timing signal generating unit) 30 that drives the CCD 20, a CDS (correlated double sampling unit) 31 that samples an electrical signal (analog RGB image signal) output from the CCD 20, and the CDS 31. An AGC (analog gain control unit) 32 that adjusts the gain of the signal, and an A / D conversion unit 33 that converts the signal gain-adjusted by the AGC 32 into a digital signal (hereinafter referred to as “RAW-RGB data”).

信号処理部22は、CCDインターフェース(以下、「CCDI/F」という)34と、メモリコントローラ35と、YUV変換部36と、リサイズ処理部37と、表示出力制御部38と、データ圧縮部39と、メディアインターフェース(以下、「メディアI/F」という)40と、欠陥画素補正部42と、制御部(CPU)28と、を有する。   The signal processing unit 22 includes a CCD interface (hereinafter referred to as “CCD I / F”) 34, a memory controller 35, a YUV conversion unit 36, a resizing processing unit 37, a display output control unit 38, and a data compression unit 39. , A media interface (hereinafter referred to as “media I / F”) 40, a defective pixel correction unit 42, and a control unit (CPU) 28.

CCDI/F34は、AFE部21のTG30へ画面水平同期信号(HD)と画面垂直同期信号(VD)の出力を行い、これらの同期信号に合わせて、AFE部21のA/D変換部33から出力されるRAW−RGBデータを取り込む。メモリコントローラ35は、SDRAM23を制御する。YUV変換部36は、CCDI/F34にて取り込んだRAW−RGBデータを、表示や記録が可能なYUV形式の画像データに変換する。リサイズ処理部37は、表示や記録される画像データのサイズに合わせて画像サイズを変更する。表示出力制御部38は、画像データの表示出力を制御する。データ圧縮部39は、画像データをJPEG形式等で記録させるべくデータの変換を行う。メディアI/F40は、画像データをメモリカード14へ書き込み、またはメモリカード14に書き込まれた画像データを読み出す。欠陥画素補正部42は、CCD20にて取得された画像データが、信号処理部22内を伝播する過程において、欠陥画素の補正を行うものである。この欠陥画素の補正については、後に詳述する。制御部28は、操作部41からの操作入力情報等に応じて、ROM24に記憶された制御プログラムに基づいてデジタルカメラ1全体のシステム制御等を行う。   The CCD I / F 34 outputs a screen horizontal synchronization signal (HD) and a screen vertical synchronization signal (VD) to the TG 30 of the AFE unit 21, and from the A / D conversion unit 33 of the AFE unit 21 according to these synchronization signals. The output RAW-RGB data is captured. The memory controller 35 controls the SDRAM 23. The YUV converter 36 converts the RAW-RGB data captured by the CCD I / F 34 into image data in YUV format that can be displayed and recorded. The resizing processing unit 37 changes the image size according to the size of image data to be displayed or recorded. The display output control unit 38 controls display output of image data. The data compression unit 39 converts the data so that the image data is recorded in the JPEG format or the like. The media I / F 40 writes image data to the memory card 14 or reads image data written to the memory card 14. The defective pixel correction unit 42 corrects defective pixels in the process in which the image data acquired by the CCD 20 propagates through the signal processing unit 22. The correction of the defective pixel will be described in detail later. The control unit 28 performs system control and the like of the entire digital camera 1 based on a control program stored in the ROM 24 in accordance with operation input information from the operation unit 41.

操作部41は、デジタルカメラ1の外観表面に設けられているレリーズボタン2、電源ボタン3、撮影・再生切替ダイアル4、広角側ズームスイッチ10、望遠側ズームスイッチ11、メニューボタン12、確定ボタン13等(図1参照)であり、撮影者の操作に応じた所定の動作指示信号が制御部28に入力される。   The operation unit 41 includes a release button 2, a power button 3, a shooting / playback switching dial 4, a wide-angle zoom switch 10, a telephoto zoom switch 11, a menu button 12, and a confirmation button 13 provided on the external surface of the digital camera 1. Etc. (see FIG. 1), and a predetermined operation instruction signal corresponding to the operation of the photographer is input to the control unit 28.

SDRAM23には、CCDI/F34に取り込まれたRAW−RGBデータが保存されるとともに、YUV変換部36で変換処理されたYUVデータ(YUV形式の画像データ)が保存され、加えて、データ圧縮部39で圧縮処理されたJPEG形成などの画像データが保存される。なお、このYUVデータとは、輝度データ(Y)と、輝度データと青色(B)成分データの差分である色差(U)と、輝度データと赤色(R)成分データの差分である色差(V)の情報で色を表現する形式である。
(デジタルカメラのモニタリング動作、静止画撮影動作)
次に、前記したデジタルカメラ1のモニタリング動作と静止画撮影動作について説明する。このデジタルカメラ1は、静止画撮影モード時には、以下に説明するようなモニタリング動作を実行しながら静止画撮影動作が行われる。
The SDRAM 23 stores RAW-RGB data captured by the CCD I / F 34 and also stores YUV data (YUV format image data) converted by the YUV conversion unit 36. In addition, the data compression unit 39 The image data such as JPEG formation that has been subjected to compression processing is saved. The YUV data is the luminance data (Y), the color difference (U) that is the difference between the luminance data and the blue (B) component data, and the color difference (V) that is the difference between the luminance data and the red (R) component data. ) Information to express color.
(Digital camera monitoring and still image shooting)
Next, the monitoring operation and still image shooting operation of the digital camera 1 will be described. In the still image shooting mode, the digital camera 1 performs a still image shooting operation while executing a monitoring operation as described below.

先ず、撮影者が電源ボタン3をONし、撮影・再生切替ダイアル4を撮影モードに設定することで、デジタルカメラ1が記録モードで起動する。制御部28は、電源ボタン3がONされて、撮影・再生切替ダイアル4が撮影モードに設定されたことを検知すると、モータドライバ25に制御信号を出力して、鏡胴ユニット6を撮影可能位置に移動させ、かつ、CCD20、AFE部21、信号処理部22、SDRAM23、ROM24、液晶モニタ9等を起動させる。   First, when the photographer turns on the power button 3 and sets the photographing / playback switching dial 4 to the photographing mode, the digital camera 1 is activated in the recording mode. When the control unit 28 detects that the power button 3 is turned on and the photographing / playback switching dial 4 is set to the photographing mode, the control unit 28 outputs a control signal to the motor driver 25 to allow the lens barrel unit 6 to be photographed. And the CCD 20, the AFE unit 21, the signal processing unit 22, the SDRAM 23, the ROM 24, the liquid crystal monitor 9 and the like are activated.

そして、鏡胴ユニット6の撮影レンズ系5が被写体に向けられることにより、撮影レンズ系5を通して入射される被写体画像がCCD20の各画素の受光面上に結像する。そして、CCD20から出力される被写体画像に応じた電気信号(アナログRGB画像信号)は、CDS31、AGC32を介してA/D変換部33に入力され、A/D変換部33により12ビット(bit)のRAW−RGBデータに変換される。   Then, the photographing lens system 5 of the lens barrel unit 6 is directed toward the subject, so that the subject image incident through the photographing lens system 5 is formed on the light receiving surface of each pixel of the CCD 20. An electrical signal (analog RGB image signal) corresponding to the subject image output from the CCD 20 is input to the A / D converter 33 via the CDS 31 and the AGC 32, and 12 bits (bits) are output from the A / D converter 33. To RAW-RGB data.

このRAW−RGBデータは、信号処理部22のCCDI/F34に取り込まれてメモリコントローラ35を介してSDRAM23に保存される。そして、SDRAM23から読み出されたRAW−RGBデータは、YUV変換部36でYUVデータ(YUV信号)に変換された後に、メモリコントローラ35を介してSDRAM23にYUVデータとして保存される。   This RAW-RGB data is taken into the CCD I / F 34 of the signal processing unit 22 and stored in the SDRAM 23 via the memory controller 35. The RAW-RGB data read from the SDRAM 23 is converted into YUV data (YUV signal) by the YUV conversion unit 36 and then stored as YUV data in the SDRAM 23 via the memory controller 35.

そして、SDRAM23からメモリコントローラ35を介して読み出されるYUVデータは、表示出力制御部38を介して液晶モニタ(LCD)9へ送られ、液晶モニタ(LCD)9において撮影画像が表示される。その液晶モニタ(LCD)9に撮影画像を表示しているモニタリング時においては、CCDI/F34による画素数の間引き処理により1/30秒の時間で1フレームが読み出されている。このため、AFE部21および信号処理部22は、制御部28の制御下で画像生成手段として機能する。   The YUV data read from the SDRAM 23 via the memory controller 35 is sent to the liquid crystal monitor (LCD) 9 via the display output control unit 38, and the photographed image is displayed on the liquid crystal monitor (LCD) 9. At the time of monitoring in which a captured image is displayed on the liquid crystal monitor (LCD) 9, one frame is read out in a time of 1/30 seconds by the pixel number thinning process by the CCD I / F 34. For this reason, the AFE unit 21 and the signal processing unit 22 function as an image generation unit under the control of the control unit 28.

なお、このモニタリング動作時は、電子ファインダとして機能する液晶モニタ(LCD)9に撮影画像が表示されているだけで、まだレリーズボタン2が押圧(半押も含む)操作されていない状態である。   In this monitoring operation, the photographed image is only displayed on the liquid crystal monitor (LCD) 9 functioning as an electronic viewfinder, and the release button 2 is not yet pressed (including half-pressed).

この撮影画像の液晶モニタ(LCD)9への表示によって、撮影者は、静止画を撮影するための構図の確認等を行うことができる。なお、デジタルカメラ1では、表示出力制御部38からTVビデオ信号として出力して、ビデオケーブルを介して外部のTV(テレビ)(図示せず)に撮影画像を表示することもできる。
(欠陥画素とその検出方法)
デジタルスチルカメラに使用される撮像素子(上記したCCD20等)では、半導体の製造工程において、全ての受光素子が完全に同一性能で形成されるわけではなく、一部の受光素子に欠陥が生じてしまうことがある。この欠陥が生じてしまった受光素子に相当する画素を、以下では欠陥画素という。しかし、製品の歩留まり上、所定の数以下の個数の欠陥画素があっても、良品の撮像素子としてデジタルスチルカメラ等の商品に使用されるのが一般的である。このため、デジタルカメラ1では、その欠陥画素のCCD20上における縦横座標(アドレス)等(以下、欠陥画素データ)を予めRAM44等に格納しておき、撮影時に、撮像データにおけるRAM44等に格納された欠陥画素のアドレスに相当する画素データに対して欠陥画素補正処理を実施する。この欠陥画素は、例えば、画像全体の輝度値の平均値であるAE評価値が128程度の真白な画像を取得させ、当該画像データの各画素データにおいて、輝度値の128からの差異が所定の値よりも大きいか否かを判断することにより、検出することができる。ここで、輝度値が128よりも低いものを黒キズといい、輝度値が128よりも高いものを白キズという。
By displaying the photographed image on the liquid crystal monitor (LCD) 9, the photographer can check the composition for photographing the still image. Note that the digital camera 1 can also output a TV video signal from the display output control unit 38 and display a captured image on an external TV (TV) (not shown) via a video cable.
(Defective pixel and its detection method)
In an imaging device (such as the CCD 20 described above) used in a digital still camera, not all light receiving elements are formed with the same performance in the semiconductor manufacturing process, and some light receiving elements are defective. May end up. A pixel corresponding to the light receiving element in which this defect has occurred is hereinafter referred to as a defective pixel. However, even if there are a predetermined number or less of defective pixels due to the product yield, it is generally used as a non-defective image sensor in a product such as a digital still camera. For this reason, in the digital camera 1, the ordinate and abscissa (address) of the defective pixel on the CCD 20 (hereinafter referred to as defective pixel data) are stored in advance in the RAM 44 or the like and stored in the RAM 44 or the like in the imaging data at the time of shooting. A defective pixel correction process is performed on the pixel data corresponding to the address of the defective pixel. For this defective pixel, for example, a pure white image having an AE evaluation value that is an average value of the luminance values of the entire image of about 128 is acquired, and in each pixel data of the image data, a difference from the luminance value of 128 is predetermined. It can be detected by judging whether it is larger than the value. Here, those having a luminance value lower than 128 are referred to as black scratches, and those having a luminance value higher than 128 are referred to as white scratches.

また、上述の欠陥画素とは別に、暗電流特性の悪い画素(温度キズ)である欠陥画素も存在する。この温度キズは、暗電流が増えたり蓄積されたりする条件、すなわち撮像素子の温度が上昇したり露光時間が長くなったりするほど影響が大きくなるという動的な欠陥要因である。このため、この温度キズの欠陥画素では、通常1秒程度の露光では問題とならないが、露光時間が長くなるに従って暗電流の増加が大きくなり、それが画像データに重畳され、画像上において輝点となって見える。夜景撮影等の長時間露光撮影による画像において、点々の星状のノイズとして現れるものがこれである。この温度キズの欠陥画素は、300万画素の撮像素子に対して60個程度であり、個々の欠陥画素のアドレスをRAM44等に格納しておくことができる。しかし、温度キズの欠陥画素は、上述したように動的な欠陥要因であることから、露光秒時などの撮影パラメータによって補正しなければならない。この温度キズの欠陥画素は、例えば、遮光して真暗な画像を取得させ、当該画像データの各画素データにおいて、輝度値が所定の値よりも大きいか否かを判断することにより、検出することができる。
(欠陥画素の基本的な補正方法)
欠陥画素の補正は基本的に以下の方法で行われる。
In addition to the above-described defective pixels, there are also defective pixels that have poor dark current characteristics (temperature scratches). This temperature flaw is a dynamic defect factor in which the influence increases as the dark current increases or accumulates, that is, as the temperature of the image sensor increases or the exposure time increases. For this reason, a defective pixel having this temperature flaw usually does not cause a problem with exposure of about 1 second, but as the exposure time becomes longer, the increase in dark current increases, which is superimposed on the image data and becomes a bright spot on the image. Looks like. This is what appears as dotted star-like noise in an image obtained by long exposure photography such as night scene photography. There are about 60 defective pixels with temperature flaws with respect to an image sensor with 3 million pixels, and addresses of individual defective pixels can be stored in the RAM 44 or the like. However, since defective pixels with temperature flaws are dynamic defect factors as described above, they must be corrected by imaging parameters such as exposure time. The defective pixel having the temperature flaw is detected by, for example, acquiring a true-dark image by shielding light and determining whether the luminance value is larger than a predetermined value in each pixel data of the image data. Can do.
(Basic correction method for defective pixels)
Correction of defective pixels is basically performed by the following method.

先ず、デジタルカメラ1では、上記したように検出してRAM44等に格納した欠陥画素のアドレス(CCD20上の縦横座標)のデータを、信号処理部22の欠陥画素補正部42の記憶部43に登録(格納)する。その後、レリーズ2(図1参照)が押し下げられて、上述したようにCCD20により取得された画像データが信号処理部22内を伝播される過程において、当該画像データ(生成過程の画像データである画像生成データ)が欠陥画素補正部42へと送られる。欠陥画素補正部42では、当該画像データ(その各画素データ)において、記憶部43に登録された欠陥画素のアドレスに相当する画素データを読み出し、その周辺のRGBフィルタで見て同じ色に対応した画素データで補間する。   First, in the digital camera 1, data of defective pixel addresses (vertical and horizontal coordinates on the CCD 20) detected as described above and stored in the RAM 44 or the like is registered in the storage unit 43 of the defective pixel correction unit 42 of the signal processing unit 22. (Store. Thereafter, when the release 2 (see FIG. 1) is pushed down and the image data acquired by the CCD 20 is propagated through the signal processing unit 22 as described above, the image data (image that is the image data of the generation process) is transmitted. Generated data) is sent to the defective pixel correction unit 42. The defective pixel correction unit 42 reads out pixel data corresponding to the address of the defective pixel registered in the storage unit 43 in the image data (each pixel data), and corresponds to the same color as seen by the surrounding RGB filters. Interpolate with pixel data.

ここでいう周辺の画素とは、緑色(G)の場合、水平方向に隣接する両隣の画素または垂直方向に隣接する両隣の画素あるいは斜め方向に隣接する両隣の画素をいい、青色(B)や赤色(R)の場合、水平方向に隣接する両隣の画素または垂直方向に隣接する両隣の画素をいう。   In the case of green (G), the peripheral pixels here refer to both adjacent pixels adjacent in the horizontal direction, adjacent pixels adjacent to each other in the vertical direction, or adjacent pixels adjacent to each other in the diagonal direction, such as blue (B) and In the case of red (R), it means both adjacent pixels adjacent in the horizontal direction or adjacent pixels adjacent in the vertical direction.

実施例1では、基本的には、注目した欠陥画素(補正対象としての欠陥画素)の水平方向に隣接する両隣の画素データの平均値を、当該注目した欠陥画素の画素データとすることにより補間する。ここで、注目した欠陥画素が、画像データにおける左端または右端に位置していた場合は、水平方向に隣接する画素データを、当該注目した欠陥画素の画素データとすることにより補正する。   In the first embodiment, basically, interpolation is performed by using the average value of pixel data on both sides adjacent to each other in the horizontal direction of the target defective pixel (defective pixel to be corrected) as pixel data of the target defective pixel. To do. Here, when the noticed defective pixel is located at the left end or the right end in the image data, the pixel data adjacent to the horizontal direction is corrected as the pixel data of the noticed defective pixel.

また、実施例1では、RGBフィルタで見て同色の欠陥画素が、水平方向に2つ並んでいる場合(以下では、連続2画素の欠陥画素ともいう)であっても、補正することができる。この注目した連続2画素の欠陥画素を補正する場合、一方の欠陥画素が他方の欠陥画素とは逆側で隣接する画素データを、当該一方の欠陥画素の画素データとし、他方の欠陥画素が一方の欠陥画素とは逆側で隣接する画素データを、当該他方の欠陥画素の画素データとすることにより、補間する。ここで、注目した連続2画素の欠陥画素が、画像データにおける左端または右端に位置していた場合は、水平方向に隣接する画素データとそれに隣接する画素データとの2画素分の画素データを、当該注目した連続2画素の欠陥画素の画素データとすることにより補正する。   Further, in the first embodiment, even when two defective pixels of the same color viewed in the RGB filter are arranged in the horizontal direction (hereinafter also referred to as consecutive two defective pixels), correction can be performed. . When correcting the focused defective pixels of the two consecutive pixels, pixel data in which one defective pixel is adjacent to the other defective pixel on the opposite side is set as pixel data of the one defective pixel, and the other defective pixel is Interpolation is performed by using pixel data adjacent to the defective pixel as the pixel data of the other defective pixel. Here, when the defective pixel of the continuous two pixels of interest is located at the left end or the right end in the image data, the pixel data for two pixels of the pixel data adjacent in the horizontal direction and the pixel data adjacent thereto are Correction is performed by using pixel data of the defective pixels of the two consecutive pixels of interest.

ここで、欠陥画素補正部42の記憶部43では、登録可能な欠陥画素(その欠陥画素のアドレスデータ等)の個数(欠陥画素データの量)は有限であり、例えば、実施例1のデジタルカメラ1では512個である。これは、デジタルカメラ1では、一般の撮像装置と同様に、装置全体としての大きさ寸法を出来る限り小さくすることが要求されているとともに内部には種々の機能のための機構が収容されること等から、欠陥画素補正部42およびその記憶部43の回路等の構成を大規模なものとすることができず、記憶部43に登録(格納)することができる欠陥画素データの量(欠陥画素数)には限りがあることによる。このため、従来のデジタルスチルカメラ等では、撮像素子において、欠陥画素補正部の記憶部に登録(格納)可能な欠陥画素数を超える欠陥画素が存在する場合、その全てを欠陥画素補正することができなかった。   Here, in the storage unit 43 of the defective pixel correction unit 42, the number of defective pixels (the amount of defective pixel data) that can be registered (the amount of defective pixel data) is finite. For example, the digital camera of the first embodiment 1 is 512. This is because the digital camera 1 is required to reduce the overall size of the device as much as possible as in a general imaging device, and a mechanism for various functions is accommodated therein. The amount of defective pixel data (defective pixels) that cannot be made large-scale, and that can be registered (stored) in the storage unit 43, such as the circuit configuration of the defective pixel correction unit 42 and its storage unit 43, etc. The number is limited. For this reason, in a conventional digital still camera or the like, if there are defective pixels exceeding the number of defective pixels that can be registered (stored) in the storage unit of the defective pixel correction unit in the image sensor, all of them can be corrected for defective pixels. could not.

本願発明は、欠陥画素補正部42の記憶部43に登録(格納)可能な欠陥画素数を超える欠陥画素が存在する場合であっても、その全てを欠陥画素補正することを可能とするものであって、欠陥画素補正部42により実行される欠陥画素補正処理内容が従来のものとは異なるものとされている。以下では、このことについて詳細に説明する。
(欠陥画素補正処理)
以下の説明では、理解容易のために、欠陥画素補正部42の記憶部43に登録(格納)可能な欠陥画素数(登録限度数)を500としている。また、欠陥画素の影響の変化の判断基準を露光時間としかつその判断基準の設定条件を露光時間として設定された秒数とすべく、CCD20における欠陥画素の検出の際、遮光して真暗な画像(ダーク画像)を取得(撮影)させ、取得した当該画像(画像データ)における画素(画素データ)の輝度値を欠陥画素レベルとし、取得した当該画像(画像データ)において輝点として現れる輝度値(欠陥画素レベル)を補正判断値としている。実施例1では、欠陥画素レベル(輝度値)が240以上であると露光時間が2秒の場合に画像(画像データ)において輝点として現れることからその補正判断値を240〜255とし、欠陥画素レベル(輝度値)が220以上であると露光時間が4秒の場合に画像(画像データ)において輝点として現れることからその補正判断値を220〜239とし、欠陥画素レベル(輝度値)が200以上であると露光時間が8秒の場合に画像(画像データ)において輝点として現れることからその補正判断値を200〜219とし、欠陥画素レベル(輝度値)が180以上であると露光時間が16秒の場合に画像(画像データ)において輝点として現れることからその補正判断値を180〜199としている。実施例1では、当該欠陥画素レベル(輝度値)が高いものほど、補正優先度の高い欠陥画素(温度キズ)であるものとしている。なお、欠陥画素レベルとしての輝度値は、出力のフルスケールを255とした出力値を示しており、数値が大きくなるほど大きな(高い)出力であることを示している。
The present invention makes it possible to correct all defective pixels even when there are defective pixels exceeding the number of defective pixels that can be registered (stored) in the storage unit 43 of the defective pixel correction unit 42. Thus, the defective pixel correction processing content executed by the defective pixel correction unit 42 is different from the conventional one. This will be described in detail below.
(Defective pixel correction process)
In the following description, the number of defective pixels that can be registered (stored) in the storage unit 43 of the defective pixel correction unit 42 (the registration limit number) is 500 for easy understanding. Further, in order to set the determination criterion for the change in the influence of the defective pixel as the exposure time and the setting condition of the determination criterion as the number of seconds set as the exposure time, when detecting the defective pixel in the CCD 20, the dark image is shielded from light. (Dark image) is acquired (photographed), and the luminance value of a pixel (pixel data) in the acquired image (image data) is set as a defective pixel level, and the luminance value that appears as a bright spot in the acquired image (image data) ( (Defective pixel level) is used as a correction judgment value. In the first embodiment, if the defective pixel level (luminance value) is 240 or more, it appears as a bright spot in the image (image data) when the exposure time is 2 seconds, so that the correction judgment value is 240 to 255, and the defective pixel If the level (luminance value) is 220 or more, it appears as a bright spot in the image (image data) when the exposure time is 4 seconds. Therefore, the correction judgment value is 220 to 239, and the defective pixel level (luminance value) is 200. When the exposure time is 8 seconds, it appears as a bright spot in the image (image data). Therefore, the correction judgment value is 200 to 219, and the exposure time is when the defective pixel level (luminance value) is 180 or more. Since it appears as a bright spot in the image (image data) in the case of 16 seconds, the correction judgment value is set to 180 to 199. In the first embodiment, the higher the defective pixel level (luminance value) is, the higher the correction priority is the defective pixel (temperature scratch). Note that the luminance value as the defective pixel level is an output value with the full scale of the output being 255, and indicates that the larger the value, the larger (higher) output.

実施例1のデジタルカメラ1では、ROM24に記憶されたプログラムを、制御部28が実行して欠陥画素補正部42等を適宜制御することにより、本願発明に係る欠陥画素補正処理を行う。この欠陥画素補正処理は、基本的には、欠陥画素補正部42において一度の欠陥画素補正の動作により補正可能な欠陥画素数が、記憶部43に登録(格納)された欠陥画素数となることから、記憶部43に登録可能な欠陥画素数(登録限度数)を超える場合、記憶部43への登録内容を書き換えつつ欠陥画素補正部42での欠陥画素補正の動作を繰り返すことにより、撮像素子(CCD20)の全ての欠陥画素の補正を可能とするものである。この欠陥画素補正処理のために、露光時間に応じた補正する欠陥画素数が設定されている。この露光時間に応じた補正画素数の決定は以下のように行う。   In the digital camera 1 according to the first embodiment, the control unit 28 executes the program stored in the ROM 24 to appropriately control the defective pixel correction unit 42 and the like, thereby performing the defective pixel correction process according to the present invention. In this defective pixel correction process, basically, the number of defective pixels that can be corrected by one defective pixel correction operation in the defective pixel correction unit 42 becomes the number of defective pixels registered (stored) in the storage unit 43. When the number of defective pixels (registration limit number) that can be registered in the storage unit 43 is exceeded, the defective pixel correction operation in the defective pixel correction unit 42 is repeated while rewriting the registration contents in the storage unit 43, thereby obtaining an image sensor. This makes it possible to correct all the defective pixels of the (CCD 20). For this defective pixel correction process, the number of defective pixels to be corrected is set according to the exposure time. Determination of the number of correction pixels according to the exposure time is performed as follows.

欠陥画素の数は撮像素子(センサ)の特性に依存する。例えば、CMOSでは、同条件下であってもCCDより10倍も多い欠陥画素が出現すると言われている。このため、実際にデジタルスチルカメラ(実施例1ではデジタルカメラ1)にセンサ(実施例1ではCCD20)を搭載した状態において、露光2秒で出現する欠陥画素の数、露光4秒で出現する欠陥画素の数、・・・・というように、設定された各露光時間で出現する欠陥画素の数を統計的に把握し、露光時間に応じて出現する欠陥画素の全てを補正するために充分だと判断できる数を、露光時間に応じた補正画素数として設定する。このため、上記した露光時間に対する補正判断値すなわち欠陥画素レベル(輝度値)の各数値は、露光時間に応じた補正画素数の設定のための目安であるということができる。この欠陥画素補正処理においては、欠陥画素レベルが高い画素から順に、露光時間に応じた補正画素数だけ、欠陥画素補正を行う。   The number of defective pixels depends on the characteristics of the image sensor (sensor). For example, in CMOS, it is said that 10 times more defective pixels appear than CCD even under the same conditions. Therefore, in the state where the sensor (CCD 20 in the first embodiment) is actually mounted on the digital still camera (the digital camera 1 in the first embodiment), the number of defective pixels that appear in the exposure 2 seconds and the defects that appear in the exposure 4 seconds. It is sufficient to statistically grasp the number of defective pixels that appear at each set exposure time, such as the number of pixels, and to correct all the defective pixels that appear according to the exposure time. Is determined as the number of corrected pixels corresponding to the exposure time. For this reason, it can be said that the correction judgment value for the exposure time, that is, each numerical value of the defective pixel level (luminance value) is a guideline for setting the number of correction pixels according to the exposure time. In this defective pixel correction process, defective pixels are corrected by the number of corrected pixels corresponding to the exposure time in order from the pixel with the highest defective pixel level.

この実施例1では、露光時間が2秒の場合の補正画素数を200とし、露光時間が4秒の場合の補正画素数を500とし、露光時間が8秒の場合の補正画素数を700とし、露光時間が16秒の場合の補正画素数を1000としている(図4参照)。すなわち、統計的に、欠陥画素レベル(輝度値)が240〜255となる画素数が200以下であり、欠陥画素レベル(輝度値)が220〜239となる画素数が500以下であり、欠陥画素レベル(輝度値)が200〜219となる画素数が700以下であり、欠陥画素レベル(輝度値)が180〜199となる画素数が1000以下であることを意味している。   In the first embodiment, the correction pixel number when the exposure time is 2 seconds is 200, the correction pixel number when the exposure time is 4 seconds is 500, and the correction pixel number when the exposure time is 8 seconds is 700. The number of corrected pixels when the exposure time is 16 seconds is 1000 (see FIG. 4). That is, statistically, the number of pixels with a defective pixel level (luminance value) of 240 to 255 is 200 or less, the number of pixels with a defective pixel level (luminance value) of 220 to 239 is 500 or less, and the defective pixel This means that the number of pixels with a level (luminance value) of 200 to 219 is 700 or less, and the number of pixels with a defective pixel level (luminance value) of 180 to 199 is 1000 or less.

制御部28は、設定された露光時間に応じた補正画素数での欠陥画素補正処理のために、実施例1では、欠陥画素データとして、検出した欠陥画素のアドレス(CCD20上の縦横座標)のデータを、それぞれの欠陥画素レベルおよび設定された露光時間に関連付けて、以下のようにRAM44に格納する。なお、実施例1では、後述するように記憶部43に適宜登録するための欠陥画素データをRAM44に格納しているが、制御部28が適宜データを格納および読み出すことが可能とされたメモリであればよく、実施例1に限定されるものではない。   In the first embodiment, the control unit 28 uses the detected defective pixel address (vertical and horizontal coordinates on the CCD 20) as defective pixel data for the defective pixel correction processing with the number of corrected pixels corresponding to the set exposure time. Data is stored in the RAM 44 as follows in association with each defective pixel level and the set exposure time. In the first embodiment, defective pixel data to be appropriately registered in the storage unit 43 is stored in the RAM 44 as will be described later. However, the memory in which the control unit 28 can appropriately store and read data is used. There is no limitation to the first embodiment.

先ず、図4に示すように、CCD20の全ての画素の中から、欠陥画素レベルが高い画素から順に200個の画素を欠陥画素として検出し、第1優先補正画素群Pの欠陥画素のアドレスデータとして、RAM44に格納する。この第1優先補正画素群Pとして検出された200個の欠陥画素は、そのまま露光時間が2秒の場合に補正する200個の欠陥画素となる。 First, as shown in FIG. 4, from among all the pixels of the CCD 20, to detect the 200 pixels in descending order of pixels defective pixel level as a defective pixel, the first address of the defective pixel of the priority correction pixel group P 1 The data is stored in the RAM 44 as data. 200 defective pixel detected as the first priority correction pixel group P 1 is, as it becomes a 200 defective pixel correcting when the exposure time is 2 seconds.

次に、CCD20の全ての画素の中から、欠陥画素レベルが高い画素から順に500個の画素を欠陥画素として検出し、その検出した500個の画素から、第1優先補正画素群Pの200個の欠陥画素を除いたものを欠陥画素として選出し、第2優先補正画素群Pの欠陥画素のアドレスデータとして、RAM44に格納する。これは、例えば、CCD20の全ての画素の中から、欠陥画素レベルが高い画素から順に500個の画素を検出する過程において、それらのうち第1優先補正画素群Pの200個の欠陥画素において最も低い欠陥画素レベルよりも低い欠陥画素レベルのものを選出することにより行う。このため、第2優先補正画素群Pの欠陥画素として、CCD20の全ての画素の中における欠陥画素レベルが高い500個の画素から、第1優先補正画素群Pの200個の欠陥画素を減算した、残りの300個の画素を検出することとなる。この第2優先補正画素群Pとして検出された300個の欠陥画素は、第1優先補正画素群Pの200個の欠陥画素を加算することにより、露光時間が4秒の場合に補正する500個の欠陥画素となる。また、本願発明に係る欠陥画素補正処理では、欠陥画素補正部42の記憶部43に登録(格納)可能な欠陥画素数を、後述するように、欠陥画素レベルが高い方から順に補正優先度の高い欠陥画素として設定することから、実施例1では、欠陥画素補正部42の記憶部43に登録(格納)可能な欠陥画素数が500であるので、露光時間が4秒の場合に補正する500個の欠陥画素が、そのまま補正優先度の高い欠陥画素となる。 Next, among all the pixels of the CCD 20, 500 pixels are detected in order from the pixel having the highest defective pixel level as a defective pixel, and 200 of the first priority correction pixel group P 1 is detected from the detected 500 pixels. elect minus the number of defective pixels as defective pixels, as the address data of the defective pixel of the second priority correction pixel group P 2, and stores it in the RAM 44. This is because, for example, in the process of detecting 500 pixels in order from the pixel having the highest defective pixel level among all the pixels of the CCD 20, among the 200 defective pixels in the first priority correction pixel group P 1 among them. This is done by selecting a defective pixel level lower than the lowest defective pixel level. For this reason, 200 defective pixels of the first priority correction pixel group P 1 are selected from 500 pixels having a high defective pixel level among all the pixels of the CCD 20 as defective pixels of the second priority correction pixel group P 2. The remaining 300 pixels after subtraction are detected. 300 pieces of defective pixels detected as the second priority correction pixel group P 2 by adding the first 200 defective pixel of the priority correction pixel group P 1, the exposure time is corrected in the case of 4 seconds There are 500 defective pixels. Further, in the defective pixel correction processing according to the present invention, the number of defective pixels that can be registered (stored) in the storage unit 43 of the defective pixel correction unit 42 is determined in order of correction priority from the highest defective pixel level, as will be described later. Since the number of defective pixels that can be registered (stored) in the storage unit 43 of the defective pixel correction unit 42 is 500 in the first embodiment because it is set as a high defective pixel, the correction is performed when the exposure time is 4 seconds. The defective pixels directly become defective pixels having a high correction priority.

次に、CCD20の全ての画素の中から、欠陥画素レベルが高い画素から順に700個の画素を欠陥画素として検出し、その検出した700個の画素から、第1優先補正画素群Pの200個の欠陥画素および第2優先補正画素群Pの300個の欠陥画素を除いたものを欠陥画素として選出し、第3優先補正画素群Pの欠陥画素のアドレスデータとして、RAM44に格納する。これは、例えば、CCD20の全ての画素の中から、欠陥画素レベルが高い画素から順に700個の画素を検出する過程において、それらのうち第2優先補正画素群Pの300個の欠陥画素において最も低い欠陥画素レベルよりも低い欠陥画素レベルのものを選出することにより行う。このため、第3優先補正画素群Pの欠陥画素として、CCD20の全ての画素の中における欠陥画素レベルが高い700個の画素から、第1優先補正画素群Pの200個の欠陥画素および第2優先補正画素群Pの300個の欠陥画素を減算した、残りの200個の画素を検出することとなる。この第3優先補正画素群Pとして検出された200個の欠陥画素は、第1優先補正画素群Pの200個の欠陥画素および第2優先補正画素群Pの300個の欠陥画素を加算することにより、露光時間が8秒の場合に補正する700個の欠陥画素となる。 Next, 700 pixels are detected as defective pixels in order from the pixel having the highest defective pixel level among all the pixels of the CCD 20, and 200 of the first priority correction pixel group P 1 is detected from the detected 700 pixels. the minus the 300 pieces of defective pixel number of defective pixels and second priority correction pixel group P 2 is selected as the defective pixel, as the address data of the defective pixel of the third priority correction pixel group P 3, and stored in RAM44 . This is because, for example, in the process of detecting 700 pixels in order from the pixel with the highest defective pixel level among all the pixels of the CCD 20, among the 300 defective pixels in the second priority correction pixel group P 2 among them. This is done by selecting a defective pixel level lower than the lowest defective pixel level. For this reason, as defective pixels in the third priority correction pixel group P 3 , 200 defective pixels in the first priority correction pixel group P 1 , from 700 pixels having a high defective pixel level among all the pixels of the CCD 20, and the second 300 of the defective pixel of the priority correction pixel group P 2 is subtracted, and thus to detect the remaining 200 pixels. The third priority 200 defective pixels detected as the correction pixel group P 3 is 200 300 defective pixel of the defective pixel and a second priority correction pixel group P 2 of the first priority correction pixel group P 1 By adding, 700 defective pixels are corrected when the exposure time is 8 seconds.

次に、CCD20の全ての画素の中から、欠陥画素レベルが高い画素から順に1000個の画素を欠陥画素として検出し、その検出した1000個の画素から、第1優先補正画素群Pの200個の欠陥画素、第2優先補正画素群Pの300個の欠陥画素および第3優先補正画素群Pの200個の欠陥画素を除いたものを欠陥画素として選出し、第4優先補正画素群Pの欠陥画素のアドレスデータとして、RAM44に格納する。これは、例えば、CCD20の全ての画素の中から、欠陥画素レベルが高い画素から順に1000個の画素を検出する過程において、それらのうち第3優先補正画素群Pの200個の欠陥画素において最も低い欠陥画素レベルよりも低い欠陥画素レベルのものを選出することにより行う。このため、第4優先補正画素群Pの欠陥画素として、CCD20の全ての画素の中における欠陥画素レベルが高い1000個の画素から、第1優先補正画素群Pの200個の欠陥画素、第2優先補正画素群Pの300個の欠陥画素および第3優先補正画素群Pの200個の欠陥画素を減算した、残りの300個の画素を検出することとなる。この第4優先補正画素群Pとして検出された300個の欠陥画素は、第1優先補正画素群Pの200個の欠陥画素、第2優先補正画素群Pの300個の欠陥画素および第3優先補正画素群Pの200個の欠陥画素を加算することにより、露光時間が16秒の場合に補正する1000個の欠陥画素となる。 Next, 1000 pixels are detected as defective pixels in order from the pixel having the highest defective pixel level among all the pixels of the CCD 20, and 200 of the first priority correction pixel group P 1 is detected from the detected 1000 pixels. elected number of defective pixels, the minus the 200 defective pixel of the second priority 300 of the defective pixel of the corrected pixel group P 2 and the third priority correction pixel group P 3 as a defective pixel, the fourth priority corrected pixel as the address data of the defective pixel group P 4, and stored in RAM 44. This, for example, from among all the pixels of the CCD 20, in the process of the defective pixel level to detect the 1000 pixels from a high pixel sequentially, in a third 200 defective pixel of the priority correction pixel group P 3 of them This is done by selecting a defective pixel level lower than the lowest defective pixel level. For this reason, as defective pixels of the fourth priority correction pixel group P 4 , from 200 pixels having a high defective pixel level among all the pixels of the CCD 20, 200 defective pixels of the first priority correction pixel group P 1 , the 200 defective pixel of the second priority 300 of the defective pixel of the corrected pixel group P 2 and the third priority correction pixel group P 3 is subtracted, and thus to detect the remaining 300 pixels. The 300 pieces of defective pixels detected as the fourth priority correction pixel group P 4 is 200 defective pixel of the first priority correction pixel group P 1, 300 pieces of defective pixels of the second priority correction pixel group P 2 and By adding 200 defective pixels of the third priority correction pixel group P 3 , 1000 defective pixels are corrected when the exposure time is 16 seconds.

なお、上記したように補正画素数を設定していることから、各優先補正画素群P(N=1〜4)の各欠陥画素では、CCD20の全ての画素の中において、補正判断値すなわち設定の目安としての欠陥画素レベル(輝度値)の範囲にある欠陥画素レベルの画素の全てを漏らすことなく含むものではあるが、設定の目安としての欠陥画素レベル(輝度値)よりも小さな欠陥画素レベルの画素が含まれている場合はあり得る。 Since the number of correction pixels is set as described above, in each defective pixel of each priority correction pixel group P N (N = 1 to 4), among all the pixels of the CCD 20, the correction judgment value, Defective pixels that contain all of the defective pixel level pixels within the range of the defective pixel level (luminance value) as a standard for setting without leaking, but are smaller than the defective pixel level (luminance value) as a standard for setting It is possible that level pixels are included.

実施例1の制御部28では、上述したようにRAM44に格納した各優先補正画素群P(N=1〜4)のアドレスデータ(図4参照)すなわち各欠陥画素データを利用して、欠陥画素補正処理を行う。図5は、この制御部28にて実行される実施例1の欠陥画素補正処理内容を示すフローチャートであり、図6は、図5のフローチャートにおけるステップS4の処理内容を示すフローチャートである。以下、図5のフローチャートの各ステップ(図6のフローチャートの各ステップも含む)について図4を用いて説明する。 The control unit 28 according to the first embodiment uses the address data (see FIG. 4) of each priority correction pixel group P N (N = 1 to 4) stored in the RAM 44 as described above, that is, uses each defective pixel data to detect a defect. Perform pixel correction processing. FIG. 5 is a flowchart showing details of the defective pixel correction processing of the first embodiment executed by the control unit 28, and FIG. 6 is a flowchart showing processing details of step S4 in the flowchart of FIG. Hereinafter, each step of the flowchart of FIG. 5 (including each step of the flowchart of FIG. 6) will be described with reference to FIG.

ステップS1では、設定された露光時間を取得して、ステップS2へ進む。このステップS1では、レリーズ2が押し下げられて撮影動作が開始されると、それにより得ることが可能となる当該撮影時の露光時間の情報を取得する。この露光時間は、撮影モードや撮影現場の雰囲気等に応じて制御部28が設定する場合もあれば、操作部41(図2参照)への操作により設定される場合もあるが、撮影動作が開始されると当該撮影時の露光時間が決まることから、撮影動作の開始に伴って露光時間の情報を取得する。   In step S1, the set exposure time is acquired, and the process proceeds to step S2. In this step S1, when the release 2 is pushed down and the photographing operation is started, information on the exposure time at the time of photographing that can be obtained by this is acquired. The exposure time may be set by the control unit 28 depending on the shooting mode, the atmosphere at the shooting site, or the like, or may be set by operating the operation unit 41 (see FIG. 2). Since the exposure time at the time of shooting is determined when it is started, information on the exposure time is acquired with the start of the shooting operation.

ステップS2では、ステップS1での設定された露光時間の取得に続き、取得した露光時間が8秒以上であるか否かを判定し、Yesの場合はステップS3へ進み、Noの場合はステップS4へ進む。このステップS2では、欠陥画素補正処理の内容の切り換え、すなわち欠陥画素補正部42による欠陥画素補正動作の回数の切り換えのために、ステップS1で取得した露光時間の長さ(数値)を判断している。これは、上述したように、露光時間に応じた補正画素数が予め設定されていることと、欠陥画素補正部42の記憶部43に登録(格納)可能な欠陥画素数(登録限度数)には限度があることと、による。実施例1では、記憶部43に登録可能な欠陥画素数(登録限度数)が500であるのに対し、露光時間が4秒の場合の補正画素数が500に設定されかつ露光時間が8秒の場合の補正画素数が700に設定されていることから、露光時間が8秒以上であると設定された補正画素数が登録限度数を越えるので、欠陥画素補正部42による欠陥画素補正動作を2回とすべくステップS3へ進み、露光時間が4秒以下であると設定された補正画素数が登録限度数以下であるので、欠陥画素補正部42による欠陥画素補正動作を1回とすべくステップS4へ進む。   In Step S2, following the acquisition of the set exposure time in Step S1, it is determined whether or not the acquired exposure time is 8 seconds or more. If Yes, the process proceeds to Step S3. If No, Step S4 is performed. Proceed to In step S2, the length (numerical value) of the exposure time acquired in step S1 is determined in order to switch the content of the defective pixel correction process, that is, to switch the number of defective pixel correction operations by the defective pixel correction unit 42. Yes. As described above, this is because the number of correction pixels corresponding to the exposure time is preset and the number of defective pixels (registration limit number) that can be registered (stored) in the storage unit 43 of the defective pixel correction unit 42. Depends on the limits. In the first embodiment, the number of defective pixels that can be registered in the storage unit 43 (registration limit number) is 500, whereas the number of corrected pixels when the exposure time is 4 seconds is set to 500 and the exposure time is 8 seconds. In this case, since the number of corrected pixels is set to 700, the number of corrected pixels set to have an exposure time of 8 seconds or more exceeds the registration limit number. The process proceeds to step S3 so that the exposure time is 4 seconds or less, and the number of corrected pixels set to be less than the registration limit number is less than the registration limit number, so that the defective pixel correction operation by the defective pixel correction unit 42 is performed once. Proceed to step S4.

ステップS3では、ステップS2での露光時間が8秒以上であるとの判断に続き、補正優先度の高い欠陥画素の補正を実行して、ステップS4へ進む。このステップS3では、ステップS2にて露光時間が8秒以上であると判断したことから、欠陥画素補正部42の記憶部43に登録可能な欠陥画素数(登録限度数)よりも多くの欠陥画素を補正する必要があるので、補正優先度の高い順すなわち欠陥画素レベル(輝度値)の大きい順から、記憶部43の登録限度数の欠陥画素を補正する。実施例1では、記憶部43の登録限度数が500であることから、第1優先補正画素群Pの200個の欠陥画素のアドレスデータと、第2優先補正画素群Pの300個の欠陥画素のアドレスデータと、を、RAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。その後、欠陥画素補正部42は、送られてきた画像データ(その各画素データ)において、記憶部43に登録された欠陥画素のアドレスに相当する画素データを読み出し、その周辺のRGBフィルタで見て同じ色に対応した画素データで補間することにより、第1優先補正画素群Pの200個の欠陥画素と、第2優先補正画素群Pの300個の欠陥画素と、の合計500個の欠陥画素の補正を行う。ここで、当該500個の欠陥画素のアドレスデータは、その全てが記憶部43に登録可能であることから、欠陥画素補正部42では一度の欠陥画素補正動作で、補正優先度の高い500個の欠陥画素の全てを補正することができる。なお、各優先補正画素群P(N=1〜4)の欠陥画素の個数の区切りが、記憶部43の登録限度数に対応していない場合、補正優先度の高い方から順に登録可能な登録限度数の欠陥画素のアドレスデータを、記憶部43への登録を可能とする状態で予めRAM44に格納しておくことが望ましい。 In step S3, following the determination that the exposure time in step S2 is 8 seconds or longer, correction of defective pixels having a high correction priority is executed, and the flow proceeds to step S4. In this step S3, since it is determined in step S2 that the exposure time is 8 seconds or more, there are more defective pixels than the number of defective pixels (registration limit number) that can be registered in the storage unit 43 of the defective pixel correction unit 42. Therefore, the defective pixels corresponding to the registration limit number in the storage unit 43 are corrected in the descending order of correction priority, that is, in the descending order of defective pixel level (luminance value). In Example 1, since the registration limit number of storage unit 43 is 500, the address data of the first 200 defective pixel of the priority correction pixel group P 1, the second priority correction pixel group P 2 300 pieces of The defective pixel address data is read from the RAM 44 and registered (stored) in the storage unit 43 of the defective pixel correction unit 42. Thereafter, the defective pixel correction unit 42 reads out pixel data corresponding to the address of the defective pixel registered in the storage unit 43 in the transmitted image data (each pixel data thereof), and looks at the surrounding RGB filters. By interpolating with pixel data corresponding to the same color, a total of 500 pixels including 200 defective pixels in the first priority correction pixel group P 1 and 300 defective pixels in the second priority correction pixel group P 2 are obtained. The defective pixel is corrected. Here, since all of the address data of the 500 defective pixels can be registered in the storage unit 43, the defective pixel correction unit 42 performs the defective pixel correction operation once, and the 500 correction pixels having a high correction priority. All defective pixels can be corrected. If the number of defective pixels in each priority correction pixel group P N (N = 1 to 4) does not correspond to the registration limit number in the storage unit 43, registration can be performed in order from the higher correction priority. It is desirable to store in advance the address data of the registration limit number of defective pixels in the RAM 44 so as to enable registration in the storage unit 43.

ステップS4では、ステップS2での露光時間が8秒以上ではないとの判断、あるいは、ステップS3での補正優先度の高い欠陥画素の補正の実行に続き、露光時間に応じた欠陥画素補正の準備を行って、ステップS5へ進む。このステップS4では、ステップS1で取得した露光時間に応じた補正画素数の欠陥画素を補正するために、各優先補正画素群P(N=1〜4)のアドレスデータをRAM44から適宜読み出して、欠陥画素補正部42の記憶部43に登録(格納)することにより、露光時間に応じた欠陥画素補正の準備を行う(これを処理Aとする)。すなわち、実質的な補正画素数の設定を行う。以下では、この露光時間に応じた欠陥画素補正の準備(ステップS4)における処理内容を示す図6のフローチャートの各ステップについて説明する。 In step S4, following the determination that the exposure time in step S2 is not more than 8 seconds or the execution of correction of defective pixels having a high correction priority in step S3, preparation for defective pixel correction according to the exposure time is performed. To go to step S5. In step S4, address data of each priority correction pixel group P N (N = 1 to 4) is appropriately read out from the RAM 44 in order to correct the defective pixels having the correction pixel number corresponding to the exposure time acquired in step S1. By registering (storing) in the storage unit 43 of the defective pixel correction unit 42, preparation for defective pixel correction corresponding to the exposure time is performed (this is referred to as process A). That is, a substantial correction pixel number is set. Below, each step of the flowchart of FIG. 6 which shows the processing content in the preparation (step S4) of defect pixel correction | amendment according to this exposure time is demonstrated.

ステップS11では、ステップS1で取得した露光時間が2秒であるか否かを判定し、Yesの場合はステップS12へ進み、Noの場合はステップS13へ進む。   In step S11, it is determined whether or not the exposure time acquired in step S1 is 2 seconds. If Yes, the process proceeds to step S12. If No, the process proceeds to step S13.

ステップS12では、ステップS11での露光時間が2秒であるとの判断に続き、2秒の露光時間に応じた欠陥画素補正の準備を行って、処理A(ステップS4)を終了し、ステップS5(図5参照)へと進む。ここで、露光時間が2秒である場合、図5のフローチャートにおいて、ステップS1→ステップS2→ステップS4へと進んできている場面である。このステップS12では、2秒の露光時間に応じた欠陥画素補正の準備として、第1優先補正画素群Pの200個の欠陥画素のアドレスデータ(図4参照)をRAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。 In step S12, following the determination that the exposure time in step S11 is 2 seconds, preparation for defective pixel correction corresponding to the exposure time of 2 seconds is made, and the process A (step S4) is terminated, and step S5 is completed. Proceed to (see FIG. 5). Here, when the exposure time is 2 seconds, in the flowchart of FIG. 5, the process proceeds from step S1 to step S2 to step S4. In the step S12, preparation of the defective pixel correction corresponding to the 2-second exposure time, the address data 200 of the defective pixels of the first priority correction pixel group P 1 (see FIG. 4) is read from the RAM 44, the defective pixel Register (store) in the storage unit 43 of the correction unit 42.

ステップS13では、ステップS11での露光時間が2秒ではないとの判断に続き、ステップS1で取得した露光時間が4秒であるか否かを判定し、Yesの場合はステップS14へ進み、Noの場合はステップS15へ進む。   In step S13, following the determination that the exposure time in step S11 is not 2 seconds, it is determined whether or not the exposure time acquired in step S1 is 4 seconds. If Yes, the process proceeds to step S14. In this case, the process proceeds to step S15.

ステップS14では、ステップS13での露光時間が4秒であるとの判断に続き、4秒の露光時間に応じた欠陥画素補正の準備を行って、処理A(ステップS4)を終了し、ステップS5(図5参照)へと進む。ここで、露光時間が4秒である場合、図5のフローチャートにおいて、ステップS1→ステップS2→ステップS4へと進んできている場面である。このステップS14では、4秒の露光時間に応じた欠陥画素補正の準備として、第1優先補正画素群Pの200個の欠陥画素のアドレスデータおよび第2優先補正画素群Pの300個の欠陥画素のアドレスデータ(図4参照)をRAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。 In step S14, following the determination that the exposure time in step S13 is 4 seconds, preparation for defective pixel correction according to the exposure time of 4 seconds is made, and the process A (step S4) is terminated, and step S5 is completed. Proceed to (see FIG. 5). Here, when the exposure time is 4 seconds, in the flowchart of FIG. 5, it is a scene in which the process proceeds from step S1 to step S2 to step S4. In the step S14, preparation of the defective pixel correction corresponding to 4 seconds exposure time, the address data and 300 of the second priority correction pixel group P 2 of the first 200 defective pixel of the priority correction pixel group P 1 The defective pixel address data (see FIG. 4) is read from the RAM 44 and registered (stored) in the storage unit 43 of the defective pixel correction unit 42.

ステップS15では、ステップS13での露光時間が4秒ではないとの判断に続き、ステップS1で取得した露光時間が8秒であるか否かを判定し、Yesの場合はステップS16へ進み、Noの場合はステップS17へ進む。   In step S15, following the determination that the exposure time in step S13 is not 4 seconds, it is determined whether or not the exposure time acquired in step S1 is 8 seconds. If Yes, the process proceeds to step S16. In this case, the process proceeds to step S17.

ステップS16では、ステップS15での露光時間が8秒であるとの判断に続き、8秒の露光時間に応じた欠陥画素補正の準備を行って、処理A(ステップS4)を終了し、ステップS5(図5参照)へと進む。ここで、露光時間が8秒である場合、図5のフローチャートにおいて、ステップS1→ステップS2→ステップS3→ステップS4へと進んできている場面であることから、補正優先度の高い500個の欠陥画素(第1優先補正画素群Pの200個の欠陥画素と、第2優先補正画素群Pの300個の欠陥画素と、の合計500個の欠陥画素)の補正が既に完了している。このため、ステップS16では、8秒の露光時間に応じた欠陥画素補正の準備として、第3優先補正画素群Pの200個の欠陥画素のアドレスデータ(図4参照)をRAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。 In step S16, following the determination in step S15 that the exposure time is 8 seconds, preparation for defective pixel correction corresponding to the exposure time of 8 seconds is made, and processing A (step S4) is terminated, and step S5 is completed. Proceed to (see FIG. 5). Here, when the exposure time is 8 seconds, 500 defects having a high correction priority are obtained in the flowchart of FIG. 5 because the process proceeds from step S1 to step S2 to step S3 to step S4. pixels (the 200 defective pixel of the first priority correction pixel group P 1, and 300 pieces of defective pixels of the second priority correction pixel group P 2, a total of 500 defective pixel) correction has already been completed . Therefore, in step S16, preparation of the defective pixel correction corresponding to 8 seconds exposure time, 200 defective pixel address data of the third priority correction pixel group P 3 (see FIG. 4) is read from the RAM 44, Register (store) in the storage unit 43 of the defective pixel correction unit 42.

ステップS17では、ステップS15での露光時間が8秒ではないとの判断に続き、16秒の露光時間に応じた欠陥画素補正の準備を行って、処理A(ステップS4)を終了し、ステップS5(図5参照)へと進む。ここで、ステップS15において露光時間が8秒ではない場合、設定されている露光時間の上限である16秒に設定されていることとなる。この場合、図5のフローチャートにおいて、ステップS1→ステップS2→ステップS3→ステップS4へと進んできている場面であることから、補正優先度の高い500個の欠陥画素(第1優先補正画素群Pの200個の欠陥画素と、第2優先補正画素群Pの300個の欠陥画素と、の合計500個の欠陥画素)の補正が既に完了している。このため、ステップS17では、16秒の露光時間に応じた欠陥画素補正の準備として、第3優先補正画素群Pの200個の欠陥画素のアドレスデータおよび第4優先補正画素群Pの300個の欠陥画素のアドレスデータ(図4参照)をRAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。 In step S17, following the determination that the exposure time in step S15 is not 8 seconds, preparation for defective pixel correction corresponding to the exposure time of 16 seconds is performed, and the process A (step S4) is terminated, and step S5 is completed. Proceed to (see FIG. 5). Here, if the exposure time is not 8 seconds in step S15, it is set to 16 seconds which is the upper limit of the set exposure time. In this case, in the flowchart of FIG. 5, since the scene proceeds from step S 1 → step S 2 → step S 3 → step S 4, 500 defective pixels having a high correction priority (first priority correction pixel group P 1 in total 200 defective pixels and 300 defective pixels in the second priority correction pixel group P 2 , a total of 500 defective pixels) has already been corrected. Therefore, in step S17, preparation of the defective pixel correction corresponding to 16 seconds of exposure time, 300 of the third preferred address data of 200 defective pixel correction pixel group P 3 and fourth priority correction pixel group P 4 The address data (see FIG. 4) of the defective pixels is read from the RAM 44 and registered (stored) in the storage unit 43 of the defective pixel correction unit 42.

ステップS5では、ステップS4での露光時間に応じた欠陥画素補正の準備に続き、露光時間に応じた欠陥画素補正を実行して、図5のフローチャートを終了する。このステップS5では、欠陥画素補正部42は、送られてきた画像データ(その各画素データ)において、記憶部43に登録された欠陥画素のアドレスに相当する画素データを読み出し、その周辺のRGBフィルタで見て同じ色に対応した画素データで補間することにより、ステップS4での露光時間に応じた欠陥画素補正の準備に応じた補正画素数の補正を行う。詳細には、露光時間が2秒の場合、第1優先補正画素群Pの200個の欠陥画素の補正を行い、露光時間が4秒の場合、第1優先補正画素群Pの200個の欠陥画素と第2優先補正画素群Pの300個の欠陥画素との合計500個の欠陥画素の補正を行い、露光時間が8秒の場合、第3優先補正画素群Pの200個の欠陥画素の補正を行い、露光時間が16秒の場合、第3優先補正画素群Pの200個と第4優先補正画素群Pの300個の欠陥画素との合計500個の欠陥画素の補正を行う。このとき、何れの場面であっても、欠陥画素のアドレスデータの全てを記憶部43に登録可能であることから、欠陥画素補正部42では一度の欠陥画素補正動作で、露光時間に応じた補正画素数の欠陥画素の全てを補正することができる。このため、ステップS5では、露光時間が2秒もしくは4秒の場合、1回目の欠陥画素補正部42での欠陥画素補正動作として、ステップS1で取得した露光時間に応じた補正画素数の補正を実行することとなり、露光時間が8秒もしくは16秒の場合、ステップS3に続く2回目の欠陥画素補正部42での欠陥画素補正動作として、ステップS1で取得した露光時間に応じた補正画素数から、ステップS3で実行した欠陥画素補正の補正画素数500を減算した残りの補正画素数の補正を、補正対象となる画素データを重複させることなく実行することとなる。
(高速な撮影処理での欠陥画素補正処理)
ここで、撮影モードや撮影現場の雰囲気等により、高速な撮影処理が必要な場合(例えば、連写等)、上記した欠陥画素補正処理の実行により欠陥画素補正部42で繰り返し(上記した実施例1では2回)欠陥画素補正動作を行うと、その欠陥画素補正の処理時間が問題となる。このため、本願発明に係る欠陥画素補正処理では、連写等の高速な撮影処理が必要な場合、欠陥画素レベルが高い画素(補正優先度の高い欠陥画素)を優先的に補正することを前提として、欠陥画素補正部42での欠陥画素補正動作を1回だけ行う。これは、欠陥画素レベルが高い画素は、欠陥画素として画像(画像データ)に表れやすい画素であることによる。この場合、例えば、図5のフローチャートにおいてステップS3で欠陥画素補正動作を実行した場合はステップS4へと進むことなく、欠陥画素補正処理を終了する。これにより、連写等の高速な撮影処理が必要な場合、欠陥画素補正に要する処理時間を短縮しつつ画像(画像データ)に出現し易い欠陥画素を補正することができる。
(本願発明の欠陥画素補正処理の作用)
本願発明の欠陥画素補正処理では、上述したように、撮像素子(CCD20)において補正対象とすべき欠陥画素の数が、欠陥画素補正部42の記憶部43に登録可能な欠陥画素数を超える場合、当該記憶部43への登録内容を書き換えつつ、すなわち記憶部43における欠陥画素データの登録内容を変更しつつ、欠陥画素補正部42での欠陥画素補正の動作を繰り返すことから、撮像素子(CCD20)の全ての欠陥画素を補正することができる。詳細には、実施例1では、記憶部43に登録(格納)可能な登録限度数が500であるのに対し、露光時間に応じて必要な補正画素数を、露光時間が2秒の場合の補正画素数を200とし、露光時間が4秒の場合の補正画素数を500とし、露光時間が8秒の場合の補正画素数を700とし、露光時間が16秒の場合の補正画素数を1000としている(図4参照)ことから、露光時間が2秒もしくは4秒の場合、欠陥画素補正部42での欠陥画素補正動作として、ステップS1で取得した露光時間に応じた補正画素数の補正を実行し、露光時間が8秒もしくは16秒の場合、1回目の欠陥画素補正部42での欠陥画素補正動作としてステップS3にて500個の補正優先度の高い欠陥画素の補正を実行し、ステップS3に続く2回目の欠陥画素補正部42での欠陥画素補正動作として、ステップS1で取得した露光時間に応じた補正画素数から、ステップS3で実行した欠陥画素補正の補正画素数500を減算した残りの補正画素数の補正をステップS5にて実行する。このように、欠陥画素補正部42の記憶部43に登録可能な欠陥画素数を超える場合(実施例1では露光時間が8秒もしくは16秒の場合)であっても、その超えた画素数を2回目(設定条件によっては複数回)の欠陥画素補正部42での欠陥画素補正動作により補正するので、補正が必要とされる欠陥画素数と記憶部43の登録限度数との関係に拘らず、撮像素子(CCD20)の全ての欠陥画素を補正することができる。
In step S5, following the preparation of defective pixel correction corresponding to the exposure time in step S4, defective pixel correction corresponding to the exposure time is executed, and the flowchart of FIG. 5 ends. In step S5, the defective pixel correction unit 42 reads out pixel data corresponding to the address of the defective pixel registered in the storage unit 43 in the transmitted image data (each pixel data thereof), and the surrounding RGB filters. In step S4, the number of corrected pixels is corrected according to the preparation for defective pixel correction according to the exposure time in step S4. Specifically, when the exposure time is 2 seconds, 200 defective pixels of the first priority correction pixel group P 1 are corrected, and when the exposure time is 4 seconds, 200 pixels of the first priority correction pixel group P 1 are corrected. performs the defective pixel and a total of 500 correcting defective pixels of the second 300 of the defective pixel of the priority correction pixel group P 2, when the exposure time is 8 seconds, 200 of the third priority correction pixel group P 3 perform the correction of the defective pixel, when the exposure time is 16 seconds, the third 200 and the total of 500 defective pixel with 300 defective pixel of the fourth priority correction pixel group P 4 priority correction pixel group P 3 Perform the correction. At this time, since any defective pixel address data can be registered in the storage unit 43 in any scene, the defective pixel correction unit 42 performs correction according to the exposure time in one defective pixel correction operation. All of the defective pixels of the number of pixels can be corrected. For this reason, in step S5, when the exposure time is 2 seconds or 4 seconds, the correction of the number of correction pixels according to the exposure time acquired in step S1 is performed as the defective pixel correction operation in the first defective pixel correction unit 42. When the exposure time is 8 seconds or 16 seconds, the defective pixel correction operation in the second defective pixel correction unit 42 following step S3 is performed from the correction pixel number corresponding to the exposure time acquired in step S1. Then, the correction of the remaining correction pixel number obtained by subtracting the correction pixel number 500 of the defective pixel correction executed in step S3 is executed without overlapping the pixel data to be corrected.
(Defective pixel correction processing in high-speed shooting processing)
Here, when a high-speed shooting process is necessary (for example, continuous shooting or the like) depending on the shooting mode, the atmosphere at the shooting site, or the like, the defective pixel correction unit 42 repeatedly performs the above-described defective pixel correction process (described above embodiment). If the defective pixel correction operation is performed twice, the processing time for the defective pixel correction becomes a problem. For this reason, in the defective pixel correction processing according to the present invention, when high-speed shooting processing such as continuous shooting is required, it is assumed that pixels with a high defective pixel level (defective pixels with a high correction priority) are corrected with priority. As described above, the defective pixel correction operation in the defective pixel correction unit 42 is performed only once. This is because a pixel having a high defective pixel level is a pixel that tends to appear in an image (image data) as a defective pixel. In this case, for example, when the defective pixel correction operation is executed in step S3 in the flowchart of FIG. 5, the defective pixel correction process is terminated without proceeding to step S4. Accordingly, when high-speed shooting processing such as continuous shooting is required, it is possible to correct defective pixels that are likely to appear in an image (image data) while reducing the processing time required for defective pixel correction.
(Operation of defective pixel correction processing of the present invention)
In the defective pixel correction process of the present invention, as described above, when the number of defective pixels to be corrected in the imaging device (CCD 20) exceeds the number of defective pixels that can be registered in the storage unit 43 of the defective pixel correction unit 42. Since the operation of correcting defective pixels in the defective pixel correction unit 42 is repeated while rewriting the registration content in the storage unit 43, that is, changing the registration content of defective pixel data in the storage unit 43, the imaging element (CCD 20 ) All defective pixels can be corrected. Specifically, in the first embodiment, the registration limit number that can be registered (stored) in the storage unit 43 is 500, but the number of correction pixels necessary according to the exposure time is set to be 2 seconds. The correction pixel number is 200, the correction pixel number when the exposure time is 4 seconds is 500, the correction pixel number when the exposure time is 8 seconds is 700, and the correction pixel number when the exposure time is 16 seconds is 1000. Therefore, when the exposure time is 2 seconds or 4 seconds, the correction of the number of correction pixels according to the exposure time acquired in step S1 is performed as the defective pixel correction operation in the defective pixel correction unit 42. When the exposure time is 8 seconds or 16 seconds, the defect pixel correction operation in the first defective pixel correction unit 42 is performed as a defective pixel correction operation for the first time in step S3, and 500 defective pixels having a high correction priority are corrected. Second defect following S3 As a defective pixel correction operation in the elementary correction unit 42, correction of the remaining correction pixel number by subtracting the correction pixel number 500 of the defective pixel correction executed in step S3 from the correction pixel number corresponding to the exposure time acquired in step S1. Is executed in step S5. Thus, even when the number of defective pixels that can be registered in the storage unit 43 of the defective pixel correction unit 42 is exceeded (in the first embodiment, the exposure time is 8 seconds or 16 seconds), Correction is performed by the defective pixel correction operation in the defective pixel correction unit 42 for the second time (multiple times depending on setting conditions), so regardless of the relationship between the number of defective pixels that need to be corrected and the registration limit number of the storage unit 43. All defective pixels of the image sensor (CCD 20) can be corrected.

また、露光時間に応じて補正対象とする画素数を変更していることから、露光時間に応じた必要な補正画素数だけ補正すること、換言すると過不足のなく適切に補正することができ、欠陥画素の補正不足や過補正に基因する画質の低下を防止することができる。これは、補正不足により、画像(画像データ)において出現する欠陥画素が補正されていないと、画像上にて当該欠陥画素が認識されてしまう虞があり、過補正により、画像(画像データ)において出現しない画素を欠陥画素として補正してしまうと、補正前の画像において問題とはならない画素(およびその周辺)であったにも拘らず当該画素の周辺を実質的に平滑化することによる空間解像度の劣化等を招いてしまう虞があることによる。   Further, since the number of pixels to be corrected is changed according to the exposure time, it is possible to correct only the necessary number of correction pixels according to the exposure time, in other words, it is possible to appropriately correct without excess or deficiency, It is possible to prevent image quality deterioration due to insufficient correction or overcorrection of defective pixels. This is because if defective pixels appearing in the image (image data) are not corrected due to insufficient correction, the defective pixels may be recognized on the image. If a non-appearing pixel is corrected as a defective pixel, the spatial resolution is obtained by substantially smoothing the periphery of the pixel even though it is not a problem pixel (and its periphery) in the image before correction. This is because there is a risk of causing deterioration or the like.

さらに、欠陥画素レベルが高い画素を優先的に補正することから、画像(画像データ)上において欠陥画素と認識され易い画素を優先的に補正することができるので、より効率的に画質を向上させることができる。   Furthermore, since pixels with a high defective pixel level are preferentially corrected, pixels that are easily recognized as defective pixels on the image (image data) can be preferentially corrected, so that the image quality can be improved more efficiently. be able to.

このため、本願発明に係る撮像装置のデジタルカメラ1では、記憶部43での登録限度数に拘らず、補正対象とするすべての欠陥画素を適切に補正することができる。これにより、暗電流が増えたり蓄積されたりする条件、例えば、撮像素子(CCD20)の温度が上昇したり露光時間が長い状況で撮影された画像(画像データ)であっても、その品質を向上させることができる。   For this reason, in the digital camera 1 of the imaging device according to the present invention, it is possible to appropriately correct all defective pixels to be corrected regardless of the registration limit number in the storage unit 43. As a result, even when dark current increases or accumulates, for example, an image (image data) taken in a situation where the temperature of the image sensor (CCD 20) rises or the exposure time is long, the quality is improved. Can be made.

なお、上記した実施例1では、欠陥画素の影響の変化の判断基準を露光時間とし、露光時間に応じた補正画素数が設定されている例を示したが、動的な欠陥要因である温度キズの影響が変化する要因を判断基準として補正画素数を設定するものであればよく、実施例1に限定されるものではない。例えば、ISO感度に応じた補正画素数の設定に基づいて欠陥画素補正処理を行うものとすることができる。この場合、露光時間と同様に、実際にデジタルスチルカメラ(実施例1ではデジタルカメラ1)にセンサ(実施例1ではCCD20)を搭載した状態において、ISO感度100で出現する欠陥画素の数、ISO感度200で出現する欠陥画素の数、・・・・というように、設定された各ISO感度で出現する欠陥画素の数を統計的に把握し、ISO感度に応じて出現する欠陥画素の全てを補正するために充分だと判断できる数を、ISO感度に応じた補正画素数として設定すればよい。この一例として、露光時間がISO100の補正画素数を200とし、ISO200の場合の補正画素数を500とし、ISO400の場合の補正画素数を700とし、ISO800の場合の補正画素数を1000とすることにより、上記した露光時間に対応して補正画素数が設定されている場合と同様に欠陥画素補正処理を行うことができる。この場合であっても、制御部28は、設定されたISO感度に応じた補正画素数での欠陥画素補正処理のために、検出した欠陥画素のアドレス(CCD20上の縦横座標)のデータを、RAM44に格納する。   In the first embodiment described above, an example is shown in which the exposure criterion is used as a criterion for determining the change in the influence of defective pixels, and the number of correction pixels corresponding to the exposure time is set. Any method may be used as long as the number of correction pixels is set based on a factor that changes the influence of scratches as a criterion, and is not limited to the first embodiment. For example, the defective pixel correction process can be performed based on the setting of the number of correction pixels according to the ISO sensitivity. In this case, as with the exposure time, the number of defective pixels appearing with ISO sensitivity 100 in the state where the sensor (CCD 20 in Example 1) is actually mounted on the digital still camera (Digital camera 1 in Example 1), ISO Statistically grasp the number of defective pixels that appear at each set ISO sensitivity, such as the number of defective pixels that appear at a sensitivity of 200, and so on, and identify all defective pixels that appear according to the ISO sensitivity. A number that can be determined to be sufficient for correction may be set as the number of corrected pixels according to ISO sensitivity. As an example of this, the number of correction pixels with an exposure time of ISO 100 is 200, the number of correction pixels with ISO 200 is 500, the number of correction pixels with ISO 400 is 700, and the number of correction pixels with ISO 800 is 1000. Thus, defective pixel correction processing can be performed in the same manner as in the case where the number of correction pixels is set corresponding to the exposure time described above. Even in this case, the control unit 28 uses the data of the detected defective pixel address (vertical and horizontal coordinates on the CCD 20) for the defective pixel correction processing with the number of corrected pixels corresponding to the set ISO sensitivity. Stored in the RAM 44.

また、実施例1では、欠陥画素補正部42の記憶部43に登録可能な欠陥画素数が500であり、かつ露光時間に応じた補正画素数の設定が露光時間16秒の場合の補正画素数1000を最大としていたが、各数値は例示であってこれらに限定されるものではない。すなわち、さらに多くの露光時間の設定がある場合には、それらに応じた欠陥画素数を適宜設定すればよく、記憶部43に登録可能な欠陥画素数や露光時間に対する補正画素数も撮像装置の各設定に応じて変化するものである。ここで、記憶部43に登録可能な欠陥画素数(登録限度数)に対して、露光時間に応じた補正画素数の設定の最大値が2倍を超える場合、ステップS3での1回目の欠陥画素補正部42での欠陥画素補正動作として登録限度数の補正を実行し、ステップS3に続く2回目の欠陥画素補正部42での欠陥画素補正動作として、ステップS1で取得した露光時間に応じた補正画素数に対応する各画素から、ステップS3で実行した欠陥画素補正の補正画素数に対応する各画素の補正の対象外となった各画素のうち登録限度数分の補正優先度の高い欠陥画素の補正を実行し、それに続く3回目の欠陥画素補正部42での欠陥画素補正動作として、ステップS1で取得した露光時間に応じた補正画素数から、上記した2回で実行した欠陥画素補正の補正画素数(登録限度数×2)を減算した残りの補正画素数の補正を実行する等のように、欠陥画素補正部42での登録限度数の画素の欠陥画素補正動作を((設定された補正画素数)/登録限度数)だけ繰り返した後に、残りの補正画素数の補正を実行すればよい。   In the first embodiment, the number of corrected pixels when the number of defective pixels that can be registered in the storage unit 43 of the defective pixel correcting unit 42 is 500 and the setting of the number of corrected pixels according to the exposure time is 16 seconds is used. Although 1000 was set as the maximum, each numerical value is an example and is not limited to these. In other words, when there are more exposure times, the number of defective pixels corresponding to them may be set as appropriate, and the number of defective pixels that can be registered in the storage unit 43 and the number of correction pixels for the exposure time are also set in the imaging apparatus. It changes according to each setting. Here, when the maximum value of the correction pixel number setting corresponding to the exposure time exceeds twice the number of defective pixels (registration limit number) that can be registered in the storage unit 43, the first defect in step S3 The registration limit number is corrected as a defective pixel correction operation in the pixel correction unit 42, and the defect pixel correction operation in the second defective pixel correction unit 42 following step S3 is performed according to the exposure time acquired in step S1. Defects with a high correction priority corresponding to the registration limit number among the pixels that are excluded from correction of each pixel corresponding to the correction pixel number of the defective pixel correction executed in step S3 from each pixel corresponding to the correction pixel number As a defective pixel correction operation in the defective pixel correction unit 42 for the third time after executing the pixel correction, the defective pixel correction performed in the above-described two times from the number of corrected pixels corresponding to the exposure time acquired in step S1. Complement of The defective pixel correction operation of the registration limit number of pixels in the defective pixel correction unit 42 is performed (for example, by performing correction of the remaining correction pixel number by subtracting the pixel number (registration limit number × 2)). After repeating the correction pixel number) / registration limit number), the remaining correction pixel number may be corrected.

次に、本発明の実施例2に係る撮像装置およびそこで行われる欠陥画素補正処理について説明する。この実施例2は、欠陥画素補正処理における処理内容の一部が実施例1とは異なる例である。この実施例2の撮像装置は、基本的な構成は上記した実施例1の撮像装置であるデジタルカメラ1と同様であることから、等しい構成の個所には同じ符号を付し、その詳細な説明は省略する。図7は、各優先補正画素群PNMにおけるRAM44に格納された欠陥画素のアドレス(CCD20上の縦横座標)のデータの個数(欠陥画素のデータ数)等を表で示す図4と同様の説明図である。図8は、取得した画像(画像データ)をS等分した様子を説明するための説明図であり、(a)は4分割した様子を示し、(b)は2分割した様子を示している。 Next, an image pickup apparatus according to Embodiment 2 of the present invention and defective pixel correction processing performed therein will be described. The second embodiment is an example in which part of the processing content in the defective pixel correction process is different from the first embodiment. Since the basic configuration of the image pickup apparatus according to the second embodiment is the same as that of the digital camera 1 that is the image pickup apparatus according to the first embodiment, the same reference numerals are given to portions having the same configuration, and detailed description thereof will be given. Is omitted. FIG. 7 is a description similar to FIG. 4 showing the number of defective pixel addresses (the number of horizontal and vertical coordinates on the CCD 20) stored in the RAM 44 in each priority correction pixel group P NM in a table. FIG. FIGS. 8A and 8B are explanatory diagrams for explaining a state where the acquired image (image data) is divided into S equal parts. FIG. 8A shows a state of being divided into four parts, and FIG. 8B shows a state of being divided into two parts. .

この実施例2の欠陥画素補正処理は、補正する必要のある欠陥画素の個数が記憶部43に登録可能な欠陥画素数(登録限度数)を超える場合であってもすべての当該欠陥画素の補正を可能としつつ、欠陥画素補正部42で欠陥画素補正動作を繰り返すことに伴って処理時間が増大することを抑制するものである。例えば、実施例1のデジタルカメラ1において、ハードウェアでの欠陥画素補正処理を行うブロックとしての欠陥画素補正部42へ10MBの画像データを入力した場合、当該画像データの欠陥画素補正に約80msの処理時間が必要になるものとし、欠陥画素補正部42の記憶部43に登録可能な欠陥画素数500に対して、1500個の欠陥画素を補正するものとする。すると、欠陥画素補正部42では、先ず、10MBの画像データに対して、欠陥画素レベルが高い画素から順に500個の欠陥画素の補正を実行し、次に、10MBの画像データに対して、既に補正した500個を除いた中で欠陥画素レベルが高い画素から順に500個の欠陥画素の補正を実行し、最後に、10MBの画像データに対して、残りの500個の欠陥画素の補正を実行する。このことから、補正する必要のある欠陥画素のすべてを欠陥画素補正するために、欠陥画素補正部42での10MBの画像データに対する欠陥画素補正動作の3回分の処理時間(約80ms×3=約240ms)を要することとなる。   The defective pixel correction process according to the second embodiment corrects all the defective pixels even when the number of defective pixels that need to be corrected exceeds the number of defective pixels that can be registered in the storage unit 43 (registration limit number). In this case, the processing time is prevented from increasing as the defective pixel correction unit 42 repeats the defective pixel correction operation. For example, in the digital camera 1 according to the first embodiment, when 10 MB of image data is input to the defective pixel correction unit 42 as a block that performs a defective pixel correction process using hardware, the defective pixel correction of the image data takes about 80 ms. It is assumed that processing time is required, and 1500 defective pixels are corrected with respect to 500 defective pixels that can be registered in the storage unit 43 of the defective pixel correction unit 42. Then, in the defective pixel correction unit 42, first, correction of 500 defective pixels is performed on the 10 MB image data in order from the pixel having the highest defective pixel level, and then the 10 MB image data is already corrected. 500 defective pixels are corrected in order from the pixel with the highest defective pixel level except for the corrected 500 pixels, and finally the remaining 500 defective pixels are corrected for 10 MB of image data. To do. From this, in order to correct all defective pixels that need to be corrected, the defective pixel correction unit 42 performs processing for three defective pixel correction operations on the 10 MB image data (about 80 ms × 3 = about 240 ms).

実施例2の欠陥画素補正処理では、撮像素子(CCD20)において、欠陥画素補正部の記憶部に登録(格納)可能な欠陥画素数を超える欠陥画素が存在する場合(設定した補正画素数が登録限度数を超える場合)であっても、その全てを欠陥画素補正することを可能としつつ、その欠陥画素補正に要する処理時間の増大を抑制するものである。   In the defective pixel correction process according to the second embodiment, in the imaging device (CCD 20), when there are defective pixels exceeding the number of defective pixels that can be registered (stored) in the storage unit of the defective pixel correction unit (the set number of corrected pixels is registered). Even when the number exceeds the limit number), it is possible to correct all of the defective pixels, while suppressing an increase in processing time required for the defective pixel correction.

先ず、実施例2の欠陥画素補正処理のために、実施例1と同様に、設定された各露光時間で出現する欠陥画素の数を統計的に把握し、露光時間に応じて出現する欠陥画素の全てを補正するために充分だと判断できる数を、露光時間に応じた補正画素数として設定する。この実施例2では、露光時間が2秒の場合の補正画素数を200とし、露光時間が4秒の場合の補正画素数を500とし、露光時間が8秒の場合の補正画素数を800とし、露光時間が16秒の場合の補正画素数を1200とし、露光時間が32秒の場合の補正画素数を2000としている(図7参照)。この露光時間に応じた補正画素数は、RAM44に格納されている。   First, for the defective pixel correction process of the second embodiment, as in the first embodiment, the number of defective pixels appearing at each set exposure time is statistically grasped, and the defective pixels appearing according to the exposure time. The number that can be determined to be sufficient to correct all of the above is set as the number of corrected pixels according to the exposure time. In the second embodiment, the correction pixel number when the exposure time is 2 seconds is 200, the correction pixel number when the exposure time is 4 seconds is 500, and the correction pixel number when the exposure time is 8 seconds is 800. The number of corrected pixels when the exposure time is 16 seconds is 1200, and the number of corrected pixels when the exposure time is 32 seconds is 2000 (see FIG. 7). The number of corrected pixels corresponding to the exposure time is stored in the RAM 44.

ここで、制御部28は、露光時間に応じた補正画素数の最大値が2000に設定されていることから、この2000個の欠陥画素のすべてを、記憶部43に登録可能な欠陥画素数が500である欠陥画素補正部42で補正するには、4回(2000/500)の欠陥画素補正動作を行う必要があることに基づいて、分割数Sの最大値を4に設定する。この分割数Sとは、図8に示すように、CCD20により取得された1つの画像データにおいて、欠陥画素補正部42での1回の欠陥画素補正動作における対象となる領域すなわちデータ量を設定するために当該画像データを等分する数であり、実施例2では1、2、4のいずれかに設定される。この分割は、欠陥画素補正部42による欠陥画素補正を可能とすべく画像データ(データ量)を等分する。この実施例2では、欠陥画素補正部42での欠陥画素補正動作が、基本的に注目した欠陥画素の水平方向に隣接する両隣の画素データの平均値を当該注目した欠陥画素の画素データとすることにより補間するものであることから、図8に示すように、画像データにおける等分線が水平方向となるように当該画像データを垂直方向に等分する。   Here, since the maximum value of the correction pixel number corresponding to the exposure time is set to 2000, the control unit 28 sets the number of defective pixels that can be registered in the storage unit 43 for all the 2000 defective pixels. In order to correct by the defective pixel correction unit 42 which is 500, it is necessary to perform the defective pixel correction operation four times (2000/500), and the maximum value of the division number S is set to 4. As shown in FIG. 8, the division number S sets a target area, that is, a data amount in one defective pixel correction operation in the defective pixel correction unit 42 in one image data acquired by the CCD 20. Therefore, the number of the image data is equally divided and is set to any one of 1, 2, and 4 in the second embodiment. This division equally divides the image data (data amount) so that defective pixel correction by the defective pixel correction unit 42 is possible. In the second embodiment, the defective pixel correction operation in the defective pixel correction unit 42 basically uses the average value of the adjacent pixel data in the horizontal direction of the defective pixel of interest as the pixel data of the defective pixel of interest. Therefore, as shown in FIG. 8, the image data is equally divided in the vertical direction so that the equal lines in the image data are in the horizontal direction.

制御部28は、設定された露光時間に応じた補正画素数での欠陥画素補正処理のために、実施例2では、検出した欠陥画素のアドレス(CCD20上の縦横座標)のデータを、それぞれの欠陥画素レベルおよび設定された露光時間に関連付けて、以下のようにRAM44に格納する。   In the second embodiment, the control unit 28 converts the data of the detected defective pixel address (vertical and horizontal coordinates on the CCD 20) into each of the defective pixel correction processing with the number of corrected pixels corresponding to the set exposure time. In association with the defective pixel level and the set exposure time, it is stored in the RAM 44 as follows.

実施例2での基本的な欠陥画素の検出方法は、実施例1と同様であるが、上述したように、分割数Sの最大値を4に設定したことから、4つの領域に分割した画像データ毎(以下、後述する分割画像データI41(分割画像A)、分割画像データI42(分割画像B)、分割画像データI43(分割画像C)、分割画像データI44(分割画像D)とする(図8(a)参照))に各優先補正画素群PNMを取得する。ここで、Nは、欠陥画素レベルが高い順からの優先番号を表すもの、すなわち各画像データにおいて補正対象となる各群の優先度を表すものであり、実施例1の第N優先補正画素群PでのNに相当するものである。実施例2では、露光時間の設定が2、4、8、16、32秒の5つであることから、順に、1、2、3、4、5を当て嵌めている。また、Mは、各N番目の群において4分割されたいずれの分割画像A、B、C、Dに該当するものであるかを表すものであり、A、B、C、Dの順に1、2、3、4を当て嵌めている。 The basic method for detecting defective pixels in the second embodiment is the same as that in the first embodiment. However, as described above, since the maximum value of the number of divisions S is set to 4, an image divided into four areas is used. For each data (hereinafter, divided image data I 41 (divided image A), divided image data I 42 (divided image B), divided image data I 43 (divided image C), divided image data I 44 (divided image D), which will be described later. (See FIG. 8A)), each priority correction pixel group PNM is acquired. Here, N represents a priority number in order from the highest defective pixel level, that is, represents a priority of each group to be corrected in each image data. The Nth priority correction pixel group in the first embodiment. This corresponds to N in PN. In the second embodiment, there are five exposure time settings of 2, 4, 8, 16, and 32 seconds, so that 1, 2, 3, 4, and 5 are applied in order. M represents which of the divided images A, B, C, and D divided into four in each N-th group, and 1 in the order of A, B, C, and D. 2, 3, 4 are fitted.

先ず、図7に示すように、CCD20の全ての画素が4つの領域に分割された各分割画像A、B、C、D(図8(a)参照)において、それらの各画素の中から、欠陥画素レベルが高い画素から順に50個の画素を欠陥画素として検出し、分割画像Aでの第1優先補正画素群P11の欠陥画素のアドレスデータと、分割画像Bでの第1優先補正画素群P12の欠陥画素のアドレスデータと、分割画像Cでの第1優先補正画素群P13の欠陥画素のアドレスデータと、分割画像Dでの第1優先補正画素群P14の欠陥画素のアドレスデータとして、RAM44に格納する。ここで、第1優先補正画素群P11として検出された50個の欠陥画素と、第1優先補正画素群P12として検出された50個の欠陥画素と、第1優先補正画素群P13として検出された50個の欠陥画素と、第1優先補正画素群P14として検出された50個の欠陥画素とを合わせたものが、露光時間が2秒の場合に補正する200個の欠陥画素となる(第1優先補正画素群Pとする)。 First, as shown in FIG. 7, in each of the divided images A, B, C, and D (see FIG. 8A) in which all the pixels of the CCD 20 are divided into four regions, from among these pixels, 50 pixels in the order of the defective pixel level from a high pixel detected as a defective pixel, the address data of the defective pixel of the first priority correction pixel group P 11 in the divided image a, the first priority correction pixel in the divided image B and the address data of the defective pixel group P 12, and the address data of the defective pixel of the first priority correction pixel group P 13 in the divided image C, the address of the defective pixel of the first priority correction pixel group P 14 in the divided image D The data is stored in the RAM 44 as data. Here, the 50 pieces of defective pixels detected as a first priority correction pixel group P 11, and 50 defective pixels detected as a first priority correction pixel group P 12, as a first priority correction pixel group P 13 A combination of the 50 defective pixels detected and the 50 defective pixels detected as the first priority correction pixel group P 14 includes 200 defective pixels to be corrected when the exposure time is 2 seconds. It becomes (first priority correction pixels is defined as P 1).

次に、各分割画像A、B、C、Dの各画素の中から、欠陥画素レベルが高い画素から順に125個の画素を欠陥画素として検出し、その検出した125個の画素から、対応する各第1優先補正画素群P1M(M=1〜4)の50個の欠陥画素を除いたものを欠陥画素として選出し、第2優先補正画素群P2M(M=1〜4)の欠陥画素のアドレスデータとして、RAM44に格納する。これらの、第2優先補正画素群P21として検出された75個の欠陥画素と、第2優先補正画素群P22として検出された75個の欠陥画素と、第2優先補正画素群P23として検出された75個の欠陥画素と、第2優先補正画素群P24として検出された75個の欠陥画素とを合わせたもの(第2優先補正画素群Pとする)は、上記した第1優先補正画素群Pの200個の欠陥画素を加算することにより、露光時間が4秒の場合に補正する500個の欠陥画素となる。また、本願発明に係る欠陥画素補正処理では、欠陥画素補正部42の記憶部43に登録(格納)可能な欠陥画素数を、欠陥画素レベルが高い方から順に補正優先度の高い欠陥画素として設定することから、実施例2では、欠陥画素補正部42の記憶部43に登録(格納)可能な欠陥画素数が500であるので、露光時間が4秒の場合に補正する500個の欠陥画素が、そのまま補正優先度の高い欠陥画素となる。この補正優先度の高い欠陥画素は、実施例1と同様に、連写等の高速な撮影処理が必要な場合に欠陥画素補正部42で欠陥画素補正動作を1回だけ行う際に用いられる。 Next, 125 pixels are detected as defective pixels in order from the pixel having the highest defective pixel level from among the pixels of each of the divided images A, B, C, and D, and corresponding from the detected 125 pixels. The first priority correction pixel group P 1M (M = 1 to 4) except 50 defective pixels is selected as a defective pixel, and the second priority correction pixel group P 2M (M = 1 to 4) is defective. It is stored in the RAM 44 as pixel address data. These 75 defective pixels detected as the second priority correction pixel group P 21 , 75 defective pixels detected as the second priority correction pixel group P 22 , and the second priority correction pixel group P 23 A combination of the 75 defective pixels detected and the 75 defective pixels detected as the second priority correction pixel group P 24 (referred to as the second priority correction pixel group P 2 ) is the first priority described above. by adding 200 defective pixel of the priority correction pixel group P 1, a 500 defective pixel exposure time is corrected in the case of 4 seconds. Further, in the defective pixel correction processing according to the present invention, the number of defective pixels that can be registered (stored) in the storage unit 43 of the defective pixel correction unit 42 is set as a defective pixel having a higher correction priority in order from the highest defective pixel level. Therefore, in Example 2, since the number of defective pixels that can be registered (stored) in the storage unit 43 of the defective pixel correction unit 42 is 500, 500 defective pixels to be corrected when the exposure time is 4 seconds. As such, it becomes a defective pixel having a high correction priority. As in the first embodiment, this defective pixel having a high correction priority is used when the defective pixel correction unit 42 performs the defective pixel correction operation only once when high-speed shooting processing such as continuous shooting is required.

次に、各分割画像A、B、C、Dの各画素の中から、欠陥画素レベルが高い画素から順に200個の画素を欠陥画素として検出し、その検出した200個の画素から、対応する各第1優先補正画素群P1M(M=1〜4)の50個の欠陥画素および各第2優先補正画素群P2M(M=1〜4)の75個の欠陥画素を除いたものを欠陥画素として選出し、第3優先補正画素群P3M(M=1〜4)の欠陥画素のアドレスデータとして、RAM44に格納する。これらの、第3優先補正画素群P31として検出された75個の欠陥画素と、第3優先補正画素群P32として検出された75個の欠陥画素と、第3優先補正画素群P33として検出された75個の欠陥画素と、第3優先補正画素群P34として検出された75個の欠陥画素とを合わせたもの(第3優先補正画素群Pとする)は、上記した第1優先補正画素群Pの200個の欠陥画素および第2優先補正画素群Pの300個の欠陥画素を加算することにより、露光時間が8秒の場合に補正する800個の欠陥画素となる。 Next, 200 pixels are detected as defective pixels in order from the pixel having the highest defective pixel level among the pixels of each of the divided images A, B, C, and D, and the corresponding pixels are detected from the detected 200 pixels. Excluding 50 defective pixels in each first priority correction pixel group P 1M (M = 1 to 4) and 75 defective pixels in each second priority correction pixel group P 2M (M = 1 to 4) The defective pixel is selected and stored in the RAM 44 as address data of the defective pixel of the third priority correction pixel group P 3M (M = 1 to 4). These 75 defective pixels detected as the third priority correction pixel group P 31 , 75 defective pixels detected as the third priority correction pixel group P 32 , and the third priority correction pixel group P 33 A combination of the 75 defective pixels detected and the 75 defective pixels detected as the third priority correction pixel group P 34 (referred to as a third priority correction pixel group P 3 ) is the first one described above. by adding 200 300 of the defective pixels of the defective pixel and a second priority correction pixel group P 2 priority correction pixel group P 1, a 800 amino defective pixel exposure time is corrected in the case of 8 seconds .

次に、各分割画像A、B、C、Dの各画素の中から、欠陥画素レベルが高い画素から順に300個の画素を欠陥画素として検出し、その検出した300個の画素から、対応する各第1優先補正画素群P1M(M=1〜4)の50個の欠陥画素、各第2優先補正画素群P2M(M=1〜4)の75個の欠陥画素および各第3優先補正画素群P3M(M=1〜4)の75個の欠陥画素を除いたものを欠陥画素として選出し、第4優先補正画素群P4M(M=1〜4)の欠陥画素のアドレスデータとして、RAM44に格納する。これらの、第4優先補正画素群P41として検出された100個の欠陥画素と、第4優先補正画素群P42として検出された100個の欠陥画素と、第4優先補正画素群P43として検出された100個の欠陥画素と、第4優先補正画素群P44として検出された100個の欠陥画素とを合わせたもの(第4優先補正画素群Pとする)は、上記した第1優先補正画素群Pの200個の欠陥画素、第2優先補正画素群Pの300個の欠陥画素および第3優先補正画素群Pの300個の欠陥画素を加算することにより、露光時間が16秒の場合に補正する1200個の欠陥画素となる。 Next, among the pixels of each of the divided images A, B, C, and D, 300 pixels are detected as defective pixels in order from the pixel having the highest defective pixel level, and the corresponding pixels are detected from the detected 300 pixels. 50 defective pixels in each first priority correction pixel group P 1M (M = 1 to 4), 75 defective pixels in each second priority correction pixel group P 2M (M = 1 to 4), and each third priority A pixel excluding 75 defective pixels in the correction pixel group P 3M (M = 1 to 4) is selected as a defective pixel, and address data of defective pixels in the fourth priority correction pixel group P 4M (M = 1 to 4). Is stored in the RAM 44. These 100 defective pixels detected as the fourth priority correction pixel group P 41 , 100 defective pixels detected as the fourth priority correction pixel group P 42 , and the fourth priority correction pixel group P 43 A combination of the 100 defective pixels detected and the 100 defective pixels detected as the fourth priority correction pixel group P 44 (referred to as the fourth priority correction pixel group P 4 ) is the first one described above. 200 defective pixel of the priority correction pixel group P 1, by adding 300 of the defective pixel of the second priority correction pixel group P 2 of 300 defective pixel, and the third priority correction pixel group P 3, the exposure time When there are 16 seconds, 1200 defective pixels are corrected.

次に、各分割画像A、B、C、Dの各画素の中から、欠陥画素レベルが高い画素から順に500個の画素を欠陥画素として検出し、その検出した500個の画素から、対応する各第1優先補正画素群P1M(M=1〜4)の50個の欠陥画素、各第2優先補正画素群P2M(M=1〜4)の75個の欠陥画素、各第3優先補正画素群P3M(M=1〜4)の75個の欠陥画素および各第4優先補正画素群P4M(M=1〜4)の100個の欠陥画素を除いたものを欠陥画素として選出し、第5優先補正画素群P5M(M=1〜4)の欠陥画素のアドレスデータとして、RAM44に格納する。これらの、第5優先補正画素群P51として検出された200個の欠陥画素と、第5優先補正画素群P52として検出された200個の欠陥画素と、第5優先補正画素群P53として検出された200個の欠陥画素と、第5優先補正画素群P54として検出された200個の欠陥画素とを合わせたもの(第5優先補正画素群Pとする)は、上記した第1優先補正画素群Pの200個の欠陥画素、第2優先補正画素群Pの300個の欠陥画素、第3優先補正画素群Pの300個の欠陥画素および第4優先補正画素群Pの400個の欠陥画素を加算することにより、露光時間が32秒の場合に補正する2000個の欠陥画素となる。 Next, among the pixels of each of the divided images A, B, C, and D, 500 pixels are detected as defective pixels in order from the pixel having the highest defective pixel level, and the corresponding pixels are detected from the detected 500 pixels. 50 defective pixels of each first priority correction pixel group P 1M (M = 1 to 4), 75 defective pixels of each second priority correction pixel group P 2M (M = 1 to 4), each third priority A pixel excluding 75 defective pixels of the correction pixel group P 3M (M = 1 to 4) and 100 defective pixels of each fourth priority correction pixel group P 4M (M = 1 to 4) is selected as a defective pixel. Then, it is stored in the RAM 44 as address data of defective pixels of the fifth priority correction pixel group P 5M (M = 1 to 4). These, and 200 defective pixels detected as the fifth priority correction pixel group P 51, and 200 of the defective pixels detected as the fifth priority correction pixel group P 52, as the fifth priority correction pixel group P 53 A combination of the detected 200 defective pixels and the 200 defective pixels detected as the fifth priority correction pixel group P 54 (referred to as a fifth priority correction pixel group P 5 ) is the first one described above. 200 defective pixel of the priority correction pixel group P 1, 300 pieces of defective pixels of the second priority correction pixel group P 2, the third priority 300 of the defective pixel of the corrected pixel group P 3 and the fourth priority correction pixel group P By adding 400 defective pixels of 4 , 2000 defective pixels are corrected when the exposure time is 32 seconds.

実施例2の制御部28では、上述したようにRAM44に格納した各優先補正画素群PNM(N=1〜5、M=1〜4)のアドレスデータ(図7参照)すなわち各欠陥画素データを利用して、欠陥画素補正処理を行う。図9は、この制御部28にて実行される実施例2の欠陥画素補正処理内容を示すフローチャートであり、図10は、図9のフローチャートにおけるステップS24の処理内容を示すフローチャートである。以下、図9のフローチャートの各ステップ(図10のフローチャートの各ステップも含む)について図7を用いて説明する。 In the control unit 28 according to the second embodiment, as described above, address data (see FIG. 7) of each priority correction pixel group P NM (N = 1 to 5, M = 1 to 4) stored in the RAM 44, that is, each defective pixel data. Is used to perform defective pixel correction processing. FIG. 9 is a flowchart showing details of defective pixel correction processing of the second embodiment executed by the control unit 28, and FIG. 10 is a flowchart showing processing details of step S24 in the flowchart of FIG. Hereinafter, each step of the flowchart of FIG. 9 (including each step of the flowchart of FIG. 10) will be described with reference to FIG.

ステップS21では、設定された露光時間を取得して、ステップS22へ進む。このステップS21では、図5のフローチャートのステップS1と同様に、レリーズ2が押し下げられて撮影動作が開始されると、それにより得ることが可能となる当該撮影時の露光時間の情報を取得する。   In step S21, the set exposure time is acquired, and the process proceeds to step S22. In step S21, as in step S1 of the flowchart of FIG. 5, when the release 2 is pushed down and the photographing operation is started, information on the exposure time at the time of photographing that can be obtained is acquired.

ステップS22では、ステップS21での露光時間の取得に続き、取得した露光時間に応じた補正画素数を読み出して、ステップS23へ進む。このステップS22では、RAM44に格納された露光時間に応じた補正画素数を読み出す。   In step S22, following the acquisition of the exposure time in step S21, the number of corrected pixels corresponding to the acquired exposure time is read, and the process proceeds to step S23. In this step S22, the number of corrected pixels corresponding to the exposure time stored in the RAM 44 is read out.

ステップS23では、ステップS22での露光時間に応じた補正画素数の読み出しに続き、取得した露光時間に対応する分割数Sを設定して、ステップS24へ進む。このステップS23では、読み出した露光時間に応じた補正画素数を、記憶部43に登録可能な欠陥画素数(500)で除算し、その商が1以下であれば分割数Sを1に、商が1よりも大きく2以下であれば分割数Sを2に、商が2よりも大きければ分割数Sを4に設定する。すなわち、露光時間に応じた補正画素数のすべてを欠陥画素補正部42で補正するために必要となる欠陥画素補正動作の回数を、分割数S(S=1、2、4)として設定する。なお、基本的には、読み出した露光時間に応じた補正画素数を、記憶部43の登録限度数(実施例2では500)で除算し、その商の小数点以下を切り上げた値を分割数Sとするものであるが、実施例2では分割数Sの設定が1、2、4のいずれかとされていることから、切り上げた数値が3である場合であっても分割数Sは4に設定する。具体的には、露光時間が2秒の場合の分割数Sを1とし、露光時間が4秒の場合の分割数Sを1とし、露光時間が8秒の場合の分割数Sを2とし(図8(b)参照)、露光時間が16秒の場合の分割数Sを4とし、露光時間が32秒の場合の分割数Sを4としている(図8(a)参照)。また、このステップS23では、カウンタ数Cを1に設定する。このカウンタ数Cは、分割数Sで等分された各分割画像(分割数4の場合A、B、C、D(図8(a)参照)、分割数2の場合E、F(図8(b)参照))の画像データ(分割画像データISC(S:分割数、C:カウンタ数))の何れに該当するものであるかを表すものであり、A、B、C、D(もしくはE、F)の順に1、2、3、4(もしくは1、2)を当て嵌めている。このため、分割数Sが2の場合、画像データは、分割画像Eの分割画像データI21と分割画像Fの分割画像データI22とに分割され(図8(b)参照)、分割数Sが4の場合、画像データは、分割画像Aの分割画像データI41と、分割画像Bの分割画像データI42と、分割画像Cの分割画像データI43と、分割画像Dの分割画像データI44とに分割される(図8(a)参照)。 In step S23, following the readout of the number of corrected pixels corresponding to the exposure time in step S22, a division number S corresponding to the acquired exposure time is set, and the process proceeds to step S24. In this step S23, the number of corrected pixels corresponding to the read exposure time is divided by the number of defective pixels (500) that can be registered in the storage unit 43. If the quotient is 1 or less, the division number S is set to 1. If S is greater than 1 and less than or equal to 2, the division number S is set to 2, and if the quotient is greater than 2, the division number S is set to 4. In other words, the number of defective pixel correction operations required to correct all the correction pixel numbers according to the exposure time by the defective pixel correction unit 42 is set as the division number S (S = 1, 2, 4). Basically, the number of corrected pixels corresponding to the read exposure time is divided by the registration limit number (500 in the second embodiment) in the storage unit 43, and the value obtained by rounding up the decimal point of the quotient is the division number S. However, since the division number S is set to any one of 1, 2, and 4 in the second embodiment, the division number S is set to 4 even when the rounded-up numerical value is 3. To do. Specifically, the division number S when the exposure time is 2 seconds is 1, the division number S when the exposure time is 4 seconds, and the division number S when the exposure time is 8 seconds is 2. The division number S when the exposure time is 16 seconds is 4 and the division number S when the exposure time is 32 seconds is 4 (see FIG. 8A). In step S23, the counter number C is set to 1. The counter number C is equal to each divided image divided by the division number S (A, B, C, and D (see FIG. 8A) when the division number is 4), and E and F when the division number is 2 (FIG. 8). (B))) of the image data (divided image data I SC (S: number of divisions, C: number of counters)), A, B, C, D ( Alternatively, 1, 2, 3, 4 (or 1, 2) are applied in the order of E, F). Therefore, when the division number S is 2, the image data is divided into the divided image data I 21 of the divided image E and the divided image data I 22 of the divided image F (see FIG. 8B). Is divided image data I 41 of the divided image A, divided image data I 42 of the divided image B, divided image data I 43 of the divided image C, and divided image data I of the divided image D. 44 (see FIG. 8A).

ステップS24では、ステップS23での分割数Sの設定、あるいは、ステップS27でのカウンタ数Cのインクリメントに続き、その分割数Sおよび露光時間に応じた欠陥画素補正の準備を行って、ステップS25へ進む。このステップS24では、ステップS21で取得した露光時間に応じた補正画素数の画素を補正する(実質的に補正画素数を設定する)ために、各優先補正画素群PNM(N=1〜5、M=1〜4)のアドレスデータをRAM44から適宜読み出して、欠陥画素補正部42の記憶部43に登録(格納)することにより、露光時間に応じた欠陥画素補正の準備を行う(これを処理Bとする)。以下では、この露光時間に応じた欠陥画素補正の準備(ステップS24)における処理内容を示す図10のフローチャートの各ステップについて説明する。 In step S24, following the setting of the division number S in step S23 or the increment of the counter number C in step S27, preparation for defective pixel correction according to the division number S and the exposure time is performed, and the flow proceeds to step S25. move on. In step S24, each of the priority correction pixel groups P NM (N = 1 to 5) is used to correct the pixels having the correction pixel number corresponding to the exposure time acquired in step S21 (substantially set the correction pixel number). , M = 1 to 4) is appropriately read out from the RAM 44 and registered (stored) in the storage unit 43 of the defective pixel correction unit 42 to prepare for defective pixel correction according to the exposure time (this) Process B). In the following, each step of the flowchart of FIG. 10 showing the processing content in preparation for defective pixel correction according to the exposure time (step S24) will be described.

ステップS31では、ステップS21で取得した露光時間が2秒であるか否かを判定し、Yesの場合はステップS32へ進み、Noの場合はステップS33へ進む。   In step S31, it is determined whether or not the exposure time acquired in step S21 is 2 seconds. If Yes, the process proceeds to step S32. If No, the process proceeds to step S33.

ステップS32では、ステップS31での露光時間が2秒であるとの判断に続き、2秒の露光時間に応じた欠陥画素補正の準備を行って、処理B(ステップS24)を終了し、ステップS25(図9参照)へと進む。ここで、露光時間が2秒である場合、図9のフローチャートのステップS23において、分割数Sが1に設定されている場面である。このステップS32では、2秒の露光時間に応じた欠陥画素補正の準備として、分割数1であることからそのまま画像データとなる分割画像データI11におけるすべての欠陥画素の補正のために、第1優先補正画素群P1M(M=1〜4)の各50個の欠陥画素のアドレスデータ(図7参照)の計200個の欠陥画素のアドレスデータをRAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。 In step S32, following the determination that the exposure time in step S31 is 2 seconds, preparation for defective pixel correction corresponding to the exposure time of 2 seconds is made, and the process B (step S24) is terminated, and step S25 is completed. Proceed to (see FIG. 9). Here, when the exposure time is 2 seconds, the number of divisions S is set to 1 in step S23 of the flowchart of FIG. In the step S32, preparation of the defective pixel correction corresponding to the 2-second exposure time, to correct all of the defective pixel in the divided image data I 11 made directly to the image data since it is divided number 1, first The address data of a total of 200 defective pixels of the address data (see FIG. 7) of 50 defective pixels of the priority correction pixel group P 1M (M = 1 to 4) is read from the RAM 44 and Register (store) in the storage unit 43.

ステップS33では、ステップS31での露光時間が2秒ではないとの判断に続き、ステップS21で取得した露光時間が4秒であるか否かを判定し、Yesの場合はステップS34へ進み、Noの場合はステップS35へ進む。   In step S33, following the determination that the exposure time in step S31 is not 2 seconds, it is determined whether or not the exposure time acquired in step S21 is 4 seconds. If yes, the process proceeds to step S34. In this case, the process proceeds to step S35.

ステップS34では、ステップS33での露光時間が4秒であるとの判断に続き、4秒の露光時間に応じた欠陥画素補正の準備を行って、処理B(ステップS24)を終了し、ステップS25(図9参照)へと進む。ここで、露光時間が4秒である場合、図9のフローチャートのステップS23において、分割数Sが1に設定されている場面である。このステップS34では、4秒の露光時間に応じた欠陥画素補正の準備として、分割数1であることからそのまま画像データとなる分割画像データI11におけるすべての欠陥画素の補正のために、第1優先補正画素群P1M(M=1〜4)の各50個の欠陥画素のアドレスデータおよび第2優先補正画素群P2M(M=1〜4)の各75個の欠陥画素のアドレスデータ(図7参照)、の計500個の欠陥画素のアドレスデータをRAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。 In step S34, following the determination that the exposure time in step S33 is 4 seconds, preparation for defective pixel correction corresponding to the exposure time of 4 seconds is made, and the process B (step S24) is terminated, and step S25 is completed. Proceed to (see FIG. 9). Here, when the exposure time is 4 seconds, the division number S is set to 1 in step S23 of the flowchart of FIG. In the step S34, preparation of the defective pixel correction corresponding to 4 seconds exposure time, to correct all of the defective pixel in the divided image data I 11 made directly to the image data since it is divided number 1, first Address data of 50 defective pixels of the priority correction pixel group P 1M (M = 1 to 4) and address data of 75 defective pixels of the second priority correction pixel group P 2M (M = 1 to 4) ( 7), the address data of 500 defective pixels is read from the RAM 44 and registered (stored) in the storage unit 43 of the defective pixel correction unit 42.

ステップS35では、ステップS33での露光時間が4秒ではないとの判断に続き、ステップS21で取得した露光時間が8秒であるか否かを判定し、Yesの場合はステップS36へ進み、Noの場合はステップS39へ進む。   In step S35, following the determination that the exposure time in step S33 is not 4 seconds, it is determined whether or not the exposure time acquired in step S21 is 8 seconds. If Yes, the process proceeds to step S36. In this case, the process proceeds to step S39.

ステップS36では、ステップS35での露光時間が8秒であるとの判断に続き、カウンタ数Cが1であるか否かを判定し、Yesの場合はステップS37へ進み、Noの場合はステップS38へ進む。これは、露光時間が8秒である場合、図9のフローチャートのステップS23において、分割数Sが2に設定されている場面であることから、後述するように、図9のフローチャートのステップS24からステップS27を経てステップS24へと戻る流れにおいてカウンタ数Cが1から2へと増加されて(ステップS27)分割画像Eおよび分割画像F(図8(b)参照)のそれぞれについて欠陥画素補正部42で欠陥画素補正動作を実行することとなるので、カウンタ数Cによって8秒の露光時間に応じた欠陥画素補正の準備が異なることによる。   In step S36, following the determination that the exposure time in step S35 is 8 seconds, it is determined whether or not the counter number C is 1, the process proceeds to step S37 if Yes, and in step S38 if No. Proceed to This is a scene where the number of divisions S is set to 2 in step S23 of the flowchart of FIG. 9 when the exposure time is 8 seconds. As will be described later, from step S24 of the flowchart of FIG. In the flow returning to step S24 via step S27, the counter number C is increased from 1 to 2 (step S27), and the defective pixel correction unit 42 for each of the divided image E and the divided image F (see FIG. 8B). This is because the defective pixel correction operation is executed in accordance with the number of counters C and the preparation for defective pixel correction corresponding to the exposure time of 8 seconds differs.

ステップS37では、ステップS36でのカウンタ数Cが1であるとの判断に続き、8秒の露光時間に応じた分割画像E(図8(b)参照)の欠陥画素補正の準備を行って、処理B(ステップS24)を終了し、ステップS25(図9参照)へと進む。このステップS37では、8秒の露光時間に応じた分割画像E(図8(b)参照)の欠陥画素補正の準備として、画像データの半分となる分割画像データI21におけるすべての欠陥画素の補正のために、8秒の露光時間に対応する優先番号(N=1〜3)であって画像データが2分割された分割画像E(分割画像Aおよび分割画像B)に対応する番号(M=1、2)である第N優先補正画素群PNM(N=1〜3、M=1〜2)の各欠陥画素のアドレスデータ(図7参照)をRAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。すなわち、第1優先補正画素群P1M(1〜2)の両50個の欠陥画素のアドレスデータ、第2優先補正画素群P2M(1〜2)の両75個の欠陥画素のアドレスデータおよび第3優先補正画素群P3M(1〜2)の両75個の欠陥画素のアドレスデータ(図7参照)、の計400個の欠陥画素のアドレスデータをRAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。 In step S37, following the determination that the counter number C is 1 in step S36, preparation for defective pixel correction of the divided image E (see FIG. 8B) corresponding to an exposure time of 8 seconds is performed. The process B (step S24) is ended, and the process proceeds to step S25 (see FIG. 9). In the step S37, preparation for defective pixel correction of the divided image E corresponding to 8 seconds exposure time (see FIG. 8 (b)), the correction of all defective pixels in the divided image data I 21 to be half of the image data Therefore, a priority number (N = 1 to 3) corresponding to an exposure time of 8 seconds and a number corresponding to a divided image E (divided image A and divided image B) obtained by dividing the image data into two (M = 1, 2), the address data (see FIG. 7) of each defective pixel of the Nth priority correction pixel group P NM (N = 1 to 3, M = 1 to 2) is read from the RAM 44, and the defective pixel correction unit 42 Is registered (stored) in the storage unit 43. That is, the address data of both 50 defective pixels of the first priority correction pixel group P 1M (1-2), the address data of both 75 defective pixels of the second priority correction pixel group P 2M (1-2), and Address data of a total of 400 defective pixels, that is, address data (see FIG. 7) of both 75 defective pixels of the third priority correction pixel group P 3M (1-2) is read from the RAM 44, and the defective pixel correction unit 42 is read out. Is registered (stored) in the storage unit 43.

ステップS38では、ステップS36でのカウンタ数Cが1ではないとの判断に続き、8秒の露光時間に応じた分割画像F(図8(b)参照)の欠陥画素補正の準備を行って、処理B(ステップS24)を終了し、ステップS25(図9参照)へと進む。このステップS38では、8秒の露光時間に応じた分割画像F(図8(b)参照)の欠陥画素補正の準備として、画像データの半分となる分割画像データI22におけるすべての欠陥画素の補正のために、8秒の露光時間に対応する優先番号(N=1〜3)であって画像データが2分割された分割画像F(分割画像Cと分割画像D)に対応する番号(M=3、4)である第N優先補正画素群PNM(N=1〜3、M=3〜4)の各欠陥画素のアドレスデータ(図7参照)をRAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。すなわち、第1優先補正画素群P1M(3〜4)の両50個の欠陥画素のアドレスデータ、第2優先補正画素群P2M(3〜4)の両75個の欠陥画素のアドレスデータおよび第3優先補正画素群P3M(3〜4)の両75個の欠陥画素のアドレスデータ(図7参照)、の計400個の欠陥画素のアドレスデータをRAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。 In step S38, following the determination that the counter number C in step S36 is not 1, preparation for defective pixel correction of the divided image F (see FIG. 8B) corresponding to an exposure time of 8 seconds is performed. The process B (step S24) is ended, and the process proceeds to step S25 (see FIG. 9). In the step S38, the preparation of the defective pixel correction of the divided image F corresponding to 8 seconds exposure time (see FIG. 8 (b)), the correction of all defective pixels in the divided image data I 22 to be half of the image data Therefore, a priority number (N = 1 to 3) corresponding to an exposure time of 8 seconds and a number corresponding to divided image F (divided image C and divided image D) obtained by dividing the image data into two (M = 3 and 4), the address data (see FIG. 7) of each defective pixel of the N-th priority correction pixel group P NM (N = 1 to 3, M = 3 to 4) is read from the RAM 44, and the defective pixel correction unit 42 is read out. Is registered (stored) in the storage unit 43. That is, the address data of both 50 defective pixels of the first priority correction pixel group P 1M (3-4), the address data of both 75 defective pixels of the second priority correction pixel group P 2M (3-4), and Address data of a total of 400 defective pixels, that is, address data (see FIG. 7) of both 75 defective pixels of the third priority correction pixel group P 3M (3 to 4) is read from the RAM 44, and the defective pixel correction unit 42 is read out. Is registered (stored) in the storage unit 43.

ステップS39では、ステップS35での露光時間が8秒ではないとの判断に続き、ステップS21で取得した露光時間が16秒であるか否かを判定し、Yesの場合はステップS40へ進み、Noの場合はステップS41へ進む。   In step S39, following the determination that the exposure time in step S35 is not 8 seconds, it is determined whether or not the exposure time acquired in step S21 is 16 seconds. If Yes, the process proceeds to step S40. In this case, the process proceeds to step S41.

ステップS40では、ステップS39での露光時間が16秒であるとの判断に続き、16秒の露光時間に応じた各分割画像A、B、C、D(図8(a)参照)のいずれかの欠陥画素補正の準備を行って、処理B(ステップS24)を終了し、ステップS25(図9参照)へと進む。これは、露光時間が16秒である場合、図9のフローチャートのステップS23において、分割数Sが4に設定されている場面であることから、後述するように、図9のフローチャートのステップS24からステップS27を経てステップS24へと戻る流れにおいてカウンタ数Cが1から4へと順次増加されて(ステップS27)分割画像A、B、C、D(図8(a)参照)のそれぞれについて欠陥画素補正部42で欠陥画素補正動作を実行することとなるので、カウンタ数Cによって16秒の露光時間に応じた欠陥画素補正の準備が異なることによる。このステップS40では、16秒の露光時間に応じた各分割画像A、B、C、D(図8(a)参照)のいずれかの欠陥画素補正の準備として、画像データの1/4となる分割画像データI4C(C=1〜4)におけるすべての欠陥画素の補正のために、16秒の露光時間に対応する優先番号(N=1〜4)であって画像データが4分割された各分割画像A、B、C、Dに対応する番号(順に、M=1、2、3、4)である第N優先補正画素群PNM(N=1〜4、M=1〜4)の各欠陥画素のアドレスデータ(図7参照)をRAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。すなわち、カウンタ数Cが1のとき、分割画像データI41(分割画像A)の欠陥画素補正のために、第1優先補正画素群P11の50個の欠陥画素のアドレスデータ、第2優先補正画素群P21の75個の欠陥画素のアドレスデータ、第3優先補正画素群P31の75個の欠陥画素のアドレスデータおよび第4優先補正画素群P41の100個の欠陥画素のアドレスデータ、の計300個の欠陥画素のアドレスデータをRAM44から読み出して、欠陥画素補正部42の記憶部43に登録する。また、カウンタ数Cが2のとき、分割画像データI42(分割画像B)の欠陥画素補正のために、第1優先補正画素群P12の50個の欠陥画素のアドレスデータ、第2優先補正画素群P22の75個の欠陥画素のアドレスデータ、第3優先補正画素群P32の75個の欠陥画素のアドレスデータおよび第4優先補正画素群P42の100個の欠陥画素のアドレスデータ、の計300個の欠陥画素のアドレスデータをRAM44から読み出して、欠陥画素補正部42の記憶部43に登録する。さらに、カウンタ数Cが3のとき、分割画像データI43(分割画像C)の欠陥画素補正のために、第1優先補正画素群P13の50個の欠陥画素のアドレスデータ、第2優先補正画素群P23の75個の欠陥画素のアドレスデータ、第3優先補正画素群P33の75個の欠陥画素のアドレスデータおよび第4優先補正画素群P43の100個の欠陥画素のアドレスデータ、の計300個の欠陥画素のアドレスデータをRAM44から読み出して、欠陥画素補正部42の記憶部43に登録する。ついで、カウンタ数Cが4のとき、分割画像データI44(分割画像D)の欠陥画素補正のために、第1優先補正画素群P14の50個の欠陥画素のアドレスデータ、第2優先補正画素群P24の75個の欠陥画素のアドレスデータ、第3優先補正画素群P34の75個の欠陥画素のアドレスデータおよび第4優先補正画素群P44の100個の欠陥画素のアドレスデータ、の計300個の欠陥画素のアドレスデータをRAM44から読み出して、欠陥画素補正部42の記憶部43に登録する。 In step S40, following the determination that the exposure time in step S39 is 16 seconds, any one of the divided images A, B, C, and D (see FIG. 8A) corresponding to the exposure time of 16 seconds. In step S24, the process proceeds to step S25 (see FIG. 9). This is a scene in which the number of divisions S is set to 4 in step S23 of the flowchart of FIG. 9 when the exposure time is 16 seconds. As will be described later, from step S24 of the flowchart of FIG. In the flow returning to step S24 through step S27, the counter number C is sequentially increased from 1 to 4 (step S27), and defective pixels for each of the divided images A, B, C, and D (see FIG. 8A). Since the correction unit 42 performs the defective pixel correction operation, the preparation for defective pixel correction corresponding to the exposure time of 16 seconds differs depending on the counter number C. In this step S40, 1/4 of the image data is prepared in preparation for correcting defective pixels of any of the divided images A, B, C, and D (see FIG. 8A) corresponding to the exposure time of 16 seconds. In order to correct all defective pixels in the divided image data I 4C (C = 1 to 4), the image data is divided into four with a priority number (N = 1 to 4) corresponding to an exposure time of 16 seconds. N-th priority correction pixel group P NM (N = 1 to 4, M = 1 to 4) corresponding to the divided images A, B, C, and D (in order M = 1, 2, 3, 4). Are read from the RAM 44 and registered (stored) in the storage unit 43 of the defective pixel correction unit 42. That is, when the counter number C is 1, for the defective pixel correction of the divided image data I 41 (divided image A), the address data of the 50 defective pixels in the first priority correction pixel group P 11 , the second priority correction 75 pieces of defective pixel address data, third priority correction of 75 pieces of defective pixels of the pixel group P 31 address data and the fourth 100 defective pixel address data of the priority correction pixel group P 41 pixel group P 21, The address data of a total of 300 defective pixels is read from the RAM 44 and registered in the storage unit 43 of the defective pixel correction unit 42. Further, when the counter number C is 2, because of the defective pixel correction of the divided image data I 42 (divided image B), 50 pieces of defective pixel address data of the first priority correction pixel group P 12, the second priority correction 75 pieces of defective pixel address data, third priority correction of 75 pieces of defective pixels of the pixel group P 32 address data and 100 defective pixel address data of the fourth priority correction pixel group P 42 pixel group P 22, The address data of a total of 300 defective pixels is read from the RAM 44 and registered in the storage unit 43 of the defective pixel correction unit 42. Furthermore, when the counter number C is 3, for the defective pixel correction of the divided image data I 43 (divided image C), the address data of the 50 defective pixels of the first priority correction pixel group P 13 , the second priority correction 75 pieces of defective pixel address data, third priority correction of 75 pieces of defective pixels of the pixel group P 33 address data and 100 defective pixel address data of the fourth priority correction pixel group P 43 pixel group P 23, The address data of a total of 300 defective pixels is read from the RAM 44 and registered in the storage unit 43 of the defective pixel correction unit 42. Then, when the counter number C is 4, for defective pixel correction of the divided image data I 44 (divided image D), 50 pieces of defective pixel address data of the first priority correction pixel group P 14, the second priority correction Address data of 75 defective pixels of the pixel group P 24 , address data of 75 defective pixels of the third priority correction pixel group P 34 , and address data of 100 defective pixels of the fourth priority correction pixel group P 44 , The address data of a total of 300 defective pixels is read from the RAM 44 and registered in the storage unit 43 of the defective pixel correction unit 42.

ステップS41では、ステップS39での露光時間が16秒ではないとの判断に続き、32秒の露光時間に応じた各分割画像A、B、C、D(図8(a)参照)のいずれかの欠陥画素補正の準備を行って、処理B(ステップS24)を終了し、ステップS25(図9参照)へと進む。これは、ステップS39において露光時間が16秒ではない場合、設定されている露光時間の上限である32秒に設定されていることとなり、図9のフローチャートのステップS23において、分割数Sが4に設定されている場面であることから、後述するように、図9のフローチャートのステップS24からステップS27を経てステップS24へと戻る流れにおいてカウンタ数Cが1から4へと順次増加されて(ステップS27)分割画像A、B、C、D(図8(a)参照)のそれぞれについて欠陥画素補正部42で欠陥画素補正動作を実行することとなるので、カウンタ数Cによって32秒の露光時間に応じた欠陥画素補正の準備が異なることによる。このステップS41では、32秒の露光時間に応じた各分割画像A、B、C、D(図8(a)参照)のいずれかの欠陥画素補正の準備として、画像データの1/4となる分割画像データI4C(C=1〜4)におけるすべての欠陥画素の補正のために、32秒の露光時間に対応する優先番号(N=1〜5)であって画像データが4分割された各分割画像A、B、C、Dに対応する番号(順に、M=1、2、3、4)である第N優先補正画素群PNM(N=1〜5、M=1〜4)の各欠陥画素のアドレスデータ(図7参照)をRAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。すなわち、カウンタ数Cが1のとき、分割画像データI41(分割画像A)の欠陥画素補正のために、第1優先補正画素群P11の50個の欠陥画素のアドレスデータ、第2優先補正画素群P21の75個の欠陥画素のアドレスデータ、第3優先補正画素群P31の75個の欠陥画素のアドレスデータ、第4優先補正画素群P41の100個の欠陥画素のアドレスデータおよび第5優先補正画素群P51の200個の欠陥画素のアドレスデータ、の計500個の欠陥画素のアドレスデータをRAM44から読み出して、欠陥画素補正部42の記憶部43に登録する。また、カウンタ数Cが2のとき、分割画像データI42(分割画像B)の欠陥画素補正のために、第1優先補正画素群P12の50個の欠陥画素のアドレスデータ、第2優先補正画素群P22の75個の欠陥画素のアドレスデータ、第3優先補正画素群P32の75個の欠陥画素のアドレスデータ、第4優先補正画素群P42の100個の欠陥画素のアドレスデータ、および第5優先補正画素群P52の200個の欠陥画素のアドレスデータ、の計500個の欠陥画素のアドレスデータをRAM44から読み出して、欠陥画素補正部42の記憶部43に登録する。さらに、カウンタ数Cが3のとき、分割画像データI43(分割画像C)の欠陥画素補正のために、第1優先補正画素群P13の50個の欠陥画素のアドレスデータ、第2優先補正画素群P23の75個の欠陥画素のアドレスデータ、第3優先補正画素群P33の75個の欠陥画素のアドレスデータ、第4優先補正画素群P43の100個の欠陥画素のアドレスデータおよび第5優先補正画素群P53の200個の欠陥画素のアドレスデータ、の計500個の欠陥画素のアドレスデータをRAM44から読み出して、欠陥画素補正部42の記憶部43に登録する。ついで、カウンタ数Cが4のとき、分割画像データI44(分割画像D)の欠陥画素補正のために、第1優先補正画素群P14の50個の欠陥画素のアドレスデータ、第2優先補正画素群P24の75個の欠陥画素のアドレスデータ、第3優先補正画素群P34の75個の欠陥画素のアドレスデータ、第4優先補正画素群P44の100個の欠陥画素のアドレスデータおよび第5優先補正画素群P54の200個の欠陥画素のアドレスデータ、の計500個の欠陥画素のアドレスデータをRAM44から読み出して、欠陥画素補正部42の記憶部43に登録する。 In step S41, following the determination that the exposure time in step S39 is not 16 seconds, one of the divided images A, B, C, and D (see FIG. 8A) corresponding to the exposure time of 32 seconds. In step S24, the process proceeds to step S25 (see FIG. 9). This means that if the exposure time is not 16 seconds in step S39, it is set to 32 seconds, which is the upper limit of the set exposure time. In step S23 of the flowchart of FIG. Since it is a set scene, as will be described later, the counter number C is sequentially increased from 1 to 4 in the flow of returning from step S24 to step S27 in the flowchart of FIG. 9 (step S27). ) Since the defective pixel correction unit 42 executes the defective pixel correction operation for each of the divided images A, B, C, and D (see FIG. 8A), the number of counters C corresponds to the exposure time of 32 seconds. This is due to different preparations for defective pixel correction. In this step S41, 1/4 of the image data is prepared as preparation for defective pixel correction of any one of the divided images A, B, C, and D (see FIG. 8A) corresponding to the exposure time of 32 seconds. In order to correct all defective pixels in the divided image data I 4C (C = 1 to 4), the image data is divided into four with a priority number (N = 1 to 5) corresponding to an exposure time of 32 seconds. N-th priority correction pixel group P NM (N = 1 to 5, M = 1 to 4) corresponding to the divided images A, B, C, and D (in order M = 1, 2, 3, 4). Are read from the RAM 44 and registered (stored) in the storage unit 43 of the defective pixel correction unit 42. That is, when the counter number C is 1, for the defective pixel correction of the divided image data I 41 (divided image A), the address data of the 50 defective pixels in the first priority correction pixel group P 11 , the second priority correction 75 pieces of defective pixel address data of pixel groups P 21, the third priority 75 of the defective pixel address data for correcting pixel group P 31, 100 pieces of address data of the defective pixel and the fourth priority correction pixel group P 41 A total of 500 defective pixel address data of 200 defective pixels of the fifth priority correction pixel group P 51 are read from the RAM 44 and registered in the storage unit 43 of the defective pixel correction unit 42. Further, when the counter number C is 2, because of the defective pixel correction of the divided image data I 42 (divided image B), 50 pieces of defective pixel address data of the first priority correction pixel group P 12, the second priority correction Address data of 75 defective pixels of the pixel group P 22 , address data of 75 defective pixels of the third priority correction pixel group P 32 , address data of 100 defective pixels of the fourth priority correction pixel group P 42 , In addition, the address data of 500 defective pixels of the 200 defective pixels of the fifth priority correction pixel group P 52 is read from the RAM 44 and registered in the storage unit 43 of the defective pixel correction unit 42. Furthermore, when the counter number C is 3, for the defective pixel correction of the divided image data I 43 (divided image C), the address data of the 50 defective pixels of the first priority correction pixel group P 13 , the second priority correction 75 pieces of defective pixel address data of the pixel group P 23, the third priority 75 of the defective pixel address data for correcting pixel group P 33, the address data and of 100 defective pixel of the fourth priority correction pixel group P 43 A total of 500 defective pixel address data of 200 defective pixels in the fifth priority correction pixel group P 53 is read from the RAM 44 and registered in the storage unit 43 of the defective pixel correction unit 42. Then, when the counter number C is 4, for defective pixel correction of the divided image data I 44 (divided image D), 50 pieces of defective pixel address data of the first priority correction pixel group P 14, the second priority correction Address data of 75 defective pixels in the pixel group P 24 , address data of 75 defective pixels in the third priority correction pixel group P 34 , address data of 100 defective pixels in the fourth priority correction pixel group P 44 , and A total of 500 defective pixel address data of 200 defective pixels in the fifth priority correction pixel group P 54 is read from the RAM 44 and registered in the storage unit 43 of the defective pixel correction unit 42.

ステップS25では、ステップS24での分割数Sおよび露光時間に応じた欠陥画素補正の準備に続き、露光時間に応じた分割数Sでのカウンタ数Cに対応する分割画像の分割画像データISCに対して欠陥画素補正を実行して、ステップS26へ進む。このステップS25では、欠陥画素補正部42が、送られてきた画像データ(その各画素データ)のうちのカウンタ数Cに対応する分割画像データISCにおいて、記憶部43に登録された欠陥画素のアドレスに相当する画素データを読み出し、その周辺のRGBフィルタで見て同じ色に対応した画素データで補間することにより、ステップS24での露光時間に応じた欠陥画素補正の準備に応じた補正画素数の補正を行う。 In step S25, following the preparation of defective pixel correction according to the division number S and the exposure time in step S24, the divided image data I SC of the divided image corresponding to the counter number C at the division number S according to the exposure time is obtained. On the other hand, defective pixel correction is executed, and the process proceeds to step S26. In the step S25, the defective pixel correction unit 42, the image sent data at (each pixel data) divided image data I SC corresponding to the counter number C of, registered in the storage unit 43 the defective pixel The pixel data corresponding to the address is read out and interpolated with pixel data corresponding to the same color as seen by the surrounding RGB filters, so that the number of correction pixels corresponding to the defective pixel correction preparation according to the exposure time in step S24 Perform the correction.

ステップS26では、ステップS25での露光時間に応じた分割数Sでのカウンタ数Cに対応する分割画像の分割画像データISCに対する欠陥画素補正の実行に続き、カウンタ数Cが分割数Sと等しいか否かを判定し、Yesの場合は図9のフローチャートを終了し、Noの場合はステップS27へ進む。このステップS26では、カウンタ数Cが露光時間に応じた分割数Sに等しいか否かを判断することにより、分割画像データISCに対して欠陥画素補正を実行するステップS25が繰り返されることにより、全ての分割画像すなわち分割される前の画像データのすべてに対して欠陥画素補正を行ったか否かを判断するものである。 In step S26, following the execution of the defective pixel correction for the divided image data I SC of the divided image corresponding to the counter number C in the divided number S corresponding to the exposure time in step S25, the counter number C is equal to the number of divisions S In the case of Yes, the flowchart of FIG. 9 is ended, and in the case of No, the process proceeds to Step S27. In step S26, by the counter number C is determined whether equal to the division number S corresponding to the exposure time, by Step S25 to perform defective pixel correction on the divided image data I SC is repeated, It is determined whether or not defective pixel correction has been performed on all divided images, that is, all image data before being divided.

ステップS27では、ステップS26でのカウンタ数Cが分割数Sと等しくないとの判断に続き、カウンタ数Cをインクリメント(C=C+1)して、ステップS24へと戻る。このステップS27では、分割される前の画像データのすべてに対して欠陥画素補正を行うために、ステップS25における分割画像データISCに対する欠陥画素補正の実行の回数(カウンタ数C)を1ずつ加算する。 In step S27, following the determination that the counter number C is not equal to the division number S in step S26, the counter number C is incremented (C = C + 1), and the process returns to step S24. In the step S27, in order to perform defective pixel correction for all of the image data before being divided, the number of execution of the defective pixel correction for the divided image data I SC in step S25 (the counter C) by adding 1 To do.

このように、実施例2の欠陥画素補正処理では、取得した露光時間に応じた補正画素数に対応して分割数Sを設定し(ステップS23)、画像(画像データ)を分割数Sで等分して、それぞれの分割画像データISCに対する欠陥画素補正部42での欠陥画素補正動作の繰り返しにより、補正対象となる画素データを重複させることなく画像データのすべてに対して欠陥画素補正を行う(ステップS25)。このとき、ステップS24において、ステップS25での欠陥画素補正の実行の回数(カウンタ数C)に応じた分割画像データISCにおける各欠陥画素のアドレスデータをRAM44に登録していることから、ステップS24→ステップS25→ステップS26→ステップS27へと進んでステップS24へと戻る流れが繰り返されることにより、分割される前の画像データのすべてに対して欠陥画素補正を行うことができる。これは、例えば、露光時間が32秒に設定されて(補正画素数は2000個)いる場合、ステップS21→ステップS22→ステップS23へと進むことにより、分割数Sが4とされて画像データを分割画像A、B、C、Dに等分する。その後、ステップS24で露光時間32秒に応じた分割画像Aの分割画像データI41の欠陥画素補正のための準備を行ってステップS25へと進むことにより、欠陥画素補正部42が、送られてきた画像データのうちの分割画像データI41において、記憶部43に登録された欠陥画素のアドレスに相当する画素データ(第1優先補正画素群P11の50個の欠陥画素、第2優先補正画素群P21の75個の欠陥画素、第3優先補正画素群P31の75個の欠陥画素、第4優先補正画素群P41の100個の欠陥画素および第5優先補正画素群P51の200個の欠陥画素、の計500個の欠陥画素)を読み出し、その周辺のRGBフィルタで見て同じ色に対応した画素データで補間することにより、分割画像Aの露光時間32秒に応じた欠陥画素補正が終了する。その後、ステップS26へと進むがカウンタ数Cが1であって分割数S=4に等しくないことから、ステップS27へと進んでステップS24へと戻ることにより、露光時間32秒に応じた分割画像Bの分割画像データI42の欠陥画素補正のための準備を行う。その後、ステップS25へと進むことにより、欠陥画素補正部42が、送られてきた画像データのうちの分割画像データI42において、記憶部43に登録された欠陥画素のアドレスに相当する画素データ(第1優先補正画素群P12の50個の欠陥画素、第2優先補正画素群P22の75個の欠陥画素、第3優先補正画素群P32の75個の欠陥画素、第4優先補正画素群P42の100個の欠陥画素および第5優先補正画素群P52の200個の欠陥画素、の計500個の欠陥画素)を読み出し、その周辺のRGBフィルタで見て同じ色に対応した画素データで補間することにより、分割画像Bの欠陥画素補正が終了する。上記した処理(テップS24→ステップS25→ステップS26→ステップS27へと進んでステップS24へと戻る流れ)を分割数Sである4回繰り返すと、その4回目のステップS26において、カウンタ数Cが4となっていることからステップS27へと進むことはなく図9のフローチャートを終了することにより、上記した分割画像Aおよび分割画像Bに加えて、分割画像Cおよび分割画像Dの欠陥画素補正が終了して分割される前の画像データのすべてに対して欠陥画素補正を行うことができる。このとき、何れの場面であっても、欠陥画素のアドレスデータの全てが記憶部43に登録可能であることから、欠陥画素補正部42では一度の欠陥画素補正動作で、露光時間に応じた分割数Sでのカウンタ数Cに対応する分割画像の分割画像データISCの欠陥画素の全てを補正することができる。 As described above, in the defective pixel correction process according to the second embodiment, the division number S is set in accordance with the correction pixel number corresponding to the acquired exposure time (step S23), and the image (image data) is divided by the division number S or the like. Thus, defective pixel correction is performed on all of the image data without duplicating the pixel data to be corrected by repeating the defective pixel correction operation in the defective pixel correction unit 42 for each divided image data ISC . (Step S25). In this case, in step S24, since it has registered address data of each defective pixel in the divided image data I SC in accordance with the number of executions of the defective pixel correction in the step S25 (counter C) in RAM 44, step S24 By repeating the flow from step S25 to step S26 to step S27 and returning to step S24, defective pixel correction can be performed on all of the image data before being divided. For example, when the exposure time is set to 32 seconds (the number of corrected pixels is 2000), the process proceeds from step S21 to step S22 to step S23, whereby the division number S is set to 4 and the image data is converted. Divide into divided images A, B, C, and D. Thereafter, in step S24, preparation for defective pixel correction of the divided image data I 41 of the divided image A corresponding to the exposure time of 32 seconds is performed, and the process proceeds to step S25, whereby the defective pixel correction unit 42 is sent. In the divided image data I 41 of the obtained image data, pixel data corresponding to the address of the defective pixel registered in the storage unit 43 (50 defective pixels and second priority correction pixels of the first priority correction pixel group P 11 ). 75 defective pixels in group P 21 , 75 defective pixels in third priority correction pixel group P 31 , 100 defective pixels in fourth priority correction pixel group P 41 , and 200 in fifth priority correction pixel group P 51 A total of 500 defective pixels), and interpolating with pixel data corresponding to the same color as seen by the surrounding RGB filters, the exposure time of the divided image A is 32 seconds. The defective pixel correction is completed. Thereafter, the process proceeds to step S26, but since the counter number C is 1 and is not equal to the division number S = 4, the process proceeds to step S27 and returns to step S24, whereby the divided image corresponding to the exposure time of 32 seconds is obtained. Preparation for defective pixel correction of the B divided image data I 42 is performed. Thereafter, by proceeding to step S25, the defective pixel correction unit 42 in the divided image data I 42 of the transmitted image data, pixel data corresponding to the defective pixel address registered in the storage unit 43 ( 50 defective pixels of the first priority correction pixel group P 12, 75 pieces of defective pixels of the second priority correction pixel group P 22, 75 pieces of defective pixels of the third priority correction pixel group P 32, the fourth priority corrected pixel 100 defective pixels in the group P 42 and 200 defective pixels in the fifth priority correction pixel group P 52 , a total of 500 defective pixels), and pixels corresponding to the same color as seen by the surrounding RGB filters By interpolating with the data, the defective pixel correction of the divided image B is completed. When the above processing (the flow from step S24 → step S25 → step S26 → step S27 and returning to step S24) is repeated four times as the division number S, the counter number C is 4 in the fourth step S26. Therefore, the process does not proceed to step S27, and the defective pixel correction of the divided image C and the divided image D is completed in addition to the divided image A and the divided image B described above by ending the flowchart of FIG. Thus, defective pixel correction can be performed on all of the image data before being divided. At this time, since any defective pixel address data can be registered in the storage unit 43 in any scene, the defective pixel correction unit 42 performs a single defective pixel correction operation to perform division according to the exposure time. it is possible to correct all the defective pixels of the divided image data I SC of the divided image corresponding to the counter number C of the number S.

実施例2の欠陥画素補正処理では、撮像素子(CCD20)において補正対象とすべき欠陥画素の数が、欠陥画素補正部42の記憶部43に登録可能な欠陥画素数(登録限度数)を超える場合(実施例2では露光時間が8秒、16秒あるいは32秒の場合)であっても、当該記憶部43への登録内容を書き換えつつ、すなわち記憶部43における欠陥画素データの登録内容を変更しつつ、欠陥画素補正部42での欠陥画素補正の動作を繰り返すことから、補正が必要とされる欠陥画素数と記憶部43の登録限度数との関係に拘らず、撮像素子(CCD20)の全ての欠陥画素を補正することができる。   In the defective pixel correction process of the second embodiment, the number of defective pixels to be corrected in the image sensor (CCD 20) exceeds the number of defective pixels (registration limit number) that can be registered in the storage unit 43 of the defective pixel correction unit 42. Even when the exposure time is 8 seconds, 16 seconds, or 32 seconds in the second embodiment, the registered content in the storage unit 43 is rewritten, that is, the registered content of defective pixel data in the storage unit 43 is changed. However, since the defective pixel correction operation in the defective pixel correction unit 42 is repeated, regardless of the relationship between the number of defective pixels that need to be corrected and the registration limit number in the storage unit 43, the imaging element (CCD 20) All defective pixels can be corrected.

また、実施例2の欠陥画素補正処理では、欠陥画素補正部42での欠陥画素補正動作の回数に拘らず、元の画像データを欠陥画素補正部42で欠陥画素補正処理させる場合と略等しいものとすることができる。これは、欠陥画素補正部42では、元の画像データを分割数Sで等分したそれぞれの分割画像データISCに対して欠陥画素補正動作を行う(ステップS25)ことから、各欠陥画素補正動作(ステップS25)において元の画像データの1/Sのデータ量を処理すればよいため、各欠陥画素補正動作(ステップS25)における処理時間を、元の画像データに対する処理時間の略1/Sに近いものとすることができるので、元の画像データに対する欠陥画素補正動作での処理時間を1とすると、分割数Sに拘らず元の画像データの全ての欠陥画素補正に要する処理時間は、各分割画像データISCでの処理時間に分割数Sを乗算したもの((1/S)×分割数S=1)で表すことができ、双方を略等しいものとすることができることによる。このため、補正が必要とされる欠陥画素数と記憶部43の登録限度数との関係に拘らず、撮像素子(CCD20)の全ての欠陥画素を補正することができるとともに、欠陥画素補正部42で欠陥画素補正動作を繰り返すことに伴って処理時間が増大すること、すなわちその全ての欠陥画素補正に要する処理時間の増大を抑制することができる。 In addition, the defective pixel correction processing according to the second embodiment is substantially the same as the case where the defective pixel correction unit 42 performs the defective pixel correction processing on the original image data regardless of the number of defective pixel correction operations in the defective pixel correction unit 42. It can be. This is the defective pixel correction unit 42 performs the defective pixel correction operation for each of the divided image data I SC obtained by equally dividing the original image data in the dividing number S (step S25) since each defective pixel correction operation Since the data amount of 1 / S of the original image data has only to be processed in (Step S25), the processing time in each defective pixel correction operation (Step S25) is approximately 1 / S of the processing time for the original image data. Since the processing time in the defective pixel correction operation for the original image data is 1, the processing time required for correcting all the defective pixels in the original image data regardless of the division number S is as follows. dividing the image processing time of the data I SC obtained by multiplying the number of divisions S can be expressed by ((1 / S) × number of divisions S = 1), due to the fact that can be made substantially equal to both . Therefore, regardless of the relationship between the number of defective pixels that need to be corrected and the registration limit number of the storage unit 43, all the defective pixels of the image sensor (CCD 20) can be corrected, and the defective pixel correcting unit 42 can be corrected. Thus, it is possible to suppress an increase in the processing time associated with repeating the defective pixel correction operation, that is, an increase in the processing time required for correcting all the defective pixels.

さらに、実施例2の欠陥画素補正処理では、露光時間に応じて補正する画素数を変更していることから、露光時間に応じた必要な補正画素数だけ補正することができ、欠陥画素の補正不足や過補正に基因する画質の低下を防止することができる。   Furthermore, in the defective pixel correction process according to the second embodiment, since the number of pixels to be corrected is changed according to the exposure time, it is possible to correct only the necessary number of correction pixels according to the exposure time. It is possible to prevent deterioration in image quality due to lack or overcorrection.

実施例2の欠陥画素補正処理では、欠陥画素レベルが高い画素を優先的に補正することから、画像(画像データ)上において欠陥画素と認識され易い画素を優先的に補正することができるので、より効率的に画質を向上させることができる。   In the defective pixel correction process according to the second embodiment, pixels having a high defective pixel level are preferentially corrected. Therefore, pixels that are easily recognized as defective pixels on an image (image data) can be preferentially corrected. The image quality can be improved more efficiently.

実施例2の欠陥画素補正処理では、分割数Sの最大値を4に設定し、それに伴って4つの領域に分割した画像データ毎(分割画像A、B、C、D(図8(a)参照))に各優先補正画素群PNMを取得してRAM44に格納するとともに、分割数Sを1、2、4に設定している(分割数Sの取り得る値を、その最大値の約数に設定している)ことから、露光時間に応じた補正画素数に適合する各欠陥画素のアドレスデータを適切に欠陥画素補正部42の記憶部43に登録することを可能としつつ、欠陥画素補正処理のためのデータ(各優先補正画素群PNM)を効率よくRAM44に格納することができる。 In the defective pixel correction process of the second embodiment, the maximum value of the division number S is set to 4, and the image data divided into four areas accordingly (divided images A, B, C, D (FIG. 8A) In addition, each priority correction pixel group P NM is acquired and stored in the RAM 44, and the number of divisions S is set to 1, 2, and 4 (the possible values of the number of divisions S are about the maximum value). Therefore, it is possible to appropriately register the address data of each defective pixel that matches the number of corrected pixels according to the exposure time in the storage unit 43 of the defective pixel correcting unit 42, and to detect defective pixels. Data for each correction process (each priority correction pixel group P NM ) can be efficiently stored in the RAM 44.

このため、本発明に係る撮像装置のデジタルカメラ1では、記憶部43での登録限度数に拘らず、補正対象とするすべての欠陥画素を適切に補正することができる。これにより、暗電流が増えたり蓄積されたりする条件、例えば、撮像素子(CCD20)の温度が上昇したり露光時間が長い状況で撮影された画像(画像データ)であっても、その品質を向上させることができる。   For this reason, in the digital camera 1 of the imaging device according to the present invention, it is possible to appropriately correct all defective pixels to be corrected regardless of the registration limit number in the storage unit 43. As a result, even when dark current increases or accumulates, for example, an image (image data) taken in a situation where the temperature of the image sensor (CCD 20) rises or the exposure time is long, the quality is improved. Can be made.

特に、実施例2の欠陥画素補正処理では、補正が必要とされる欠陥画素数と記憶部43の登録限度数との関係に拘らず、撮像素子(CCD20)の全ての欠陥画素を補正することができるとともに、欠陥画素補正部42で欠陥画素補正動作を繰り返すことに伴って処理時間が増大することを抑制することができる。   In particular, in the defective pixel correction process according to the second embodiment, all defective pixels of the image sensor (CCD 20) are corrected regardless of the relationship between the number of defective pixels that need to be corrected and the registration limit number in the storage unit 43. In addition, it is possible to suppress an increase in processing time as the defective pixel correction unit 42 repeats the defective pixel correction operation.

なお、上記した実施例2では、欠陥画素の影響の変化の判断基準を露光時間とし、露光時間に応じた補正画素数が設定されている例を示したが、動的な欠陥要因である温度キズの影響が変化する要因を基準として補正画素数を設定するものであれば、例えば、ISO感度に応じた補正画素数の設定に基づいて補正画素数を設定するものであってもよく、実施例2に限定されるものではない。   In the above-described second embodiment, an example in which the exposure time is used as the determination criterion for the change in the influence of the defective pixel and the number of correction pixels according to the exposure time is set. As long as the correction pixel number is set on the basis of the factor that the influence of scratches changes, for example, the correction pixel number may be set based on the setting of the correction pixel number according to the ISO sensitivity. It is not limited to Example 2.

また、実施例2では、欠陥画素補正部42の記憶部43に登録可能な欠陥画素数が500であり、かつ露光時間に応じた補正画素数の設定が露光時間32秒の場合の補正画素数2000を最大としていたが、各数値は例示であってこれらに限定されるものではない。   In the second embodiment, the number of corrected pixels when the number of defective pixels that can be registered in the storage unit 43 of the defective pixel correction unit 42 is 500 and the setting of the number of corrected pixels according to the exposure time is an exposure time of 32 seconds. Although 2000 was set as the maximum, each numerical value is an example and is not limited thereto.

さらに、実施例2では、分割数Sが取り得る値を、その最大値の約数に設定していたが、補正する必要のある欠陥画素のすべてを欠陥画素補正部42による欠陥画素補正動作で補正するために、その記憶部43に登録可能な欠陥画素数(登録限度数)に応じて分割数Sを設定するもの、すなわち少なくとも補正画素数を登録限度数で除算して得られた商の少数以下を切り上げた値を分割数Sとして設定するものであればよく、実施例2に限定されるものではない。例えば、実施例2では、露光時間が16秒である場合、補正画素数が1200に設定されており、かつ記憶部43の登録限度数が500であることから、欠陥画素補正部42による欠陥画素補正動作を3回行えば、1200個の欠陥画素のすべてを補正することができることとなるので、分割数Sを3に設定してもよい。この場合、予めRAM44に各欠陥画素のアドレスデータを格納する際、分割数Sが3、すなわち画像(画像データ)を3分割した状態での各欠陥画素のアドレスデータを格納しておく必要がある。   Furthermore, in Example 2, the value that the division number S can take is set to a divisor of the maximum value. However, all defective pixels that need to be corrected are corrected by the defective pixel correction unit 42 using the defective pixel correction operation. In order to correct, the division number S is set according to the number of defective pixels (registration limit number) that can be registered in the storage unit 43, that is, the quotient obtained by dividing at least the correction pixel number by the registration limit number Any value may be used as long as a value obtained by rounding up the decimals is set as the division number S, and the present invention is not limited to the second embodiment. For example, in the second embodiment, when the exposure time is 16 seconds, the number of correction pixels is set to 1200, and the registration limit number of the storage unit 43 is 500. If the correction operation is performed three times, all 1200 defective pixels can be corrected. Therefore, the division number S may be set to 3. In this case, when storing the address data of each defective pixel in the RAM 44 in advance, it is necessary to store the address data of each defective pixel when the division number S is 3, that is, the image (image data) is divided into three. .

実施例2では、露光時間に応じた補正画素数に対応して分割数Sを設定して、その分割数Sおよび露光時間に応じた欠陥画素補正の準備を行うものとしていたが、分割数Sの最大値で等分(実施例2では4)された領域の画像データ毎に各優先補正画素群PNMを取得してRAM44に格納していることから、分割数Sが最大値の約数(実施例2では、1または2)である場合(露光時間が2、4、8秒)、最大値で等分された画像データ毎の各優先補正画素群PNMを合わせることとなる(ステップS32、ステップS34、ステップS37およびステップS38参照)ので、分割数Sを常に最大値として欠陥画素補正の準備を行うものとしてもよい。 In the second embodiment, the division number S is set corresponding to the correction pixel number corresponding to the exposure time, and the preparation of defective pixel correction corresponding to the division number S and the exposure time is performed. Since each priority correction pixel group P NM is acquired and stored in the RAM 44 for each image data of an area equally divided by the maximum value (4 in the second embodiment), the division number S is a divisor of the maximum value. (In Example 2, 1 or 2) (exposure time is 2, 4, and 8 seconds), the priority correction pixel groups P NM for each image data equally divided by the maximum value are combined (step S32, step S34, step S37, and step S38), the number of divisions S may always be set to the maximum value to prepare for defective pixel correction.

実施例2では、分割数Sの最大値(実施例2では4)で等分された領域の画像データ毎に各優先補正画素群PNMを取得してRAM44に格納していたが、露光時間に応じた欠陥画素補正の準備を可能とする、すなわち各欠陥画素のアドレスデータを欠陥画素補正部42の記憶部43に適宜登録することができるものであればよく、実施例2に限定されるものではない。 In the second embodiment, each priority correction pixel group P NM is acquired and stored in the RAM 44 for each image data of an area equally divided by the maximum value of the division number S (4 in the second embodiment). It is only necessary to be able to prepare for defective pixel correction according to the above, that is, the address data of each defective pixel can be appropriately registered in the storage unit 43 of the defective pixel correction unit 42, and is limited to the second embodiment. It is not a thing.

次に、本発明の実施例3に係る撮像装置およびそこで行われる欠陥画素補正処理について説明する。この実施例3は、欠陥画素補正処理における処理内容の一部が実施例1および実施例2とは異なる例である。この実施例3の撮像装置は、基本的な構成は上記した実施例1の撮像装置であるデジタルカメラ1と同様であることから、等しい構成の個所には同じ符号を付し、その詳細な説明は省略する。図11は、各優先補正画素群P´もしくは各優先補正画素群PNM´におけるRAM44に格納された欠陥画素のアドレス(CCD20上の縦横座標)のデータの個数(欠陥画素のデータ数)等を表で示す図4および図7と同様の説明図である。 Next, an image pickup apparatus according to Embodiment 3 of the present invention and defective pixel correction processing performed therein will be described. The third embodiment is an example in which part of the processing content in the defective pixel correction process is different from the first and second embodiments. Since the basic configuration of the image pickup apparatus according to the third embodiment is the same as that of the digital camera 1 that is the image pickup apparatus according to the first embodiment described above, the same reference numerals are given to portions having the same configuration, and detailed description thereof will be given. Is omitted. FIG. 11 shows the number of defective pixel addresses (number of defective pixel data) stored in the RAM 44 in each priority correction pixel group P N ′ or each priority correction pixel group P NM ′. It is explanatory drawing similar to FIG. 4 and FIG.

先ず、実施例3の欠陥画素補正処理のために、実施例1と同様に、設定された各露光時間で出現する欠陥画素の数を統計的に把握し、露光時間に応じて出現する欠陥画素の全てを補正するために充分だと判断できる数を、露光時間に応じた補正画素数として設定する。この実施例3では、露光時間が2秒の場合の補正画素数を200とし、露光時間が4秒の場合の補正画素数を500とし、露光時間が8秒の場合の補正画素数を700とし、露光時間が16秒の場合の補正画素数を1000とし、露光時間が32秒の場合の補正画素数を1500としている(図11参照)。この露光時間に応じた補正画素数は、RAM44に格納されている。   First, for the defective pixel correction process of the third embodiment, as in the first embodiment, the number of defective pixels appearing at each set exposure time is statistically grasped, and the defective pixels appearing according to the exposure time. The number that can be determined to be sufficient to correct all of the above is set as the number of corrected pixels according to the exposure time. In the third embodiment, the number of corrected pixels when the exposure time is 2 seconds is 200, the number of corrected pixels when the exposure time is 4 seconds is 500, and the number of corrected pixels when the exposure time is 8 seconds is 700. The number of corrected pixels when the exposure time is 16 seconds is 1000, and the number of corrected pixels when the exposure time is 32 seconds is 1500 (see FIG. 11). The number of corrected pixels corresponding to the exposure time is stored in the RAM 44.

ここで、制御部28は、露光時間に応じた補正画素数の最大値を1500に設定しているとともに、記憶部43に登録可能な欠陥画素数が500であることから、この1500から500を減算した欠陥画素(1000)のすべてを欠陥画素補正部42で補正するには、2回の欠陥画素補正動作を行う必要があることに基づいて、分割数S´の最大値を2に設定する。この実施例3では、後述するように、記憶部43に登録可能な欠陥画素数(登録限度数)を超える数の画素を補正する場合、先ず欠陥画素補正部42において登録限度数の欠陥画素補正を行い、その後、残りの欠陥画素のすべてを欠陥画素補正するものであることから、実施例3での分割数S´とは、その残りの欠陥画素のすべてを処理時間の増大を抑制しつつ補正するために、CCD20により取得された1つの画像データにおいて、欠陥画素補正部42での1回の欠陥画素補正動作における対象となる領域すなわちデータ量を設定するために当該画像データを等分する数である。   Here, the control unit 28 sets the maximum value of the number of corrected pixels according to the exposure time to 1500, and the number of defective pixels that can be registered in the storage unit 43 is 500. In order to correct all the subtracted defective pixels (1000) by the defective pixel correction unit 42, the maximum value of the division number S ′ is set to 2 based on the necessity of performing the defective pixel correction operation twice. . In the third embodiment, as described later, when correcting the number of pixels exceeding the number of defective pixels (registration limit number) that can be registered in the storage unit 43, first, the defective pixel correction unit 42 corrects the defective pixel of the registration limit number. Then, all of the remaining defective pixels are corrected for defective pixels. Therefore, the division number S ′ in the third embodiment is the same as that of the remaining defective pixels while suppressing an increase in processing time. In order to perform correction, in one piece of image data acquired by the CCD 20, the image data is equally divided in order to set a target region, that is, a data amount in one defective pixel correction operation in the defective pixel correction unit 42. Is a number.

制御部28は、設定された露光時間に応じた補正画素数での欠陥画素補正処理のために、実施例3では、検出した欠陥画素のアドレス(CCD20上の縦横座標)のデータを、それぞれの欠陥画素レベルおよび設定された露光時間に関連付けて、以下のようにRAM44に格納する。   In the third embodiment, the control unit 28 converts the data of the detected defective pixel address (vertical and horizontal coordinates on the CCD 20) into each of the defective pixel correction processing with the number of corrected pixels corresponding to the set exposure time. In association with the defective pixel level and the set exposure time, it is stored in the RAM 44 as follows.

実施例3での基本的な欠陥画素の検出方法は、実施例1と同様であるが、上述したように、先ず欠陥画素補正部42において登録限度数の欠陥画素補正を行うため、最初に、CCD20の全ての画素の中から、欠陥画素レベルが高い順から登録限度数すなわち500個までの画素を検出し、上から200個を第1優先補正画素群P´の欠陥画素のアドレスデータとして、RAM44に格納し、残りの300個を第2優先補正画素群P´の欠陥画素のアドレスデータとして、RAM44に格納する。この第1優先補正画素群P´として検出された200個の欠陥画素は、そのまま露光時間が2秒の場合に補正する200個の欠陥画素となり、第2優先補正画素群P´として検出された300個の欠陥画素は、第1優先補正画素群P´の200個の欠陥画素を加算することにより、露光時間が4秒の場合に補正する500個の欠陥画素となる。また、実施例3では、この露光時間が4秒の場合に補正する500個の欠陥画素が、そのまま補正優先度の高い欠陥画素となる。 The basic defective pixel detection method in the third embodiment is the same as that in the first embodiment. However, as described above, first, the defective pixel correction unit 42 performs the correction of the defective pixel of the registration limit number. From all the pixels of the CCD 20, the registration limit number, that is, up to 500 pixels is detected in descending order of the defective pixel level, and 200 pixels from the top are used as address data of defective pixels in the first priority correction pixel group P 1 ′. The remaining 300 pixels are stored in the RAM 44 as address data of defective pixels of the second priority correction pixel group P 2 ′. The 200 defective pixels detected as the first priority correction pixel group P 1 ′ become 200 defective pixels to be corrected when the exposure time is 2 seconds, and are detected as the second priority correction pixel group P 2 ′. The 300 defective pixels thus added become 500 defective pixels to be corrected when the exposure time is 4 seconds by adding 200 defective pixels of the first priority correction pixel group P 1 ′. In the third embodiment, the 500 defective pixels that are corrected when the exposure time is 4 seconds directly become defective pixels having a high correction priority.

次に、上述したように、分割数S´の最大値を2に設定したことから、2つの領域に分割した画像データ毎(以下、分割画像E、Fとする(図8(b)参照))に各優先補正画素群PNM´を取得する。ここで、Nは、実施例2と同様であるが(但し、既に第1優先補正画素群P´と第2優先補正画素群P´とが取得されていることから、取り得る値は3〜5)、Mは、実施例3では、各N番目の群においてどの分割画像E、Fのいずれに該当するものであるかを表すものであるので、E、Fの順に1、2を当て嵌めている。 Next, as described above, since the maximum value of the division number S ′ is set to 2, each image data divided into two regions (hereinafter referred to as divided images E and F (see FIG. 8B)). ), Each priority correction pixel group P NM ′ is acquired. Here, N is the same as that in the second embodiment (however, since the first priority correction pixel group P 1 ′ and the second priority correction pixel group P 2 ′ have already been acquired, possible values are 3 to 5) and M in the third embodiment indicate which of the divided images E and F corresponds to each of the N-th group. It is fitted.

両分割画像E、Fの各画素の中から、それぞれにおける第2優先補正画素群P´の中の最も欠陥画素レベルが低いものよりも欠陥画素レベルが低いことを前提として、欠陥画素レベルが高い画素から順に100個の画素を欠陥画素として検出し、第3優先補正画素群P3M´(M=1、2)の欠陥画素のアドレスデータとして、RAM44に格納する。これらの、第3優先補正画素群P31´として検出された100個の欠陥画素と、第3優先補正画素群P32´として検出された100個の欠陥画素とを合わせたもの(第3優先補正画素群P´とする)は、上記した第1優先補正画素群P´の200個の欠陥画素および第2優先補正画素群P´の300個の欠陥画素を加算することにより、露光時間が8秒の場合に補正する700個の欠陥画素となる。 On the assumption that the defective pixel level is lower than the lowest defective pixel level in the second priority correction pixel group P 2 ′ in each of the divided images E and F, the defective pixel level is 100 pixels in order from the highest pixel are detected as defective pixels, and are stored in the RAM 44 as address data of defective pixels in the third priority correction pixel group P 3M ′ (M = 1, 2). A combination of the 100 defective pixels detected as the third priority correction pixel group P 31 ′ and the 100 defective pixels detected as the third priority correction pixel group P 32 ′ (third priority) The correction pixel group P 3 ′) is obtained by adding the 200 defective pixels of the first priority correction pixel group P 1 ′ and the 300 defective pixels of the second priority correction pixel group P 2 ′. When the exposure time is 8 seconds, 700 defective pixels are corrected.

次に、両分割画像E、Fの各画素の中から、それぞれにおける第3優先補正画素群P´(第3優先補正画素群P31´または第3優先補正画素群P32´)の中の最も欠陥画素レベルが低いものよりも欠陥画素レベルが低いことを前提として、欠陥画素レベルが高い画素から順に150個の画素を欠陥画素として検出し、第4優先補正画素群P4M´(M=1、2)の欠陥画素のアドレスデータとして、RAM44に格納する。これらの、第4優先補正画素群P41´として検出された150個の欠陥画素と、第4優先補正画素群P42´として検出された150個の欠陥画素とを合わせたもの(第4優先補正画素群P´とする)は、上記した第1優先補正画素群P´の200個の欠陥画素、第2優先補正画素群P´の300個の欠陥画素および第3優先補正画素群P´の200個の欠陥画素を加算することにより、露光時間が16秒の場合に補正する1000個の欠陥画素となる。 Next, among the pixels of the divided images E and F, in the third priority correction pixel group P 3 ′ (third priority correction pixel group P 31 ′ or third priority correction pixel group P 32 ′) in each pixel. Assuming that the defective pixel level is lower than that having the lowest defective pixel level, 150 pixels are detected as defective pixels in order from the pixel with the highest defective pixel level, and the fourth priority correction pixel group P 4M ′ (M = 1, 2) is stored in the RAM 44 as address data of defective pixels. A combination of 150 defective pixels detected as the fourth priority correction pixel group P 41 ′ and 150 defective pixels detected as the fourth priority correction pixel group P 42 ′ (fourth priority) The correction pixel group P 4 ′) includes the 200 defective pixels of the first priority correction pixel group P 1 ′, the 300 defective pixels and the third priority correction pixel of the second priority correction pixel group P 2 ′. By adding the 200 defective pixels of the group P 3 ′, 1000 defective pixels are corrected when the exposure time is 16 seconds.

次に、両分割画像E、Fの各画素の中から、それぞれにおける第3優先補正画素群P´(第4優先補正画素群P41´または第4優先補正画素群P42´)の中の最も欠陥画素レベルが低いものよりも欠陥画素レベルが低いことを前提として、欠陥画素レベルが高い画素から順に250個の画素を欠陥画素として検出し、第5優先補正画素群P5M´(M=1、2)の欠陥画素のアドレスデータとして、RAM44に格納する。これらの、第5優先補正画素群P51´として検出された250個の欠陥画素と、第5優先補正画素群P52´として検出された250個の欠陥画素とを合わせたもの(第5優先補正画素群P´とする)は、上記した第1優先補正画素群P´の200個の欠陥画素、第2優先補正画素群P´の300個の欠陥画素、第3優先補正画素群P´の200個の欠陥画素および第4優先補正画素群P´の200個の欠陥画素を加算することにより、露光時間が32秒の場合に補正する1500個の欠陥画素となる。 Next, among the pixels of the divided images E and F, in the third priority correction pixel group P 3 ′ (the fourth priority correction pixel group P 41 ′ or the fourth priority correction pixel group P 42 ′) in each pixel. Assuming that the defective pixel level is lower than the lowest defective pixel level, 250 pixels are detected as defective pixels in order from the pixel with the highest defective pixel level, and the fifth priority correction pixel group P 5M ′ (M = 1, 2) is stored in the RAM 44 as address data of defective pixels. A combination of 250 defective pixels detected as the fifth priority correction pixel group P 51 ′ and 250 defective pixels detected as the fifth priority correction pixel group P 52 ′ (fifth priority) The correction pixel group P 5 ′) includes the 200 defective pixels of the first priority correction pixel group P 1 ′, the 300 defective pixels of the second priority correction pixel group P 2 ′, and the third priority correction pixels. By adding the 200 defective pixels of the group P 3 ′ and the 200 defective pixels of the fourth priority correction pixel group P 4 ′, 1500 defective pixels are corrected when the exposure time is 32 seconds.

実施例3の制御部28では、上述したようにRAM44に格納した各優先補正画素群PNM´(N=1〜5、M=1、2)のアドレスデータ(図11参照)すなわち各欠陥画素データを利用して、欠陥画素補正処理を行う。図12は、この制御部28にて実行される実施例3の欠陥画素補正処理内容を示すフローチャートであり、図13は、図12のフローチャートにおけるステップS56の処理内容を示すフローチャートである。以下、図12のフローチャートの各ステップ(図13のフローチャートの各ステップも含む)について図11を用いて説明する。 In the control unit 28 of the third embodiment, as described above, address data (see FIG. 11) of each priority correction pixel group P NM ′ (N = 1 to 5, M = 1, 2) stored in the RAM 44, that is, each defective pixel. A defective pixel correction process is performed using the data. FIG. 12 is a flowchart showing the defective pixel correction process contents of the third embodiment executed by the control unit 28, and FIG. 13 is a flowchart showing the process contents of step S56 in the flowchart of FIG. Hereinafter, each step of the flowchart of FIG. 12 (including each step of the flowchart of FIG. 13) will be described with reference to FIG.

ステップS51では、設定された露光時間を取得して、ステップS52へ進む。このステップS51では、図5のフローチャートのステップS1と同様に、レリーズ2が押し下げられて撮影動作が開始されると、それにより得ることが可能となる当該撮影時の露光時間の情報を取得する。   In step S51, the set exposure time is acquired, and the process proceeds to step S52. In Step S51, as in Step S1 of the flowchart of FIG. 5, when the release 2 is pushed down and the photographing operation is started, information on the exposure time at the time of photographing that can be obtained is acquired.

ステップS52では、ステップS51での設定された露光時間の取得に続き、取得した露光時間が8秒以上であるか否かを判定し、Yesの場合はステップS53へ進み、Noの場合はステップS60へ進む。このステップS52では、欠陥画素補正処理の内容の切り換え、すなわち欠陥画素補正部42による欠陥画素補正動作の回数の切り換えのために、ステップS51で取得した露光時間の長さを判断している。実施例3では、記憶部43に登録(格納)可能な欠陥画素数が500であるのに対し、露光時間が4秒の場合の補正画素数が500に設定され、かつ露光時間が8秒の場合の補正画素数が700に設定されていることから、露光時間が8秒以上である場合の補正画素数が登録限度数を越えているので、欠陥画素補正部42による欠陥画素補正動作を2回とすべくステップS53へ進み、露光時間が4秒以下である場合の補正画素数が登録限度数以下であるので、欠陥画素補正部42による欠陥画素補正動作を1回とすべくステップS60へ進む。   In step S52, following the acquisition of the set exposure time in step S51, it is determined whether or not the acquired exposure time is 8 seconds or more. If Yes, the process proceeds to step S53. If No, step S60 is performed. Proceed to In step S52, the length of the exposure time acquired in step S51 is determined in order to switch the content of the defective pixel correction process, that is, to switch the number of defective pixel correction operations by the defective pixel correction unit 42. In the third embodiment, the number of defective pixels that can be registered (stored) in the storage unit 43 is 500, whereas the number of corrected pixels when the exposure time is 4 seconds is set to 500, and the exposure time is 8 seconds. In this case, since the number of corrected pixels is set to 700, the number of corrected pixels when the exposure time is 8 seconds or more exceeds the registration limit number. The process proceeds to step S53 so that the number of corrected pixels when the exposure time is 4 seconds or less is equal to or less than the registration limit number. Therefore, the defective pixel correction unit 42 performs the defective pixel correction operation once to proceed to step S60. move on.

ステップS53では、ステップS52での露光時間が8秒以上であるとの判断に続き、補正優先度の高い欠陥画素の補正を実行して、ステップS54へ進む。このステップS53では、ステップS52にて露光時間が8秒以上であると判断したことから、欠陥画素補正部42の記憶部43に登録可能な欠陥画素数よりも多くの欠陥画素を補正する必要があるので、補正優先度の高い順すなわち欠陥画素レベル(輝度値)の大きい順から、記憶部43の登録限度数の欠陥画素を補正する。実施例3では、記憶部43の登録限度数が500であることから、第1優先補正画素群P´の200個の欠陥画素のアドレスデータと、第2優先補正画素群P´の300個の欠陥画素のアドレスデータと、を、RAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。その後、欠陥画素補正部42が、送られてきた画像データ(その各画素データ)において、記憶部43に登録された欠陥画素のアドレスに相当する画素データを読み出し、その周辺のRGBフィルタで見て同じ色に対応した画素データで補間することにより、第1優先補正画素群P´の200個の欠陥画素と、第2優先補正画素群P´の300個の欠陥画素と、の合計500個の欠陥画素の補正を行う。 In step S53, following the determination that the exposure time in step S52 is 8 seconds or longer, correction of defective pixels having a high correction priority is executed, and the flow proceeds to step S54. In step S53, since it is determined in step S52 that the exposure time is 8 seconds or more, it is necessary to correct more defective pixels than the number of defective pixels that can be registered in the storage unit 43 of the defective pixel correction unit 42. Therefore, the registration limit number of defective pixels in the storage unit 43 is corrected in descending order of correction priority, that is, in order of increasing defective pixel level (luminance value). In Example 3, since the registration limit number of the storage unit 43 is 500, the address data of 200 defective pixels of the first priority correction pixel group P 1 ′ and 300 of the second priority correction pixel group P 2 ′. The address data of the defective pixels is read from the RAM 44 and registered (stored) in the storage unit 43 of the defective pixel correction unit 42. Thereafter, the defective pixel correction unit 42 reads out pixel data corresponding to the address of the defective pixel registered in the storage unit 43 in the received image data (each pixel data), and looks at the surrounding RGB filters. By interpolating with pixel data corresponding to the same color, the total of 500 defective pixels of the first priority correction pixel group P 1 ′ and 300 defective pixels of the second priority correction pixel group P 2 ′ is 500. Correction of defective pixels is performed.

ステップS54では、ステップS53での補正優先度の高い欠陥画素の補正の実行に続き、ステップS51で取得した露光時間に応じた補正画素数を読み出して、ステップS55へ進む。このステップS54では、RAM44に格納された露光時間に応じた補正画素数を読み出す。   In step S54, following the execution of correction of defective pixels having a high correction priority in step S53, the number of correction pixels corresponding to the exposure time acquired in step S51 is read, and the process proceeds to step S55. In step S54, the number of corrected pixels corresponding to the exposure time stored in the RAM 44 is read out.

ステップS55では、ステップS54での露光時間に応じた補正画素数の読み出しに続き、取得した露光時間に対応する分割数S´を設定して、ステップS56へ進む。このステップS55では、読み出した露光時間に応じた補正画素数から、記憶部43に登録可能な欠陥画素数(500)を減算した値を、当該欠陥画素数(500)で除算し、その商が1以下であれば分割数S´を1に、商が1よりも大きく2以下であれば分割数S´を2に設定する。すなわち、露光時間に応じた補正画素数のうち、ステップS53にて既に欠陥画素補正を行った補正優先度の高い欠陥画素の数を減算した残りの補正画素数のすべてを欠陥画素補正部42で補正するために必要となる欠陥画素補正動作の回数を、分割数S´(S=1、2)として設定する。具体的には、露光時間が8秒の場合の分割数S´を1とし、露光時間が16秒の場合の分割数S´を1とし、露光時間が32秒の場合の分割数S´を2としている(図8(b)参照)。なお、基本的には、読み出した露光時間に応じた補正画素数から、記憶部43の欠陥画素数(500)を減算した値を、当該欠陥画素数で除算し、その商の小数点以下を切り上げた値を分割数Sとするものである。また、このステップS55では、カウンタ数Cを1に設定する。このカウンタ数Cは、分割数S´で等分された各分割画像(E、F(図8(b)参照))の画像データ(分割画像データISC´(S:分割数、C:カウンタ数))の何れに該当するものであるかを表すものであり、E、Fの順に1、2を当て嵌めている。このため、分割数S´が2の場合、画像データは、分割画像Eの分割画像データI21´と分割画像Fの分割画像データI22´とに分割される(図8(b)参照)。 In step S55, following the readout of the number of corrected pixels corresponding to the exposure time in step S54, a division number S ′ corresponding to the acquired exposure time is set, and the process proceeds to step S56. In step S55, a value obtained by subtracting the number of defective pixels (500) that can be registered in the storage unit 43 from the number of corrected pixels corresponding to the read exposure time is divided by the number of defective pixels (500), and the quotient is obtained. If the number is 1 or less, the division number S ′ is set to 1, and if the quotient is larger than 1 and 2 or less, the division number S ′ is set to 2. That is, of the number of corrected pixels corresponding to the exposure time, all the remaining corrected pixel numbers obtained by subtracting the number of defective pixels with high correction priority already corrected in step S53 are used by the defective pixel correction unit 42. The number of defective pixel correction operations required for correction is set as the division number S ′ (S = 1, 2). Specifically, the division number S ′ when the exposure time is 8 seconds is 1, the division number S ′ is 1 when the exposure time is 16 seconds, and the division number S ′ when the exposure time is 32 seconds. 2 (see FIG. 8B). Basically, the value obtained by subtracting the number of defective pixels (500) in the storage unit 43 from the number of corrected pixels corresponding to the read exposure time is divided by the number of defective pixels, and the decimal part of the quotient is rounded up. The obtained value is the division number S. In step S55, the counter number C is set to 1. This counter number C is the image data (divided image data I SC ′ (S: division number, C: counter) of each divided image (E, F (see FIG. 8B)) equally divided by the division number S ′. It represents which of the number)), and 1 and 2 are applied in the order of E and F. Therefore, when the division number S'is 2, image data is divided into 'a divided image F of the divided image data I 22' divided image data I 21 of the divided image E (FIG. 8 (b) see) .

ステップS56では、ステップS55での分割数S´の設定、あるいはステップS59でのカウンタ数Cのインクリメントに続き、その分割数S´および露光時間に応じた欠陥画素補正の準備を行って、ステップS57へ進む。このステップS56では、ステップS51で取得した露光時間に応じた補正画素数の画素を補正する(実質的に補正画素数を設定する)ために、各優先補正画素群PNM´(N=3〜5、M=1、2)のアドレスデータをRAM44から適宜読み出して、欠陥画素補正部42の記憶部43に登録(格納)することにより、露光時間に応じた欠陥画素補正の準備を行う(これを処理Cとする)。以下では、この露光時間に応じた欠陥画素補正の準備(ステップS56)における処理内容を示す図13のフローチャートの各ステップについて説明する。なお、上述したように、この図13のフローチャートに進んでくる場合、図12のフローチャートにおいて、ステップS51→ステップS52→ステップS53→ステップS54→ステップS55へと進んできている場面であることから、補正優先度の高い500個の欠陥画素(第1優先補正画素群P´の200個の欠陥画素と、第2優先補正画素群P´の300個の欠陥画素と、の合計500個の欠陥画素)の補正が既に完了している。 In step S56, following the setting of the division number S ′ in step S55 or the increment of the counter number C in step S59, preparation for defective pixel correction is performed in accordance with the division number S ′ and the exposure time. Proceed to In this step S56, each of the priority correction pixel groups P NM ′ (N = 3 to 3) is corrected in order to correct the pixels with the correction pixel number corresponding to the exposure time acquired in step S51 (substantially set the correction pixel number). 5, M = 1, 2) is read from the RAM 44 as appropriate and registered (stored) in the storage unit 43 of the defective pixel correction unit 42 to prepare for defective pixel correction according to the exposure time (this) Is treated as C). Below, each step of the flowchart of FIG. 13 which shows the processing content in the preparation (step S56) of the defective pixel correction | amendment according to this exposure time is demonstrated. As described above, when the process proceeds to the flowchart of FIG. 13, the process proceeds from step S51 → step S52 → step S53 → step S54 → step S55 in the flowchart of FIG. A total of 500 defective pixels having a high correction priority (200 defective pixels in the first priority correction pixel group P 1 ′ and 300 defective pixels in the second priority correction pixel group P 2 ′). (Defective pixel) has already been corrected.

ステップS71では、ステップS51で取得した露光時間が8秒であるか否かを判定し、Yesの場合はステップS72へ進み、Noの場合はステップS73へ進む。   In step S71, it is determined whether or not the exposure time acquired in step S51 is 8 seconds. If Yes, the process proceeds to step S72. If No, the process proceeds to step S73.

ステップS72では、ステップS71での露光時間が8秒であるとの判断に続き、8秒の露光時間に応じた欠陥画素補正の準備を行って、処理C(ステップS56)を終了し、ステップS57(図12参照)へと進む。ここで、露光時間が8秒である場合、図12のフローチャートのステップS55において、分割数S´が1に設定されている場面である。このステップS72では、8秒の露光時間に応じた欠陥画素補正の準備として、分割数1であることからそのまま画像データとなる分割画像データI11´におけるすべての欠陥画素の補正のために、第3優先補正画素群P3M´(M=1、2)の各100個の欠陥画素のアドレスデータ(図11参照)の計200個の欠陥画素のアドレスデータをRAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。 In step S72, following the determination that the exposure time in step S71 is 8 seconds, preparation for defective pixel correction corresponding to the exposure time of 8 seconds is made, and the process C (step S56) is terminated, and step S57 is completed. Proceed to (see FIG. 12). Here, when the exposure time is 8 seconds, the division number S ′ is set to 1 in step S55 of the flowchart of FIG. In this step S72, as preparation for defective pixel correction corresponding to an exposure time of 8 seconds, the number of divisions is 1, so that all defective pixels in the divided image data I 11 ′, which is image data as it is, are corrected for the first time. Address data of a total of 200 defective pixels of the address data (see FIG. 11) of each 100 defective pixels of the 3-priority correction pixel group P 3M ′ (M = 1, 2) is read from the RAM 44, and a defective pixel correction unit 42 is registered (stored) in the storage unit 43.

ステップS73では、ステップS71での露光時間が8秒ではないとの判断に続き、ステップS51で取得した露光時間が16秒であるか否かを判定し、Yesの場合はステップS74へ進み、Noの場合はステップS75へ進む。   In step S73, following the determination that the exposure time in step S71 is not 8 seconds, it is determined whether the exposure time acquired in step S51 is 16 seconds. If Yes, the process proceeds to step S74. In this case, the process proceeds to step S75.

ステップS74では、ステップS73での露光時間が16秒であるとの判断に続き、16秒の露光時間に応じた欠陥画素補正の準備を行って、処理C(ステップS56)を終了し、ステップS57(図9参照)へと進む。ここで、露光時間が16秒である場合、図12のフローチャートのステップS55において、分割数S´が1に設定されている場面である。このステップS74では、16秒の露光時間に応じた欠陥画素補正の準備として、分割数1であることからそのまま画像データとなる分割画像データI11´におけるすべての欠陥画素の補正のために、第3優先補正画素群P3M´(M=1、2)の各100個の欠陥画素のアドレスデータおよび第4優先補正画素群P4M´(M=1、2)の各150個の欠陥画素のアドレスデータ(図4参照)、の計500個の欠陥画素のアドレスデータをRAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。 In step S74, following the determination that the exposure time in step S73 is 16 seconds, preparation for defective pixel correction corresponding to the exposure time of 16 seconds is made, and the process C (step S56) is terminated, and step S57 is completed. Proceed to (see FIG. 9). Here, when the exposure time is 16 seconds, the division number S ′ is set to 1 in step S55 of the flowchart of FIG. In this step S74, as preparation for defective pixel correction according to the exposure time of 16 seconds, the number of divisions is 1, so that all the defective pixels in the divided image data I 11 ′ as image data as they are are corrected. Address data of each 100 defective pixels of the 3 priority correction pixel group P 3M ′ (M = 1, 2) and 150 defective pixels of the 4th priority correction pixel group P 4M ′ (M = 1, 2). Address data (see FIG. 4) of a total of 500 defective pixels is read from the RAM 44 and registered (stored) in the storage unit 43 of the defective pixel correction unit 42.

ステップS75では、ステップS73での露光時間が16秒ではないとの判断に続き、カウンタ数Cが1であるか否かを判定し、Yesの場合はステップS76へ進み、Noの場合はステップS77へ進む。これは、ステップS73において露光時間が16秒ではない場合、設定されている露光時間の上限である32秒に設定されていることとなり、図12のフローチャートのステップS55において、分割数S´が2に設定されている場面であることから、後述するように、図12のフローチャートのステップS56からステップS59を経てステップS56へと戻る流れにおいてカウンタ数Cが1から2へと増加されて(ステップS59)分割画像Eおよび分割画像F(図8(b)参照)のそれぞれについて欠陥画素補正部42で欠陥画素補正動作を実行することとなるので、カウンタ数Cによって32秒の露光時間に応じた欠陥画素補正の準備が異なることによる。   In step S75, following the determination that the exposure time in step S73 is not 16 seconds, it is determined whether or not the counter number C is 1, the process proceeds to step S76 if Yes, and in step S77 if No. Proceed to This means that if the exposure time is not 16 seconds in step S73, the upper limit of the set exposure time is set to 32 seconds. In step S55 of the flowchart of FIG. Therefore, as will be described later, the counter number C is increased from 1 to 2 in the flow of returning from step S56 to step S59 in the flowchart of FIG. 12 (step S59). ) Since the defective pixel correction unit 42 executes the defective pixel correction operation for each of the divided image E and the divided image F (see FIG. 8B), the defect corresponding to the exposure time of 32 seconds by the counter number C. This is due to different pixel correction preparations.

ステップS76では、ステップS75でのカウンタ数Cが1であるとの判断に続き、32秒の露光時間に応じた分割画像E(図8(b)参照)の欠陥画素補正の準備を行って、処理C(ステップS56)を終了し、ステップS57(図12参照)へと進む。このステップS76では、32秒の露光時間に応じた分割画像E(図8(b)参照)の欠陥画素補正の準備として、画像データの半分となる分割画像データI21´におけるすべての欠陥画素の補正のために、32秒の露光時間に対応する優先番号(N=3〜5)であって画像データが2分割された分割画像Eに対応する番号(M=1)である第N優先補正画素群PNM´(N=3〜5、M=1)の各欠陥画素のアドレスデータ(図11参照)をRAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。すなわち、第3優先補正画素群P31´の100個の欠陥画素のアドレスデータ、第4優先補正画素群P41´の150個の欠陥画素のアドレスデータおよび第5優先補正画素群P51´の250個の欠陥画素のアドレスデータ(図11参照)、の計500個の欠陥画素のアドレスデータをRAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。 In step S76, following the determination that the counter number C in step S75 is 1, preparation for defective pixel correction of the divided image E (see FIG. 8B) corresponding to the exposure time of 32 seconds is performed. The process C (step S56) is terminated, and the process proceeds to step S57 (see FIG. 12). In this step S76, as preparation for defective pixel correction of the divided image E (see FIG. 8B) corresponding to the exposure time of 32 seconds, all defective pixels in the divided image data I 21 ′ that is half of the image data are obtained. For correction, the Nth priority correction is a priority number (N = 3 to 5) corresponding to the exposure time of 32 seconds and a number (M = 1) corresponding to the divided image E obtained by dividing the image data into two. Address data (see FIG. 11) of each defective pixel of the pixel group P NM ′ (N = 3 to 5, M = 1) is read from the RAM 44 and registered (stored) in the storage unit 43 of the defective pixel correction unit 42. That is, the address data of 100 defective pixels of the third priority correction pixel group P 31 ′, the address data of 150 defective pixels of the fourth priority correction pixel group P 41 ′, and the fifth priority correction pixel group P 51 ′. A total of 500 defective pixel address data of 250 defective pixels (see FIG. 11) is read from the RAM 44 and registered (stored) in the storage unit 43 of the defective pixel correction unit 42.

ステップS77では、ステップS75でのカウンタ数Cが1ではないとの判断に続き、32秒の露光時間に応じた分割画像F(図8(b)参照)の欠陥画素補正の準備を行って、処理C(ステップS56)を終了し、ステップS57(図12参照)へと進む。このステップS77では、32秒の露光時間に応じた分割画像F(図8(b)参照)の欠陥画素補正の準備として、画像データの半分となる分割画像データI22´におけるすべての欠陥画素の補正のために、32秒の露光時間に対応する優先番号(N=3〜5)であって画像データが2分割された分割画像Fに対応する番号(M=2)である第N優先補正画素群PNM´(N=3〜5、M=2)の各欠陥画素のアドレスデータ(図11参照)をRAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。すなわち、第3優先補正画素群P32´の100個の欠陥画素のアドレスデータ、第4優先補正画素群P42´の150個の欠陥画素のアドレスデータおよび第5優先補正画素群P52´の250個の欠陥画素のアドレスデータ(図11参照)、の計500個の欠陥画素のアドレスデータをRAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。 In step S77, following the determination that the counter number C in step S75 is not 1, preparation for defective pixel correction of the divided image F (see FIG. 8B) corresponding to the exposure time of 32 seconds is performed. The process C (step S56) is terminated, and the process proceeds to step S57 (see FIG. 12). In this step S77, as preparation for defective pixel correction of the divided image F (see FIG. 8B) corresponding to the exposure time of 32 seconds, all defective pixels in the divided image data I 22 ′ which is half of the image data are obtained. For correction, the Nth priority correction is a priority number (N = 3 to 5) corresponding to the exposure time of 32 seconds and a number (M = 2) corresponding to the divided image F obtained by dividing the image data into two. Address data (see FIG. 11) of each defective pixel of the pixel group P NM ′ (N = 3 to 5, M = 2) is read from the RAM 44 and registered (stored) in the storage unit 43 of the defective pixel correction unit 42. That is, address data of 100 defective pixels of the third priority correction pixel group P 32 ′, address data of 150 defective pixels of the fourth priority correction pixel group P 42 ′, and the fifth priority correction pixel group P 52 ′. A total of 500 defective pixel address data of 250 defective pixels (see FIG. 11) is read from the RAM 44 and registered (stored) in the storage unit 43 of the defective pixel correction unit 42.

ステップS57では、ステップS56での分割数S´および露光時間に応じた欠陥画素補正の準備に続き、露光時間に応じた分割数S´でのカウンタ数Cに対応する分割画像の分割画像データISC´に対して欠陥画素補正を実行して、ステップS58へ進む。このステップS57では、欠陥画素補正部42が、送られてきた画像データ(その各画素データ)のうちのカウンタ数Cに対応する分割画像データISC´において、記憶部43に登録された欠陥画素のアドレスに相当する画素データを読み出し、その周辺のRGBフィルタで見て同じ色に対応した画素データで補間することにより、ステップS56での露光時間に応じた欠陥画素補正の準備に応じた補正画素数の補正を行う。 In step S57, following the preparation of defective pixel correction according to the number of divisions S ′ and the exposure time in step S56, the divided image data I of the divided image corresponding to the counter number C at the number of divisions S ′ according to the exposure time. Defective pixel correction is executed for SC ′, and the process proceeds to step S58. In this step S57, the defective pixel correction unit 42 detects defective pixels registered in the storage unit 43 in the divided image data I SC ′ corresponding to the counter number C in the transmitted image data (each pixel data). Pixel data corresponding to the address of the correction pixel corresponding to the exposure time in step S56 by interpolating with pixel data corresponding to the same color as seen by the surrounding RGB filters Correct the number.

ステップS58では、ステップS57での露光時間に応じた分割数S´でのカウンタ数Cに対応する分割画像の分割画像データISCに対する欠陥画素補正の実行に続き、カウンタ数Cが分割数S´と等しいか否かを判定し、Yesの場合は図12のフローチャートを終了し、Noの場合はステップS59へ進む。このステップS58では、カウンタ数Cが露光時間に応じた分割数S´に等しいか否かを判断することにより、分割画像データISC´に対して欠陥画素補正を実行するステップS57が繰り返されることで、全ての分割画像すなわち分割される前の画像データのすべてに対して欠陥画素補正を行ったか否かを判断するものである。 At step S58, the continued execution of the defective pixel correction for the divided image data I SC of the divided image corresponding to the counter number C in the divided number S'according to the exposure time in step S57, the count C division number S' If YES, the flowchart of FIG. 12 is terminated, and if NO, the process proceeds to step S59. In this step S58, it is determined whether or not the counter number C is equal to the division number S ′ corresponding to the exposure time, whereby step S57 for performing defective pixel correction on the divided image data I SC ′ is repeated. Thus, it is determined whether or not defective pixel correction has been performed on all the divided images, that is, all of the image data before being divided.

ステップS59では、ステップS58でのカウンタ数Cが分割数S´と等しくないとの判断に続き、カウンタ数Cをインクリメント(C=C+1)して、ステップS56へと戻る。このステップS59は、分割される前の画像データのすべてに対して欠陥画素補正を行うために、ステップS57における分割画像データISC´に対する欠陥画素補正の実行の回数(カウンタ数C)を1ずつ加算する。 In step S59, following the determination that the counter number C is not equal to the division number S ′ in step S58, the counter number C is incremented (C = C + 1), and the process returns to step S56. In this step S59, in order to perform defective pixel correction on all of the image data before division, the number of executions of defective pixel correction (counter number C) for the divided image data I SC ′ in step S57 is incremented by one. to add.

ステップS60では、ステップS52での露光時間が8秒以上ではないとの判断に続き、露光時間に応じた欠陥画素補正の準備を行って、ステップS61へ進む。このステップS60では、図5のフローチャートのステップS4と同様に、ステップS51で取得した露光時間に応じた補正画素数の画素を補正するために、各優先補正画素群P´のアドレスデータをRAM44から適宜読み出して、欠陥画素補正部42の記憶部43に登録(格納)することにより、露光時間に応じた欠陥画素補正の準備を行う。このステップS60では、露光時間が2秒の場合、露光時間に応じた欠陥画素補正の準備として、第1優先補正画素群P´の200個の欠陥画素のアドレスデータ(図4参照)をRAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。また、露光時間が4秒の場合、露光時間に応じた欠陥画素補正の準備として、第1優先補正画素群P´の200個の欠陥画素のアドレスデータおよび第2優先補正画素群P´の300個の欠陥画素のアドレスデータ(図4参照)をRAM44から読み出して、欠陥画素補正部42の記憶部43に登録(格納)する。 In step S60, following the determination in step S52 that the exposure time is not 8 seconds or more, preparation for defective pixel correction according to the exposure time is performed, and the flow proceeds to step S61. In step S60, as in step S4 in the flowchart of FIG. 5, the address data of each priority correction pixel group P N ′ is stored in the RAM 44 in order to correct the pixels having the number of correction pixels corresponding to the exposure time acquired in step S51. Are appropriately read out and registered (stored) in the storage unit 43 of the defective pixel correction unit 42 to prepare for defective pixel correction according to the exposure time. In this step S60, when the exposure time is 2 seconds, the address data (see FIG. 4) of 200 defective pixels of the first priority correction pixel group P 1 ′ is prepared in the RAM 44 as preparation for defective pixel correction according to the exposure time. Are registered (stored) in the storage unit 43 of the defective pixel correction unit 42. When the exposure time is 4 seconds, the address data of 200 defective pixels of the first priority correction pixel group P 1 ′ and the second priority correction pixel group P 2 ′ are prepared as preparations for defective pixel correction according to the exposure time. Are read from the RAM 44 and registered (stored) in the storage unit 43 of the defective pixel correction unit 42.

ステップS61では、ステップS60での露光時間に応じた欠陥画素補正の準備に続き、露光時間に応じた欠陥画素補正を実行して、図12のフローチャートを終了する。このステップS61では、欠陥画素補正部42が、送られてきた画像データ(その各画素データ)において、記憶部43に登録された欠陥画素のアドレスに相当する画素データを読み出し、その周辺のRGBフィルタで見て同じ色に対応した画素データで補間することにより、ステップS60での露光時間に応じた欠陥画素補正の準備に応じた補正画素数の補正を行う。詳細には、露光時間が2秒の場合、第1優先補正画素群P´の200個の欠陥画素の補正を行い、露光時間が4秒の場合、第1優先補正画素群P´の200個の欠陥画素と第2優先補正画素群P´の300個の欠陥画素との合計500個の欠陥画素の補正を行う。このとき、何れの場面であっても、欠陥画素のアドレスデータの全てが記憶部43に登録可能であることから、欠陥画素補正部42では一度の欠陥画素補正動作で、露光時間に応じた補正画素数の欠陥画素の全てを補正することができる。このため、ステップS61では、露光時間が2秒もしくは4秒の場合であって、1回目の欠陥画素補正部42での欠陥画素補正動作として、ステップS51で取得した露光時間に応じた補正画素数の補正を実行することとなる。 In step S61, following the preparation for defective pixel correction corresponding to the exposure time in step S60, defective pixel correction corresponding to the exposure time is executed, and the flowchart of FIG. 12 ends. In step S61, the defective pixel correction unit 42 reads out pixel data corresponding to the address of the defective pixel registered in the storage unit 43 in the transmitted image data (each pixel data thereof), and the surrounding RGB filters In step S60, interpolation is performed using pixel data corresponding to the same color, thereby correcting the number of corrected pixels in accordance with the preparation for defective pixel correction in accordance with the exposure time in step S60. Specifically, when the exposure time is 2 seconds, 200 defective pixels of the first priority correction pixel group P 1 ′ are corrected, and when the exposure time is 4 seconds, the first priority correction pixel group P 1 ′ is corrected. A total of 500 defective pixels including 200 defective pixels and 300 defective pixels in the second priority correction pixel group P 2 ′ are corrected. At this time, since all of the defective pixel address data can be registered in the storage unit 43 in any scene, the defective pixel correction unit 42 performs correction according to the exposure time by one defective pixel correction operation. All of the defective pixels of the number of pixels can be corrected. Therefore, in step S61, the exposure time is 2 seconds or 4 seconds, and the number of corrected pixels corresponding to the exposure time acquired in step S51 is used as the defective pixel correction operation in the first defective pixel correction unit 42. Correction is executed.

このように、実施例3の欠陥画素補正処理では、撮像素子(CCD20)において補正対象とする欠陥画素の数が、欠陥画素補正部42の記憶部43に登録可能な欠陥画素数以内である場合(実施例3では露光時間が2秒あるいは4秒の場合)、ステップS51→ステップS52→ステップS60→ステップS61へと進んで、等分されていないそのままの画像(画像データ)に対して、欠陥画素補正部42で取得した露光時間に応じた補正画素数の欠陥画素補正動作を行う。このため、全体としての処理内容をより簡易なものとしつつ、露光時間に応じた補正画素数の欠陥画素補正を行うことができる。   As described above, in the defective pixel correction process according to the third embodiment, the number of defective pixels to be corrected in the image sensor (CCD 20) is within the number of defective pixels that can be registered in the storage unit 43 of the defective pixel correction unit 42. (In Example 3, when the exposure time is 2 seconds or 4 seconds), the process proceeds from step S51 to step S52 to step S60 to step S61. A defective pixel correction operation with the number of corrected pixels corresponding to the exposure time acquired by the pixel correction unit 42 is performed. For this reason, it is possible to perform defective pixel correction of the number of corrected pixels corresponding to the exposure time while making the processing content as a whole simpler.

また、撮像素子(CCD20)において補正対象とする欠陥画素の数が、欠陥画素補正部42の記憶部43に登録可能な欠陥画素数を超える場合(実施例3では露光時間が8秒、16秒あるいは32秒の場合)、ステップS51→ステップS52→ステップS53へと進んで、先ず、補正優先度の高い500個の欠陥画素(第1優先補正画素群P´の200個の欠陥画素および第2優先補正画素群P´の300個の欠陥画素)の補正を行い、その後、ステップS54→ステップS55→ステップS56→ステップS57へと進んで、取得した露光時間に応じた補正画素数のうちの補正をしていない残りの欠陥画素数に対応して分割数S´を設定し(ステップS55)、画像(画像データ)を分割数S´で等分して、それぞれの分割画像データISC´に対する欠陥画素補正部42での欠陥画素補正動作の繰り返しにより、補正対象となる画素データを重複させることなく画像データのすべてに対して欠陥画素補正を行う(ステップS57)。このとき、ステップS56において、ステップS57での欠陥画素補正の実行の回数(カウンタ数C)に応じた分割画像データISC´における各欠陥画素のアドレスデータをRAM44に格納していることから、ステップS56→ステップS57→ステップS58→ステップS59へと進んでステップS56へと戻る流れが繰り返されることにより、分割される前の画像データのすべてに対して欠陥画素補正を行うことができる。これは、例えば、露光時間が32秒に設定されて(補正画素数は1500個)いる場合、ステップS51→ステップS52→ステップS53→ステップS54→ステップS55へと進むことにより、分割数S´が2とされて画像データを分割画像E、Fに等分する。その後、ステップS56で露光時間32秒に応じた分割画像Eの分割画像データI21´の欠陥画素補正のための準備を行ってステップS57へと進むことにより、欠陥画素補正部42が、送られてきた画像データのうちの分割画像データI21´において、記憶部43に登録された欠陥画素のアドレスに相当する画素データ(第3優先補正画素群P31´の100個の欠陥画素、第4優先補正画素群P41´の150個の欠陥画素および第5優先補正画素群P51´の250個、の計500個の欠陥画素)を読み出し、その周辺のRGBフィルタで見て同じ色に対応した画素データで補間して、分割画像Eの露光時間32秒に応じた欠陥画素補正が終了する。その後、ステップS58へと進むがカウンタ数Cが1であって分割数S´=2に等しくないことから、ステップS59へと進んでステップS56へと戻ることにより、露光時間32秒に応じた分割画像Fの分割画像データI22´の欠陥画素補正のための準備を行う。その後、ステップS57へと進むことにより、欠陥画素補正部42に、送られてきた画像データのうちの分割画像データI22´において、記憶部43に登録された欠陥画素のアドレスに相当する画素データ(第3優先補正画素群P32´の100個の欠陥画素、第4優先補正画素群P42´の150個の欠陥画素および第5優先補正画素群P52´の250個の欠陥画素、の計500個の欠陥画素)を読み出し、その周辺のRGBフィルタで見て同じ色に対応した画素データで補間して、分割画像Fの欠陥画素補正が終了する。その後、ステップS58へと進むと、カウンタ数Cが2となっていることからステップS59へと進むことはなく図12のフローチャートを終了することにより、上記した分割画像Eおよび分割画像Fの欠陥画素補正が終了し、分割される前の画像データのすべてに対して欠陥画素補正を行うことができる。このとき、何れの場面であっても、欠陥画素のアドレスデータの全てが記憶部43に登録可能であることから、欠陥画素補正部42では一度の欠陥画素補正動作で、露光時間に応じた分割数S´でのカウンタ数Cに対応する分割画像の分割画像データISC´の欠陥画素の全てを補正することができる。 When the number of defective pixels to be corrected in the image sensor (CCD 20) exceeds the number of defective pixels that can be registered in the storage unit 43 of the defective pixel correction unit 42 (in Example 3, the exposure time is 8 seconds and 16 seconds). Alternatively, in the case of 32 seconds), the process proceeds from step S51 to step S52 to step S53, and first, 500 defective pixels having a high correction priority (200 defective pixels in the first priority correction pixel group P 1 ′ and the first) (300 defective pixels in the 2-priority correction pixel group P 2 ′), and then proceeds to step S54 → step S55 → step S56 → step S57, and out of the number of correction pixels corresponding to the acquired exposure time The division number S ′ is set corresponding to the number of remaining defective pixels that have not been corrected (step S55), the image (image data) is equally divided by the division number S ′, and each divided image data is divided. By repeating the defective pixel correction operation in the defective pixel correction unit 42 with respect to data I SC ', performs defective pixel correction for all of the image data without overlapping the pixel data to be corrected (step S57). At this time, in step S56, the address data of each defective pixel in the divided image data I SC ′ corresponding to the number of executions of the defective pixel correction (counter number C) in step S57 is stored in the RAM 44. By repeating the flow from S56 → step S57 → step S58 → step S59 and returning to step S56, defective pixel correction can be performed on all of the image data before being divided. For example, when the exposure time is set to 32 seconds (the number of correction pixels is 1500), the division number S ′ is set by proceeding from step S51 → step S52 → step S53 → step S54 → step S55. 2 and the image data is equally divided into divided images E and F. Thereafter, preparation for defective pixel correction of the divided image data I 21 ′ of the divided image E corresponding to the exposure time of 32 seconds is performed in step S56, and the process proceeds to step S57, whereby the defective pixel correction unit 42 is sent. In the divided image data I 21 ′ of the received image data, the pixel data corresponding to the address of the defective pixel registered in the storage unit 43 (100 defective pixels of the third priority correction pixel group P 31 ′, fourth 150 defective pixels in the priority correction pixel group P 41 ′ and 250 defective pixels in the fifth priority correction pixel group P 51 ′ (total 500 defective pixels) are read out and correspond to the same color as seen by the surrounding RGB filters The defective pixel correction corresponding to the exposure time of 32 seconds of the divided image E is completed by interpolating with the pixel data. Thereafter, the process proceeds to step S58, but since the counter number C is 1 and is not equal to the division number S ′ = 2, the process proceeds to step S59 and returns to step S56, thereby dividing the exposure time according to 32 seconds. Preparation for defect pixel correction of the divided image data I 22 ′ of the image F is performed. Thereafter, by proceeding to step S57, pixel data corresponding to the address of the defective pixel registered in the storage unit 43 in the divided image data I 22 ′ of the image data sent to the defective pixel correction unit 42. (100 defective pixels in the third priority correction pixel group P 32 ′, 150 defective pixels in the fourth priority correction pixel group P 42 ′, and 250 defective pixels in the fifth priority correction pixel group P 52 ′ A total of 500 defective pixels) is read out and interpolated with pixel data corresponding to the same color as seen by the surrounding RGB filters, and the defective pixel correction of the divided image F is completed. Thereafter, when the process proceeds to step S58, since the counter number C is 2, the process does not proceed to step S59, and the flowchart of FIG. After the correction is completed, defective pixel correction can be performed on all of the image data before being divided. At this time, since any defective pixel address data can be registered in the storage unit 43 in any scene, the defective pixel correction unit 42 performs a single defective pixel correction operation to perform division according to the exposure time. All of the defective pixels in the divided image data I SC ′ of the divided image corresponding to the counter number C in the number S ′ can be corrected.

実施例3の欠陥画素補正処理では、撮像素子(CCD20)において補正対象とする欠陥画素の数が、欠陥画素補正部42の記憶部43に登録可能な欠陥画素数を超える場合(実施例3では露光時間が8秒、16秒あるいは32秒の場合)であっても、当該記憶部43への登録内容を書き換えつつ、すなわち記憶部43における欠陥画素データの登録内容を変更しつつ、欠陥画素補正部42での欠陥画素補正の動作を繰り返すことから、補正が必要とされる欠陥画素数と記憶部43の登録限度数との関係に拘らず、撮像素子(CCD20)の全ての欠陥画素を補正することができる。   In the defective pixel correction process of the third embodiment, when the number of defective pixels to be corrected in the image sensor (CCD 20) exceeds the number of defective pixels that can be registered in the storage unit 43 of the defective pixel correction unit 42 (in the third embodiment). Even when the exposure time is 8 seconds, 16 seconds, or 32 seconds, the defective pixel correction is performed while rewriting the registration content in the storage unit 43, that is, changing the registration content of the defective pixel data in the storage unit 43. Since the defective pixel correction operation in the unit 42 is repeated, all defective pixels in the image sensor (CCD 20) are corrected regardless of the relationship between the number of defective pixels that need correction and the registration limit number in the storage unit 43. can do.

また、実施例3の欠陥画素補正処理では、撮像素子(CCD20)において補正対象とする欠陥画素の数が、欠陥画素補正部42の記憶部43に登録可能な欠陥画素数を超えない場合は、画像(画像データ)全体に対する欠陥画素補正部42での1回分の欠陥画素補正動作の処理時間で、より適切に欠陥画素補正をすることができる。これは、画像(画像データ)全体に対して欠陥画素補正部42が欠陥画素補正動作を行うことから、注目した欠陥画素の両隣の画素が存在する確率が高まることと、画像(画像データ)全体における各欠陥画素の分散具合に偏りがあった場合であっても当該偏りに拘らず確実に欠陥画素レベルの高い画素を優先的に補正することができることと、による。   In the defective pixel correction process of the third embodiment, when the number of defective pixels to be corrected in the image sensor (CCD 20) does not exceed the number of defective pixels that can be registered in the storage unit 43 of the defective pixel correction unit 42, The defective pixel correction can be performed more appropriately in the processing time of one defective pixel correction operation in the defective pixel correction unit 42 for the entire image (image data). This is because the defective pixel correction unit 42 performs the defective pixel correction operation on the entire image (image data), so that the probability that there is a pixel adjacent to the defective pixel of interest increases, and the entire image (image data). Even if there is a bias in the distribution of each defective pixel in the above, it is possible to reliably preferentially correct a pixel having a high defective pixel level regardless of the bias.

さらに、実施例3の欠陥画素補正処理では、撮像素子(CCD20)において補正対象とする欠陥画素の数が、欠陥画素補正部42の記憶部43に登録可能な欠陥画素数を超える場合であっても、画像(画像データ)全体に対する欠陥画素補正部42での略2回分の欠陥画素補正動作の処理時間で、より適切に欠陥画素補正をすることができる。すなわち、画像(画像データ)全体に対して、先ず、補正優先度の高い500個の欠陥画素の補正を行い、その後に、残りの各欠陥画素に対して分割数S´を設定し、元の画像データを分割数S´で等分したそれぞれの分割画像データISC´に対して欠陥画素補正動作を行う(ステップS57)ことから、画像(画像データ)全体に対して欠陥画素補正をすることによるより適切な補正が可能であるという効果と、元の画像データを分割数S´で等分して欠陥画素補正をすることによる処理時間の増大を抑制する効果と、の双方を調和させつつ得ることができる。 Furthermore, in the defective pixel correction process of the third embodiment, the number of defective pixels to be corrected in the image sensor (CCD 20) exceeds the number of defective pixels that can be registered in the storage unit 43 of the defective pixel correction unit 42. In addition, the defective pixel correction can be performed more appropriately in the processing time of the defective pixel correction operation for approximately two times in the defective pixel correction unit 42 for the entire image (image data). That is, for the entire image (image data), first, 500 defective pixels having a high correction priority are corrected, and then the division number S ′ is set for each remaining defective pixel. Since the defective pixel correction operation is performed on each divided image data I SC ′ obtained by equally dividing the image data by the division number S ′ (step S57), the defective pixel correction is performed on the entire image (image data). While harmonizing both the effect that a more appropriate correction can be performed by the above and the effect of suppressing an increase in processing time by correcting the defective pixel by equally dividing the original image data by the division number S ′ Can be obtained.

実施例3の欠陥画素補正処理では、露光時間に応じて補正する画素数を変更していることから、露光時間に応じた必要な補正画素数だけ補正することができ、欠陥画素の補正不足や過補正に基因する画質の低下を防止することができる。   In the defective pixel correction process according to the third embodiment, since the number of pixels to be corrected is changed according to the exposure time, it is possible to correct only the necessary number of correction pixels according to the exposure time. It is possible to prevent a deterioration in image quality due to overcorrection.

実施例3の欠陥画素補正処理では、欠陥画素レベルが高い画素を優先的に補正することから、画像(画像データ)上において欠陥画素と認識され易い画素を優先的に補正することができるので、より効率的に画質を向上させることができる。   In the defective pixel correction process according to the third embodiment, since pixels with high defective pixel levels are preferentially corrected, pixels that are easily recognized as defective pixels on an image (image data) can be preferentially corrected. The image quality can be improved more efficiently.

このため、本発明に係る撮像装置のデジタルカメラ1では、記憶部43での登録限度数に拘らず、補正対象とするすべての欠陥画素を適切に補正することができる。これにより、暗電流が増えたり蓄積されたりする条件、例えば、撮像素子(CCD20)の温度が上昇したり露光時間が長い状況で撮影された画像(画像データ)であっても、その品質を向上させることができる。   For this reason, in the digital camera 1 of the imaging device according to the present invention, it is possible to appropriately correct all defective pixels to be corrected regardless of the registration limit number in the storage unit 43. As a result, even when dark current increases or accumulates, for example, an image (image data) taken in a situation where the temperature of the image sensor (CCD 20) rises or the exposure time is long, the quality is improved. Can be made.

特に、実施例3の欠陥画素補正処理では、補正が必要とされる欠陥画素数と記憶部43の登録限度数との関係に拘らず、撮像素子(CCD20)の全ての欠陥画素をより適切に補正することができるとともに、欠陥画素補正部42で欠陥画素補正動作を繰り返すことに伴って処理時間が増大することを抑制することができる。   In particular, in the defective pixel correction process according to the third embodiment, all defective pixels of the image sensor (CCD 20) are more appropriately determined regardless of the relationship between the number of defective pixels that need correction and the registration limit number of the storage unit 43. In addition to correction, it is possible to suppress an increase in processing time due to the defective pixel correction unit 42 repeating the defective pixel correction operation.

なお、上記した実施例3では、欠陥画素の影響の変化の判断基準を露光時間として露光時間に応じた補正画素数が設定されている例を示したが、動的な欠陥要因である温度キズの影響が変化する要因を基準として補正画素数を設定するものであれば、例えば、ISO感度に応じた補正画素数の設定に基づいて補正画素数を設定するものであってもよく、実施例3に限定されるものではない。   In the above-described third embodiment, an example is shown in which the number of correction pixels corresponding to the exposure time is set with the exposure time as the criterion for determining the change in the influence of defective pixels. For example, the correction pixel number may be set based on the setting of the correction pixel number according to the ISO sensitivity. It is not limited to three.

また、実施例3では、欠陥画素補正部42の記憶部43に登録可能な欠陥画素数が500であり、かつ露光時間に応じた補正画素数の設定が露光時間32秒の場合の補正画素数1500を最大としていたが、各数値は例示であってこれらに限定されるものではない。ここで、設定した補正画素数が登録限度数の3倍以上である場合、少なくとも、当該補正画素数から登録限度数を減算した値(差分)を、登録限度数で除算して得られた商の少数以下を切り上げた値を分割数S´として設定すればよい。   Further, in the third embodiment, the number of corrected pixels when the number of defective pixels that can be registered in the storage unit 43 of the defective pixel correcting unit 42 is 500 and the setting of the number of corrected pixels according to the exposure time is an exposure time of 32 seconds. Although 1500 is set as the maximum, each numerical value is an example and is not limited thereto. Here, when the set number of correction pixels is three times or more of the registration limit number, at least a quotient obtained by dividing the registration pixel number by the registration limit number by subtracting the registration limit number from the correction pixel number. What is necessary is just to set the value which rounded up the lesser than this as division | segmentation number S '.

さらに、実施例3では、露光時間に応じた補正画素数に対応して分割数S´を設定して、その分割数S´および露光時間に応じた欠陥画素補正の準備を行うものとしていたが、分割数S´の最大値で等分(実施例3では2)された領域の画像データ毎に各優先補正画素群PNM´を取得してRAM44に格納していることから、分割数S´が最大値の約数(実施例3では、1)である場合(露光時間が8、16秒)、最大値で等分された画像データ毎の各優先補正画素群PNM´を合わせることとなる(ステップS72およびステップS74参照)ので、分割数S´を常に最大値として欠陥画素補正の準備を行うものとしてもよい。 Furthermore, in the third embodiment, the division number S ′ is set corresponding to the number of correction pixels corresponding to the exposure time, and preparation for defective pixel correction corresponding to the division number S ′ and the exposure time is performed. Since each priority correction pixel group P NM ′ is acquired and stored in the RAM 44 for each image data of an area equally divided by the maximum value of the division number S ′ (2 in the third embodiment), the division number S When 'is a divisor of the maximum value (1 in the third embodiment) (exposure time is 8 and 16 seconds), each priority correction pixel group P NM ' for each image data equally divided by the maximum value is combined. Therefore (see step S72 and step S74), the number of divisions S ′ may always be set to the maximum value to prepare for defective pixel correction.

実施例3では、分割数S´の最大値(実施例3では2)で等分された領域の画像データ毎に各優先補正画素群PNM´を取得してRAM44に格納していたが、露光時間に応じた欠陥画素補正の準備を可能とする、すなわち各欠陥画素のアドレスデータを欠陥画素補正部42の記憶部43に適宜登録することができるものであればよく、実施例3に限定されるものではない。 In the third embodiment, each priority correction pixel group P NM ′ is acquired and stored in the RAM 44 for each image data of an area equally divided by the maximum value of the division number S ′ (2 in the third embodiment). Any device may be used as long as it can prepare for defective pixel correction according to the exposure time, that is, can register address data of each defective pixel in the storage unit 43 of the defective pixel correction unit 42 as appropriate. Is not to be done.

以上、本発明を各実施例に基づき詳述してきたが、これらの具体的な構成に限らず、本発明の趣旨を逸脱しない程度の設計的変更は、本発明の技術的範囲に含まれる。   As described above, the present invention has been described in detail based on the respective embodiments. However, the present invention is not limited to these specific configurations, and design changes that do not depart from the spirit of the present invention are included in the technical scope of the present invention.

なお、上記した各実施例では、各露光時間に応じた補正画素数を設定し、それを判断基準として各露光時間での欠陥画素を検出していたが、実際にデジタルスチルカメラ(デジタルカメラ1)にセンサ(CCD20)を搭載した状態において、設定された各露光時間における取得したダーク画像(画像データ)で輝点として現れる画素(画素データ)の輝度値を把握して、露光時間に応じて出現する輝点(画素)の全てを補正するために充分だと判断できる輝度値を、露光時間に応じた欠陥画素レベルの閾値(補正判断値)として設定し、その露光時間に応じた欠陥画素レベルを判断基準として各露光時間での欠陥画素を検出するものであってもよい。このことは、欠陥画素(温度キズ)の影響の変化の判断基準をISO感度とした場合であっても同様である。   In each of the above-described embodiments, the number of corrected pixels corresponding to each exposure time is set, and defective pixels at each exposure time are detected based on the correction pixel number. However, in actuality, a digital still camera (digital camera 1) is used. ) In the state where the sensor (CCD 20) is mounted, the luminance value of the pixel (pixel data) appearing as a bright spot in the acquired dark image (image data) at each set exposure time is grasped, and according to the exposure time. A luminance value that can be determined to be sufficient for correcting all of the appearing bright spots (pixels) is set as a threshold value (correction determination value) of a defective pixel level corresponding to the exposure time, and the defective pixel corresponding to the exposure time is set. A defective pixel at each exposure time may be detected using the level as a criterion. This is the same even when the ISO sensitivity is used as a criterion for determining the change in the influence of defective pixels (temperature scratches).

また、上記した各実施例では、撮像素子(CCD20)にRGBフィルタが設けられていたが、当該フィルタを設けずに構成されていてもよい。この場合、欠陥画素補正部42における欠陥画素補正では、色の区分けを考慮することなく、注目した欠陥画素に隣接する両隣の画素データの平均値を、当該注目した欠陥画素の画素データとすることにより補間すればよい。   In each of the above-described embodiments, the RGB filter is provided in the image sensor (CCD 20). However, the image sensor (CCD 20) may be configured without the filter. In this case, in the defective pixel correction in the defective pixel correction unit 42, the average value of the pixel data on both sides adjacent to the focused defective pixel is set as the pixel data of the focused defective pixel without considering the color classification. Interpolation may be performed by

1 (撮像装置として)デジタルカメラ
21 (画像生成手段としての)アナログフロントエンド部
22 (画像生成手段としての)信号処理部
23 (画像生成手段としての)SDRAM
24 (画像生成手段としての)ROM
28 (画像生成手段としての)制御部
42 欠陥画素補正部
43 記憶部
44 (メモリとしての)RAM
SC 分割画像データ
、PNM (欠陥画素データとしての)優先補正画素群
S、S´ 分割数
DESCRIPTION OF SYMBOLS 1 (As imaging device) Digital camera 21 Analog front end part (As image generation means) 22 Signal processing part (As image generation means) 23 SDRAM (As image generation means)
24 ROM (as image generation means)
28 Control unit (as image generation means) 42 Defective pixel correction unit 43 Storage unit 44 RAM (as memory)
I SC divided image data P N , P NM (as defective pixel data) priority correction pixel group S, S ′ number of divisions

特開2002−94884号公報JP 2002-94884 A

Claims (11)

複数の画素を有する撮像素子から出力された複数の電気信号に基づいて画像データを生成する画像生成手段を備え、
該画像生成手段が、前記画像データの生成過程における画像生成データが入力されると、該画像生成データにおいて、記憶部に登録された前記撮像素子における各欠陥画素データに相当する画素データを補正する欠陥画素補正動作により、前記画像生成データの欠陥画素補正を行う欠陥画素補正部を有する撮像装置であって、
前記画像生成手段は、欠陥画素の影響の変化の判断基準に対応付けた欠陥画素レベルに基づいて補正対象とする補正画素数を設定し、該補正画素数が、前記記憶部に登録可能な前記欠陥画素データの数である登録限度数を超えた場合、補正対象とする画素データを重複させることなく前記補正画素数の欠陥画素補正を行うべく、前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返すとともに、前記画像生成データを、前記補正画素数を前記登録限度数で除算して得られた商の少数以下を切り上げた値で等分して複数の分割画像データに区分けし、各該分割画像データ毎に前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返すことを特徴とする撮像装置。
Image generating means for generating image data based on a plurality of electrical signals output from an imaging device having a plurality of pixels;
When the image generation data in the image data generation process is input, the image generation unit corrects pixel data corresponding to each defective pixel data in the image sensor registered in the storage unit in the image generation data. An imaging apparatus having a defective pixel correction unit that performs defective pixel correction of the image generation data by a defective pixel correction operation,
The image generation unit sets the number of correction pixels to be corrected based on a defective pixel level associated with a criterion for determining a change in the influence of a defective pixel, and the correction pixel number can be registered in the storage unit. When the registration limit number that is the number of defective pixel data is exceeded, the registration content of the defective pixel data in the storage unit is determined so that defective pixel correction of the correction pixel number is performed without duplicating pixel data to be corrected. While repeating the defective pixel correction operation in the defective pixel correction unit, the image generation data is a value obtained by rounding up the decimal of the quotient obtained by dividing the number of corrected pixels by the registration limit number Dividing equally into a plurality of divided image data, and changing the registered content of the defective pixel data in the storage unit for each divided image data, the defective pixel in the defective pixel correction unit Imaging apparatus characterized by repeating the positive operation.
複数の画素を有する撮像素子から出力された複数の電気信号に基づいて画像データを生成する画像生成手段を備え、
該画像生成手段が、前記画像データの生成過程における画像生成データが入力されると、該画像生成データにおいて、記憶部に登録された前記撮像素子における各欠陥画素データに相当する画素データを補正する欠陥画素補正動作により、前記画像生成データの欠陥画素補正を行う欠陥画素補正部を有する撮像装置であって、
前記画像生成手段は、欠陥画素の影響の変化の判断基準に対応付けた欠陥画素レベルに基づいて補正対象とする補正画素数を設定し、該補正画素数が、前記記憶部に登録可能な前記欠陥画素データの数である登録限度数を超えた場合、補正対象とする画素データを重複させることなく前記補正画素数の欠陥画素補正を行うべく、前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返すとともに、前記画像生成データに対して、前記登録限度数の前記欠陥画素データを前記記憶部に登録して前記欠陥画素補正部での前記欠陥画素補正動作を行い、その後、前記画像生成データを、前記補正画素数が前記登録限度数を減算した差分を該登録限度数で除算して得られた商の少数以下を切り上げた値で等分して複数の分割画像データに区分けし、最初の前記欠陥画素補正動作での欠陥画素補正とは補正対象とする画素データが重複しないように各該分割画像データ毎に前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返すことを特徴とする撮像装置。
Image generating means for generating image data based on a plurality of electrical signals output from an imaging device having a plurality of pixels;
When the image generation data in the image data generation process is input, the image generation unit corrects pixel data corresponding to each defective pixel data in the image sensor registered in the storage unit in the image generation data. An imaging apparatus having a defective pixel correction unit that performs defective pixel correction of the image generation data by a defective pixel correction operation,
The image generation unit sets the number of correction pixels to be corrected based on a defective pixel level associated with a criterion for determining a change in the influence of a defective pixel, and the correction pixel number can be registered in the storage unit. When the registration limit number that is the number of defective pixel data is exceeded, the registration content of the defective pixel data in the storage unit is determined so that defective pixel correction of the correction pixel number is performed without duplicating pixel data to be corrected. The defective pixel correction operation in the defective pixel correction unit is repeated while changing, and the defective pixel data of the registration limit number is registered in the storage unit for the image generation data, and the defective pixel correction unit The defective pixel correction operation is performed, and then the image generation data is equal to or smaller than the quotient obtained by dividing the difference obtained by subtracting the registration limit number from the correction pixel number by the registration limit number. Divided into a plurality of divided image data by equally dividing the rounded-up value, and for each of the divided image data, the pixel data to be corrected does not overlap with the defective pixel correction in the first defective pixel correction operation. An imaging apparatus , wherein the defective pixel correction operation in the defective pixel correction unit is repeated while changing the registered content of the defective pixel data in a storage unit .
複数の画素を有する撮像素子から出力された複数の電気信号に基づいて画像データを生成する画像生成手段を備え、
該画像生成手段が、前記画像データの生成過程における画像生成データが入力されると、該画像生成データにおいて、記憶部に登録された前記撮像素子における各欠陥画素データに相当する画素データを補正する欠陥画素補正動作により、前記画像生成データの欠陥画素補正を行う欠陥画素補正部を有する撮像装置であって、
前記画像生成手段は、欠陥画素の影響の変化の判断基準に対応付けた欠陥画素レベルに基づいて補正対象とする補正画素数を設定し、該補正画素数が、前記記憶部に登録可能な前記欠陥画素データの数である登録限度数を超えた場合、補正対象とする画素データを重複させることなく前記補正画素数の欠陥画素補正を行うべく、前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返すとともに、前記画像生成データに対して、前記欠陥画素レベルが高い方から順に前記登録限度数の前記欠陥画素データを前記記憶部に登録して前記欠陥画素補正部での前記欠陥画素補正動作を行い、その後、前記画像生成データを、前記補正画素数が前記登録限度数を減算した差分を該登録限度数で除算して得られた商の少数以下を切り上げた値で等分して複数の分割画像データに区分けし、最初の前記欠陥画素補正動作での欠陥画素補正とは補正対象とする画素データが重複しないように各該分割画像データ毎に前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返すことを特徴とする撮像装置。
Image generating means for generating image data based on a plurality of electrical signals output from an imaging device having a plurality of pixels;
When the image generation data in the image data generation process is input, the image generation unit corrects pixel data corresponding to each defective pixel data in the image sensor registered in the storage unit in the image generation data. An imaging apparatus having a defective pixel correction unit that performs defective pixel correction of the image generation data by a defective pixel correction operation,
The image generation unit sets the number of correction pixels to be corrected based on a defective pixel level associated with a criterion for determining a change in the influence of a defective pixel, and the correction pixel number can be registered in the storage unit. When the registration limit number that is the number of defective pixel data is exceeded, the registration content of the defective pixel data in the storage unit is determined so that defective pixel correction of the correction pixel number is performed without duplicating pixel data to be corrected. The defective pixel correction operation in the defective pixel correction unit is repeated while changing, and the defective pixel data of the registration limit number is sequentially stored in the storage unit with respect to the image generation data in descending order of the defective pixel level. register performs the defective pixel correction operation in the defective pixel correction unit, then the image generation data, wherein said correction difference number of pixels obtained by subtracting the number of the registration limit registration limit Pixel data is equally divided by a value obtained by rounding up a few following quotient obtained by dividing the number is divided into a plurality of divided image data, and defective pixel correction of the first of the defective pixel correction operations to be corrected the defective pixel correction operation characterized imaging device to repeat the but in the defective pixel correction unit while changing the registration contents of the defective pixel data in the storage unit for each of the divided image data so as not to overlap .
請求項1から請求項3のいずれか1項に記載の撮像装置であって、
さらに、前記画像生成手段が適宜格納および読出することのできるメモリを備え、
前記欠陥画素データは、前記撮像素子から出力される電気信号に基づいて前記欠陥画素レベルを判断し、該欠陥画素レベルが前記判断基準における設定条件に対応付けた補正判断値を超えた前記画素の前記撮像素子上の縦横座標に、対応する前記設定条件および前記欠陥画素レベルを関連付けて生成されて前記メモリに格納され、
前記画像生成手段は、前記設定条件に適合する前記欠陥画素データを前記メモリから読み出して前記記憶部に登録することを特徴とする撮像装置。
The imaging apparatus according to any one of claims 1 to 3, wherein
Furthermore, the image generating means comprises a memory that can be stored and read as appropriate.
The defective pixel data is determined based on an electrical signal output from the image sensor, and the defective pixel level of the pixel that has exceeded the correction determination value associated with the setting condition in the determination criterion. The ordinate and abscissa on the image sensor are generated in association with the corresponding setting condition and the defective pixel level and stored in the memory,
It said image generating means, you characterized imaging device to register in the storage unit of the defective pixel data conforms to the setting conditions are read from the memory.
前記欠陥画素データは、等分された前記分割画像データに対応する前記撮像素子上での区画毎に、前記撮像素子から出力される電気信号に基づいて前記欠陥画素レベルを判断し、該欠陥画素レベルが前記判断基準における設定条件に対応付けた補正判断値を超えた前記画素の前記撮像素子上の縦横座標に、対応する前記設定条件および前記欠陥画素レベルを関連付けて生成されて前記メモリに格納されていることを特徴とする請求項1ないし請求項4のいずれか1項に記載の撮像装置。 The defective pixel data is determined by determining the defective pixel level based on an electrical signal output from the image sensor for each section on the image sensor corresponding to the divided image data that has been equally divided. The ordinate and the horizontal coordinate on the image sensor of the pixel whose level exceeds the correction judgment value associated with the setting condition in the judgment criterion are generated by associating the corresponding setting condition and the defective pixel level and storing them in the memory the imaging apparatus according to any one of claims 1 to 4, characterized in that it is. 前記判断基準は露光時間であり、前記設定条件は露光時間として設定された数値であることを特徴とする請求項1ないし請求項5のいずれか1項に記載の撮像装置。 The criterion is the exposure time, the setting condition is imaging apparatus according to any one of claims 1 to 5, characterized in numerical der Rukoto set as the exposure time. 前記判断基準はISO感度であり、前記設定条件はISO感度として設定された数値であることを特徴とする請求項1ないし請求項5のいずれか1項に記載の撮像装置。 The criterion is the ISO sensitivity, the setting condition imaging apparatus according to any one of claims 1 to claim 5, characterized in that a value set as the ISO sensitivity. 複数の画素を有する撮像素子から出力された複数の電気信号に基づいて画像データを生成する画像生成手段を備え、
該画像生成手段が、前記画像データの生成過程における画像生成データが入力されると、該画像生成データにおいて、記憶部に登録された前記撮像素子における各欠陥画素データに相当する画素データを補正する欠陥画素補正動作により、前記画像生成データの欠陥画素補正を行う欠陥画素補正部を有する撮像装置の制御部に、前記欠陥画素補正部による欠陥画素を補正する機能を実現させるためのプログラムであって、
前記画像生成手段に、欠陥画素の影響の変化の判断基準に対応付けた欠陥画素レベルに基づいて補正対象とする補正画素数を設定させる機能と、
該補正画素数が、前記記憶部に登録可能な前記欠陥画素データの数である登録限度数を超えた場合、補正対象とする画素データを重複させることなく前記補正画素数の欠陥画素補正を行うべく、前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返させるとともに、前記画像生成データを、前記補正画素数を前記登録限度数で除算して得られた商の少数以下を切り上げた値で等分して複数の分割画像データに区分けし、各該分割画像データ毎に前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返させる機能と、
を実現させることを特徴とするプログラム。
Image generating means for generating image data based on a plurality of electrical signals output from an imaging device having a plurality of pixels;
When the image generation data in the image data generation process is input, the image generation unit corrects pixel data corresponding to each defective pixel data in the image sensor registered in the storage unit in the image generation data. A program for causing a control unit of an imaging apparatus having a defective pixel correction unit that performs defective pixel correction of the image generation data to realize a function of correcting a defective pixel by the defective pixel correction unit by a defective pixel correction operation. ,
A function of causing the image generation means to set the number of correction pixels to be corrected based on a defective pixel level associated with a determination criterion for a change in the influence of a defective pixel;
When the number of corrected pixels exceeds the registration limit number that is the number of defective pixel data that can be registered in the storage unit, defective pixel correction is performed for the number of corrected pixels without overlapping pixel data to be corrected. Therefore, the defective pixel correction operation in the defective pixel correction unit is repeated while changing the registration content of the defective pixel data in the storage unit, and the number of corrected pixels is set to the registration limit number. Dividing into a plurality of divided image data by equally dividing a fractional number obtained by dividing by a rounded up value, and changing the registration content of the defective pixel data in the storage unit for each divided image data A function of repeating the defective pixel correction operation in the defective pixel correction unit;
Program characterized Rukoto is realized.
複数の画素を有する撮像素子から出力された複数の電気信号に基づいて画像データを生成する画像生成手段を備え、
該画像生成手段が、前記画像データの生成過程における画像生成データが入力されると、該画像生成データにおいて、記憶部に登録された前記撮像素子における各欠陥画素データに相当する画素データを補正する欠陥画素補正動作により、前記画像生成データの欠陥画素補正を行う欠陥画素補正部を有する撮像装置の制御部に、前記欠陥画素補正部による欠陥画素を補正する機能を実現させるためのプログラムであって、
前記画像生成手段に、欠陥画素の影響の変化の判断基準に対応付けた欠陥画素レベルに基づいて補正対象とする補正画素数を設定させる機能と、
該補正画素数が、前記記憶部に登録可能な前記欠陥画素データの数である登録限度数を超えた場合、補正対象とする画素データを重複させることなく前記補正画素数の欠陥画素補正を行うべく、前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返させるとともに、前記画像生成データに対して、前記登録限度数の前記欠陥画素データを前記記憶部に登録して前記欠陥画素補正部での前記欠陥画素補正動作を行わせ、かつ、その後、前記画像生成データを、前記補正画素数が前記登録限度数を減算した差分を該登録限度数で除算して得られた商の少数以下を切り上げた値で等分して複数の分割画像データに区分けし、最初の前記欠陥画素補正動作での欠陥画素補正とは補正対象とする画素データが重複しないように各該分割画像データ毎に前記記憶部における前記欠陥画素データの登録内容を変更しつつ前記欠陥画素補正部での前記欠陥画素補正動作を繰り返させる機能と、
を実現させることを特徴とするプログラム。
Image generating means for generating image data based on a plurality of electrical signals output from an imaging device having a plurality of pixels;
When the image generation data in the image data generation process is input, the image generation unit corrects pixel data corresponding to each defective pixel data in the image sensor registered in the storage unit in the image generation data. A program for causing a control unit of an imaging apparatus having a defective pixel correction unit that performs defective pixel correction of the image generation data to realize a function of correcting a defective pixel by the defective pixel correction unit by a defective pixel correction operation. ,
A function of causing the image generation means to set the number of correction pixels to be corrected based on a defective pixel level associated with a criterion for determining a change in the influence of a defective pixel;
When the number of corrected pixels exceeds the registration limit number that is the number of defective pixel data that can be registered in the storage unit, defective pixel correction is performed for the number of corrected pixels without overlapping pixel data to be corrected. Therefore, the defective pixel correction operation in the defective pixel correction unit is repeated while changing the registration content of the defective pixel data in the storage unit , and the registration limit number of the defective pixels is changed with respect to the image generation data. Data is registered in the storage unit to cause the defective pixel correction unit to perform the defective pixel correction operation, and then the image generation data is determined by subtracting the registration limit number from the correction pixel number. Dividing into a plurality of divided image data by equally dividing the value obtained by dividing the quotient obtained by dividing by the registration limit number into a plurality of divided image data, the defective pixel correction in the first defective pixel correction operation is a correction pair. A function to repeat the defective pixel correction operation in the defective pixel correction unit while changing the registration contents of the defective pixel data in the storage unit so that the pixel data do not overlap each said divided image data to,
A program characterized by realizing.
前記画像生成手段に、前記撮像素子から出力される電気信号に基づいて前記欠陥画素レベルを判断し、該欠陥画素レベルが前記判断基準における設定条件に対応付けた補正判断値を超えた前記画素の前記撮像素子上の縦横座標に、対応する前記設定条件および前記欠陥画素レベルを関連付けて生成されて前記メモリに格納された前記欠陥画素データのうち、前記設定条件に適合する前記欠陥画素データを前記メモリから読み出して前記記憶部に登録する機能を、実現させることを特徴とする請求項8または請求項9に記載のプログラム。 The defective pixel level is determined based on an electrical signal output from the image sensor to the image generation unit, and the defective pixel level of the pixel that exceeds the correction determination value associated with the setting condition in the determination criterion Among the defective pixel data generated by associating the corresponding setting condition and the defective pixel level with the vertical and horizontal coordinates on the image sensor and stored in the memory, the defective pixel data that matches the setting condition is The program according to claim 8 or 9, wherein a function of reading from a memory and registering in the storage unit is realized. 前記欠陥画素データとして、等分された前記分割画像データに対応する前記撮像素子上での区画毎に、前記撮像素子から出力される電気信号に基づいて前記欠陥画素レベルを判断し、該欠陥画素レベルが前記判断基準における設定条件に対応付けた補正判断値を超えた前記画素の前記撮像素子上の縦横座標に、対応する前記設定条件および前記欠陥画素レベルを関連付けて生成されて前記メモリに格納する機能を、実現させることを特徴とする請求項8ないし請求項10のいずれか1項に記載のプログラム。 The defective pixel level is determined on the basis of an electrical signal output from the image sensor for each section on the image sensor corresponding to the divided image data equally divided as the defective pixel data, and the defective pixel The ordinate and the horizontal coordinate on the image sensor of the pixel whose level exceeds the correction judgment value associated with the setting condition in the judgment criterion are generated by associating the corresponding setting condition and the defective pixel level and storing them in the memory the ability to program according to any one of claims 8 to claim 10, characterized in that to realize.
JP2009187063A 2009-08-12 2009-08-12 Imaging apparatus and program Expired - Fee Related JP5299159B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009187063A JP5299159B2 (en) 2009-08-12 2009-08-12 Imaging apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009187063A JP5299159B2 (en) 2009-08-12 2009-08-12 Imaging apparatus and program

Publications (2)

Publication Number Publication Date
JP2011041039A JP2011041039A (en) 2011-02-24
JP5299159B2 true JP5299159B2 (en) 2013-09-25

Family

ID=43768343

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009187063A Expired - Fee Related JP5299159B2 (en) 2009-08-12 2009-08-12 Imaging apparatus and program

Country Status (1)

Country Link
JP (1) JP5299159B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013021443A (en) * 2011-07-08 2013-01-31 Nikon Corp Imaging apparatus
US9279893B2 (en) 2012-07-24 2016-03-08 Canon Kabushiki Kaisha Radiation imaging control apparatus, radiation imaging system and radiation imaging apparatus, and method for controlling the same
GB2522347B (en) * 2012-07-24 2016-03-09 Canon Kk Imaging apparatus, radiation imaging apparatus, and method for controlling the same

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4313860B2 (en) * 1998-07-01 2009-08-12 キヤノン株式会社 Defective pixel correction apparatus and defective pixel correction method
JP2000196966A (en) * 1998-12-28 2000-07-14 Matsushita Electric Ind Co Ltd High-sensitivity image pickup device
JP2002204396A (en) * 2000-12-28 2002-07-19 Matsushita Electric Ind Co Ltd Pixel correction apparatus
JP2003333435A (en) * 2002-03-08 2003-11-21 Canon Inc Correcting device, image pickup device, correcting method, correcting computer program
JP4323883B2 (en) * 2003-06-30 2009-09-02 キヤノン株式会社 Image processing apparatus and control method thereof
JP4584768B2 (en) * 2005-05-18 2010-11-24 Hoya株式会社 Pixel defect correction device

Also Published As

Publication number Publication date
JP2011041039A (en) 2011-02-24

Similar Documents

Publication Publication Date Title
JP4662880B2 (en) Imaging apparatus and imaging method
JP5523065B2 (en) Imaging apparatus and control method thereof
JPWO2011155297A1 (en) Imaging apparatus and image processing method
JP2010074813A (en) Imaging apparatus and imaging method
JP6351271B2 (en) Image composition apparatus, image composition method, and program
JP2005269373A (en) Video signal processing system, and electronic video apparatus
JP2009201094A (en) Imaging apparatus and imaging method
JP3854754B2 (en) Imaging apparatus, image processing apparatus and method, and memory medium
JP4985124B2 (en) Image processing apparatus, image processing method, and image processing program
JP4167200B2 (en) Signal processing apparatus, signal processing method, and digital camera
JP3980781B2 (en) Imaging apparatus and imaging method
JP2004282686A (en) Imaging apparatus
JP5299159B2 (en) Imaging apparatus and program
JP5446955B2 (en) Imaging device
JP2009055415A (en) Camera
JP5387341B2 (en) Imaging device
JP3767188B2 (en) Electronic camera and signal correction method
JP2014230121A (en) Imaging apparatus and pixel defect detection method
JP2006121165A (en) Imaging apparatus and image forming method
JP2008124793A (en) Imaging apparatus, and imaging method
JP4687619B2 (en) Image processing apparatus, image processing method, and program
JP2013074368A (en) Imaging apparatus and imaging method
JP2006222689A (en) Photographing apparatus
JP6247513B2 (en) Imaging apparatus, control method, and program
JP2015061137A (en) Imaging apparatus, control method of the same, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120528

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130228

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130305

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130422

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: 20130521

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130603

R151 Written notification of patent or utility model registration

Ref document number: 5299159

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees