JP2006339986A - Image processing apparatus - Google Patents

Image processing apparatus Download PDF

Info

Publication number
JP2006339986A
JP2006339986A JP2005161676A JP2005161676A JP2006339986A JP 2006339986 A JP2006339986 A JP 2006339986A JP 2005161676 A JP2005161676 A JP 2005161676A JP 2005161676 A JP2005161676 A JP 2005161676A JP 2006339986 A JP2006339986 A JP 2006339986A
Authority
JP
Japan
Prior art keywords
pixel
data
address
defective
unit
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.)
Pending
Application number
JP2005161676A
Other languages
Japanese (ja)
Inventor
Hitoshi Yamamoto
斉 山本
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 JP2005161676A priority Critical patent/JP2006339986A/en
Publication of JP2006339986A publication Critical patent/JP2006339986A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing apparatus capable of detecting a white-dot defect and a black-dot defect of pixels of an image sensor without any error while individual nonvolatile memories are not provided. <P>SOLUTION: The image processing apparatus includes a decision section which decides whether a pixel corresponding to pixel data is a defective pixel when the pixel data is output from the image sensor, a storage section which stores the pixel address of a pixel decided as a defective pixel by the decision section and decision count the decision section decides the pixel as the defective pixel, a determination section which determines a pixel whose decision count exceeds a specified value as a defective pixel, and a complementation section which complements pixel data corresponding to the pixel determined as the defective pixel by the determination section by a specified method and then outputs the complemented pixel data. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、デジタルカメラ等に用いられる画像処理装置に関する。   The present invention relates to an image processing apparatus used for a digital camera or the like.

現在、デジタルビデオカメラやデジタルスチルカメラの代表的なイメージセンサとして、電荷結合素子(以下、「CCD」という。)や、相補型金属酸化物半導体センサ(以下、「CMOSセンサ」という。)がある。このようなイメージセンサでは、特定位置の画素の明度が常に一定の明度で固定される場合がある。このように画素の明度が常に高く又は低く固定されることを、それぞれ白点不良及び黒点不良と呼ぶ。   At present, charge coupled devices (hereinafter referred to as “CCD”) and complementary metal oxide semiconductor sensors (hereinafter referred to as “CMOS sensors”) are typical image sensors of digital video cameras and digital still cameras. . In such an image sensor, the brightness of a pixel at a specific position may be always fixed at a constant brightness. Such a fixed brightness of the pixel always being high or low is called a white spot defect and a black spot defect, respectively.

一般的に、イメージセンサによって撮像された画像を640×480画素のVGAサイズできれいにディスプレイ等に表示するためには、30万画素クラスのイメージセンサが必要である。しかし、現状では、30万画素全てを正しく製造することが困難であるため、ある程度の白点不良及び黒点不良の発生は許容しなければならない。実際に、イメージセンサは、白点不良画素及び黒点不良画素(以下、単に「不良画素」という。)が存在する場合であっても、その不良画素の個数が所定数以下の場合は、不良画素の個数によって定められるグレードに応じた価格で販売されている。例えば、不良画素の個数が全体で30個を超えるイメージセンサは不良品として取り扱われるが、不良画素の個数が全体で10個を超えてかつ30個以下のイメージセンサはグレードが低いイメージセンサとして、不良画素の個数が全体で10個以下のイメージセンサはグレードが高いイメージセンサとしてそれぞれ販売されている。   In general, in order to display an image captured by an image sensor neatly on a display or the like with a VGA size of 640 × 480 pixels, a 300,000 pixel class image sensor is required. However, at present, it is difficult to correctly manufacture all 300,000 pixels, and therefore it is necessary to allow a certain amount of white spot failure and black spot failure. Actually, even when there are white point defective pixels and black point defective pixels (hereinafter, simply referred to as “defective pixels”), the image sensor is defective when the number of defective pixels is equal to or less than a predetermined number. It is sold at a price according to the grade determined by the number of items. For example, an image sensor having a total of more than 30 defective pixels is handled as a defective product, but an image sensor having a total of more than 10 defective pixels and not more than 30 is considered as a low-grade image sensor. Image sensors with a total of 10 or less defective pixels are sold as high-grade image sensors.

上述のように、イメージセンサにおいて白点不良及び黒点不良が発生することは避けられないため、イメージセンサによって撮像された画像を、例えば、USBバスを経由してホストコンピュータに伝送し、ホストコンピュータのディスプレイに表示する場合には、明るい画像の中に周囲よりも暗い点が強調されて表示されたり、又は暗い画像の中に周囲よりも明るい点が強調されて表示されたりするといった不具合が生じる。   As described above, it is inevitable that white spot defects and black spot defects occur in the image sensor. Therefore, an image captured by the image sensor is transmitted to the host computer via, for example, the USB bus, and the host computer In the case of displaying on the display, there is a problem that a dark point is emphasized and displayed in a bright image, or a brighter point is emphasized and displayed in a dark image.

このような不具合を解決する一般的な方法として、出荷前の検査工程でイメージセンサにおける不良画素の位置を検出し、検出した不良画素のアドレスデータを外付けの不揮発性メモリ等に記憶させ、出荷後に、イメージセンサからその記憶されたアドレスデータに対応する画素の画素データが出力された場合にその画素データを補完するという方法があった。   As a general method for solving such a problem, the position of a defective pixel in an image sensor is detected in an inspection process before shipment, and the address data of the detected defective pixel is stored in an external nonvolatile memory or the like. Later, when pixel data of a pixel corresponding to the stored address data was output from the image sensor, there was a method of complementing the pixel data.

また、従来のイメージセンサには、画素がマトリクス状に配列された画素部から画素データを読み出し、その読み出された画素データに対して周辺画素との明度の違いを演算することにより、外部に不揮発性メモリを接続することなく白点不良を検知して、その読み出された画素データを補正するものがあった(例えば、特許文献1参照。)。   In addition, in a conventional image sensor, pixel data is read out from a pixel unit in which pixels are arranged in a matrix, and the difference in brightness from surrounding pixels is calculated with respect to the read pixel data. Some have detected a white point defect without connecting a non-volatile memory and corrected the read pixel data (see, for example, Patent Document 1).

なお、従来の画像読み取り装置には、高濃度から低濃度及び低濃度から高濃度へのそれぞれの追従特性を設定したデジタルピークホールド回路によりピーク値を検出し、その検出値に基づいて除算器により入力画像データを正規化し、一定白レベル値で地肌データを出力するものがあった(例えば、特許文献2参照。)。
特開2003−234958号公報 特開2003−101777号公報
Note that the conventional image reading apparatus detects a peak value by a digital peak hold circuit in which tracking characteristics from high density to low density and low density to high density are set, and a divider based on the detected value. There is one that normalizes input image data and outputs background data with a constant white level value (see, for example, Patent Document 2).
JP 2003-234958 A JP 2003-101777 A

しかし、不良画素のアドレスデータを外付けの不揮発性メモリに記憶させる従来の方法では、イメージセンサ毎に出荷前の検査工程で検出された不良画素の位置を不揮発性メモリに記憶させる必要があるため出荷前の処理が煩雑になるとともに、不揮発性メモリが別に必要であるためコストが増大するという課題があった。   However, in the conventional method of storing the defective pixel address data in the external nonvolatile memory, it is necessary to store the position of the defective pixel detected in the inspection process before shipment for each image sensor in the nonvolatile memory. There is a problem that processing before shipment becomes complicated, and cost is increased because a non-volatile memory is separately required.

一方、読み出された画素データに対して周辺画素との明度の違いを演算する従来のイメージセンサでは、個別の不揮発性メモリは不要であるが、実際に明度の明るい非常に細い線や明度の明るい非常に小さい点があった場合に、白点不良と間違えて補完してしまう場合があった。このような誤認識をしてしまうと、非常に細い線又は点が周りの画素と補完されてしまって消えてしまうことになり、その結果得られる画像が不自然になるという課題があった。この不具合は、高解像度のイメージセンサでは一画素の領域が非常に小さいので問題にならない場合もあるが、30万画素以下のイメージセンサでは特に顕著であった。   On the other hand, the conventional image sensor that calculates the difference in brightness from the surrounding pixels with respect to the read pixel data does not require an individual non-volatile memory, but actually has a very thin line or brightness with bright brightness. When there were bright and very small points, they were sometimes mistaken for white spot defects and complemented. If such a misrecognition is made, a very thin line or point is complemented with surrounding pixels and disappears, resulting in an unnatural image. This problem may not be a problem because the area of one pixel is very small in a high-resolution image sensor, but is particularly noticeable in an image sensor with 300,000 pixels or less.

本発明は、上記課題を解決するためになされたものであり、個別の不揮発性メモリをもたないが、イメージセンサにおける画素の白点不良及び黒点不良を誤りなく検出することができる画像処理装置を提供することを目的とする。   SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problems, and has no individual nonvolatile memory, but can detect a white point defect and a black point defect of a pixel in an image sensor without error. The purpose is to provide.

本発明による画像処理装置は、イメージセンサの不良画素に対応する画素データを所定の方法で補完して出力する画像処理装置である。この画像処理装置は、前記のイメージセンサから画素データが出力されると、その画素データに対応する画素が不良画素であるか否かを判定する判定部と、前記の判定部によって不良画素であると判定された画素の画素アドレスと、その画素が前記の判定部によって不良画素であると判定された判定回数とを記憶する記憶部と、前記の判定回数が所定の回数を超えた画素を不良画素として決定する決定部と、前記の決定部によって不良画素であると決定された画素に対応する画素データを所定の方法で補完して出力する補完部とを備える。   An image processing apparatus according to the present invention is an image processing apparatus that complements and outputs pixel data corresponding to defective pixels of an image sensor by a predetermined method. In the image processing apparatus, when pixel data is output from the image sensor, a determination unit that determines whether a pixel corresponding to the pixel data is a defective pixel, and the determination unit determines that the pixel is a defective pixel. A storage unit that stores a pixel address of a pixel determined to be and a determination number of times that the pixel is determined to be a defective pixel by the determination unit; and a pixel that has the predetermined number of determinations exceeding a predetermined number A determining unit that determines the pixel; and a complementing unit that complements and outputs pixel data corresponding to the pixel determined to be a defective pixel by the determining unit by a predetermined method.

好ましくは、前記の記憶部は、前記の画素アドレス及び判定回数を記憶するデータ記憶部と、前記のデータ記憶部に対するデータの読み出し及び書き込みを制御する記憶制御部とを備える。前記の記憶制御部は、前記のイメージセンサから出力された画素データに対応する画素が前記の判定部によって不良画素であると判定され、かつ前記のデータ記憶部にその画素の画素アドレス及び判定回数が記憶されていない場合には、前記のデータ記憶部にその画素に対応する画素アドレスと判定回数とを書き込む。   Preferably, the storage unit includes a data storage unit that stores the pixel address and the number of determinations, and a storage control unit that controls reading and writing of data with respect to the data storage unit. The storage control unit determines that the pixel corresponding to the pixel data output from the image sensor is a defective pixel by the determination unit, and stores the pixel address of the pixel and the number of determinations in the data storage unit Is stored, the pixel address corresponding to the pixel and the number of determinations are written in the data storage unit.

好ましくは、前記の記憶制御部は、前記のイメージセンサから出力された画素データに対応する画素が前記の判定部によって不良画素であると判定され、かつ前記のデータ記憶部にその画素の画素アドレス及び判定回数が記憶されている場合には、前記のデータ記憶部に記憶されたその画素の判定回数を1つ増加させる。   Preferably, the storage control unit determines that the pixel corresponding to the pixel data output from the image sensor is a defective pixel by the determination unit, and stores the pixel address of the pixel in the data storage unit. When the determination number is stored, the determination number of the pixel stored in the data storage unit is increased by one.

好ましくは、前記のデータ記憶部は、FIFOメモリである。   Preferably, the data storage unit is a FIFO memory.

好ましくは、前記の所定の回数は、外部から設定可能である。   Preferably, the predetermined number of times can be set from the outside.

好ましくは、前記の判定部は、判定の対象である画素の画素データの明度と、その画素データの入力前及び入力後にそれぞれ入力された前後入力画素データの明度の和とが所定の関係にあるときに、前記の判定の対象である画素が不良画素であると判定する。   Preferably, the determination unit has a predetermined relationship between the brightness of the pixel data of the pixel to be determined and the sum of the brightness of the input and output pixel data input before and after the input of the pixel data. Sometimes, it is determined that the pixel to be determined is a defective pixel.

好ましくは、前記の前後入力画素データは、前記の判定の対象となる画素の画素データと同じ色成分の画素データである。   Preferably, the front and rear input pixel data is pixel data having the same color component as the pixel data of the pixel to be determined.

好ましくは、前記の判定部は、前記の判定の対象となる画素の画素データの明度が、前記の前後入力画素データの明度の和に所定の第1の係数を乗算した第1の乗算画素データよりも大きい場合、又は前記の判定の対象となる画素の画素データの明度が、前記の前後入力画素データの明度の和に所定の第2の係数を乗算した第2の乗算画素データよりも小さい場合に、前記の判定の対象である画素が不良画素であると判定する。   Preferably, the determination unit includes a first multiplied pixel data obtained by multiplying a brightness of pixel data of the pixel to be determined by a predetermined first coefficient by a sum of the brightness of the preceding and following input pixel data. Or the brightness of the pixel data of the pixel to be determined is smaller than the second multiplied pixel data obtained by multiplying the sum of the brightness of the preceding and following input pixel data by a predetermined second coefficient. In this case, it is determined that the pixel to be determined is a defective pixel.

好ましくは、前記の第1及び第2の各係数は、それぞれ外部から設定可能である。   Preferably, each of the first and second coefficients can be set from the outside.

本発明による画像処理装置によれば、イメージセンサから画素データが出力されると、その画素データに対応する画素が不良画素であるか否かを判定する判定部と、判定部によって不良画素であると判定された画素の画素アドレスと、その画素が判定部によって不良画素であると判定された判定回数とを記憶する記憶部と、判定回数が所定の回数を超えた画素を不良画素として決定する決定部と、決定部によって不良画素であると決定された画素に対応する画素データを所定の方法で補完して出力する補完部とを備えるので、個別の不揮発性メモリを有しなくとも、イメージセンサにおける画素の白点不良及び黒点不良を誤りなく検出することができる。   According to the image processing device of the present invention, when pixel data is output from the image sensor, a determination unit that determines whether or not a pixel corresponding to the pixel data is a defective pixel, and the determination unit determines that the pixel is a defective pixel. A storage unit that stores a pixel address of the pixel determined as a pixel and a determination number of times that the pixel is determined to be a defective pixel by the determination unit, and a pixel that has exceeded the predetermined number of determinations is determined as a defective pixel Since it includes a determination unit and a complement unit that complements and outputs pixel data corresponding to a pixel determined to be a defective pixel by the determination unit using a predetermined method, an image can be obtained without having an individual nonvolatile memory. It is possible to detect a white spot defect and a black spot defect of a pixel in the sensor without error.

以下に、添付の図面を参照して本発明の実施の形態について説明する。
(実施の形態1)
図1は、本発明による画像処理装置の構成例を示すブロック図である。本発明による画像処理装置1は、例えばCCD等のイメージセンサによって撮像された画像をUSBバスを介してホストコンピュータ2に伝送する際に用いられる。この画像処理装置1は、イメージセンサから入力された画素データに対して、その画素データに対応する画素が不良画素であるか否かを決定し、不良画素であると決定すると、その画素データを所定の方法で補完してホストコンピュータ2に出力する。図1に示されるように、画像処理装置1は、イメージセンサ部3、白点/黒点補正装置4、及びUSBインタフェース部5(以下、「USBI/F部5」という。)を備える。また、白点/黒点補正装置4は、白点/黒点記憶部6及び白点/黒点検出補完部7を備え、白点/黒点検出補完部7は、画素アドレス生成部8を備える。画像処理装置1の各構成要素であるイメージセンサ部3、白点/黒点補正装置4、及びUSBI/F部5は、外部のタイミング信号生成部9から入力されるタイミング信号TMに同期したタイミングでそれぞれ動作する。
Embodiments of the present invention will be described below with reference to the accompanying drawings.
(Embodiment 1)
FIG. 1 is a block diagram showing a configuration example of an image processing apparatus according to the present invention. An image processing apparatus 1 according to the present invention is used when an image captured by an image sensor such as a CCD is transmitted to a host computer 2 via a USB bus. The image processing apparatus 1 determines whether or not the pixel corresponding to the pixel data is a defective pixel with respect to the pixel data input from the image sensor, and determines that the pixel data is a defective pixel. The data is complemented by a predetermined method and output to the host computer 2. As shown in FIG. 1, the image processing apparatus 1 includes an image sensor unit 3, a white point / black point correction device 4, and a USB interface unit 5 (hereinafter referred to as “USB I / F unit 5”). The white point / black point correction device 4 includes a white point / black point storage unit 6 and a white point / black point detection complement unit 7, and the white point / black point detection complement unit 7 includes a pixel address generation unit 8. The image sensor unit 3, white point / black point correction device 4, and USB I / F unit 5, which are components of the image processing device 1, are synchronized with the timing signal TM input from the external timing signal generation unit 9. Each works.

イメージセンサ部3は、CCDやCMOSセンサ等の固体撮像素子からなるイメージセンサ(図示せず)を備える。イメージセンサは、垂直方向及び水平方向に配列された複数の画素からなる画素配列を備え、各画素に照射された光の量をそれぞれ電気信号に変換して出力する。イメージセンサから出力された各画素に対応するアナログ信号は、A/Dコンバータ(図示せず)によって、それぞれデジタル信号に変換されて出力される。すなわち、イメージセンサ部3は、イメージセンサの各画素にそれぞれ対応する画素データDinを白点/黒点検出補完部7にそれぞれ出力する。   The image sensor unit 3 includes an image sensor (not shown) composed of a solid-state imaging device such as a CCD or a CMOS sensor. The image sensor includes a pixel array composed of a plurality of pixels arranged in the vertical direction and the horizontal direction, and converts the amount of light irradiated to each pixel into an electrical signal and outputs it. An analog signal corresponding to each pixel output from the image sensor is converted into a digital signal by an A / D converter (not shown) and output. That is, the image sensor unit 3 outputs pixel data Din corresponding to each pixel of the image sensor to the white point / black point detection complementing unit 7, respectively.

また、イメージセンサ部3は、垂直帰線期間信号VBlankと水平帰線期間信号HBlankとをそれぞれ出力する。図2は、垂直帰線期間信号VBlankと水平帰線期間信号HBlankとを説明するためのタイミングチャートである。これらの帰線期間信号VBlank,HBlankは、それぞれLow(L)レベルでアクティブである。垂直帰線期間信号VBlankは、イメージセンサ部3から有効な画素データが出力されている期間にLレベルとなる。例えば、イメージセンサの有効画素数が640×480であるとき、垂直帰線期間信号VBlankは、640×480個の画素にそれぞれ対応する画素データが出力されている間Lレベルとなる。画素データは、一般に、イメージセンサの画素配列における一番上の水平ラインから一番下の水平ラインまで水平ライン毎に出力され、各水平ラインについては、左端の画素から右端の画素まで各画素に対応する画素データが順に出力される。よって、垂直帰線期間信号VBlankは、イメージセンサにおいて実際に撮像に利用される画素領域(以下、「有効画素領域」という。)の左上の画素の画素データが出力されてから、右下の画素の画素データが出力されるまでの期間にLレベルとなる。一方、水平帰線期間信号HBlankは、イメージセンサの有効画素領域において各水平ラインにおける左端の画素から右端の画素まで各画素の画素データが出力される期間TにLレベルとなる。画素アドレス生成部8は、イメージセンサ部3から出力された垂直帰線期間信号VBlank及び水平帰線期間信号HBlankから画素データDinに対応する画素の画素アドレスを検出する。   The image sensor unit 3 outputs a vertical blanking interval signal VBlank and a horizontal blanking interval signal HBlank, respectively. FIG. 2 is a timing chart for explaining the vertical blanking period signal VBlank and the horizontal blanking period signal HBlank. These blanking period signals VBlank and HBlank are each active at a Low (L) level. The vertical blanking period signal VBlank is at the L level during the period when valid pixel data is output from the image sensor unit 3. For example, when the number of effective pixels of the image sensor is 640 × 480, the vertical blanking period signal VBlank is at L level while pixel data corresponding to 640 × 480 pixels are being output. The pixel data is generally output for each horizontal line from the top horizontal line to the bottom horizontal line in the pixel array of the image sensor, and for each horizontal line, each pixel from the left end pixel to the right end pixel is output to each pixel. Corresponding pixel data is output in order. Therefore, the vertical blanking period signal VBlank is output from the pixel data of the upper left pixel of the pixel area (hereinafter referred to as “effective pixel area”) actually used for imaging in the image sensor, and then the lower right pixel. It becomes L level during the period until the pixel data is output. On the other hand, the horizontal blanking period signal HBlank becomes L level during a period T in which pixel data of each pixel is output from the leftmost pixel to the rightmost pixel in each horizontal line in the effective pixel region of the image sensor. The pixel address generation unit 8 detects the pixel address of the pixel corresponding to the pixel data Din from the vertical blanking period signal VBlank and the horizontal blanking period signal HBlank output from the image sensor unit 3.

また、垂直帰線期間信号VBlank及び水平帰線期間信号HBlankは、USBI/F部5にもそれぞれ入力される。これは、イメージセンサ部3から出力される画素データDinには、イメージセンサの有効画素領域以外の画素に対応した画素データも含まれるため、USBI/F部5がそれらの画素データを識別して、ホストコンピュータ2に出力しないようにするためである。USBI/F部5は、白点/黒点検出補完部7から出力された画素データDoutをUSBバスで伝送することができるように画素データDusbに変換してホストコンピュータ2に出力する。   Further, the vertical blanking period signal VBlank and the horizontal blanking period signal HBlank are also input to the USB I / F unit 5, respectively. This is because the pixel data Din output from the image sensor unit 3 includes pixel data corresponding to pixels other than the effective pixel region of the image sensor, and the USB I / F unit 5 identifies these pixel data. This is to prevent output to the host computer 2. The USB I / F unit 5 converts the pixel data Dout output from the white point / black point detection complement unit 7 into pixel data Dusb so that it can be transmitted via the USB bus, and outputs it to the host computer 2.

白点/黒点検出補完部7は、イメージセンサ部3から画素データDinが入力されると、その画素データDinに対応するイメージセンサの画素が白点不良画素、黒点不良画素及び正常画素のいずれであるかを判定し、その判定結果を示す判定データDetを白点/黒点記憶部6に出力する。また、白点/黒点検出補完部7における画素アドレス生成部8は、イメージセンサ部3から入力された垂直帰線期間信号VBlankと水平帰線期間信号HBlankとを用いて、入力された画素データDinに対応する画素の画素アドレスを検出し、その画素アドレスを示す画素アドレスデータAdを生成して、白点/黒点記憶部6に出力する。この画素アドレスデータAdは、例えば、イメージセンサの画素配列における垂直方向のアドレスVadと水平方向のアドレスHadとを用いて(Vad,Had)と表現され、例えば、(033,045)、(124,048)等のように示される。白点/黒点記憶部6は、白点/黒点検出補完部7から出力された画素アドレスデータAd及び判定データDetを用いて、その画素アドレスデータAdによって特定された画素の画素データDinに対して補完が必要であるか否かを判断し、その判断結果を示す補完要求信号Reqを白点/黒点検出補完部7に出力する。白点/黒点検出補完部7は、白点/黒点記憶部6によって補完が必要であると判断された場合には、その画素データDinを補完して画素データDoutとしてUSBI/F部5に出力する。一方、白点/黒点記憶部6によって補完が必要でないと判断された場合には、画素データDoutとしてイメージセンサ部3から入力された画素データDinをそのままUSBI/F部5に出力する。   When the pixel data Din is input from the image sensor unit 3, the white point / black point detection complementing unit 7 is a white point defective pixel, a black point defective pixel, or a normal pixel corresponding to the pixel data Din. The determination data Det indicating the determination result is output to the white / black point storage unit 6. In addition, the pixel address generation unit 8 in the white spot / black spot detection complement unit 7 uses the vertical blanking period signal VBlank and the horizontal blanking period signal HBlank input from the image sensor unit 3 to input pixel data Din. The pixel address of the pixel corresponding to is detected, pixel address data Ad indicating the pixel address is generated, and output to the white point / black point storage unit 6. The pixel address data Ad is expressed as (Vad, Had) using, for example, a vertical address Vad and a horizontal address Had in the pixel array of the image sensor. For example, (033, 045), (124, 048) and the like. The white point / black point storage unit 6 uses the pixel address data Ad and the determination data Det output from the white point / black point detection complement unit 7 to perform the pixel data Din of the pixel specified by the pixel address data Ad. It is determined whether or not complementation is necessary, and a complement request signal Req indicating the determination result is output to the white / black spot detection and complement unit 7. The white point / black point detection complementing unit 7 complements the pixel data Din and outputs the pixel data Dout to the USB I / F unit 5 when the white point / black point storage unit 6 determines that complementation is necessary. To do. On the other hand, when the white point / black point storage unit 6 determines that complementation is not necessary, the pixel data Din input from the image sensor unit 3 as the pixel data Dout is output to the USB I / F unit 5 as it is.

イメージセンサ部3のイメージセンサは、光の赤色成分のみを検知するR画素、青色成分のみを検知するB画素、及び緑色成分のみを検知するG画素から構成されている。図3は、イメージセンサの画素配列の一例を示した図である。図3に示された画素配列は、ベイヤー配列であり、この配列は、現在、ほとんどのイメージセンサで採用されている。図3に示されるように、ベイヤー配列では、水平方向にR画素とG画素が交互に配列された第1の水平ラインと、水平方向にG画素とB画素が交互に配列された第2の水平ラインがあり、それらの第1及び第2の各水平ラインが垂直方向に交互に配列されている。   The image sensor of the image sensor unit 3 includes an R pixel that detects only a red component of light, a B pixel that detects only a blue component, and a G pixel that detects only a green component. FIG. 3 is a diagram illustrating an example of a pixel array of the image sensor. The pixel array shown in FIG. 3 is a Bayer array, and this array is currently used in most image sensors. As shown in FIG. 3, in the Bayer array, a first horizontal line in which R pixels and G pixels are alternately arranged in the horizontal direction and a second line in which G pixels and B pixels are alternately arranged in the horizontal direction are used. There are horizontal lines, and the first and second horizontal lines are alternately arranged in the vertical direction.

図4は、白点/黒点検出補完部7の構成例を示すブロック図である。図4に示されるように、白点/黒点検出補完部7は、画素アドレス生成部8、白点/黒点判別部11、5つの画素データ記憶部12〜16、画素補完部17、及びマルチプレクサ(以下、「MUX」という。)18を備える。また、白点/黒点判別部11は、係数記憶レジスタ19を備える。イメージセンサ部3から入力された画素データDinは、まず、画素データ記憶部12に記憶され、その後、イメージセンサ部3から画素データDinが入力される毎に、各画素データ記憶部13〜16に順にシフトされる。以下では、説明を簡単にするために、各画素データ記憶部12〜16に記憶された画素データを、それぞれ画素データd12〜d16とする。例えば、イメージセンサの画素配列が図2に示されるようなベイヤー配列である場合、イメージセンサ部3は、ある水平ラインにおける赤色成分の明度を示す画素データDinと緑色成分の明度を示す画素データDinとを交互に出力し、次に、その下の水平ラインにおける緑色成分の明度を示す画素データDinと青色成分の明度を示す画素データDinとを交互に出力する。つまり、イメージセンサ部3は、同じ色成分の明度を示す画素データDinを1つおきに出力する。よって、画素データ記憶部12,14,16がそれぞれ記憶する画素データd12,d14,d16は、同じ色成分の明度を示す画素データであり、画素データ記憶部13,15がそれぞれ記憶する画素データd13,d15は、同じ色成分の明度を示す画素データである。   FIG. 4 is a block diagram illustrating a configuration example of the white / black spot detection / complementing unit 7. As shown in FIG. 4, the white point / black point detection complement unit 7 includes a pixel address generation unit 8, a white point / black point determination unit 11, five pixel data storage units 12 to 16, a pixel complement unit 17, and a multiplexer ( (Hereinafter referred to as “MUX”) 18. In addition, the white spot / black spot determination unit 11 includes a coefficient storage register 19. The pixel data Din input from the image sensor unit 3 is first stored in the pixel data storage unit 12, and then each time the pixel data Din is input from the image sensor unit 3, the pixel data Din is stored in each of the pixel data storage units 13 to 16. Shifted in order. Hereinafter, in order to simplify the description, the pixel data stored in each of the pixel data storage units 12 to 16 is referred to as pixel data d12 to d16, respectively. For example, when the pixel array of the image sensor is a Bayer array as shown in FIG. 2, the image sensor unit 3 has pixel data Din indicating the brightness of the red component and pixel data Din indicating the brightness of the green component in a certain horizontal line. Are alternately output, and then pixel data Din indicating the brightness of the green component and pixel data Din indicating the brightness of the blue component are alternately output in the horizontal line below. That is, the image sensor unit 3 outputs every other pixel data Din indicating the brightness of the same color component. Therefore, the pixel data d12, d14, and d16 stored in the pixel data storage units 12, 14, and 16 are pixel data indicating the brightness of the same color component, and the pixel data d13 that is stored in the pixel data storage units 13 and 15, respectively. , D15 are pixel data indicating the brightness of the same color component.

白点/黒点検出補完部7において、画素データd12,d14,d16は、白点/黒点判別部11にそれぞれ入力される。白点/黒点判別部11は、画素データd14と、近接する同じ色成分の明度を示す画素データd12,d16とを用いて、画素データd14に対応する画素が白点不良画素、黒点不良画素、及び不良でない正常な画素のいずれであるかを判定する。具体的に、白点/黒点判別部11は、画素データd14について以下の式(1),(2)が満たされるか否かでそれを判定する。なお、D12,D14,D16は、画素データd12,d14,d16がそれぞれ示す画素の明度である。
D14>(D12+D16)×k1・・・・・(1)
D14<(D12+D16)×k2・・・・・(2)
ここで、各係数k1,k2は、係数記憶レジスタ19にそれぞれ記憶された所定の定数である。
In the white / black point detection / complementing unit 7, the pixel data d 12, d 14, and d 16 are input to the white / black point determining unit 11, respectively. The white point / black point determination unit 11 uses the pixel data d14 and the pixel data d12 and d16 indicating the brightness of the same color component adjacent to each other, and the pixels corresponding to the pixel data d14 are white point defective pixels, black point defective pixels, And a normal pixel that is not defective is determined. Specifically, the white / black point determination unit 11 determines whether or not the following expressions (1) and (2) are satisfied for the pixel data d14. D12, D14, and D16 are the brightness values of the pixels indicated by the pixel data d12, d14, and d16, respectively.
D14> (D12 + D16) × k1 (1)
D14 <(D12 + D16) × k2 (2)
Here, the coefficients k1 and k2 are predetermined constants stored in the coefficient storage register 19, respectively.

白点/黒点判別部11は、式(1)が満たされる場合は、画素データd14に対応する画素を白点不良画素であると判定し、式(2)が満たされる場合は、画素データd14に対応する画素を黒点不良画素と判定し、式(1),(2)が両方とも満たされない場合は、画素データd14に対応する画素を正常な画素であると判定する。そして、白点/黒点判別部11は、判定結果を示す判定データDetを白点/黒点記憶部6に出力する。   The white point / black point determination unit 11 determines that the pixel corresponding to the pixel data d14 is a white point defective pixel when the expression (1) is satisfied, and the pixel data d14 when the expression (2) is satisfied. The pixel corresponding to is determined as a black spot defective pixel, and when both of the expressions (1) and (2) are not satisfied, it is determined that the pixel corresponding to the pixel data d14 is a normal pixel. Then, the white point / black point determination unit 11 outputs determination data Det indicating the determination result to the white point / black point storage unit 6.

また、画素アドレス生成部8は、上記判定データDetが出力されるタイミングと同じタイミングで、画素データd14に対応する画素のアドレスを示すアドレスデータAdを出力する。   Further, the pixel address generation unit 8 outputs address data Ad indicating the address of the pixel corresponding to the pixel data d14 at the same timing as the timing at which the determination data Det is output.

なお、白点不良を検出するための係数k1及び黒点不良を検出するための係数k2は、それぞれあまり小さい値に設定されると正常な画素まで不良画素と誤判断され、あまり高い値に設定されると逆に不良画素が正常な画素と誤判断されてしまう可能性がある。よって、各係数k1,k2の値は、イメージセンサ部3によって撮像された画像に応じて変更することができるように、外部から設定可能としてもよい。例えば、暗い画像が撮像された場合には、係数k1の値を小さく、かつ係数k2の値を大きくし、明るい画像が撮像された場合には、係数k1の値を大きく、かつ係数k2の値を小さくしてもよい。   If the coefficient k1 for detecting a white spot defect and the coefficient k2 for detecting a black spot defect are set to a very small value, a normal pixel is erroneously determined to be a defective pixel and set to a very high value. On the contrary, there is a possibility that the defective pixel is erroneously determined as a normal pixel. Therefore, the values of the coefficients k1 and k2 may be settable from the outside so that they can be changed according to the image captured by the image sensor unit 3. For example, when a dark image is captured, the coefficient k1 is decreased and the coefficient k2 is increased. When a bright image is captured, the coefficient k1 is increased and the coefficient k2 is increased. May be reduced.

一方、画素補完部17には、画素データd12,d16がそれぞれ入力される。画素補完部17は、以下の式(3)で示されるように、入力された各画素データd12,d16を用いて画素データd14を補完した補完画素データdd14を生成し、MUX18に出力する。
DD14=(D12+D16)/2・・・・・(3)
ここで、DD14は、補完画素データdd14が示す画素の明度である。
On the other hand, pixel data d12 and d16 are input to the pixel complementing unit 17, respectively. The pixel complementing unit 17 generates complemented pixel data dd14 that complements the pixel data d14 using the input pixel data d12 and d16, and outputs the complemented pixel data dd14 to the MUX 18, as shown in the following formula (3).
DD14 = (D12 + D16) / 2 (3)
Here, DD14 is the brightness of the pixel indicated by the complementary pixel data dd14.

また、MUX18には、画素データd14、補完画素データdd14、及び補完要求信号Reqが入力される。ここで、補完要求信号Reqは、白点/黒点記憶部6が画素データd14に対して補完が必要であるか否かを判断したその判断結果を示す信号である。例えば、白点/黒点記憶部6が画素データd14に対して補完が必要であると判断した場合にHレベルの補完要求信号Reqを出力し、補完が必要でないと判断した場合にLレベルの補完要求信号Reqを出力する場合、MUX18は、Hレベルの補完要求信号Reqが入力されると、画素データDoutとして補完画素データdd14を出力し、Lレベルの補完要求信号Reqが入力されると、画素データDoutとして画素データd14を出力する。   The MUX 18 receives pixel data d14, complementary pixel data dd14, and a complementary request signal Req. Here, the complement request signal Req is a signal indicating the determination result of whether or not the white spot / black spot storage unit 6 needs to complement the pixel data d14. For example, when the white point / black point storage unit 6 determines that complementation is necessary for the pixel data d14, the H level complement request signal Req is output, and when it is determined that complementation is not necessary, L level complementation is performed. When the request signal Req is output, the MUX 18 outputs the complementary pixel data dd14 as the pixel data Dout when the H level complement request signal Req is input, and when the L level complement request signal Req is input, Pixel data d14 is output as data Dout.

図5は、白点/黒点記憶部6の構成例を示すブロック図である。図5に示されるように、白点/黒点記憶部6は、判定コントロール部21、先入れ先出しメモリ(以下、「FIFOメモリ」という。)22、及び判定比較部23を備える。また、判定比較部23は、回数記憶レジスタ24を備える。判定コントロール部21は、FIFOメモリ22に対してデータの読み出し及び書き込みを行う。判定コントロール部21には、白点/黒点検出補完部7から、画素データd14に対応する画素アドレスデータAdとその画素データd14に対応する画素が白点不良画素、黒点不良画素及び正常画素のいずれであるかを示す判定データDetとが入力される。判定コントロール部21の動作については、後で詳細に説明する。   FIG. 5 is a block diagram illustrating a configuration example of the white spot / black spot storage unit 6. As shown in FIG. 5, the white point / black point storage unit 6 includes a determination control unit 21, a first-in first-out memory (hereinafter referred to as “FIFO memory”) 22, and a determination comparison unit 23. Further, the determination comparison unit 23 includes a number storage register 24. The determination control unit 21 reads and writes data from and to the FIFO memory 22. The determination control unit 21 receives from the white / black point detection complementing unit 7 the pixel address data Ad corresponding to the pixel data d14 and the pixel corresponding to the pixel data d14, which is either a white point defective pixel, a black point defective pixel, or a normal pixel. The determination data Det indicating whether or not is input. The operation of the determination control unit 21 will be described in detail later.

FIFOメモリ22は、不良画素のデータを記憶する。図6は、FIFOメモリ22に記憶されたデータのデータ構造の一例を示している。このデータ構造では、白点/黒点判別部11によって不良画素であると判定された画素の画素アドレスが、小さいものから順に並べられている。また、図6に示されるように、このデータ構造では、その画素アドレスに対応する画素が黒点不良画素及び白点不良画素のどちらであるかを示す白点/黒点データと、その画素が不良画素と判定された判定回数を示す判定回数データとが、各画素アドレスに関連付けて記憶されている。画素アドレスのデータは、イメージセンサ部3のイメージセンサが、例えば30万画素のVGAクラスのイメージセンサである場合、10ビットの水平アドレスデータと9ビットの垂直アドレスデータとからなる。また、白点/黒点データは、1ビットのデータで構成される。なお、FIFOメモリ22の容量は、イメージセンサ部3のイメージセンサについて想定される不良画素の個数によって定められる。例えば、不良画素の個数により定められたイメージセンサのグレードに応じて定められてもよい。また、以下の説明では、簡単のために、FIFOメモリ22に記憶された画素アドレスを「FIFO画素アドレス」という。   The FIFO memory 22 stores defective pixel data. FIG. 6 shows an example of the data structure of data stored in the FIFO memory 22. In this data structure, pixel addresses of pixels determined to be defective pixels by the white / black point determination unit 11 are arranged in order from the smallest. Further, as shown in FIG. 6, in this data structure, white point / black point data indicating whether a pixel corresponding to the pixel address is a black point defective pixel or a white point defective pixel, and the pixel is a defective pixel. Is stored in association with each pixel address. The pixel address data is composed of 10-bit horizontal address data and 9-bit vertical address data when the image sensor of the image sensor unit 3 is, for example, a 300,000-pixel VGA class image sensor. The white / black spot data is composed of 1-bit data. The capacity of the FIFO memory 22 is determined by the number of defective pixels assumed for the image sensor of the image sensor unit 3. For example, it may be determined according to the grade of the image sensor determined by the number of defective pixels. In the following description, the pixel address stored in the FIFO memory 22 is referred to as “FIFO pixel address” for the sake of simplicity.

判定比較部23は、入力された画素アドレスデータAdが示す画素アドレス(以下、「現画素アドレス」という。)に関連したデータDMを、FIFOメモリ22から読み出す。そして、そのデータDMに含まれている判定回数mと、回数記憶レジスタ24に記憶された所定の回数sとを比較することにより、現画素アドレスに対応する画素が不良画素であるか否かを判断する。ここで、m,sは、それぞれ0以上の整数である。具体的に、s<mが成り立つ場合には、現画素アドレスに対応する画素が不良画素であると決定し、補完が必要であると判断する。s≧mが成り立つ場合には、現画素アドレスに対応する画素が正常画素であると決定し、補完が不要であると判断する。なお、所定の回数sは、イメージセンサ部3によって撮像された画像に応じて変更できる構成が望ましい。判定比較部23は、その判断結果に応じて補完要求信号Reqを出力する。   The determination comparison unit 23 reads data DM related to the pixel address indicated by the input pixel address data Ad (hereinafter referred to as “current pixel address”) from the FIFO memory 22. Then, by comparing the determination number m included in the data DM with the predetermined number s stored in the number storage register 24, it is determined whether or not the pixel corresponding to the current pixel address is a defective pixel. to decide. Here, m and s are each an integer of 0 or more. Specifically, when s <m holds, it is determined that the pixel corresponding to the current pixel address is a defective pixel, and it is determined that complementation is necessary. If s ≧ m holds, it is determined that the pixel corresponding to the current pixel address is a normal pixel, and it is determined that complementation is unnecessary. It is desirable that the predetermined number of times s can be changed according to the image captured by the image sensor unit 3. The judgment comparison unit 23 outputs a complement request signal Req according to the judgment result.

次に、判定コントロール部21の動作について詳細に説明する。図7は、判定コントロール部21の動作を説明するフローチャートである。判定コントロール部21は、まず、FIFOメモリ22をリセットする(ステップS1)。具体的に、判定コントロール部21は、FIFOメモリ22内の全てのアドレスデータを(maxX,maxY)とし、全ての判定回数データを「0h」、すなわち「0回」とする。ここで、(maxX,maxY)は、イメージセンサの有効画素領域における画素の画素アドレスの最大値である。例えば、イメージセンサの有効画素数が640×480であるとき、(maxX,maxY)は、(640,480)となる。次に、判定コントロール部21は、FIFOメモリ22においてリードアクセスするアドレスを指定するリードポインタを、FIFOメモリ22の最初のアドレスに設定する(ステップS2)。   Next, the operation of the determination control unit 21 will be described in detail. FIG. 7 is a flowchart for explaining the operation of the determination control unit 21. The determination control unit 21 first resets the FIFO memory 22 (step S1). Specifically, the determination control unit 21 sets all address data in the FIFO memory 22 to (maxX, maxY), and sets all determination count data to “0h”, that is, “0”. Here, (maxX, maxY) is the maximum value of the pixel address of the pixel in the effective pixel region of the image sensor. For example, when the number of effective pixels of the image sensor is 640 × 480, (maxX, maxY) is (640, 480). Next, the determination control unit 21 sets a read pointer for designating an address for read access in the FIFO memory 22 to the first address in the FIFO memory 22 (step S2).

次に、判定コントロール部21は、FIFOメモリ22が一旦リセットされた後そのFIFOメモリ22にデータが書き込まれたことがあるか否かによって、異なる処理を行う。よって、判定コントロール部21は、FIFOメモリ22を一旦リセットした後の書き込み回数を内部レジスタに記憶しておいてもよい。書き込み回数が0である場合には(ステップS3においてYES)、図8に示された書き込み処理を行う。   Next, the determination control unit 21 performs different processing depending on whether or not data has been written to the FIFO memory 22 after the FIFO memory 22 is once reset. Therefore, the determination control unit 21 may store the number of writes after the FIFO memory 22 is once reset in an internal register. If the number of times of writing is 0 (YES in step S3), the writing process shown in FIG. 8 is performed.

図8は、一旦リセットされたFIFOメモリ22に最初にデータを書き込む場合の判定コントロール部21の動作を説明したフローチャートである。図8に示されるように、判定コントロール部21は、まず、入力された画素アドレスデータAdから、現画素アドレス(Vad,Had)を取得する(ステップS21)。そして、その現画素アドレスの垂直方向アドレスVadとmaxYとを比較する(ステップS22)。ここで、「maxY」とは、有効画素領域における垂直方向の最大アドレスである。現画素アドレスの垂直方向アドレスVadがmaxYよりも大きい場合には(ステップS22においてYES)、ステップS2に戻る。一方、垂直方向アドレスVadがmaxY以下の場合には(ステップS22においてNO)、判定データDetを用いて現画素アドレスに対応する画素が不良画素であるか否かを判断する(ステップS23)。現画素アドレスに対応する画素が不良画素でない場合には(ステップS23においてNO)、ステップS21に戻り、次に入力される画素アドレスデータAdが示す画素アドレスを取得する。   FIG. 8 is a flowchart for explaining the operation of the determination control unit 21 when data is first written to the FIFO memory 22 once reset. As shown in FIG. 8, the determination control unit 21 first acquires the current pixel address (Vad, Had) from the input pixel address data Ad (step S21). Then, the vertical address Vad and maxY of the current pixel address are compared (step S22). Here, “maxY” is the maximum vertical address in the effective pixel region. If vertical address Vad of the current pixel address is larger than maxY (YES in step S22), the process returns to step S2. On the other hand, if the vertical address Vad is equal to or less than maxY (NO in step S22), it is determined whether or not the pixel corresponding to the current pixel address is a defective pixel using the determination data Det (step S23). If the pixel corresponding to the current pixel address is not a defective pixel (NO in step S23), the process returns to step S21, and the pixel address indicated by the next input pixel address data Ad is acquired.

一方、現画素アドレスに対応する画素が不良画素である場合には(ステップS23においてYES)、FIFOメモリ22に新しい不良画素のデータを書き込む。具体的には、FIFOメモリ22の各アドレスに記憶されているデータをそのアドレスの次のアドレスにシフトさせる(ステップS24)。すなわち、現在リードポインタによって指定されているアドレスが空になる。そして、リードポインタによって指定されているアドレスに、現画素アドレス、白点/黒点データ、及び判定回数を書き込む(ステップS25)。ここで、判定回数は、「1h」として書き込まれる。その後、リードポインタを、データが書き込まれたFIFO画素アドレスの次のアドレスに進めて(ステップS26)、ステップS21に戻る。そして、次の画素アドレスを示す画素アドレスデータAdが入力される毎に、ステップS21〜S26を繰り返し、現画素アドレスの垂直方向アドレスVadがmaxYよりも大きくなったとき、ステップS2に戻る。   On the other hand, if the pixel corresponding to the current pixel address is a defective pixel (YES in step S23), new defective pixel data is written in the FIFO memory 22. Specifically, the data stored in each address of the FIFO memory 22 is shifted to the next address after that address (step S24). That is, the address currently designated by the read pointer becomes empty. Then, the current pixel address, white / black point data, and the number of determinations are written in the address designated by the read pointer (step S25). Here, the number of determinations is written as “1h”. Thereafter, the read pointer is advanced to the address next to the FIFO pixel address in which the data is written (step S26), and the process returns to step S21. Each time pixel address data Ad indicating the next pixel address is input, steps S21 to S26 are repeated, and when the vertical address Vad of the current pixel address is greater than maxY, the process returns to step S2.

再び図7を参照すると、ステップS3において、書き込み回数が0でない場合には(ステップS3においてNO)、入力された画素アドレスデータAdから、現画素アドレス(Vad,Had)を取得し(ステップS4)、その現画素アドレスの垂直方向アドレスVadとmaxYとを比較する(ステップS5)。現画素アドレスの垂直方向アドレスVadがmaxYよりも大きい場合には(ステップS5においてYES)、ステップS2に戻る。一方、垂直方向アドレスVadがmaxY以下の場合には(ステップS5においてNO)、リードポインタによって指定されているアドレスのデータDMを読み出す(ステップS6)。次に、読み出したデータに含まれているFIFO画素アドレスと、現画素アドレスとを比較する(ステップS7)。そして、現画素アドレスがFIFO画素アドレスよりも小さい場合には、判定データDetを用いて現画素アドレスに対応する画素が不良画素であるかどうかを判断し(ステップS8)、不良画素でない場合には(ステップS8においてNO)、ステップS4に戻り、次に入力される画素アドレスデータAdが示す画素アドレスを取得する。現画素アドレスに対応する画素が不良画素である場合には(ステップS8においてYES)、FIFOメモリ22がFULL状態であるか否かを判断する(ステップS9)。この判断には、例えば、上記内部レジスタに記憶されている書き込み回数データを用いてもよい。この書き込み回数データが、FIFOメモリ22に書き込み可能なデータ数よりも小さい場合にはFIFOメモリ22がいまだ書き込み可能であると判断する。この書き込み可能なデータ数は、予め別の内部レジスタに記憶されていてもよい。   Referring to FIG. 7 again, if the number of times of writing is not 0 in step S3 (NO in step S3), the current pixel address (Vad, Had) is acquired from the input pixel address data Ad (step S4). Then, the vertical address Vad and maxY of the current pixel address are compared (step S5). If vertical address Vad of the current pixel address is larger than maxY (YES in step S5), the process returns to step S2. On the other hand, if the vertical direction address Vad is equal to or less than maxY (NO in step S5), the data DM at the address specified by the read pointer is read (step S6). Next, the FIFO pixel address included in the read data is compared with the current pixel address (step S7). If the current pixel address is smaller than the FIFO pixel address, it is determined whether or not the pixel corresponding to the current pixel address is a defective pixel using the determination data Det (step S8). (NO in step S8), the process returns to step S4, and the pixel address indicated by the pixel address data Ad input next is acquired. If the pixel corresponding to the current pixel address is a defective pixel (YES in step S8), it is determined whether or not the FIFO memory 22 is in a FULL state (step S9). For this determination, for example, the write count data stored in the internal register may be used. If the write count data is smaller than the number of data that can be written to the FIFO memory 22, it is determined that the FIFO memory 22 is still writable. This number of writable data may be stored in advance in another internal register.

ステップS9において、FIFOメモリ22がFULL状態でないと判断されると(ステップS9においてNO)、FIFOメモリ22に新しい不良画素のデータを書き込む。
具体的に、FIFOメモリ22の現在リードポインタによって指定されているアドレス以降の各アドレスに記憶されているデータをそのアドレスの次のアドレスにシフトさせる(ステップS10)。すなわち、現在リードポインタによって指定されているアドレスが空になる。そして、リードポインタによって指定されているアドレスに、現画素アドレス、白点/黒点データ、及び判定回数(値1h)を書き込む(ステップS11)。その後、リードポインタを、データが書き込まれたFIFO画素アドレスの次のアドレスに進めて(ステップS12)、ステップS4に戻る。一方、FIFOメモリ22がFULL状態であると判断されると(ステップS9においてYES)、リードポインタをFIFOメモリ22における次のアドレスに進めて(ステップS13)、ステップS4に戻る。
If it is determined in step S9 that the FIFO memory 22 is not in the FULL state (NO in step S9), new defective pixel data is written in the FIFO memory 22.
Specifically, the data stored in each address after the address specified by the current read pointer in the FIFO memory 22 is shifted to the next address after that address (step S10). That is, the address currently designated by the read pointer becomes empty. Then, the current pixel address, white / black point data, and the number of determinations (value 1h) are written in the address designated by the read pointer (step S11). Thereafter, the read pointer is advanced to the address next to the FIFO pixel address in which the data is written (step S12), and the process returns to step S4. On the other hand, if it is determined that FIFO memory 22 is in the FULL state (YES in step S9), the read pointer is advanced to the next address in FIFO memory 22 (step S13), and the process returns to step S4.

ステップS7において、FIFO画素アドレスと現画素アドレスとを比較した結果、FIFO画素アドレスと現画素アドレスが一致する場合(ステップS7において「=」)、判定コントロール部21は、判定データDetを用いて現画素アドレスに対応する画素が不良画素であるかどうかを判断する(ステップS14)。不良画素でない場合には(ステップS14においてNO)、リードポインタを次のアドレスに進めて(ステップS15)、ステップS4に戻る。現画素アドレスに対応する画素が不良画素である場合には(ステップS14においてYES)、リードポインタによって指定されているアドレスに記憶された判定回数データを更新する(ステップS16)。例えば、FIFOメモリ22に記憶された判定回数データが「3h」であれば、「4h」にする。その後、リードポインタを次のアドレスに進めて(ステップS17)、ステップS4に戻る。   When the FIFO pixel address and the current pixel address match as a result of the comparison between the FIFO pixel address and the current pixel address in step S7 (“=” in step S7), the determination control unit 21 uses the determination data Det. It is determined whether or not the pixel corresponding to the pixel address is a defective pixel (step S14). If it is not a defective pixel (NO in step S14), the read pointer is advanced to the next address (step S15), and the process returns to step S4. If the pixel corresponding to the current pixel address is a defective pixel (YES in step S14), the determination count data stored at the address specified by the read pointer is updated (step S16). For example, if the determination count data stored in the FIFO memory 22 is “3h”, it is set to “4h”. Thereafter, the read pointer is advanced to the next address (step S17), and the process returns to step S4.

以上のフローチャートの説明において、現画素アドレスの垂直方向アドレスVadがmaxYより大きい場合とは、イメージセンサによって撮像された1つのシーンについて全ての画素データの処理が終了した場合であり、その場合には、次に撮像されたシーンについて画素データの処理を行うために、リードポインタをFIFOメモリ22の最初のアドレスに設定する。以上のように、本実施の形態による画像処理装置は、イメージセンサによって撮像された複数のシーンについて各シーンの撮像に使用された全ての画素に対して白点不良及び黒点不良を検出するため、1つのシーンのみから不良画素を検出するものと異なり、イメージセンサの不良画素を正確に検出することができる。これにより、不良画素ではない明度の高い又は低い非常に細い線や非常に小さい点が不良画素と誤判断されることを防止することができる。これは、画像に動きがある場合、すなわちシーン毎に各画素の明度が大きく異なる場合等に非常に有効である。   In the above description of the flowchart, the case where the vertical address Vad of the current pixel address is larger than maxY is the case where the processing of all pixel data is completed for one scene captured by the image sensor. Then, the read pointer is set to the first address in the FIFO memory 22 in order to process the pixel data for the next imaged scene. As described above, the image processing apparatus according to the present embodiment detects white point defects and black point defects for all the pixels used for imaging each scene for a plurality of scenes captured by the image sensor. Unlike the case of detecting a defective pixel from only one scene, it is possible to accurately detect a defective pixel of the image sensor. Thereby, it is possible to prevent a very thin line or a very small point having high or low brightness that is not a defective pixel from being erroneously determined as a defective pixel. This is very effective when there is a motion in the image, that is, when the brightness of each pixel differs greatly from scene to scene.

また、本実施の形態による画像処理装置において、係数記憶レジスタ19に記憶された係数k1,k2、及び回数記憶レジスタ24に記憶された所定の回数sを外部から設定可能にすれば、全体に暗い又は全体に明るい等の撮影環境に応じてその係数k1,k2及び回数sを変更することにより、白点不良及び黒点不良をより正確に検出することができる。例えば、全体に撮影環境が暗い場合に白点不良を検出しやすくなるように、外部から係数k1,k2をそれぞれ大きな値及び小さい値に変更することができれば、不良画素の判定をより正確に行うことができる。   Further, in the image processing apparatus according to the present embodiment, if the coefficients k1 and k2 stored in the coefficient storage register 19 and the predetermined number s stored in the number storage register 24 can be set from the outside, the entire image is dark. Alternatively, by changing the coefficients k1 and k2 and the number of times s according to the photographing environment such as the overall brightness, white spot defects and black spot defects can be detected more accurately. For example, if the coefficients k1 and k2 can be changed from the outside to a large value and a small value, respectively, so that it is easy to detect a white spot defect when the entire shooting environment is dark, the defective pixel is determined more accurately. be able to.

さらに、本実施の形態による画像処理装置は、イメージセンサの不良画素の位置を予め記憶させておく必要がないので、個別の不揮発性メモリが不要となりコストの低減が図れるとともに、出荷前に不良画素の位置を不揮発性メモリに記憶させるといった煩雑な処理をする必要がなくなる。また、FIFOメモリ22の容量を変化させることにより、不良画素が多いイメージセンサも使用することができるため、使用するイメージセンサの制限がなくなる。これにより、より価格の低いイメージセンサを使用することができ、画像処理装置全体の費用も安くすることができる。   Furthermore, since the image processing apparatus according to the present embodiment does not need to store the position of the defective pixel of the image sensor in advance, an individual non-volatile memory is not required, and the cost can be reduced. It is not necessary to perform complicated processing such as storing the position of the position in the nonvolatile memory. In addition, by changing the capacity of the FIFO memory 22, an image sensor with many defective pixels can be used, so that there is no restriction on the image sensor to be used. Thereby, an image sensor with a lower price can be used, and the cost of the entire image processing apparatus can be reduced.

本発明による画像処理装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the image processing apparatus by this invention. 垂直帰線期間信号VBlankと水平帰線期間信号HBlankとを説明するためのタイミングチャートである。It is a timing chart for demonstrating the vertical blanking period signal VBlank and the horizontal blanking period signal HBlank. イメージセンサ部3におけるイメージセンサの画素配列の一例を示した図である。3 is a diagram illustrating an example of a pixel array of an image sensor in an image sensor unit 3. FIG. 白点/黒点検出補完部7の構成例を示すブロック図である。It is a block diagram which shows the structural example of the white spot / black spot detection complement part. 白点/黒点記憶部6の構成例を示すブロック図である。3 is a block diagram illustrating a configuration example of a white point / black point storage unit 6. FIG. FIFOメモリ22に記憶されたデータのデータ構造の一例を示した図である。3 is a diagram illustrating an example of a data structure of data stored in a FIFO memory 22. FIG. 判定コントロール部21の動作を説明するフローチャートである。4 is a flowchart for explaining the operation of a determination control unit 21. 一旦リセットされたFIFOメモリ22に最初にデータを書き込む場合の判定コントロール部21の動作を説明したフローチャートである。6 is a flowchart for explaining the operation of the determination control unit 21 when data is first written to the FIFO memory 22 once reset.

符号の説明Explanation of symbols

1 画像処理装置
2 ホストコンピュータ
3 イメージセンサ部
4 白点/黒点補正装置
5 USBI/F部
6 白点/黒点記憶部
7 白点/黒点検出補完部
8 画素アドレス生成部
9 タイミング信号生成部
11 白点/黒点判別部
12〜16 画素データ記憶部
17 画素補完部
18 MUX
19 係数記憶レジスタ
21 判定コントロール部
22 FIFOメモリ
23 判定比較部
24 回数記憶レジスタ
Ad アドレスデータ
Din,Dout,Dusb 画素データ
Det 判定データ
Req 補完要求信号
VBlank 垂直帰線期間信号
HBlank 水平帰線期間信号
TM タイミング信号
DESCRIPTION OF SYMBOLS 1 Image processing apparatus 2 Host computer 3 Image sensor part 4 White point / black point correction apparatus 5 USB I / F part 6 White point / black point memory | storage part 7 White point / black point detection complement part 8 Pixel address generation part 9 Timing signal generation part 11 White Point / black point determination unit 12 to 16 Pixel data storage unit 17 Pixel complementation unit 18 MUX
19 Coefficient storage register 21 Judgment control unit 22 FIFO memory 23 Judgment comparison unit 24 Count storage register Ad Address data Din, Dout, Dusb Pixel data Det Judgment data Req Complement request signal VBlank Vertical blanking period signal HBlank Horizontal blanking period signal TM Timing signal

Claims (9)

イメージセンサの不良画素に対応する画素データを所定の方法で補完して出力する画像処理装置であって、
前記イメージセンサから画素データが出力されると、その画素データに対応する画素が不良画素であるか否かを判定する判定部と、
前記判定部によって不良画素であると判定された画素の画素アドレスと、その画素が前記判定部によって不良画素であると判定された判定回数とを記憶する記憶部と、
前記判定回数が所定の回数を超えた画素を不良画素として決定する決定部と、
前記決定部によって不良画素であると決定された画素に対応する画素データを所定の方法で補完して出力する補完部と
を備えることを特徴とする画像処理装置。
An image processing apparatus that complements and outputs pixel data corresponding to defective pixels of an image sensor by a predetermined method,
When pixel data is output from the image sensor, a determination unit that determines whether a pixel corresponding to the pixel data is a defective pixel;
A storage unit that stores a pixel address of a pixel determined to be a defective pixel by the determination unit, and a determination number of times that the pixel is determined to be a defective pixel by the determination unit;
A determination unit that determines, as a defective pixel, a pixel whose number of determinations exceeds a predetermined number;
An image processing apparatus comprising: a complementing unit that complements and outputs pixel data corresponding to a pixel determined to be a defective pixel by the determination unit by a predetermined method.
前記記憶部は、
前記画素アドレス及び判定回数を記憶するデータ記憶部と、
前記データ記憶部に対するデータの読み出し及び書き込みを制御する記憶制御部と
を備え、
前記記憶制御部は、前記イメージセンサから出力された画素データに対応する画素が前記判定部によって不良画素であると判定され、かつ前記データ記憶部にその画素の画素アドレス及び判定回数が記憶されていない場合には、前記データ記憶部にその画素に対応する画素アドレスと判定回数とを書き込むことを特徴とする請求項1に記載の画像処理装置。
The storage unit
A data storage unit for storing the pixel address and the number of determination times;
A storage control unit that controls reading and writing of data with respect to the data storage unit,
The storage control unit determines that the pixel corresponding to the pixel data output from the image sensor is a defective pixel by the determination unit, and the pixel address and the number of determinations of the pixel are stored in the data storage unit. 2. The image processing apparatus according to claim 1, wherein if there is no pixel address, the pixel address corresponding to the pixel and the number of times of determination are written in the data storage unit.
前記記憶制御部は、前記イメージセンサから出力された画素データに対応する画素が前記判定部によって不良画素であると判定され、かつ前記データ記憶部にその画素の画素アドレス及び判定回数が記憶されている場合には、前記データ記憶部に記憶されたその画素の判定回数を1つ増加させることを特徴とする請求項2に記載の画像処理装置。   The storage control unit determines that the pixel corresponding to the pixel data output from the image sensor is a defective pixel by the determination unit, and stores the pixel address and the number of determinations of the pixel in the data storage unit. 3. The image processing apparatus according to claim 2, wherein the number of times of determination of the pixel stored in the data storage unit is increased by one when there is. 前記データ記憶部は、FIFOメモリであることを特徴とする請求項1から3のいずれかに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the data storage unit is a FIFO memory. 前記所定の回数は、外部から設定可能であることを特徴とする請求項1から4のいずれかに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the predetermined number of times can be set from outside. 前記判定部は、判定の対象である画素の画素データの明度と、その画素データの入力前及び入力後にそれぞれ入力された前後入力画素データの明度の和とが所定の関係にあるときに、前記判定の対象である画素が不良画素であると判定することを特徴とする請求項1から5のいずれかに記載の画像処理装置。   The determination unit, when the brightness of the pixel data of the pixel to be determined and the sum of the brightness of the input and output pixel data input before and after the input of the pixel data are in a predetermined relationship, The image processing apparatus according to claim 1, wherein the pixel to be determined is determined to be a defective pixel. 前記前後入力画素データは、前記判定の対象となる画素の画素データと同じ色成分の画素データであることを特徴とする請求項6に記載の画像処理装置。   The image processing apparatus according to claim 6, wherein the front and rear input pixel data is pixel data having the same color component as pixel data of the pixel to be determined. 前記判定部は、前記判定の対象となる画素の画素データの明度が、前記前後入力画素データの明度の和に所定の第1の係数を乗算した第1の乗算画素データよりも大きい場合、又は前記判定の対象となる画素の画素データの明度が、前記前後入力画素データの明度の和に所定の第2の係数を乗算した第2の乗算画素データよりも小さい場合に、前記判定の対象である画素が不良画素であると判定することを特徴とする請求項7に記載の画像処理装置。   The determination unit, when the brightness of the pixel data of the pixel to be determined is larger than the first multiplied pixel data obtained by multiplying the sum of the brightness of the front and rear input pixel data by a predetermined first coefficient, or When the brightness of the pixel data of the pixel to be determined is smaller than the second multiplied pixel data obtained by multiplying the sum of the brightness of the front and rear input pixel data by a predetermined second coefficient, The image processing apparatus according to claim 7, wherein a certain pixel is determined to be a defective pixel. 前記第1及び第2の各係数は、それぞれ外部から設定可能であることを特徴とする請求項8に記載の画像処理装置。
The image processing apparatus according to claim 8, wherein each of the first and second coefficients can be set from outside.
JP2005161676A 2005-06-01 2005-06-01 Image processing apparatus Pending JP2006339986A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005161676A JP2006339986A (en) 2005-06-01 2005-06-01 Image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005161676A JP2006339986A (en) 2005-06-01 2005-06-01 Image processing apparatus

Publications (1)

Publication Number Publication Date
JP2006339986A true JP2006339986A (en) 2006-12-14

Family

ID=37560134

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005161676A Pending JP2006339986A (en) 2005-06-01 2005-06-01 Image processing apparatus

Country Status (1)

Country Link
JP (1) JP2006339986A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015534369A (en) * 2012-09-20 2015-11-26 ジャイラス・エーシーエムアイ・インコーポレーテッド Fixed pattern noise reduction

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015534369A (en) * 2012-09-20 2015-11-26 ジャイラス・エーシーエムアイ・インコーポレーテッド Fixed pattern noise reduction
US9854138B2 (en) 2012-09-20 2017-12-26 Gyrus Acmi, Inc. Fixed pattern noise reduction

Similar Documents

Publication Publication Date Title
JP4754939B2 (en) Image processing device
US20060262193A1 (en) Image processing apparatus and method and program
JP6946564B2 (en) Image processing methods and image processing equipment, computer-readable storage media and computer equipment
JP6172935B2 (en) Image processing apparatus, image processing method, and image processing program
US20160006942A1 (en) Image signal processing apparatus and a control method thereof, and an image pickup apparatus and a control method thereof
JP2009147757A (en) Motion vector detecting apparatus, motion vector detecting method, imaging apparatus, and program
KR20160044945A (en) Image photographing appratus
JP2005328421A (en) Imaging apparatus and imaging method
JP5829122B2 (en) Imaging apparatus and evaluation value generation apparatus
JP2007199816A (en) Bank controller, information processing device, imaging device and control method
JP4606218B2 (en) Distortion correction device
JP5446955B2 (en) Imaging device
US10742914B2 (en) Head-wearable imaging apparatus with two imaging elements corresponding to a user left eye and right eye, method, and computer readable storage medium for correcting a defective pixel among plural pixels forming each image captured by the two imaging elements based on defective-pixel related position information
US20110141308A1 (en) Image Processing Apparatus and Method, and Computer-Readable Medium Having Stored Thereon Computer Program for Executing the Method
JP2006339986A (en) Image processing apparatus
JP5299159B2 (en) Imaging apparatus and program
JP2015156558A (en) Solid state imaging apparatus and imaging system
JP6118133B2 (en) Signal processing apparatus and imaging apparatus
JP2013122513A (en) Imaging device and exposure control method
JP2000101924A (en) Defect detection correction device in image input device
KR101646673B1 (en) An apparatus and a method for processing image, and a computer-readable medium storing a computer program for performing the method
JP2012070319A (en) Image processing method, image processing apparatus, and image processing program
JP2011114473A (en) Pixel defect correction device
JP2007228269A (en) Image signal processing device and method
JP5159647B2 (en) Image processing apparatus and image processing method

Legal Events

Date Code Title Description
RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20080131