JP2005210218A - Image processor, image processing method, and program - Google Patents

Image processor, image processing method, and program Download PDF

Info

Publication number
JP2005210218A
JP2005210218A JP2004012176A JP2004012176A JP2005210218A JP 2005210218 A JP2005210218 A JP 2005210218A JP 2004012176 A JP2004012176 A JP 2004012176A JP 2004012176 A JP2004012176 A JP 2004012176A JP 2005210218 A JP2005210218 A JP 2005210218A
Authority
JP
Japan
Prior art keywords
image
pixel
intensity
value
color
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2004012176A
Other languages
Japanese (ja)
Other versions
JP4556102B2 (en
Inventor
Hiroaki Ono
博明 小野
Tomoo Mitsunaga
知生 光永
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.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2004012176A priority Critical patent/JP4556102B2/en
Publication of JP2005210218A publication Critical patent/JP2005210218A/en
Application granted granted Critical
Publication of JP4556102B2 publication Critical patent/JP4556102B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To suppress noise such as false color at the time of all pixel reading and also decimation reading. <P>SOLUTION: Since G signals are arranged in checkered pattern and spatially distributed uniformly in every direction in a mosaic arrangement 231, interpolation of G can be carried out precisely in demosaic processing at the time of all pixel reading. A color arrangement being obtained when the decimation reading of every other row is performed become a G stripe of every other row, and such mosaic arrangements as R and B are mixed uniformly on the same horizontal line in a row other than G and arranged alternately on the same vertical line. When an on-chip color filter of such a mosaic arrangement 231 is employed in a CCD image sensor, noise such as false color is not generated easily at the time of decimation reading of every other row as well as at the time of all pixel reading, and a high quality low resolution image can be attained. The invention is applicable to a digital still camera and a digital video camera. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、画像処理装置および画像処理方法、並びに、プログラムに関し、特に、間引き処理を行う場合に用いて好適な、画像処理装置および画像処理方法、並びに、プログラムに関する。   The present invention relates to an image processing device, an image processing method, and a program, and more particularly, to an image processing device, an image processing method, and a program that are suitable for performing thinning processing.

近年、半導体技術の進歩により数百万画素の固体撮像素子が開発され、これらの固体撮像素子は、例えば、デジタルカメラなどに用いられている。数百万画素の固体撮像素子を用いたデジタルカメラによって撮影される画像は高画質であるが、画像の撮影時以外の、例えば、デジタルカメラのモニタをファインダとして用いている状態における画像の表示、露出やホワイトバランス等の撮影条件決定時の画像の表示などにおいては、フレームレートを高くしたり、画像処理を高速化する必要が生じるが、必ずしも高解像度の画像は必要ではない。しかしながら、数百万画素の固体撮像素子が用いられている場合に、全画素の情報を高速で読み出すのは困難である。   In recent years, solid-state imaging devices having millions of pixels have been developed due to advances in semiconductor technology, and these solid-state imaging devices are used in, for example, digital cameras. An image captured by a digital camera using a multi-million-pixel solid-state image sensor has high image quality, but other than when capturing an image, for example, displaying an image in a state where a monitor of a digital camera is used as a viewfinder In displaying an image when determining shooting conditions such as exposure and white balance, it is necessary to increase the frame rate and speed up image processing, but a high-resolution image is not necessarily required. However, when a multi-million-pixel solid-state imaging device is used, it is difficult to read out information of all pixels at high speed.

これに対して、画像情報の読み出しや処理の高速化が求められている状況においては、固体撮像素子の信号を間引いて読み出し、実質的な画素数を減らすことで、読み出しおよび処理を高速化する方法が提案されている。   On the other hand, in a situation where readout of image information and high-speed processing are required, readout and processing are speeded up by thinning out and reading out signals from the solid-state imaging device and reducing the substantial number of pixels. A method has been proposed.

従来、ベイヤー配列カラーフィルタを有する固体撮像素子により得られた画像信号から、読み出し可能な画像信号の半分の画素を間引きして読み出す方法がある。ここで、ベイヤー配列のカラーフィルタを有する固体撮像素子により得られた画像信号から、水平に1行単位で半分のラインを間引く(すなわち、行ごとに読出し、スキップを交互に実行する)と、RまたはBの色に対応する信号のいずれか一方が完全に欠落してしまう。このように、特定の色の情報が欠落してしまうことがないようにするために、例えば、図1に示されるように、ベイヤー配列11の水平ラインに対して、2行読出し、2行スキップを交互に行うことにより間引きを行い、間引き後に、モザイク配列12の画像信号を得るようになされている技術がある。(例えば、特許文献1)。この手法だと、間引きを行った後のモザイク画像においても、ベイヤー配列が維持されており、後段の処理をそのまま利用することができる。   Conventionally, there is a method of thinning out and reading out half the pixels of a readable image signal from an image signal obtained by a solid-state imaging device having a Bayer array color filter. Here, from an image signal obtained by a solid-state imaging device having a color filter with a Bayer array, half lines are thinned horizontally in units of one row (that is, reading is performed for each row and skipping is performed alternately), R Alternatively, one of the signals corresponding to the B color is completely lost. In this way, in order to prevent a specific color information from being lost, for example, as shown in FIG. 1, two rows are read out and two rows are skipped with respect to the horizontal line of the Bayer array 11. There is a technique in which thinning is performed by alternately performing the above, and after the thinning, an image signal of the mosaic array 12 is obtained. (For example, patent document 1). With this method, the Bayer array is maintained even in the mosaic image after thinning, and the subsequent processing can be used as it is.

特開平9−312849号公報JP 9-312849 A

また、図2に示されるように、1行のデータに全ての色の情報を含んでいる色配列のカラーフィルタを有する高解像度の固体撮像素子から得られる画像信号(RGBストライプ配列21、または、GストライプRB完全市松配列22のモザイク画像など)を間引きして、モザイク配列23の低解像度画像信号に変換する技術がある(例えば、特許文献2)。   In addition, as shown in FIG. 2, an image signal (RGB stripe array 21, or an image signal obtained from a high-resolution solid-state imaging device having a color filter of a color array that includes all color information in one row of data, There is a technique of thinning a G stripe RB complete checkered array 22 mosaic image) and converting it into a low resolution image signal of the mosaic array 23 (for example, Patent Document 2).

特許第3429061号Japanese Patent No. 3429061

たしかに、特許文献1に記載の技術においては、図1に示されるように、間引いた後のモザイク配列12の色配列も、間引く前のモザイク配列11と同様のベイヤー配列になっているという利点がある。しかしながら、2行読出し、2行スキップを交互に設ける読出し方法のため、間引いた後のモザイク配列12の1行目と2行目は、間引き前のモザイク配列11においても隣接しているが、間引いた後のモザイク配列12の2行目と3行目は、間引き前のモザイク配列11の2行目と5行目に対応するため、実際には隣接した画素ではない。このため、間引き後のモザイク配列12に対応する画像信号を用いたRGB同時化処理(デモザイク処理)において、上下に隣接ラインを使用して補間などの処理を実行する場合、サンプリング間隔が一定でないため、垂直方向に偽色等のノイズが発生しやすい。   Indeed, in the technique described in Patent Document 1, as shown in FIG. 1, the color arrangement of the mosaic arrangement 12 after thinning is the same Bayer arrangement as the mosaic arrangement 11 before thinning. is there. However, because of the reading method in which two-line reading and two-line skip are alternately provided, the first and second lines of the mosaic array 12 after thinning are adjacent to each other in the mosaic array 11 before thinning. Since the second and third rows of the mosaic array 12 after this correspond to the second and fifth rows of the mosaic array 11 before thinning, they are not actually adjacent pixels. For this reason, in the RGB simultaneous processing (demosaic processing) using the image signal corresponding to the mosaic array 12 after thinning, when performing processing such as interpolation using adjacent lines up and down, the sampling interval is not constant. , Noise such as false colors is likely to occur in the vertical direction.

また、特許文献2に記載の技術においては、図2に示されるように、間引き処理終了後のモザイク配列23が、列ごとのRGBストライプになってしまうため、RBの水平方向における空間密度が、垂直方向と比較して疎になってしまい、解像度の方向によるばらつきや偽色が発生しやすい。   In the technique described in Patent Document 2, as shown in FIG. 2, the mosaic arrangement 23 after the thinning-out process becomes an RGB stripe for each column, so that the spatial density of the RB in the horizontal direction is It becomes sparse compared to the vertical direction, and variations due to the resolution direction and false colors are likely to occur.

本発明はこのような状況に鑑みてなされたものであり、フレームレートを要求されない処理が実行される場合、全画素読出しを行うことができ、フレームレートを要求される処理が実行される場合、行毎に読出し、スキップを繰り返す間引き読出しを行うことで高速読み出しを実現し、全画素読み出し時においても、間引き読み出し時においても、モザイク画像を構成する各色が空間的に均等に分布するような色フィルタ配列を実現することにより、偽色などを極力抑えた高品質な画像信号を得ることができるようにするものである。   The present invention has been made in view of such a situation, and when a process that does not require a frame rate is executed, all pixels can be read out, and when a process that requires a frame rate is executed, High-speed reading is realized by performing thinning readout that repeats reading and skipping for each row, and colors that make up the mosaic image are evenly distributed spatially at all pixel readout and thinning readout By realizing the filter arrangement, it is possible to obtain a high-quality image signal in which false colors and the like are suppressed as much as possible.

本発明の画像処理装置は、分光感度が異なる3種類のフィルタを有し、複数種類のフィルタのうちのいずれかが画素ごとに用いられている画像センサによって得られたモザイク画像信号から、フィルタの分光感度により決まる3つの色に対応する画素位置毎の強度情報が全画素でそろうようなカラー画像を生成する画像処理装置であり、画像センサからの信号の読み出しを制御する制御手段と、画像センサによって得られたモザイク画像信号から、フィルタの分光感度により決まる3種類の色のそれぞれに対応する強度情報が全画素でそろうような3つの単色画像データを生成する生成手段とを備え、画像センサは、第1のフィルタが市松状に配置され、第2のフィルタが斜め方向に連続し、かつ、水平および垂直方向に1画素おきに配置され、第3のフィルタが斜め方向に連続し、かつ、水平および垂直方向に1画素おきに配置されたフィルタ配列を有し、制御手段は、画像センサからの信号の、全画素読み出しおよび間引き読み出しを制御することを特徴とする。   The image processing apparatus of the present invention has three types of filters having different spectral sensitivities, and from the mosaic image signal obtained by the image sensor in which any one of the plurality of types of filters is used for each pixel, An image processing apparatus that generates a color image in which intensity information for each pixel position corresponding to three colors determined by spectral sensitivity is aligned in all pixels, and includes a control unit that controls reading of a signal from the image sensor, and an image sensor. Generation means for generating, from the obtained mosaic image signal, three single-color image data in which intensity information corresponding to each of the three types of colors determined by the spectral sensitivity of the filter is aligned in all pixels; One filter is arranged in a checkered pattern, the second filter is arranged in an oblique direction, and arranged every other pixel in the horizontal and vertical directions. The third filter has a filter arrangement in which the third filter continues in an oblique direction and is arranged every other pixel in the horizontal and vertical directions, and the control means performs all pixel readout and thinning readout of the signal from the image sensor. It is characterized by controlling.

制御手段により画像センサからの間引き読み出しが制御されたとき、間引き読み出しにより得られたモザイク画像信号を基に生成手段により生成された3つの単色画像データを基に、単色画像データに対応する水平方向に縮小された単色画像データを生成する生成手段を更に備えさせるようにすることができる。   When the thinning readout from the image sensor is controlled by the control means, the horizontal direction corresponding to the single color image data based on the three single color image data generated by the generation means based on the mosaic image signal obtained by the thinning readout. Generation means for generating monochromatic image data reduced in size can be further provided.

制御手段により画像センサからの間引き読み出しが制御されたとき、間引き読み出しにより得られたモザイク画像信号を基に、モザイク画像信号に対応する水平方向に縮小されたモザイク画像信号を生成する生成手段を更に備えさせるようにすることができる。   When the thinning readout from the image sensor is controlled by the control means, a generation means for generating a mosaic image signal reduced in the horizontal direction corresponding to the mosaic image signal based on the mosaic image signal obtained by the thinning readout is further provided. Can be provided.

制御手段は、画像センサからの信号の、1行ごとの読み出しおよびスキップによる間引き読み出しを制御させるようにすることができる。   The control means can control readout of signals from the image sensor for each row and thinning readout by skipping.

画像センサには、少なくとも1水平ラインは同一の感度となるような、複数種類の感度で画像信号を得ることができるようにすることができる。   The image sensor can obtain image signals with a plurality of types of sensitivity such that at least one horizontal line has the same sensitivity.

制御手段には、画像センサからの信号を、複数種類の感度がすべてそろうような均一な行数の読み出しおよびスキップによる間引き読み出しを制御させるようにすることができる。   The control means can control the signal from the image sensor to read out a uniform number of rows in which all the types of sensitivities are all the same and to read out the data by skipping.

本発明の画像処理方法は、画像センサからの信号の読み出しを制御する制御ステップと、画像センサによって得られたモザイク画像信号から、フィルタの分光感度により決まる3種類の色のそれぞれに対応する強度情報が全画素でそろうような3つの単色画像データを生成する生成ステップとを含み、画像センサは、第1のフィルタが市松状に配置され、第2のフィルタが斜め方向に連続し、かつ、水平および垂直方向に1画素おきに配置され、第3のフィルタが斜め方向に連続し、かつ、水平および垂直方向に1画素おきに配置されたフィルタ配列を有し、制御ステップの処理では、画像センサからの信号の、全画素読み出しおよび間引き読み出しを制御することを特徴とする。   According to the image processing method of the present invention, the intensity information corresponding to each of the three types of colors determined by the spectral sensitivity of the filter from the control step for controlling the readout of the signal from the image sensor and the mosaic image signal obtained by the image sensor. Generating three monochromatic image data in which all pixels are aligned, and the image sensor includes a first filter arranged in a checkered pattern, a second filter continuous in an oblique direction, and horizontal and horizontal It has a filter array that is arranged every other pixel in the vertical direction, and the third filter is arranged in the diagonal direction and arranged every other pixel in the horizontal and vertical directions. This is characterized in that all pixel readout and thinning readout of the above signal are controlled.

本発明のプログラムは、画像センサからの信号の読み出しを制御する制御ステップと、画像センサによって得られたモザイク画像信号から、フィルタの分光感度により決まる3種類の色のそれぞれに対応する強度情報が全画素でそろうような3つの単色画像データを生成する生成ステップとを含み、画像センサは、第1のフィルタが市松状に配置され、第2のフィルタが斜め方向に連続し、かつ、水平および垂直方向に1画素おきに配置され、第3のフィルタが斜め方向に連続し、かつ、水平および垂直方向に1画素おきに配置されたフィルタ配列を有し、制御ステップの処理では、画像センサからの信号の、全画素読み出しおよび間引き読み出しを制御することを特徴とする処理をコンピュータに実行させる。   The program of the present invention includes all of intensity information corresponding to each of the three types of colors determined by the spectral sensitivity of the filter from the control step for controlling the readout of the signal from the image sensor and the mosaic image signal obtained by the image sensor. A generation step of generating three monochromatic image data that is aligned with pixels, and the image sensor includes a first filter arranged in a checkered pattern, a second filter continuous in an oblique direction, and horizontal and vertical directions. Are arranged every other pixel, the third filter is arranged in a diagonal direction, and has a filter arrangement arranged every other pixel in the horizontal and vertical directions. The computer is caused to execute processing characterized by controlling all pixel readout and thinning readout.

本発明の画像処理装置および画像処理方法、並びにプログラムにおいては、画像センサからの信号の読み出しが制御され、画像センサによって得られたモザイク画像信号から、フィルタの分光感度により決まる3種類の色のそれぞれに対応する強度情報が全画素でそろうような3つの単色画像データが生成され、画像センサのフィルタ配置は、第1のフィルタが市松状に配置され、第2のフィルタが斜め方向に連続し、かつ、水平および垂直方向に1画素おきに配置され、第3のフィルタが斜め方向に連続し、かつ、水平および垂直方向に1画素おきに配置され、画像センサからの信号の、全画素読み出しおよび間引き読み出しが制御される。   In the image processing apparatus, the image processing method, and the program of the present invention, readout of a signal from the image sensor is controlled, and each of the three types of colors determined by the spectral sensitivity of the filter is determined from the mosaic image signal obtained by the image sensor. Three monochrome image data in which the intensity information corresponding to each pixel is aligned is generated, and the filter arrangement of the image sensor is such that the first filter is arranged in a checkered pattern, the second filter is continuous in an oblique direction, and The third filter is arranged every other pixel in the horizontal and vertical directions, and the third filter is arranged in the diagonal direction and arranged every other pixel in the horizontal and vertical directions. Reading is controlled.

本発明によれば、モザイク画像信号から、カラー画像を生成することができ、特に、画像信号の読み出し速度や処理速度と、得られる画像において必要な解像度とによって、高解像度画像を得るための全画素読み出しか、または、低解像度画像を得るための間引き読み出しが実行され、いずれの場合にも、偽色などの発生を防止して、高品質の画像を得ることができる。   According to the present invention, it is possible to generate a color image from a mosaic image signal, and in particular, to obtain a high-resolution image according to the readout speed and processing speed of the image signal and the resolution required for the obtained image. Pixel reading or thinning-out reading for obtaining a low resolution image is executed, and in any case, generation of a false color or the like can be prevented and a high quality image can be obtained.

以下に本発明の実施の形態を説明するが、本明細書に記載の発明と、発明の実施の形態との対応関係を例示すると、次のようになる。この記載は、本明細書に記載されている発明をサポートする実施の形態が、本明細書に記載されていることを確認するためのものである。したがって、発明の実施の形態中には記載されているが、発明に対応するものとして、ここには記載されていない実施の形態があったとしても、そのことは、その実施の形態が、その発明に対応するものではないことを意味するものではない。逆に、実施の形態が発明に対応するものとしてここに記載されていたとしても、そのことは、その実施の形態が、その発明以外の発明には対応しないものであることを意味するものでもない。   Embodiments of the present invention will be described below. The correspondence relationship between the invention described in this specification and the embodiments of the invention is exemplified as follows. This description is intended to confirm that the embodiments supporting the invention described in this specification are described in this specification. Therefore, even if there is an embodiment that is described in the embodiment of the invention but is not described here as corresponding to the invention, the fact that the embodiment is not It does not mean that it does not correspond to the invention. Conversely, even if an embodiment is described herein as corresponding to an invention, that means that the embodiment does not correspond to an invention other than the invention. Absent.

更に、この記載は、本明細書に記載されている発明の全てを意味するものでもない。換言すれば、この記載は、本明細書に記載されている発明であって、この出願では請求されていない発明の存在、すなわち、将来、分割出願されたり、補正により出現、追加される発明の存在を否定するものではない。   Further, this description does not mean all the inventions described in this specification. In other words, this description is for the invention described in the present specification, which is not claimed in this application, that is, for the invention that will be applied for in the future or that will appear and be added by amendment. It does not deny existence.

請求項1に記載の画像処理装置は、分光感度が異なる3種類のフィルタ(例えば、RGBの3色に対応するカラーフィルタ)を有し、複数種類のフィルタのうちのいずれかが画素ごとに用いられている画像センサ(例えば、CCDイメージセンサ213)によって得られたモザイク画像信号から、フィルタの分光感度により決まる3つの色に対応する画素位置毎の強度情報が全画素でそろうようなカラー画像を生成する画像処理装置であって、画像センサからの信号の読み出しを制御する制御手段(例えば、図3のタイミングジェネレータ217)と、画像センサによって得られたモザイク画像信号から、フィルタの分光感度により決まる3種類の色のそれぞれに対応する強度情報が全画素でそろうような3つの単色画像データを生成する生成手段(例えば、図7のデモザイク処理部253、または、図36のデモザイク処理部371)とを備え、画像センサは、第1のフィルタ(例えば、Gに対応するカラーフィルタ)が市松状に配置され、第2のフィルタ(例えば、RまたはBの一方に対応するカラーフィルタ)が斜め方向に連続し、かつ、水平および垂直方向に1画素おきに配置され、第3のフィルタ(例えば、RまたはBの他方に対応するカラーフィルタ)が斜め方向に連続し、かつ、水平および垂直方向に1画素おきに配置されたフィルタ配列(例えば、図4のモザイク配列231または図34のモザイク配列361に対応するフィルタ配列)を有し、制御手段は、画像センサからの信号の、全画素読み出しおよび間引き読み出しを制御することを特徴とする。   The image processing apparatus according to claim 1 has three types of filters (for example, color filters corresponding to three colors of RGB) having different spectral sensitivities, and any one of the plurality of types of filters is used for each pixel. A color image in which intensity information for each pixel position corresponding to the three colors determined by the spectral sensitivity of the filter is the same for all pixels is generated from the mosaic image signal obtained by the image sensor (for example, the CCD image sensor 213). 3 is determined by the spectral sensitivity of the filter from the mosaic image signal obtained by the control means (for example, the timing generator 217 in FIG. 3) and the image sensor obtained by controlling the readout of the signal from the image sensor. Generation means for generating three single-color image data in which intensity information corresponding to each type of color is aligned in all pixels ( For example, the image sensor includes the demosaic processing unit 253 in FIG. 7 or the demosaic processing unit 371 in FIG. 36, and the image sensor includes first filters (for example, color filters corresponding to G) arranged in a checkered pattern, Two filters (for example, a color filter corresponding to one of R or B) are arranged in an oblique direction and arranged every other pixel in the horizontal and vertical directions, and a third filter (for example, the other of R or B) Is a filter array corresponding to the mosaic array 231 in FIG. 4 or the mosaic array 361 in FIG. And the control means controls all pixel readout and thinning readout of the signal from the image sensor.

制御手段により画像センサからの間引き読み出しが制御されたとき、間引き読み出しにより得られたモザイク画像信号を基に生成手段により生成された3つの単色画像データを基に、単色画像データに対応する水平方向に縮小された単色画像データを生成する生成手段(例えば、図6の水平方向縮小処理部255)を更に備えることができる。   When the thinning readout from the image sensor is controlled by the control means, the horizontal direction corresponding to the single color image data based on the three single color image data generated by the generation means based on the mosaic image signal obtained by the thinning readout. Generation means (for example, the horizontal direction reduction processing unit 255 in FIG. 6) for generating monochrome image data reduced in size can be further provided.

制御手段により画像センサからの間引き読み出しが制御されたとき、間引き読み出しにより得られたモザイク画像信号を基に、モザイク画像信号に対応する水平方向に縮小されたモザイク画像信号を生成する生成手段(例えば、図39の水平方向縮小処理部398)を更に備えることができる。   When thinning readout from the image sensor is controlled by the control means, generation means (for example, generating a mosaic image signal reduced in the horizontal direction corresponding to the mosaic image signal based on the mosaic image signal obtained by thinning readout. 39, the horizontal reduction processing unit 398) of FIG.

画像センサは、少なくとも1水平ラインは同一の感度となるような、複数種類の感度で画像信号を得る(例えば、図34のモザイク配列361に対応するモザイク画像信号を得る)ことができる。   The image sensor can obtain image signals with a plurality of kinds of sensitivities such that at least one horizontal line has the same sensitivity (for example, obtain a mosaic image signal corresponding to the mosaic arrangement 361 in FIG. 34).

制御手段は、画像センサからの信号を、複数種類の感度がすべてそろうような均一な行数(例えば、図34のモザイク配列361に対応するモザイク画像信号に対しては、2行ごと)の読み出しおよびスキップによる間引き読み出しを制御することができる。   The control means reads out the signal from the image sensor in a uniform number of rows (for example, every two rows for the mosaic image signal corresponding to the mosaic array 361 in FIG. 34) such that all the types of sensitivity are all aligned. Further, it is possible to control thinning readout by skipping.

本発明の画像処理方法は、分光感度が異なる3種類のフィルタ(例えば、RGBの3色に対応するカラーフィルタ)を有し、複数種類のフィルタのうちのいずれかが画素ごとに用いられている画像センサ(例えば、CCDイメージセンサ213)によって得られたモザイク画像信号から、フィルタの分光感度により決まる3つの色に対応する画素位置毎の強度情報が全画素でそろうようなカラー画像を生成する画像処理装置の画像処理方法であって、画像センサからの信号の読み出しを制御する制御ステップ(例えば、図16のステップS2またはステップS6の処理)と、画像センサによって得られたモザイク画像信号から、フィルタの分光感度により決まる3種類の色のそれぞれに対応する強度情報が全画素でそろうような3つの単色画像データを生成する生成ステップ(例えば、図16のステップS3またはステップS7の処理)とを含み、画像センサは、第1のフィルタ(例えば、Gに対応するカラーフィルタ)が市松状に配置され、第2のフィルタ(例えば、RまたはBの一方に対応するカラーフィルタ)が斜め方向に連続し、かつ、水平および垂直方向に1画素おきに配置され、第3のフィルタ(例えば、RまたはBの他方に対応するカラーフィルタ)が斜め方向に連続し、かつ、水平および垂直方向に1画素おきに配置されたフィルタ配列(例えば、図4のモザイク配列231または図34のモザイク配列361に対応するフィルタ配列)を有し、制御ステップの処理では、画像センサからの信号の、全画素読み出しおよび間引き読み出しを制御することを特徴とする。   The image processing method of the present invention has three types of filters (for example, color filters corresponding to three colors of RGB) having different spectral sensitivities, and any one of a plurality of types of filters is used for each pixel. Image processing for generating, from a mosaic image signal obtained by an image sensor (for example, a CCD image sensor 213), a color image in which intensity information for each pixel position corresponding to three colors determined by the spectral sensitivity of the filter is aligned in all pixels. An image processing method of the apparatus, wherein a control step (for example, processing in step S2 or step S6 in FIG. 16) for controlling reading of a signal from the image sensor, and a mosaic image signal obtained by the image sensor, Three single-color image data in which intensity information corresponding to each of the three types of colors determined by the spectral sensitivity is the same for all pixels The image sensor includes a first filter (for example, a color filter corresponding to G) arranged in a checkered pattern, and a second generation step (for example, the process of step S3 or step S7 in FIG. 16). A filter (for example, a color filter corresponding to one of R or B) is arranged in an oblique direction and arranged every other pixel in the horizontal and vertical directions, and a third filter (for example, corresponding to the other of R or B) Filter array (for example, a filter array corresponding to the mosaic array 231 in FIG. 4 or the mosaic array 361 in FIG. 34) arranged in the diagonal direction and arranged every other pixel in the horizontal and vertical directions. In the control step processing, all pixel readout and thinning readout of the signal from the image sensor are controlled.

また、請求項8に記載のプログラムにおいても、各ステップが対応する実施の形態(但し一例)は、請求項7に記載の情報処理方法と同様である。   Also in the program according to claim 8, the embodiment (however, an example) to which each step corresponds is the same as the information processing method according to claim 7.

以下、図を参照して、本発明の実施の形態について説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図3は、本発明を適用した演算処理を実行するデジタルスチルカメラ201の構成を示すブロック図である。   FIG. 3 is a block diagram showing a configuration of a digital still camera 201 that executes arithmetic processing to which the present invention is applied.

図3に示すように、デジタルスチルカメラ201は、レンズ211、絞り212、CCD(Charge Coupled Devices)イメージセンサ213、相関2重サンプリング(CDS:Correlated Double Sampling)回路214、A/Dコンバータ215、DSP(Digital Signal Processor)ブロック216、タイミングジェネレータ217、D/Aコンバータ218、ビデオエンコーダ219、表示部220、コーデック(CODEC:COmpression/DECompression)処理部221、メモリ222、CPU223、および、操作入力部224から構成される。   As shown in FIG. 3, a digital still camera 201 includes a lens 211, an aperture 212, a CCD (Charge Coupled Devices) image sensor 213, a correlated double sampling (CDS) circuit 214, an A / D converter 215, and a DSP. (Digital Signal Processor) From block 216, timing generator 217, D / A converter 218, video encoder 219, display unit 220, codec (CODEC: COmpression / DECompression) processing unit 221, memory 222, CPU 223, and operation input unit 224 Composed.

CCDとは、光情報を電気信号に変換する(光電変換)半導体素子であり、CCDイメージセンサ213は、光を電気に変換する受光素子(画素)を複数個並べ、光の変化を画素ごとに独立して電気信号に変換するものである。相関2重サンプリング回路214は、CCDイメージセンサ213の出力信号に含まれるノイズのうちの主な成分であるリセットノイズを、出力の各画素信号のうち、映像信号期間をサンプリングしたものと、基準期間をサンプリングしたものとを引き算することにより除去する回路である。A/Dコンバータ215は、供給されたノイズ除去後のアナログ信号をデジタル信号に変換する。   The CCD is a semiconductor element that converts light information into an electrical signal (photoelectric conversion). The CCD image sensor 213 has a plurality of light receiving elements (pixels) that convert light into electricity, and changes in light for each pixel. It converts to an electric signal independently. The correlated double sampling circuit 214 samples the reset noise, which is the main component of the noise included in the output signal of the CCD image sensor 213, from the sampled video signal period of the output pixel signals, and the reference period. Is a circuit that removes the signal by subtracting the sampled signal. The A / D converter 215 converts the supplied analog signal after noise removal into a digital signal.

DSPブロック216は、信号処理用プロセッサと画像用RAMを持つブロックで、信号処理用プロセッサが画像用RAMに格納された画像データに対して、予めプログラムされた画像処理、または、ハードウェアによる演算処理として構成された画像処理を行うものである。タイミングジェネレータ217は、CCDを駆動するために必要な、水平および垂直の各種駆動パルス、並びに、アナログフロント処理で用いるパルスを、基準クロックに同期して発生させるロジック回路である。また、タイミングジェネレータ217により発生されるタイミングクロックは、バス225を介して、コーデック処理部221、メモリ222、および、CPU223にも供給されている。   The DSP block 216 is a block having a signal processing processor and an image RAM, and the signal processing processor performs pre-programmed image processing or hardware arithmetic processing on the image data stored in the image RAM. The image processing configured as follows is performed. The timing generator 217 is a logic circuit that generates various horizontal and vertical driving pulses necessary for driving the CCD and pulses used in the analog front processing in synchronization with the reference clock. The timing clock generated by the timing generator 217 is also supplied to the codec processing unit 221, the memory 222, and the CPU 223 via the bus 225.

D/Aコンバータ218は、供給されたデジタル信号をアナログ信号に変換して出力する。ビデオエンコーダ219は、供給されたアナログ信号を、表示部220において表示可能な形式のビデオデータにエンコードする。表示部220は、例えば、LCD(Liquid Crystal Display)などで構成され、ビデオエンコーダ219から供給されたビデオ信号を表示する。   The D / A converter 218 converts the supplied digital signal into an analog signal and outputs the analog signal. The video encoder 219 encodes the supplied analog signal into video data in a format that can be displayed on the display unit 220. The display unit 220 is configured by, for example, an LCD (Liquid Crystal Display) and displays the video signal supplied from the video encoder 219.

コーデック処理部221は、例えばJPEG(Joint Picture Experts Group)などの、デジタル画像データの圧縮または伸張アルゴリズムによる処理を実行する。メモリ222は、例えば、半導体メモリ、磁気ディスク、光磁気ディスク、または、光ディスクなどにより構成され、CPU223の制御に基づいて、供給されたデータを記憶したり、または、記憶しているデータを出力する。なお、メモリ222は、デジタルスチルカメラ201に対して着脱可能なようになされていても良い。   The codec processing unit 221 executes processing based on a compression or expansion algorithm for digital image data such as JPEG (Joint Picture Experts Group). The memory 222 is configured by, for example, a semiconductor memory, a magnetic disk, a magneto-optical disk, or an optical disk, and stores supplied data or outputs stored data based on control of the CPU 223. . Note that the memory 222 may be detachable from the digital still camera 201.

CPU223は、バス225を介して、操作入力部224から供給されたユーザの操作入力を基に、デジタルスチルカメラ201の各部を制御する。操作入力部224は、録画を指令する場合のボタンをはじめとして、例えば、ジョグダイヤル、キー、レバー、ボタン、またはタッチパネルなどにより構成され、ユーザによる操作入力を受ける。   The CPU 223 controls each unit of the digital still camera 201 based on a user operation input supplied from the operation input unit 224 via the bus 225. The operation input unit 224 includes, for example, a jog dial, a key, a lever, a button, or a touch panel as well as a button for instructing recording, and receives an operation input by a user.

レンズ211および絞り212を介して入力された光は、CCDイメージセンサ213に入射され、受光素子での光電変換によって電気信号に変換され、相関2重サンプリング回路214に供給される。相関2重サンプリング回路214は、CCDイメージセンサ213の出力の各画素信号のうち、映像信号期間をサンプリングしたものと、基準期間をサンプリングしたものとを引き算することによりノイズを除去し、A/Dコンバータ215に供給する。A/Dコンバータ215は、供給されたノイズ除去後のアナログ信号をデジタル信号に変換し、DSPブロック216の画像用RAMに一時格納する。   Light input through the lens 211 and the diaphragm 212 is incident on the CCD image sensor 213, converted into an electrical signal by photoelectric conversion at the light receiving element, and supplied to the correlated double sampling circuit 214. The correlated double sampling circuit 214 removes noise by subtracting the sampled video signal period and the sampled reference period from the pixel signals output from the CCD image sensor 213, and A / D This is supplied to the converter 215. The A / D converter 215 converts the supplied analog signal after noise removal into a digital signal, and temporarily stores it in the image RAM of the DSP block 216.

タイミングジェネレータ217は、シャッタボタンが押されたか否かかの、撮像中の状態に基づいて、CCDイメージセンサ213による画像の読み出しを制御し、一定のフレームレートによる画像取り込みを維持するように、CCDイメージセンサ213、相関2重サンプリング回路214、A/Dコンバータ215、および、DSPブロック216を制御する。   The timing generator 217 controls the readout of the image by the CCD image sensor 213 based on the state during imaging whether or not the shutter button has been pressed, and maintains the image capture at a constant frame rate. The image sensor 213, the correlated double sampling circuit 214, the A / D converter 215, and the DSP block 216 are controlled.

DSPブロック216は、一定のレートで画素のストリームデータの供給を受け、画像用RAMに一時格納し、信号処理用プロセッサにおいて、一時格納された画像データに対して、後述する画像処理を実行する。DSPブロック216は、画像処理の終了後、CPU223の制御に基づいて、その画像データを表示部220に表示させる場合は、D/Aコンバータ218に、メモリ222に記憶させる場合は、コーデック処理部221に画像データを供給する。   The DSP block 216 receives supply of pixel stream data at a constant rate, temporarily stores it in the image RAM, and executes image processing (to be described later) on the temporarily stored image data in the signal processing processor. When the image block is displayed on the display unit 220 after the image processing is completed, the DSP block 216 displays the code data in the D / A converter 218 and the codec processing unit 221 in the case where the image data is stored in the memory 222. Supply image data.

D/Aコンバータ218は、DSPブロック216から供給されたデジタルの画像データをアナログ信号に変換し、ビデオエンコーダ219に供給する。ビデオエンコーダ219は、供給されたアナログの画像信号を、ビデオ信号に変換し、表示部220に出力して表示させる。すなわち、表示部220は、デジタルスチルカメラ201において、カメラのファインダの役割を担っている。コーデック処理部221は、DSPブロック216から供給された画像データに対して、所定の方式の符号化を施し、符号化された画像データをメモリ222に供給して記憶させる。   The D / A converter 218 converts the digital image data supplied from the DSP block 216 into an analog signal and supplies the analog signal to the video encoder 219. The video encoder 219 converts the supplied analog image signal into a video signal, and outputs the video signal to the display unit 220 for display. That is, the display unit 220 plays a role of a camera finder in the digital still camera 201. The codec processing unit 221 performs a predetermined encoding on the image data supplied from the DSP block 216 and supplies the encoded image data to the memory 222 for storage.

また、コーデック処理部221は、操作入力部224からユーザの操作入力を受けたCPU223の制御に基づいて、メモリ222に記憶されているデータのうち、ユーザに指定されたデータを読み取り、所定の復号方法で復号し、復号した信号をDSPブロック216に出力する。これにより、復号された信号が、DSPブロック216を介してD/Aコンバータ218に供給され、アナログ変換された後、ビデオエンコーダ219によりエンコードされて、表示部220に表示される。   Further, the codec processing unit 221 reads data designated by the user from among the data stored in the memory 222 based on the control of the CPU 223 that has received the user's operation input from the operation input unit 224, and performs predetermined decoding. The decoded signal is output to the DSP block 216. Thus, the decoded signal is supplied to the D / A converter 218 via the DSP block 216, converted into an analog signal, encoded by the video encoder 219, and displayed on the display unit 220.

すなわち、通常の状態(シャッタボタンが押される前の状態)では、タイミングジェネレータ217の制御により、DSPブロック216の画像用RAMには、CCDイメージセンサ213から間引き処理された画像信号が、一定のフレームレートで絶えず上書きされるようになされている。DSPブロック216により処理された画像信号は、D/Aコンバータ215に供給されてアナログ信号に変換され、ビデオエンコーダ219によってビデオ信号に変換されて、変換されたビデオ信号に対応する画像が表示部220に表示される。この時表示される画像は、間引き処理された画像信号に対応する画像であるため、CCDイメージセンサ213の解像度より低い解像度の画像となる。この状態において、表示部220は、CCDイメージセンサ213のファインダの役割を担っている。   That is, in the normal state (the state before the shutter button is pressed), the image signal thinned out from the CCD image sensor 213 is stored in the image RAM of the DSP block 216 in a certain frame by the control of the timing generator 217. It is constantly overwritten at the rate. The image signal processed by the DSP block 216 is supplied to the D / A converter 215, converted into an analog signal, converted into a video signal by the video encoder 219, and an image corresponding to the converted video signal is displayed on the display unit 220. Is displayed. Since the image displayed at this time is an image corresponding to the thinned image signal, the image has a resolution lower than that of the CCD image sensor 213. In this state, the display unit 220 serves as a finder for the CCD image sensor 213.

そして、ユーザにより操作入力部224に含まれるシャッタボタンが押下された場合、CPU223は、シャッタボタンが押下されたタイミングに基づいて、タイミングジェネレータ217にCCDイメージセンサ213から全画素が読出されるように制御させるとともに、DSPブロック216の画像用RAMに新たな画像データが一定期間上書きされないように、すなわち、読み出された画像信号が処理されて保持されるように制御する。DSPブロック216により処理された画像信号は、コーデック処理部221により、所定の方式の符号化が施されて、メモリ222に記憶される。   Then, when the shutter button included in the operation input unit 224 is pressed by the user, the CPU 223 causes the timing generator 217 to read all the pixels from the CCD image sensor 213 based on the timing at which the shutter button is pressed. At the same time, the image RAM of the DSP block 216 is controlled so that new image data is not overwritten for a certain period, that is, the read image signal is processed and held. The image signal processed by the DSP block 216 is encoded by a codec processing unit 221 and stored in the memory 222.

図3のCCDイメージセンサ213のオンチップカラーフィルタに用いられているモザイク配列の第1の例、すなわち、図3のCCDイメージセンサ213により得られるモザイク画像の色配列の第1の例を図4に、図4のモザイク配列に対して、1行ごとに読み出し、スキップを繰り返して間引き処理を行った場合に得られる間引きされたモザイク画像の色配列を図5に示す。   FIG. 4 shows a first example of a mosaic arrangement used in the on-chip color filter of the CCD image sensor 213 in FIG. 3, that is, a first example of a color arrangement of a mosaic image obtained by the CCD image sensor 213 in FIG. FIG. 5 shows the color array of the thinned mosaic image obtained when the thinning process is performed by repeating reading and skipping for each row with respect to the mosaic array of FIG.

図4に示されるモザイク配列231は、ベイヤー配列と同様にG信号が市松上に配置されるようになされ、空間的に、縦方向と横方向に均等に分布しているので、画像の撮像時(全画素読み出し時)におけるDSPブロック216におけるRGB同時化処理(デモザイク処理)で、精度良くGの補間処理を行うことが可能となる。   The mosaic arrangement 231 shown in FIG. 4 is arranged such that the G signals are arranged on the checkered pattern in the same manner as the Bayer arrangement, and are spatially evenly distributed in the vertical and horizontal directions. The RGB interpolation processing (demosaic processing) in the DSP block 216 at the time of all pixel readout makes it possible to perform G interpolation processing with high accuracy.

また、図4に示されるモザイク配列231がCCDイメージセンサ213のオンチップカラーフィルタに用いられている場合、CPU223は、間引き読み出し実行時に、タイミングジェネレータ217を制御して、1行おきに間引いて画像信号を読み出させる。すなわち、CCDイメージセンサ213において取得された画像信号のうち、奇数行または偶数行のみ画像信号が読み出される。したがって、間引き読出し時において、図5に示されるように、得られる色配列は、1列おきのGストライプとなり、Gではない列には、RとBが、それぞれ同一水平ラインに均一に混在し、かつ、同一垂直ラインに交互に配列されるようなモザイク配列241となる。   Further, when the mosaic arrangement 231 shown in FIG. 4 is used for the on-chip color filter of the CCD image sensor 213, the CPU 223 controls the timing generator 217 during thinning-out reading, and thins out every other row. Read the signal. That is, among the image signals acquired by the CCD image sensor 213, the image signals are read out only in odd-numbered rows or even-numbered rows. Therefore, at the time of thinning readout, as shown in FIG. 5, the obtained color arrangement is every other G stripe, and R and B are uniformly mixed on the same horizontal line in non-G columns. And the mosaic arrangement 241 is arranged alternately on the same vertical line.

ここで、図5のモザイク配列241において、間引き後に残っているG信号の間引き前のモザイク配列231における位置を確認してみると、空間的に均等に分布している。すなわち、間引き画像は、原信号である全画素読み出し画像を等しい間隔でリサンプリングしたものと同等である。よって、間引き後のモザイク配列241を有する画像信号においても、DSPブロック216におけるRGB同時化処理(デモザイク処理)において、Gの補間精度の方向によるばらつきが発生しにくい。また、例えば、図2を用いて説明した従来の方法においては、間引いた後のGストライプではない同一の列には、R、Bのいずれか一方しか存在しないが、図5のモザイク配列241では、間引き後に、R、Bが同一列内に混在し、空間的に均等に分布するようになされている。したがって、DSPブロック216におけるRGB同時化処理(デモザイク処理)において、RBの補間精度の方向によるばらつきが発生しにくい。   Here, in the mosaic arrangement 241 of FIG. 5, when the positions in the mosaic arrangement 231 before the thinning of the G signals remaining after the thinning are confirmed, they are spatially evenly distributed. That is, the thinned image is equivalent to a resampled image of the all-pixel read image that is the original signal at equal intervals. Therefore, even in an image signal having the mosaic array 241 after thinning, variations due to the direction of G interpolation accuracy are unlikely to occur in the RGB synchronization processing (demosaic processing) in the DSP block 216. Further, for example, in the conventional method described with reference to FIG. 2, only one of R and B exists in the same column that is not the G stripe after thinning, but in the mosaic arrangement 241 in FIG. After thinning, R and B are mixed in the same column and distributed spatially evenly. Therefore, in the RGB synchronization processing (demosaic processing) in the DSP block 216, variations due to the direction of RB interpolation accuracy are unlikely to occur.

以上から、図4のモザイク配列231に示されるオンチップカラーフィルタを図3のCCDイメージセンサ213に用いることより、全画素読み出しはもちろん、偽色などのノイズが発生しにくい1行おきの間引き読出しを行っても、高品質な低解像度画像を得ることが可能となる。   From the above, by using the on-chip color filter shown in the mosaic array 231 in FIG. 4 for the CCD image sensor 213 in FIG. Even if it performs, it becomes possible to obtain a high-quality low-resolution image.

図6は、図3のDSPブロック216の更に詳細な構成を示すブロック図である。 FIG. 6 is a block diagram showing a more detailed configuration of the DSP block 216 of FIG.

DSPブロック216は、上述したように、画像用RAM241および信号処理用プロセッサ242で構成され、信号処理用プロセッサ242は、ホワイトバランス調整部251、ガンマ補正部252、デモザイク処理部253、スイッチ254、水平方向縮小処理部255、階調変換処理部256、および、YC変換部257で構成される。   As described above, the DSP block 216 includes the image RAM 241 and the signal processing processor 242, and the signal processing processor 242 includes the white balance adjustment unit 251, the gamma correction unit 252, the demosaic processing unit 253, the switch 254, the horizontal A direction reduction processing unit 255, a gradation conversion processing unit 256, and a YC conversion unit 257 are included.

A/Dコンバータ215によってデジタル信号に変換されたモザイク画像は、画像用RAM241に一時保存される。モザイク画像は、各画素にR、GまたはBのいずれかの色に対応する強度信号、すなわち、CCDイメージセンサ213に用いられているカラーフィルタにより定められる配列(図4を用いて説明したモザイク配列231)、または、間引きして得られた所定の配列(図5を用いて説明したモザイク配列241)の周期的なパターンの強度信号により構成されている。   The mosaic image converted into a digital signal by the A / D converter 215 is temporarily stored in the image RAM 241. The mosaic image is an intensity signal corresponding to any color of R, G, or B for each pixel, that is, an array determined by the color filter used in the CCD image sensor 213 (the mosaic array described with reference to FIG. 4). 231) or a predetermined pattern (mosaic array 241 described with reference to FIG. 5) obtained by thinning out, is formed of periodic pattern intensity signals.

ホワイトバランス調整部251は、モザイク画像に対して、無彩色の被写体領域の色バランスが無彩色になるように、各画素強度の持つ色に応じて適切な係数をかける処理(ホワイトバランスの調整処理)を実行する。ガンマ補正部252は、ホワイトバランスが調整されたモザイク画像の各画素強度に対して、ガンマ補正を行う。画像の階調の応答特性を表すために「ガンマ(γ)」という数値が使われる。ガンマ補正とは、表示部220に表示される画像の明るさや色の彩度を正しく表示するための補正処理のことである。表示部220に出力される信号は、画素ごとに特定の電圧を加えることで、画像の明るさや色が再現されるようになされている。しかしながら、実際に表示される画像の明るさや色は、表示部220が有する特性(ガンマ値)により、入力電圧を倍にしてもブラウン管の明るさが倍になるわけではない(非線形性を有する)ため、ガンマ補正部252において、表示部220に表示される画像の明るさや色の彩度が正しく表示されるように補正する処理が施される。   The white balance adjustment unit 251 performs processing (white balance adjustment processing) for applying an appropriate coefficient to the mosaic image according to the color of each pixel intensity so that the color balance of the achromatic subject region becomes an achromatic color. ). The gamma correction unit 252 performs gamma correction on each pixel intensity of the mosaic image whose white balance has been adjusted. A numerical value “gamma (γ)” is used to represent the response characteristics of the gradation of the image. The gamma correction is a correction process for correctly displaying the brightness and color saturation of the image displayed on the display unit 220. The signal output to the display unit 220 reproduces the brightness and color of the image by applying a specific voltage for each pixel. However, due to the characteristics (gamma value) of the display unit 220, the brightness and color of the actually displayed image does not double the brightness of the CRT even if the input voltage is doubled (has non-linearity). For this reason, the gamma correction unit 252 performs a correction process so that the brightness and color saturation of the image displayed on the display unit 220 are correctly displayed.

デモザイク処理部253は、色分布形状を統計的に算出することにより、ガンマ補正がなされたモザイク画像の各画素位置にR,G,Bの全ての強度(強度情報)を揃えるデモザイク処理を実行する。したがって、デモザイク処理部253からの出力信号は、R,G,Bの3つの色に対応する3つの画像信号となる。   The demosaic processing unit 253 statistically calculates the color distribution shape, thereby executing a demosaic process for aligning all the R, G, and B intensities (intensity information) at each pixel position of the mosaic image subjected to gamma correction. . Therefore, the output signals from the demosaic processing unit 253 are three image signals corresponding to the three colors R, G, and B.

スイッチ254は、CPU223の制御に基づいて、供給された画像信号が間引きされていない画像信号、すなわち、モザイク配列231を有する画像信号を用いてデモザイク処理されたR,G,Bの3つの色に対応する3つの画像信号である場合、供給された信号を階調変換処理部256に供給し、供給された画像信号が間引きされた画像信号、すなわち、モザイク配列241を有する画像信号を用いてデモザイク処理されたR,G,Bの3つの色に対応する3つの画像信号である場合、供給された信号を水平方向縮小処理部255に供給する。   Based on the control of the CPU 223, the switch 254 converts the supplied image signal into three colors R, G, and B that have been demosaiced using the image signal that has not been thinned out, that is, the image signal having the mosaic array 231. In the case of the corresponding three image signals, the supplied signal is supplied to the gradation conversion processing unit 256, and the supplied image signal is thinned, that is, demosaiced using the image signal having the mosaic array 241. In the case of three image signals corresponding to the processed three colors of R, G, and B, the supplied signals are supplied to the horizontal reduction processing unit 255.

水平方向縮小処理部255には、モザイク配列241を有する画像信号を用いてデモザイク処理されたR,G,Bの3つの色に対応する3つの画像信号が供給される。1/2に水平ラインが間引きされた画像信号は、縦の画素数が原画像の1/2となっている。したがって、水平方向縮小処理部255は、間引きされた画像信号の縦横比が、原画像と同様の縦横比となるように、水平方向に縮小処理を施して、階調変換処理部256に供給する。   The horizontal direction reduction processing unit 255 is supplied with three image signals corresponding to the three colors R, G, and B that have been demosaiced using the image signal having the mosaic arrangement 241. In the image signal in which the horizontal line is thinned by 1/2, the number of vertical pixels is 1/2 that of the original image. Therefore, the horizontal reduction processing unit 255 performs a reduction process in the horizontal direction so that the aspect ratio of the thinned image signal becomes the same aspect ratio as that of the original image, and supplies it to the gradation conversion processing unit 256. .

階調変換処理部256は、出力する画像データのビット数にあわせて、供給された画像信号の階調を圧縮する階調変換処理を実行し、階調変換された画像信号をYC変換部257に供給する。   The gradation conversion processing unit 256 executes gradation conversion processing for compressing the gradation of the supplied image signal in accordance with the number of bits of the output image data, and the YC conversion unit 257 converts the gradation-converted image signal. To supply.

YC変換部257はR,G,Bの3チャネル画像に、マトリックス処理およびクロマ成分に対する帯域制限を行うことで、Y画像およびC画像(YCbCr画像信号)を生成し、出力する。   The YC conversion unit 257 generates and outputs a Y image and a C image (YCbCr image signal) by subjecting the three-channel image of R, G, and B to band processing for matrix processing and chroma components.

DSPブロック216の信号処理用プロセッサ242においては、デモザイク処理部253によるデモザイク処理の前に、ガンマ補正部252によりガンマ補正を行うものとしている。これは、ガンマ補正された非線形な画素強度空間においてデモザイク演算を実行することにより、デモザイク処理部253のデモザイク処理の信頼性をより高めることができるためである。   In the signal processing processor 242 of the DSP block 216, the gamma correction unit 252 performs gamma correction before the demosaic processing by the demosaic processing unit 253. This is because the reliability of the demosaic processing of the demosaic processing unit 253 can be further improved by executing the demosaic operation in the non-linear pixel intensity space subjected to the gamma correction.

例えば、入力される画像が高コントラストな輪郭領域である場合、その色分布は、非常に明るい強度域と非常に暗い強度域に渡ってしまう。物理的に、物体反射光は、物体表面のばらつきに照明からの入射光強度が乗じられたものになることから、カメラへの入射光強度に比例する線形な画素強度空間においては、明るい強度域にある物体色の分布はスパースに(まばらに)広がり、暗い画素強度域にある物体色の分布はあまり広がらずにコンパクトに縮まる傾向にある。   For example, when the input image is a high-contrast contour region, the color distribution covers a very bright intensity region and a very dark intensity region. Physically, the object reflected light is obtained by multiplying the variation of the object surface by the incident light intensity from the illumination. Therefore, in the linear pixel intensity space proportional to the incident light intensity to the camera, the bright intensity region The distribution of the object color in the sparsely spreads (sparsely), and the distribution of the object color in the dark pixel intensity region does not spread so much and tends to be compact.

デモザイク処理部253においては、色分布形状を統計的に算出することにより、デモザイク処理を実行する。しかしながら、高コントラストな輪郭領域では、明るい領域での画素強度のちらばりと暗い領域での画素強度のちらばりが大きく異なり、統計的な線形回帰が適用しにくくなる。したがって、入力されたデータに対して、デモザイク処理部253におけるデモザイク処理に先立って、ガンマ補正のような非線形の画素強度変換を施して、暗い画素強度域を持ち上げて(明るい画素強度領域に近づけて)、画素強度の分散をある程度抑制するようにすることにより、デモザイク処理部253において実行される線形回帰処理の信頼性を向上させることができる。   In the demosaic processing unit 253, demosaic processing is executed by statistically calculating the color distribution shape. However, in the high-contrast contour region, the pixel intensity variation in the bright region and the pixel intensity variation in the dark region are greatly different, and it becomes difficult to apply statistical linear regression. Therefore, prior to demosaic processing in the demosaic processing unit 253, the input data is subjected to non-linear pixel intensity conversion such as gamma correction to raise the dark pixel intensity region (close to the bright pixel intensity region). ) By suppressing the dispersion of the pixel intensity to some extent, the reliability of the linear regression processing executed in the demosaic processing unit 253 can be improved.

このような目的で適用する非線形変換は、ガンマ補正のように1より小さい指数によるべき乗変換が望ましいが、通常カラープロファイル等で用いられているsRGBガンマのように、べき乗部と線形部を組み合わせたような変換であっても、略べき乗関数と同じとみなせるようなものであれば、いずれの非線形変換であってもよい。また、非線形変換を省略するようにしても、デモザイク処理の後に、ガンマ補正などの非線形変換処理を行うようにしてもよいことは言うまでもない。   The nonlinear transformation applied for such a purpose is preferably a power transformation with an exponent smaller than 1 as in gamma correction, but a combination of a power portion and a linear portion as in sRGB gamma usually used in a color profile or the like. Even if it is such a conversion, any non-linear conversion may be used as long as it can be regarded as being substantially the same as a power function. Needless to say, even if the non-linear conversion is omitted, a non-linear conversion process such as gamma correction may be performed after the demosaic process.

次に、図7は、全画素位置でRGBの全ての色が存在するように、各画素位置ごとに順次、そこにない色の強度を補間または推定していく処理であるデモザイク処理を実行する、図6のデモザイク処理部253の更に詳細な構成を示すブロック図である。   Next, FIG. 7 executes a demosaic process that is a process of sequentially interpolating or estimating the intensity of a color that does not exist at each pixel position so that all RGB colors exist at all pixel positions. FIG. 7 is a block diagram showing a more detailed configuration of the demosaic processing unit 253 in FIG. 6.

デモザイク処理部253は、局所領域抽出部281、G強度補間処理部282、信頼度算出部283、粗補間処理部284、統計量算出部285−1乃至285−3、および、回帰演算処理部286−1乃至286−3で構成される。   The demosaic processing unit 253 includes a local region extraction unit 281, a G intensity interpolation processing unit 282, a reliability calculation unit 283, a rough interpolation processing unit 284, statistic calculation units 285-1 to 285-3, and a regression calculation processing unit 286. -1 to 286-3.

局所領域抽出部281は、ガンマ補正されたモザイク画像から、注目画素位置周囲の決まった大きさの局所領域の画素を切り出す。ここでは、切り出す局所領域を、間引きされていない画像信号においては、注目画素位置を中心とした、例えば、5×5画素、7×7画素、または、9×9画素などのn×n画素の矩形領域とし、間引きされた画像信号においては、注目画素を中心とした、例えば、5×3画素、7×4画素、または、9×5画素などのn×m画素の矩形領域とする。   The local area extraction unit 281 cuts out a pixel of a local area having a predetermined size around the target pixel position from the gamma-corrected mosaic image. Here, in the image signal in which the local region to be cut out is not thinned out, an n × n pixel such as a 5 × 5 pixel, a 7 × 7 pixel, or a 9 × 9 pixel is used, for example. In the thinned image signal, a rectangular region of n × m pixels such as 5 × 3 pixels, 7 × 4 pixels, or 9 × 5 pixels, for example, with the pixel of interest at the center is used.

G強度補間処理部282は、局所領域内に存在する画素を用いて、注目画素位置におけるG強度を補間処理によって算出する。信頼度算出部283は、局所領域内に存在する画素とG強度補間処理部282が算出した注目画素位置のG強度とを用いて、信頼度を算出する。ここで信頼度とは、この局所領域における色分布形状の推定の正確さを予想する値である。信頼度をどのように算出するかは後述する。   The G intensity interpolation processing unit 282 calculates the G intensity at the target pixel position by interpolation processing using pixels existing in the local region. The reliability calculation unit 283 calculates the reliability using the pixels existing in the local region and the G intensity at the target pixel position calculated by the G intensity interpolation processing unit 282. Here, the reliability is a value that predicts the accuracy of estimation of the color distribution shape in the local region. How to calculate the reliability will be described later.

粗補間処理部284は、局所領域内の複数の画素位置においてR,G,B各色の強度の組が作れるよう、簡単な演算によって、R,G,Bの画素強度の推定値(以下、ラフな推定値と称する)を、後述する補間方法を用いて算出する。本発明においては色分布形状を推定するために、2次の統計量、または、それに相当する値を計算することが必要であり、そのために、同一画素位置における各色の強度が組となって得られている必要がある。この強度の組を生成するために、粗補間処理部284は、局所領域内の複数の画素(ここでは、n×m画素の局所領域に対して、注目画素を中心とした(n−2)×(m−2)画素であり、n=mのときは、(n−2)×(n−2)画素となる)におけるR,G,Bのラフな推定値を算出する。   The coarse interpolation processing unit 284 is configured to calculate R, G, and B pixel intensity estimates (hereinafter, rough values) by simple calculation so that a set of R, G, and B color intensities can be created at a plurality of pixel positions in the local region. Is calculated by using an interpolation method described later. In the present invention, in order to estimate the color distribution shape, it is necessary to calculate a second-order statistic or a value corresponding thereto, and for this reason, the intensity of each color at the same pixel position can be taken as a set. Need to be. In order to generate this intensity set, the coarse interpolation processing unit 284 has a plurality of pixels in the local region (here, the pixel of interest is centered on the local region of n × m pixels (n−2)). R (G−2) pixels, and when n = m, the rough estimated values of R, G, and B in (n−2) × (n−2) pixels) are calculated.

なお、従来のデモザイク技術においては、このような粗補間処理部284に相当する処理がないため、正確な色分布形状推定を行うための情報が算出できないという問題があった。これに対して、本発明を適用したデモザイク処理部253においては、粗補間処理部284を用いて、正確な色分布形状推定を行うための情報として、ラフな推定値を求めることができるようになされている。   In the conventional demosaic technique, there is no processing corresponding to such a rough interpolation processing unit 284, and thus there is a problem that information for performing accurate color distribution shape estimation cannot be calculated. On the other hand, in the demosaic processing unit 253 to which the present invention is applied, a rough estimation value can be obtained as information for performing accurate color distribution shape estimation using the rough interpolation processing unit 284. Has been made.

統計量算出部285−1乃至285−3は、粗補間処理部284により算出された局所領域内の各画素におけるR,G,B強度の組を用いて、2色間の統計量を算出する。統計量算出部285−1乃至285−3のいずれにおいても、第1の色はGである。そして、統計量算出部285−1に供給される第2の色はRであり、統計量算出部285−2に供給される第2の色は、第1の色と同じくGであり、統計量算出部285−3に供給される第2の色はBである。そして、統計量算出部285−1乃至285−3は、第1の色の平均値、第2の色の平均値、第1の色の分散値、および、第1の色と第2の色の共分散値を演算して出力する。デモザイク処理部253には、入力信号の色の違いによって3つの統計量算出部285−1乃至285−3が存在するが、それらの動作は全て等しいので、以下、特に区別しない場合、単に、統計量算出部285と称するものとする。   The statistic calculators 285-1 to 285-3 calculate a statistic between two colors using a set of R, G, and B intensities at each pixel in the local area calculated by the coarse interpolation processor 284. . In any of the statistic calculation units 285-1 to 285-3, the first color is G. The second color supplied to the statistic calculation unit 285-1 is R, and the second color supplied to the statistic calculation unit 285-2 is G, like the first color. The second color supplied to the amount calculation unit 285-3 is B. Then, the statistic calculation units 285-1 to 285-3 calculate the average value of the first color, the average value of the second color, the dispersion value of the first color, and the first color and the second color. The covariance value of is computed and output. The demosaic processing unit 253 includes three statistical amount calculation units 285-1 to 285-3 depending on the color of the input signal, but their operations are all the same. It shall be called the quantity calculation part 285.

回帰演算処理部286−1乃至286−3は、G強度補間処理部282が算出した注目画素位置のG強度と、統計量算出部285−1乃至285−3のうちのいずれか対応するものが算出した統計量と、信頼度算出部283が算出した信頼度に基づいて、色分布形状の線形回帰計算を行い、注目画素位置における強度推定値を算出する。具体的には、回帰演算処理部286−1は、注目画素位置のG強度と信頼度算出部283が算出した信頼度に加えて、GとRのそれぞれの平均値、Gの分散値、および、GとRとの共分散値の供給を受け、注目画素のR強度を推定して出力する。また、回帰演算処理部286−2は、注目画素位置のG強度と信頼度算出部283が算出した信頼度に加えて、Gの平均値、Gの分散値の供給を受け、注目画素のG強度を推定して出力する。そして、回帰演算処理部286−3は、注目画素位置のG強度と信頼度算出部283が算出した信頼度に加えて、GとBのそれぞれの平均値、Gの分散値、および、GとBとの共分散値の供給を受け、注目画素のB強度を推定して出力する。デモザイク処理部253には、入力信号の色の違いによって3つの回帰演算処理部286−1乃至286−3が存在するが、それらの動作は全て等しいので、以下、特に区別しない場合、単に、回帰演算処理部286と称するものとする。   The regression calculation processing units 286-1 to 286-3 correspond to one of the G intensity at the target pixel position calculated by the G intensity interpolation processing unit 282 and the statistic calculation units 285-1 to 285-3. Based on the calculated statistic and the reliability calculated by the reliability calculation unit 283, linear regression calculation of the color distribution shape is performed, and an intensity estimation value at the target pixel position is calculated. Specifically, in addition to the G intensity of the target pixel position and the reliability calculated by the reliability calculation unit 283, the regression calculation processing unit 286-1 includes the average value of each of G and R, the variance value of G, and , The covariance value of G and R is supplied, and the R intensity of the pixel of interest is estimated and output. In addition to the G intensity at the target pixel position and the reliability calculated by the reliability calculation unit 283, the regression calculation processing unit 286-2 receives the average value of G and the variance value of G, and receives the G of the target pixel. Estimate and output the intensity. Then, in addition to the G intensity at the target pixel position and the reliability calculated by the reliability calculation unit 283, the regression calculation processing unit 286-3 adds the average value of each of G and B, the variance value of G, and G and Upon receiving the covariance value with B, the B intensity of the pixel of interest is estimated and output. The demosaic processing unit 253 includes three regression calculation processing units 286-1 to 286-3 depending on the color of the input signal, but their operations are all the same. It is assumed to be called an arithmetic processing unit 286.

なお、デモザイク処理部253においては、デモザイク処理を行うために、Gの強度推定値を算出するための統計量算出部285−2および回帰演算処理部286−2を省略し、G強度補間処理部282が算出した注目画素位置のG強度を用いるようにしてもよい。しかしながら、図7に示されるように、統計量算出部285−2および回帰演算処理部286−2を用いて、Gに対して回帰計算を行って、推定値を算出し直すことによりGの強度に対するノイズ低減効果や高域補正効果を奏することが可能となるので、Gの強度推定値を算出するための統計量算出部285−2および回帰演算処理部286−2を省略することなく、備えるようにするほうが、得られる画像の品質が向上し、好適である。   Note that the demosaic processing unit 253 omits the statistic calculation unit 285-2 and the regression calculation processing unit 286-2 for calculating the G intensity estimation value in order to perform the demosaic processing, and the G intensity interpolation processing unit. The G intensity at the target pixel position calculated by 282 may be used. However, as shown in FIG. 7, by using the statistic calculation unit 285-2 and the regression calculation processing unit 286-2 to perform regression calculation on G and recalculate the estimated value, the intensity of G Therefore, the statistical amount calculation unit 285-2 and the regression calculation processing unit 286-2 for calculating the G intensity estimation value are provided without being omitted. It is preferable to improve the quality of the obtained image.

次に、デモザイク処理部253の各部の更に詳細な動作について説明する。   Next, a more detailed operation of each unit of the demosaic processing unit 253 will be described.

局所領域抽出部281は、注目画素位置近傍の所定の矩形領域内の画素情報を取得するものである。なお、画素情報の取得方法はいずれの方法であっても良く、例えば、本発明をソフトウェアとして実現する場合、注目画素位置近傍の矩形領域内の画素値を、配列として内部のメモリに保存するようにすれば良いし、ハードウェアで実現する場合、ディレイラインを用いて、注目画素の上下に隣接する画素信号を取得することができるようにすれば良い。通常、撮像装置の信号処理系においては、CCDイメージセンサ213から供給される信号が、水平ライン順次の画素強度の1次元系列となるように、ハードウェアが実装されることが多いので、通常、1水平ライン分の画素強度を保持できるディレイラインが用いられて、上下に隣接する水平ラインの画素へのアクセスが確保される。したがって、9×9の矩形領域の画像信号を取得するためには、最低8個のディレイラインを用意すればよい。   The local area extraction unit 281 acquires pixel information in a predetermined rectangular area near the target pixel position. The pixel information acquisition method may be any method. For example, when the present invention is implemented as software, pixel values in a rectangular area near the target pixel position are stored in an internal memory as an array. In the case of realization by hardware, it is only necessary to obtain a pixel signal adjacent to the upper and lower sides of the pixel of interest using a delay line. Usually, in a signal processing system of an imaging apparatus, hardware is often mounted so that a signal supplied from the CCD image sensor 213 is a one-dimensional series of pixel intensities in a horizontal line sequence. A delay line capable of holding the pixel intensity for one horizontal line is used to ensure access to the pixels of the horizontal lines adjacent vertically. Therefore, in order to acquire an image signal of a 9 × 9 rectangular area, it is sufficient to prepare at least eight delay lines.

G強度補間処理部282は、局所領域抽出部281が抽出したn×nまたはn×m(例えば、9×9や9×5)画素の矩形領域の画素を用いて、注目画素位置のG強度値を補間により算出する。G強度補間処理部282が注目画素の周囲の画素を用いてG強度を算出する方法は、いかなる方法であっても良く、例えば、「村田,森,前中,岡田、および、千原,“PS-CCDにおける相関判別色分離方式”,映像情報メディア学会誌,Vol.55,No.1,pp.120-132,2001」(非特許文献1)に記載されている方法などを用いることができる。   The G intensity interpolation processing unit 282 uses the pixels in the rectangular region of n × n or n × m (for example, 9 × 9 or 9 × 5) pixels extracted by the local region extraction unit 281 to use the G intensity at the target pixel position. The value is calculated by interpolation. Any method may be used for the G intensity interpolation processing unit 282 to calculate the G intensity using pixels around the target pixel. For example, “Murata, Mori, Maenaka, Okada, and Chihara,“ PS ” -Correlation discriminating color separation method in CCD ", Journal of the Institute of Image Information and Television Engineers, Vol.55, No.1, pp.120-132, 2001" (Non-patent Document 1) can be used. .

信頼度算出部283は、局所領域抽出部281により抽出されたn×nまたはn×m(例えば、9×9や9×5)画素の矩形局所領域の画素と、G強度補間処理部282により算出された注目画素位置のG強度とを用いて、注目画素位置における色分布形状推定の信頼度を算出する。本発明を適用したデモザイク処理における色分布形状推定では、抽出された局所領域内に、2種類の異なる色の領域があることを想定している。通常の物体輪郭領域に関しては、この仮定が当てはまることが多いので、この仮定で、充分正確な輪郭の色再現が可能である。しかしながら、画像の中にはその仮定が当てはまらず、局所領域内に異なる3色が存在するような場合もあり得る。典型的には、細い縞模様状のテクスチャにおける場合であり、このようなテクスチャにおいて、局所領域内に多くの色が含まれ易い。そこで、信頼度算出部283は、このような細い縞模様状のテクスチャを検出し、そのテクスチャの強度に基づいて信頼度値を出力する。   The reliability calculation unit 283 includes n × n or n × m (for example, 9 × 9 or 9 × 5) pixels in the rectangular local region extracted by the local region extraction unit 281, and the G intensity interpolation processing unit 282. The reliability of color distribution shape estimation at the target pixel position is calculated using the calculated G intensity at the target pixel position. In the color distribution shape estimation in the demosaic process to which the present invention is applied, it is assumed that there are two different color regions in the extracted local region. Since this assumption is often applied to a normal object contour region, sufficiently accurate contour color reproduction is possible with this assumption. However, the assumption is not true in the image, and there may be cases where three different colors exist in the local region. Typically, this is a case of a thin striped texture. In such a texture, many colors are likely to be included in the local region. Therefore, the reliability calculation unit 283 detects such a thin striped texture and outputs a reliability value based on the intensity of the texture.

信頼度値の供給を受ける回帰演算処理部286は、統計量算出部285により算出された色分布形状に関する統計量に対して、信頼度値に基づいた補正を施すようになされているため、抽出された局所領域内に、2種類の異なる色の領域があるという仮定から外れたことによる色強度の推定誤差を抑制することが可能となる。   The regression calculation processing unit 286 that receives the supply of the reliability value performs correction based on the reliability value with respect to the statistic related to the color distribution shape calculated by the statistic calculation unit 285. It is possible to suppress an estimation error of color intensity due to deviation from the assumption that there are two different color areas in the local area.

図8は、信頼度算出部283の構成を示すブロック図である。信頼度算出部283は、具体的には、細い縞模様状のテクスチャを検出するために、注目画素位置周囲のG強度に対する方向別の低周波フィルタを算出して、注目画素位置のG強度との差分演算処理を実行することにより、高周波抽出を行って、注目画素位置周囲において「明−暗−明」あるいは「暗−明−暗」といった輝度変化がある場合、これを方向別に検出し、方向別の検出結果を統合することによって信頼度を算出する。信頼度算出部283は、高周波抽出部321−1乃至321−6、加算処理部322、および、クリップ処理部323で構成される。6つの高周波抽出部321−1乃至321−6は、注目画素を中心として、それぞれ異なる6つの方向の高周波抽出を行い、その強度を出力する。   FIG. 8 is a block diagram illustrating a configuration of the reliability calculation unit 283. Specifically, the reliability calculation unit 283 calculates a low-frequency filter for each direction with respect to the G intensity around the target pixel position in order to detect a thin striped texture, and determines the G intensity at the target pixel position. In the case where there is a luminance change such as “bright-dark-bright” or “dark-bright-dark” around the target pixel position by performing high-frequency extraction by performing the difference calculation process of The reliability is calculated by integrating the detection results for each direction. The reliability calculation unit 283 includes high frequency extraction units 321-1 to 321-6, an addition processing unit 322, and a clip processing unit 323. The six high-frequency extraction units 321-1 to 321-6 perform high-frequency extraction in six different directions around the target pixel and output the intensity.

間引きされていない画素信号が供給された場合の、信頼度算出部283の周波抽出部321−1乃至321−6による方向別高周波抽出の具体例について、図9を用いて説明する。図9は、局所領域抽出部281により抽出された、7×7画素の局所領域を示したものである図9Aは、注目画素がGである場合、図9Bは、注目画素がRである場合を示す。なお、信頼度の算出に関してはGの画素のみを用いるので、注目画素がBである場合はRである場合と同様の処理が実行される。   A specific example of direction-specific high-frequency extraction by the frequency extraction units 321-1 to 321-6 of the reliability calculation unit 283 when pixel signals that have not been thinned are supplied will be described with reference to FIG. FIG. 9 shows a 7 × 7 pixel local region extracted by the local region extraction unit 281. FIG. 9A shows a case where the target pixel is G, and FIG. 9B shows a case where the target pixel is R. Indicates. Since only the G pixel is used for the calculation of the reliability, when the target pixel is B, the same processing as that in the case of R is executed.

まず、画素から水平および垂直にちょうど1/2だけずれた(すなわち、4つの画素に囲まれる)位置であって、注目画素に近い位置から12箇所の位置(図中、丸印で示される位置)のG強度が算出される。具体的には、図9に示した12箇所の位置の全てにおいて、斜めにGの画素が隣接しているので、その2つのG強度の平均値を用いて、12箇所それぞれのG強度とする。ここで、注目画素がGである場合と、注目画素がRまたはBである場合とでは、隣接するGの方向が異なるが、いずれの場合においても、それぞれの位置でGが存在する方向は、注目画素がGであるかまたは、RもしくはBのいずれかであるかを基に判別することができる。   First, 12 positions from positions close to the target pixel (positions indicated by circles in the figure) that are shifted from the pixel by exactly ½ in the horizontal and vertical directions (that is, surrounded by four pixels). ) G intensity is calculated. Specifically, since the G pixels are diagonally adjacent to each other at the 12 positions shown in FIG. 9, the average value of the two G intensities is used as the G intensity at each of the 12 positions. . Here, the direction of adjacent G is different between the case where the target pixel is G and the case where the target pixel is R or B. In either case, the direction in which G exists at each position is The determination can be made based on whether the pixel of interest is G or R or B.

間引きされた画素信号が供給された場合の、信頼度算出部283の周波抽出部321−1乃至321−6による方向別高周波抽出の具体例について、図10を用いて説明する。図10は、局所領域抽出部281により抽出された、7×5画素の局所領域を示したものである。説明のため、図10Aは、注目画素がGである場合、図10Bは、注目画素がRである場合を示す。なお、信頼度の算出に関してはGの画素のみを用いるので、注目画素がBである場合はRである場合と同様の処理が実行される。   A specific example of the direction-specific high-frequency extraction by the frequency extraction units 321-1 to 321-6 of the reliability calculation unit 283 when the thinned pixel signal is supplied will be described with reference to FIG. FIG. 10 shows a 7 × 5 pixel local region extracted by the local region extraction unit 281. For explanation, FIG. 10A shows a case where the target pixel is G, and FIG. 10B shows a case where the target pixel is R. Since only the G pixel is used for the calculation of the reliability, when the target pixel is B, the same processing as that in the case of R is executed.

まず、画素から水平および垂直にちょうど1/2だけずれた(すなわち、4つの画素に囲まれる)位置であって、注目画素に近い位置から12箇所の位置(図中、丸印で示される位置)のG強度が算出される。具体的には、図10に示した12箇所の位置の全てにおいて、斜めにGの画素が隣接しているので、その2つのG強度の平均値を用いて、12箇所それぞれのG強度とする。ここで、注目画素がGである場合と、注目画素がRまたはBである場合とでは、隣接するGの方向が異なるが、いずれの場合においても、それぞれの位置でGが存在する方向は、注目画素がGであるかまたは、RもしくはBのいずれかであるかを基に判別することができる。   First, 12 positions from positions close to the target pixel (positions indicated by circles in the figure) that are shifted from the pixel by exactly ½ in the horizontal and vertical directions (that is, surrounded by four pixels). ) G intensity is calculated. Specifically, since the G pixels are diagonally adjacent to each other at the 12 positions shown in FIG. 10, the average value of the two G intensities is used as the G intensity at each of the 12 positions. . Here, the direction of adjacent G is different between the case where the target pixel is G and the case where the target pixel is R or B. In either case, the direction in which G exists at each position is The determination can be made based on whether the pixel of interest is G or R or B.

このようにして、12箇所においてG強度が算出された後、それらを用いて6方向の低周波フィルタを計算する。図11を用いてフィルタの方向について説明する。図11においては、局所領域中、特に、注目画素付近の5×5画素のみが図示されている。   In this way, after the G intensity is calculated at 12 locations, a low frequency filter in six directions is calculated using them. The direction of the filter will be described with reference to FIG. In FIG. 11, only 5 × 5 pixels in the vicinity of the target pixel are shown in the local region.

12箇所のG強度の算出位置は、間引きされていない画素信号、間引きされた画素信号のいずれにおいても、注目画素位置を中心に点対称の配置となっていて、互いに対称の位置にあるG強度の対が、図中、Aで示されるG強度の組、Dで示されるG強度の組、VAで示されるG強度の組、VDで示されるG強度の組、HAで示されるG強度の組、および、HDで示されるG強度の組の、合計6つできる。これらの6つのG強度の対において、それぞれ平均値を算出するようなフィルタを用いれば、6方向の低周波フィルタが算出される。更に、それら低周波フィルタの出力と注目画素位置のG強度の差分をとれば、方向別の高周波抽出ができる。   The calculation positions of the 12 G intensities are arranged in a point-symmetric manner around the target pixel position in both the pixel signals that are not thinned out and the pixel signals that are thinned out, and the G intensities that are in symmetrical positions with respect to each other. In the figure, a pair of G intensity indicated by A, a group of G intensity indicated by D, a group of G intensity indicated by VA, a group of G intensity indicated by VD, and a G intensity indicated by HA A total of 6 sets can be made, and a set of G intensity indicated by HD. If a filter that calculates an average value is used for each of these six G intensity pairs, a low-frequency filter in six directions is calculated. Further, if the difference between the output of the low frequency filter and the G intensity at the target pixel position is taken, high frequency extraction can be performed for each direction.

そして、加算処理部322は、6つの高周波抽出結果を適当なバランスで加算した値を出力する。クリップ処理部323は、加算処理部322による加算処理結果にクリッピング処理を施し、クリップされた高周波抽出の加算値を信頼度値として出力する。   Then, the addition processing unit 322 outputs a value obtained by adding the six high-frequency extraction results with an appropriate balance. The clip processing unit 323 performs clipping processing on the addition processing result by the addition processing unit 322, and outputs the added value of the clipped high-frequency extraction as a reliability value.

算出される信頼度値は、細い縞模様状のテクスチャの強度が大きいほど信頼度値が大きくなるので、信頼度値が小さいほうが統計量による色分布形状の推定が確かである可能性が高いということになる。   The calculated reliability value increases as the strength of the thin striped texture increases, so the smaller the reliability value is, the more likely it is that the estimation of the color distribution shape by statistics is more certain. It will be.

次に、粗補間処理部284は、局所領域内の複数の位置においてR,G,B各色の強度の組が作れるよう、複雑な計算方法でない方法で、R,G,Bの推定値(ラフな推定値)を、補間によって算出する。例えば、間引きされていない画素信号、間引きされた画素信号のいずれにおいても、注目画素の周囲8画素から、R,G,Bの補間値を計算することができる。   Next, the coarse interpolation processing unit 284 uses a method that is not a complicated calculation method so that a set of intensities of R, G, and B colors can be created at a plurality of positions in the local region. The estimated value) is calculated by interpolation. For example, R, G, and B interpolation values can be calculated from 8 pixels around the pixel of interest for both the pixel signal that has not been thinned and the pixel signal that has been thinned.

具体的には、間引きされていない画素信号は、図4を用いて説明したモザイク配列231を有しているので、注目画素に対して、上および左に位置する画素のペア、右および下に位置する画素のペア、右斜め上および左斜め下に位置する画素のペア、左斜め上および右斜め下に位置する画素のペア、並びに、注目画素自身を用いて、R,G,Bのラフな推定値を少なくとも1つ作成することができる。また、間引きされた画像は、図5を用いて説明したモザイク配列241を有しているので、注目画素に対して、上および下に位置する画素のペア、左斜め上、右、および左斜め下に位置する3つの画素、右斜め上、左、および、右斜め下に位置する3つの画素、並びに、注目画素自身を用いて、R,G,Bのラフな推定値を少なくとも1つ作成することができる。このようにして、粗補間処理部284は、R,G,Bのラフな推定値を各画素位置で算出することができる。   Specifically, since the pixel signal that has not been thinned has the mosaic arrangement 231 described with reference to FIG. 4, the pixel pair located above and to the left of the target pixel, the right and the bottom R, G, B rough using a pair of pixels, a pair of pixels located diagonally up and down right, a pair of pixels located diagonally up and down left, and the pixel of interest itself At least one correct estimate can be created. Further, since the thinned image has the mosaic arrangement 241 described with reference to FIG. 5, a pair of pixels located above and below the diagonal pixel, diagonally upper left, diagonally left, and diagonally left Create at least one rough estimate of R, G, and B using the three pixels located below, the three pixels located diagonally right above, left, and diagonally below right, and the pixel of interest itself can do. In this way, the rough interpolation processing unit 284 can calculate rough estimated values of R, G, and B at each pixel position.

ここで、粗補間処理部284で得られるR,G,Bの推定値は、同じ位置におけるR,G,Bの推定値の組が得られればよいのであって、必ずしも本来のセンサの画素位置上でなくてもかまわない。例えば、画素から水平および垂直にちょうど1/2だけずれた位置(すなわち、4つの画素に囲まれる位置)について補間値を求めるようにしてもよい。この位置は、周囲各画素から水平・垂直に1/2画素ずれた位置であるので、間引きされた画素信号においては、周囲4画素に必ずRが1つ、Gが2つ、Bが1つ存在する。したがってR,Bに関してはNearestNeighbor補間(最近傍補間)を行い、Gに関しては近傍2画素の平均値を計算して、R,G,Bの3色に関するラフな推定値を各画素位置で算出することができるようにすればよい。   Here, the estimated values of R, G, and B obtained by the coarse interpolation processing unit 284 are only required to obtain a set of estimated values of R, G, and B at the same position. It doesn't have to be above. For example, an interpolation value may be obtained for a position shifted from the pixel by exactly ½ in the horizontal and vertical directions (that is, a position surrounded by four pixels). Since this position is a position deviated by ½ pixel horizontally and vertically from the surrounding pixels, in the thinned pixel signal, one R is always present in the four surrounding pixels, two Gs, and one B. Exists. Therefore, Nearest Neighbor interpolation (nearest neighbor interpolation) is performed for R and B, an average value of two neighboring pixels is calculated for G, and rough estimated values for the three colors R, G, and B are calculated at each pixel position. You can do that.

次に、図12は、統計量算出部285の構成を示すブロック図である。ここでは、GとRの統計量を計算する場合、すなわち、デモザイク処理部253のうち、統計量算出部285−1の処理を例として説明する。   Next, FIG. 12 is a block diagram illustrating a configuration of the statistic calculation unit 285. Here, the case where the statistics of G and R are calculated, that is, the process of the statistic calculator 285-1 in the demosaic processor 253 will be described as an example.

統計量算出部285は、平均値算出部331、平均値算出部332、分散算出部333、および、共分散算出部334によって構成されている。平均値算出部331は、粗補間処理部284が算出した、局所領域におけるラフなG強度補間値のセットの供給を受け、その平均値を算出する。同様に、平均値算出部332は、粗補間処理部284が算出した、局所領域におけるラフなR強度補間値のセットの供給を受け、その平均値を算出する。分散算出部333は、平均値算出部331が算出したGの平均値と、局所領域におけるラフなG強度補間値のセットの供給を受け、Gの分散値を算出する。共分散算出部334は、平均値算出部331が算出したGの平均値とラフなG強度補間値のセット、および、平均値算出部332が算出したRの平均値とラフなR強度補間値のセットを受け取り、GとRの共分散値を算出する。   The statistic calculation unit 285 includes an average value calculation unit 331, an average value calculation unit 332, a variance calculation unit 333, and a covariance calculation unit 334. The average value calculation unit 331 receives supply of a rough set of G intensity interpolation values in the local region calculated by the rough interpolation processing unit 284, and calculates the average value. Similarly, the average value calculation unit 332 receives a set of rough R intensity interpolation values in the local region calculated by the coarse interpolation processing unit 284, and calculates the average value. The variance calculation unit 333 receives the G average value calculated by the average value calculation unit 331 and a set of rough G intensity interpolation values in the local region, and calculates the G variance value. The covariance calculation unit 334 includes a set of an average value of G calculated by the average value calculation unit 331 and a rough G intensity interpolation value, and an average value of R calculated by the average value calculation unit 332 and a rough R intensity interpolation value. And a covariance value of G and R is calculated.

平均値算出部331および平均値算出部332は、例えば、次の式(1)を用いて、平均値Mcを計算する。   The average value calculation unit 331 and the average value calculation unit 332 calculate the average value Mc using, for example, the following equation (1).

Figure 2005210218
・・・(1)
Figure 2005210218
... (1)

式(1)において、Croughiは、供給された色C(R,G,または、C)のラフな強度補間値のi(i=1乃至N)番目のデータである。色Cは、平均値算出部331においてはGであり、平均値算出部332においてはRである。また、wiは、i番目のデータに対する重み値(重み付け係数)である。 In Expression (1), C roughi is i (i = 1 to N) th data of the rough intensity interpolation value of the supplied color C (R, G, or C). The color C is G in the average value calculation unit 331 and R in the average value calculation unit 332. W i is a weight value (weighting coefficient) for the i-th data.

重み値wiは、i番目のデータの位置から注目画素位置への距離などを指標として、予め設定されている値である。図13および図14に、重み付け係数wiの例を示す。図13は、間引き処理が施されていない画像信号に対する5×5の領域の重み値wiを示すものであり、図14においては、間引き処理が施された画像信号に対する5×3の領域の重み付け係数wiの例を示すものである。これらの重み値の絶対値は、図13または図14に示されるものに制限されないことはいうまでもないが、これらに示されるように、注目画素位置に近いほど重み値が大きくなるように設定されるほうが好適である。 The weight value w i is a value set in advance using the distance from the position of the i-th data to the target pixel position as an index. 13 and 14 show examples of the weighting coefficient w i . FIG. 13 shows the weight value w i of the 5 × 5 area for the image signal that has not been subjected to the thinning process. In FIG. 14, the 5 × 3 area weight value for the image signal that has been subjected to the thinning process. An example of the weighting coefficient w i is shown. It goes without saying that the absolute values of these weight values are not limited to those shown in FIG. 13 or FIG. 14, but as shown in these figures, the weight values are set so as to increase as they are closer to the target pixel position. It is better to be done.

分散算出部332は、例えば次の式(2)に示される計算式によって第1の信号(ここではG)の分散値VC1C1を計算する。 The variance calculation unit 332 calculates the variance value V C1C1 of the first signal (here, G) using, for example, the calculation formula shown in the following formula (2).

Figure 2005210218
・・・(2)
Figure 2005210218
... (2)

この式において、C1roughiは、色C1(ここでは、G)のラフな強度補間値のi番目のデータ、MC1は色C1の平均値、wiはi番目のデータに対する重み値である。重み値wiは、平均値算出部331および平均値算出部333が用いたものと同じものを用いればよい。 In this equation, C 1roughi is the i-th data of the rough intensity interpolation value of the color C1 (here, G), M C1 is the average value of the color C1, and w i is a weight value for the i-th data. The weight value w i may be the same as that used by the average value calculation unit 331 and the average value calculation unit 333.

共分散算出部334は、例えば次の式(3)に示される計算式によって、第1の信号(ここではG)と、第2の信号(ここではR)の共分散値VC1C2を計算する。 The covariance calculation unit 334 calculates the covariance value V C1C2 of the first signal (here, G) and the second signal (here, R), for example, by the calculation formula shown in the following formula (3). .

この式において、C2roughiは色C2(ここでは、R)のラフな強度補間値のi番目のデータ、MC2は色C2の平均値である。 In this equation, C 2roughi is the i-th data of the rough intensity interpolation value of the color C2 (here, R), and M C2 is the average value of the color C2.

Figure 2005210218
・・・(3)
Figure 2005210218
... (3)

式(2)を用いて説明した分散値の計算、および、式(3)を用いて説明した共分散の計算が実行された場合、定義どおりの正確な統計量が得られる。しかしながら、式(2)および式(3)の計算が実行された場合、積算が多く出現するために計算時間が長くなり、この演算をハードウェアで実現したときの回路規模が増加してしまう。そこで、より簡易な計算で、分散および共分散を算出するようにしてもよい。   When the calculation of the variance value described using the equation (2) and the calculation of the covariance described using the equation (3) are executed, accurate statistics as defined can be obtained. However, when the calculations of Formula (2) and Formula (3) are executed, a large amount of integration appears, so that the calculation time becomes long, and the circuit scale when this calculation is realized by hardware increases. Therefore, the variance and covariance may be calculated by simpler calculation.

例えば、共分散の演算に、次の式(4)を用いるようにしても良い。   For example, the following equation (4) may be used for the covariance calculation.

Figure 2005210218
・・・(4)
Figure 2005210218
... (4)

ここで、関数sgn(a,b)は、2変数aとbの符号の一致を調べるものである。sgn(a,b)の出力は{1,0,-1}のうちのいずれかであるので、sgn{a,b}の演算は、実際には積算を必要としない。式(4)の計算は、式(3)の計算の各i番目のGとRとの偏差の積算を、GとRとの絶対偏差の和算に置き換えたものである。式(4)を用いて積算を和算に置き換えても、本発明の目的とする局所領域の色分布形状推定には充分な精度を有する近似値を算出することができる。   Here, the function sgn (a, b) is for checking the coincidence of the signs of the two variables a and b. Since the output of sgn (a, b) is one of {1, 0, -1}, the operation of sgn {a, b} does not actually require integration. The calculation of equation (4) replaces the i-th deviation of G and R in the calculation of equation (3) with the sum of absolute deviations of G and R. Even if the integration is replaced with summation using equation (4), it is possible to calculate an approximate value having sufficient accuracy for estimating the color distribution shape of the local region targeted by the present invention.

また、例えば、共分散の演算に、次の式(5)を用いるようにしても良い。   Further, for example, the following equation (5) may be used for the covariance calculation.

Figure 2005210218
・・・(5)
Figure 2005210218
... (5)

ここで、式(5)の計算は、式(3)の計算の各i番目のGとRとの偏差の積算を、GとRとの最小値の選択処理に置き換えたものである。なお、式(4)の計算より、式(5)の計算のほうが、式(3)における共分散演算への近似精度が良い。   Here, the calculation of Expression (5) is obtained by replacing the integration of deviations of each i-th G and R in the calculation of Expression (3) with the process of selecting the minimum value of G and R. Note that the calculation of equation (5) has better approximation accuracy to the covariance calculation in equation (3) than the calculation of equation (4).

式(4)または式(5)を用いて、式(3)に示される共分散の演算に対する近似演算が可能であることについて説明したが、式(2)を用いて説明した分散演算は、2つの入力が等しい場合の共分散と同等であるので、式(2)を用いて説明した分散演算も、式(4)または式(5)を用いて、同様にして近似演算することが可能であることは言うまでもない。具体的には、分散演算を近似した場合は、式(4)または式(5)のいずれを用いても、(C1roughi−MC12が(C1roughi−MC1)に近似される。 The expression (4) or the expression (5) is used to explain that the approximation operation for the covariance operation shown in the expression (3) is possible, but the dispersion operation described using the expression (2) is Since it is equivalent to the covariance when the two inputs are equal, the variance calculation described using equation (2) can be similarly approximated using equation (4) or equation (5). Needless to say. Specifically, when the variance calculation is approximated, (C 1roughi −M C1 ) 2 is approximated to (C 1roughi −M C1 ) regardless of which of the equations (4) and (5) is used.

次に、図15は、回帰演算処理部286の構成を示すブロック図である。図15においては、Rに関する回帰演算処理部286(すなわち、回帰演算処理部286−1)を示しているが、GおよびBに関する動作は、RをGまたはBに置き換えればよいだけであり、基本的に同一の処理が実行される。   Next, FIG. 15 is a block diagram illustrating a configuration of the regression calculation processing unit 286. In FIG. 15, the regression calculation processing unit 286 (that is, the regression calculation processing unit 286-1) related to R is shown, but the operation related to G and B only has to replace R with G or B. The same process is executed.

回帰演算処理部286は、傾き算出部351、傾き算出部352、傾き合成部353、および、画素強度推定部354で構成されている。   The regression calculation processing unit 286 includes an inclination calculation unit 351, an inclination calculation unit 352, an inclination synthesis unit 353, and a pixel intensity estimation unit 354.

傾き算出部351は、Rの平均値MRとGの平均値MGに基づいたG−R色分布の傾きKmを算出する。具体的には、傾き算出部351は、式(6)の数式に示されるように、2つの平均値の比率を計算する。ここでは、C1はG、C2はRである。 The inclination calculation unit 351 calculates an inclination Km of the GR color distribution based on the average value MR of R and the average value MG of G. Specifically, the inclination calculation unit 351 calculates the ratio of the two average values as shown in the equation (6). Here, C1 is G and C2 is R.

Figure 2005210218
・・・(6)
Figure 2005210218
... (6)

Mthresholdはゼロで除算することにより値が発散するのを回避するための定数であり、十分に小さい正の値が予め設定されている。 M threshold is a constant for avoiding the value to diverge by dividing by zero, and a sufficiently small positive value is set in advance.

傾き算出部352は、C1とC2の共分散値VC1,C2とC1の分散値VC1,C1に基づいたC1−C2の色分布の傾きKsを算出する。ここで、C1はG、C2はRである。具体的には、傾き算出部352は、式(7)に示されるように、分散、共分散値の比率を計算する。 The gradient calculating unit 352 calculates the gradient Ks of the C1-C2 color distribution based on the covariance values V C1, C2 of C1 and C2 and the variance values V C1, C1 of C1. Here, C1 is G and C2 is R. Specifically, the slope calculation unit 352 calculates the ratio of the variance and covariance values as shown in Expression (7).

Figure 2005210218
・・・(7)
Figure 2005210218
... (7)

Vthresholdは、ゼロで除算することによって値が発散するのを回避するための定数であり、十分に小さい正の値が予め設定される。式(7)におけるVthresholdを用いて、分母のC1の分散をクリップすることにより、ゼロによる除算を回避することができるが、Vthresholdを用いたクリッピングは、更に、画像の平坦部分におけるノイズを低減するために活用することができる。 V threshold is a constant for avoiding the value to diverge by dividing by zero, and a sufficiently small positive value is set in advance. Using V threshold in equation (7) to clip the variance of C1 in the denominator, division by zero can be avoided, but clipping using V threshold further reduces noise in the flat part of the image. Can be used to reduce.

すなわち、分母であるC1の分散は、その局所領域の輝度のばらつきを反映した値であり、その値が小さいことは、その局所領域が平坦であることと同義である。固体撮像素子のノイズは、画像が平坦であるほど良く目立つため、画像の平坦な部分に限ってノイズ低減処理を施すようにすると、全体の画像の品質を下げることなく、目立つノイズを効果的に低減させることができ、好適である。また、色分布の傾きKsの分母をクリップし、それ以上分母が小さくならないようにすることによって、Ksの絶対値が元の値より小さい値となるように抑制することができる。傾きKsの絶対値が小さく抑制されることによって、C1に対するC2の変化率が小さくなり、結果的に、その局所領域でのC2の振幅を抑制することができるという効果が生じる。   That is, the variance of C1 as the denominator is a value reflecting the variation in luminance of the local region, and a small value is synonymous with the fact that the local region is flat. Since the noise of a solid-state image sensor stands out better as the image becomes flat, if noise reduction processing is performed only on the flat part of the image, the noticeable noise is effectively reduced without degrading the overall image quality. This can be reduced and is preferable. Also, by clipping the denominator of the gradient Ks of the color distribution so that the denominator does not become any smaller, the absolute value of Ks can be suppressed to be smaller than the original value. By suppressing the absolute value of the slope Ks to be small, the rate of change of C2 with respect to C1 is reduced, and as a result, the effect that the amplitude of C2 in the local region can be suppressed occurs.

以上のように、傾きKsの分母に対するクリッピング処理により、画像が平坦かどうかの判定と出力振幅の抑制との両方の処理を実行した場合と同様に、ノイズ低減の作用がある。このように、本発明の色推定方法を用いれば、別途ノイズ低減処理を追加しなくても画像の平坦な部分で目立つノイズを抑制することができる。   As described above, the clipping process for the denominator of the slope Ks has the effect of reducing noise, as in the case where both the process of determining whether the image is flat and the process of suppressing the output amplitude are executed. Thus, by using the color estimation method of the present invention, it is possible to suppress noticeable noise in a flat portion of an image without adding a separate noise reduction process.

傾き合成部353は、2つの傾き推定値KmとKsとを、信頼度hに基づいて合成し、傾き推定値Kを算出する。上述したとおり、分散、共分散に基づく傾き推定値Ksは、細い縞模様状のテクスチャがある領域では正しい推定ができるとは限らない。そこで、傾き合成部353は、細い縞模様状のテクスチャの強度を反映した信頼度hを用いて、例えば式(8)を用いて、平均値に基づく傾き推定値Kmと合成して、傾き推定値Kを算出するようにする。   The inclination combining unit 353 combines the two inclination estimation values Km and Ks based on the reliability h, and calculates the inclination estimation value K. As described above, the inclination estimation value Ks based on the variance and covariance cannot always be correctly estimated in a region having a thin striped texture. Therefore, the inclination synthesis unit 353 uses the reliability h that reflects the strength of the thin striped texture and combines the inclination estimation value Km based on the average value using, for example, Equation (8) to estimate the inclination. The value K is calculated.

Figure 2005210218
・・・(8)
Figure 2005210218
... (8)

そして、画素強度推定手段354は、得られた傾き推定値K、2つの平均値MGおよびMR、並びに、注目画素位置のG強度を、次の式(9)の線形回帰式に当てはめることによって、注目画素位置のR強度の推定値を算出する。 Then, the pixel intensity estimating means 354 applies the obtained gradient estimated value K, the two average values M G and M R , and the G intensity at the target pixel position to the linear regression equation of the following equation (9). Thus, an estimated value of the R intensity at the target pixel position is calculated.

Figure 2005210218
・・・(9)
Figure 2005210218
... (9)

ここで、C1center、および、C2centerは、それぞれ、注目画素位置の第1の信号に対応する色C1(すなわちG)の強度、および、注目画素位置の第2の信号に対応する色C2(すなわちR)の強度推定値である。 Here, C 1center and C 2center are respectively the intensity of the color C1 (that is, G) corresponding to the first signal at the target pixel position and the color C2 (corresponding to the second signal at the target pixel position). That is, the estimated intensity value of R).

また、画素強度推定手段354は、式(9)とは異なる回帰式を用いて、強度推定値を算出するようにしてもよい。例えば式(10)に示されるように、適当な定数uを傾き推定値Kに乗算させて、線形回帰計算を行うようにしてもよい。   Further, the pixel intensity estimating means 354 may calculate the intensity estimated value using a regression equation different from the equation (9). For example, as shown in Expression (10), the linear regression calculation may be performed by multiplying the slope estimation value K by an appropriate constant u.

Figure 2005210218
・・・(10)
Figure 2005210218
... (10)

式(10)において、第1項は第2の信号に対応する色C2(すなわち、R)強度の高周波成分、第2項は低周波成分と考えることができる。そして、式(10)においては、その高周波成分を適当な定数uで少し増強することにより、Rに対する適切な高域補正を実行した場合と同様の効果を得ることができる。このようにすることにより、別途高域補正処理を追加しなくても高域が補正された画像を得ることができる。   In Equation (10), the first term can be considered as a high frequency component of the color C2 (ie, R) intensity corresponding to the second signal, and the second term can be considered as a low frequency component. In the equation (10), the same effect as when appropriate high-frequency correction for R is performed can be obtained by slightly enhancing the high-frequency component with an appropriate constant u. By doing so, it is possible to obtain an image in which the high frequency is corrected without adding a separate high frequency correction process.

なお、上述した従来の第3の技術では、第2の信号に対応する色C2の強度の推定値をC2=MC2+β×(C1−MC1)という計算で求めるので、係数βが本発明のuに対応するかのようにみえる。しかしながら、従来の第3の技術においては、βは(C1−MC1)、すなわちC1強度の高周波成分を強調しているにすぎないので、第2の信号に対応する色C2の強度の高域成分を正しく補正することができるというわけではない。 In the above-described conventional third technique, the estimated value of the intensity of the color C2 corresponding to the second signal is obtained by calculation of C2 = M C2 + β × (C1−M C1 ). Looks like it corresponds to u. However, in the third conventional technique, β only emphasizes the high-frequency component of (C1−M C1 ), that is, the C1 intensity, so that the high frequency band of the color C2 corresponding to the second signal is high. The component cannot be corrected correctly.

以上においては、統計量算出部285において算出される、平均値、分散値、および共分散値を基に、回帰演算処理部286において、回帰直線の傾きKが算出される場合について説明したが、回帰直線の傾きは、これ以外の方法を用いて算出するようにしてもよい。   In the above description, a case has been described in which the regression calculation processing unit 286 calculates the slope K of the regression line based on the average value, the variance value, and the covariance value calculated by the statistic calculation unit 285. The slope of the regression line may be calculated using a method other than this.

例えば、標準偏差および相関係数を用いて回帰直線の傾きを計算する定義式は以下の式(11)に表される。   For example, a definition formula for calculating the slope of the regression line using the standard deviation and the correlation coefficient is represented by the following formula (11).

Figure 2005210218
・・・(11)
Figure 2005210218
(11)

標準偏差Sx,Syは、データ値が平均の周囲にどれだけの幅で分布しているのかを表す統計量であり、2変数のxy方向の変分を表すdx、dyに近い値であると考えられる。回帰直線は、この式(11)を用いて求めるようにしてもよい。   The standard deviations Sx and Sy are statistics indicating how much the data values are distributed around the average, and are values close to dx and dy representing the variation in the xy direction of two variables. Conceivable. You may make it obtain | require a regression line using this Formula (11).

また、特に、正の傾きの直線上にデータが分布し、Rxyが1になる場合、Sx,Syはdx、dyと等価になる。つまり、計算の複雑な標準偏差を用いる代わりに、データ分布幅を表し、演算がより簡単な他の統計量があれば、Sx,Syを、データ分布幅を表す他の統計量に置き換えても、回帰直線の傾きは、近い振る舞いを示すことが期待できる。   In particular, when data is distributed on a straight line having a positive slope and Rxy is 1, Sx and Sy are equivalent to dx and dy. That is, instead of using a complicated standard deviation of calculation, if there is another statistic that represents the data distribution width and is easier to calculate, Sx and Sy may be replaced with other statistic that represents the data distribution width. The slope of the regression line can be expected to show close behavior.

そこで、データ分布幅を表す他の統計量として、標準偏差と並んでデータの分布幅を表すために用いられる平均偏差を代替に用いる。xの平均偏差Axの定義は、次の式(12)で示される。   Therefore, as another statistic representing the data distribution width, an average deviation used to represent the data distribution width along with the standard deviation is used instead. The definition of the average deviation Ax of x is shown by the following equation (12).

Figure 2005210218
・・・(12)
Figure 2005210218
(12)

同様にして、yの平均偏差Ayも、次の式(13)で示される。   Similarly, the average deviation Ay of y is also expressed by the following equation (13).

Figure 2005210218
・・・(13)
Figure 2005210218
... (13)

平均偏差AxおよびAyを用いて、Rxyを書き改めると、次の式(14)が得られる。   When Rxy is rewritten using the average deviations Ax and Ay, the following equation (14) is obtained.

Figure 2005210218
・・・(14)
Figure 2005210218
(14)

標準偏差を用いた演算に平方根や乗算が必要であることと比較して、平均偏差は少ない計算量で算出することができる。そして、更に、Vxyの算出に用いられる乗算や、Ax,Ayの乗算を近似演算することで、Rxyの近似を高速に算出することができる。   The average deviation can be calculated with a small amount of calculation compared to the fact that a square root or multiplication is necessary for the calculation using the standard deviation. Further, approximation of Rxy can be calculated at high speed by performing approximate calculation of multiplication used to calculate Vxy and multiplication of Ax and Ay.

このように、統計量算出部285において算出される、平均値、分散値、および共分散値を基に、回帰演算処理部286において、回帰直線の傾きKを算出する処理に代わって、標準偏差および相関関数を用いて、2系統のデータの2次元分布における回帰直線の傾きを計算したり、または、偏差と相関に関してそれぞれ近似演算した後、2系統のデータの2次元分布における回帰直線の傾きを計算するようにしてもよい。   In this way, instead of the process of calculating the slope K of the regression line in the regression calculation processing unit 286 based on the average value, the variance value, and the covariance value calculated in the statistic calculation unit 285, the standard deviation And using the correlation function to calculate the slope of the regression line in the two-dimensional distribution of the two systems of data, or after approximating the deviation and correlation, respectively, the slope of the regression line in the two-dimensional distribution of the two systems of data May be calculated.

次に、図16のフローチャートを参照して、デジタルスチルカメラ201が実行する撮像処理について説明する。   Next, imaging processing executed by the digital still camera 201 will be described with reference to the flowchart of FIG.

ステップS1において、CPU223は、操作入力部224よりバス225を介して供給される信号を基に、ユーザによりシャッタボタンが押下されたか否かを判断する。   In step S <b> 1, the CPU 223 determines whether the user has pressed the shutter button based on a signal supplied from the operation input unit 224 via the bus 225.

ステップS1において、シャッタボタンが押下されていないと判断された場合、ステップS2において、CPU223は、タイミングジェネレータ217を制御して、CCDイメージセンサ213により取得される画像信号の一定のフレームレートでの間引き読み出しを実行させる。間引き読み出しされた画像信号は、相関2重サンプリング回路214によりノイズが除去され、A/Dコンバータ215によりデジタル信号に変換されて、DSPブロック216の画像用RAMに格納される。   If it is determined in step S1 that the shutter button has not been pressed, in step S2, the CPU 223 controls the timing generator 217 to thin out the image signal acquired by the CCD image sensor 213 at a constant frame rate. Read is executed. The image signal read out is subjected to noise removal by the correlated double sampling circuit 214, converted into a digital signal by the A / D converter 215, and stored in the image RAM of the DSP block 216.

ステップS3において、図17または図41を用いて後述する画像処理が実行される。   In step S3, image processing to be described later with reference to FIG. 17 or 41 is executed.

ステップS4において、D/Aコンバータ218は、DSPブロック216により同時化されたデジタルの画像信号をアナログ信号に変換し、ビデオエンコーダ219は、D/Aコンバータ218から供給されたアナログの画像信号をビデオ信号に変換し、表示部220に出力する。   In step S4, the D / A converter 218 converts the digital image signal synchronized by the DSP block 216 into an analog signal, and the video encoder 219 converts the analog image signal supplied from the D / A converter 218 into video. The signal is converted into a signal and output to the display unit 220.

ステップS5において、表示部220は、供給されたビデオ信号を表示する。すなわち、表示部220は、デジタルスチルカメラ201において、カメラのファインダの役割を担っている。   In step S5, the display unit 220 displays the supplied video signal. That is, the display unit 220 plays a role of a camera finder in the digital still camera 201.

ステップS1において、シャッタボタンが押下されたと判断された場合、ステップS6において、CPU223は、タイミングジェネレータ217を制御して、CCDイメージセンサ213により取得される画像信号の一定のフレームレートでの全画素読み出しを実行させる。全画素読み出しされた画像信号は、相関2重サンプリング回路214によりノイズが除去され、A/Dコンバータ215によりデジタル信号に変換されて、DSPブロック216の画像用RAMに格納される。   If it is determined in step S1 that the shutter button has been pressed, in step S6, the CPU 223 controls the timing generator 217 to read out all pixels at a constant frame rate of the image signal acquired by the CCD image sensor 213. Is executed. The image signal read from all pixels is denoised by the correlated double sampling circuit 214, converted to a digital signal by the A / D converter 215, and stored in the image RAM of the DSP block 216.

ステップS7において、図17または図41を用いて後述する画像処理が実行される。   In step S7, image processing to be described later with reference to FIG. 17 or 41 is executed.

ステップS8において、コーデック処理部221は、DSPブロック216から供給された画像データに対して、所定の方式の符号化処理を実行する。   In step S <b> 8, the codec processing unit 221 performs a predetermined format encoding process on the image data supplied from the DSP block 216.

ステップS9において、メモリ222は、符号化された画像データの供給を受け、ユーザにより撮像された画像を記録する。   In step S9, the memory 222 receives the encoded image data and records the image captured by the user.

ステップS5、または、ステップS9の処理の終了後、ステップS10において、CPU223は、操作入力部224から供給される信号を基に、ユーザにより電源がOFFされたか否かを判断する。ステップS10において、電源がオフされていないと判断された場合、処理は、ステップS1に戻り、それ以降の処理が繰り返される。ステップS10において、電源がオフされたと判断された場合、処理は終了される。   After step S5 or step S9 is completed, in step S10, the CPU 223 determines whether the user has turned off the power based on the signal supplied from the operation input unit 224. If it is determined in step S10 that the power is not turned off, the process returns to step S1, and the subsequent processes are repeated. If it is determined in step S10 that the power has been turned off, the process ends.

このような処理により、ユーザによりシャッタボタンが押下されていないときは、画像の読み出しおよび処理を高速に実行可能なように、間引き読み出しが実行され、処理された画像がビデオデータに変換されて表示されるので、表示部220は、デジタルスチルカメラ201において、カメラのファインダの役割を担うことが可能となり、ユーザによりシャッタボタンが押下されたときは、高解像度の画像を取得するために、全画素読み出しが実行されて、処理された画像が符号化されて、撮像された画像として記録される。   By such processing, when the shutter button is not pressed by the user, thinning readout is executed so that the image reading and processing can be executed at high speed, and the processed image is converted into video data and displayed. Therefore, the display unit 220 can play the role of a camera finder in the digital still camera 201. When the shutter button is pressed by the user, all the pixels are acquired in order to obtain a high-resolution image. Reading is performed and the processed image is encoded and recorded as a captured image.

次に、図17のフローチャートを参照して、図6のDS2Pブロック216が、図16のステップS3またはステップS7において実行する画像処理1について説明する。   Next, image processing 1 executed by the DS2P block 216 in FIG. 6 in step S3 or step S7 in FIG. 16 will be described with reference to the flowchart in FIG.

ステップS21において、画像用RAM241は、CCDイメージセンサ213に用いられているカラーフィルタにより定められる配列(例えば、図4を用いて説明したモザイク配列231、または、図5を用いて説明したモザイク配列241)の周期的なパターンの強度信号により構成されるモザイク画像を取得して、一時保存する。   In step S <b> 21, the image RAM 241 is arranged with an array (for example, the mosaic array 231 described with reference to FIG. 4 or the mosaic array 241 described with reference to FIG. 5) determined by the color filter used in the CCD image sensor 213. ) Is acquired and temporarily stored.

ステップS22において、信号処理用プロセッサ242のホワイトバランス調整部251は、モザイク画像に対して、無彩色の被写体領域の色バランスが無彩色になるように、各画素強度の持つ色に応じて適切な係数をかける処理であるホワイトバランス調整処理を行う。   In step S22, the white balance adjustment unit 251 of the signal processor 242 applies an appropriate color according to the color of each pixel intensity so that the color balance of the achromatic subject region is achromatic with respect to the mosaic image. A white balance adjustment process, which is a process for applying a coefficient, is performed.

ステップS23において、ガンマ補正部252は、ホワイトバランスがとられたモザイク画像の各画素強度に対し、表示部220に表示される画像の明るさや色の彩度が正しく表示されるようにガンマ補正を行う。   In step S23, the gamma correction unit 252 performs gamma correction so that the brightness and color saturation of the image displayed on the display unit 220 are correctly displayed for each pixel intensity of the mosaic image with the white balance. Do.

ステップS24において、デモザイク処理部253により、図18を用いて後述するデモザイク処理が実行される。   In step S24, the demosaic processing unit 253 performs a demosaic process described later with reference to FIG.

ステップS25において、スイッチ254は、供給されたRGBの画像データが、間引きされた画像であるか否かを判断する。ステップS25において、間引きされた画像ではないと判断された場合、スイッチ254は、供給された画像を階調変換処理部256に供給するので、処理は、ステップS27に進む。   In step S25, the switch 254 determines whether or not the supplied RGB image data is a thinned image. If it is determined in step S25 that the image is not a thinned image, the switch 254 supplies the supplied image to the gradation conversion processing unit 256, and thus the process proceeds to step S27.

ステップS25において、間引きされた画像であると判断された場合、ステップS26において、スイッチ254は、供給された画像を水平方向縮小処理部255に供給する。水平方向縮小処理部255は、供給された画像の縦横比が、間引きされていない画像と同一になるように水平方向に画像を縮小する。   If it is determined in step S25 that the image is a thinned image, the switch 254 supplies the supplied image to the horizontal direction reduction processing unit 255 in step S26. The horizontal direction reduction processing unit 255 reduces the image in the horizontal direction so that the aspect ratio of the supplied image is the same as that of the non-thinned image.

ステップS25において、間引きされた画像ではないと判断された場合、または、ステップS26の処理の終了後、ステップS27において、階調変換処理部256は、供給された画像信号の階調を圧縮する階調変換処理を実行し、階調変換された画像信号をYC変換部257に供給する。   If it is determined in step S25 that the image is not a thinned image, or after the process of step S26 is completed, in step S27, the gradation conversion processing unit 256 compresses the gradation of the supplied image signal. The tone conversion processing is executed, and the tone-converted image signal is supplied to the YC conversion unit 257.

YC変換部257は、ステップS28において、階調変換処理部257からの出力であるR,G,Bの3チャネル画像に、マトリックス処理およびクロマ成分に対する帯域制限を行うことで、YC変換を行い、Y画像およびC画像を生成し、ステップS29において、生成したY画像およびC画像を出力し、処理が終了される。   In step S28, the YC conversion unit 257 performs YC conversion on the R, G, and B three-channel images that are output from the gradation conversion processing unit 257 by performing band processing on matrix processing and chroma components, A Y image and a C image are generated. In step S29, the generated Y image and C image are output, and the process is terminated.

このような処理により、DS2Pブロック216は、供給されたモザイク画像信号に対して、各種処理を施して、Y画像およびC画像を生成し、CPU223の制御に基づいて、その画像データを表示部220に表示させる場合は、D/Aコンバータ218に、メモリ222に記憶させる場合は、コーデック処理部221に供給する。   Through such processing, the DS2P block 216 performs various processing on the supplied mosaic image signal to generate a Y image and a C image, and displays the image data on the display unit 220 based on the control of the CPU 223. Is displayed in the D / A converter 218 and is stored in the memory 222, and is supplied to the codec processing unit 221.

次に、図18のフローチャートを参照して、図17のステップS24において実行されるデモザイク処理1について説明する。   Next, the demosaic process 1 executed in step S24 of FIG. 17 will be described with reference to the flowchart of FIG.

ステップS41において、局所領域抽出部281は、未処理の画素のうちのいずれかを注目画素とする。   In step S41, the local region extraction unit 281 sets one of unprocessed pixels as a target pixel.

ステップS42において、局所領域抽出部281は、供給されたモザイク画像データが、間引きされた画像であるか否かを判断する。ステップS42において、間引きされた画像ではないと判断された場合、処理は、ステップS45に進む。   In step S42, the local region extraction unit 281 determines whether or not the supplied mosaic image data is a thinned image. If it is determined in step S42 that the image is not a thinned image, the process proceeds to step S45.

ステップS42において、間引きされた画像であると判断された場合、ステップS43において、局所領域抽出部281は、注目画素位置の周辺の所定数(n×n)の画素を、局所領域として抽出し、G強度補間処理部282、信頼度算出部283、および、粗補間処理部284に供給する。   If it is determined in step S42 that the image is a thinned image, in step S43, the local region extraction unit 281 extracts a predetermined number (n × n) of pixels around the target pixel position as a local region, This is supplied to the G intensity interpolation processing unit 282, the reliability calculation unit 283, and the coarse interpolation processing unit 284.

ステップS44において、図19のフローチャートを用いて後述する、粗補間処理1が実行される。   In step S44, coarse interpolation processing 1 described later using the flowchart of FIG. 19 is executed.

ステップS42において、間引きされた画像ではないと判断された場合、ステップS45において、局所領域抽出部281は、注目画素位置の周辺の所定数(n×m)の画素を、局所領域として抽出し、G強度補間処理部282、信頼度算出部283、および、粗補間処理部284に供給する。   If it is determined in step S42 that the image is not a thinned image, in step S45, the local region extraction unit 281 extracts a predetermined number (n × m) of pixels around the target pixel position as a local region, This is supplied to the G intensity interpolation processing unit 282, the reliability calculation unit 283, and the coarse interpolation processing unit 284.

ステップS46において、図20のフローチャートを用いて後述する、粗補間処理2が実行される。   In step S46, coarse interpolation processing 2 described later using the flowchart of FIG. 20 is executed.

ステップS44またはステップS46の処理の終了後、ステップS47において、G強度補間処理部282は、局所領域抽出部281により抽出された局所領域内の画素を用いて、注目画素位置のG強度を算出し、信頼度算出部283、および、回帰演算処理部286−1乃至286−3に供給する   After step S44 or step S46 is completed, in step S47, the G intensity interpolation processing unit 282 uses the pixels in the local area extracted by the local area extraction unit 281 to calculate the G intensity at the target pixel position. , The reliability calculation unit 283, and the regression calculation processing units 286-1 to 286-3

ステップS48において、図21のフローチャートを用いて後述する信頼度値算出処理が実行される。   In step S48, a reliability value calculation process to be described later is executed using the flowchart of FIG.

ステップS49において、図22のフローチャートを用いて後述する2色分布形状の統計量算出処理が、統計量算出部285−1乃至285−3において並行して実行される。   In step S49, a statistic calculation process for a two-color distribution shape, which will be described later using the flowchart of FIG. 22, is executed in parallel in the statistic calculation units 285-1 to 285-3.

ステップS50において、図32のフローチャートを用いて後述する補間画素推定処理が、回帰演算処理部286−1乃至286−3において並行して実行される。   In step S50, interpolation pixel estimation processing, which will be described later using the flowchart of FIG. 32, is executed in parallel in the regression calculation processing units 286-1 to 286-3.

ステップS51において、局所領域抽出部281は、全ての画素において処理が終了したか否かを判断する。ステップS51において、全ての画素において処理が終了していないと判断された場合、処理は、ステップS41に戻り、それ以降の処理が繰り返される。ステップS51において、全ての画素において処理が終了したと判断された場合、処理は、図17のステップS25に進む。   In step S51, the local region extraction unit 281 determines whether or not processing has been completed for all pixels. If it is determined in step S51 that the process has not been completed for all pixels, the process returns to step S41, and the subsequent processes are repeated. If it is determined in step S51 that the process has been completed for all pixels, the process proceeds to step S25 in FIG.

換言すれば、デモザイク処理部253を構成する各部は、ある注目画素位置が決定されたときにその注目画素位置においてそれぞれの処理を実行し、全画素において、ステップS41乃至ステップS50の処理が終了された場合、処理が終了される。   In other words, each unit constituting the demosaic processing unit 253 executes the respective processes at the target pixel position when a certain target pixel position is determined, and the processes of step S41 to step S50 are completed for all the pixels. If so, the process is terminated.

このような処理により、CCDイメージセンサ213が有するカラーフィルタの配列に基づいて得られるモザイク画像をデモザイク(色補間、または、同時化)して、各画素において、カラーフィルタを構成する各色が補間された画像データを得ることができる。   By such processing, the mosaic image obtained based on the color filter array of the CCD image sensor 213 is demosaiced (color interpolation or synchronization), and each color constituting the color filter is interpolated in each pixel. Image data can be obtained.

次に、図19のフローチャートを参照して、図18のステップS44において実行される粗補間処理1について説明する。   Next, the rough interpolation process 1 executed in step S44 of FIG. 18 will be described with reference to the flowchart of FIG.

粗補間処理部284は、ステップS61において、供給された局所領域の画素のうち、処理を実行する画素位置を示す第1のレジスタの値sを初期化して、s=2とし、ステップS62において、供給された局所領域の画素のうち、処理を実行する画素位置を示す第2のレジスタの値tを初期化して、t=2とする。   In step S61, the coarse interpolation processing unit 284 initializes the value s of the first register indicating the pixel position where the processing is performed among the pixels of the supplied local region, and sets s = 2. Among the supplied local area pixels, the value t of the second register indicating the pixel position where the process is executed is initialized to t = 2.

ステップS63において、粗補間処理部284は、画素(s、t)の画素強度を補間値α1とする。   In step S63, the coarse interpolation processing unit 284 sets the pixel intensity of the pixel (s, t) as the interpolation value α1.

ステップS64において、粗補間処理部284は、画素(s、t)の左隣の画素である画素(s−1、t)と、画素(s、t)に対して上の位置の画素である画素(s、t−1)との平均強度を補間値α2とする。   In step S64, the coarse interpolation processing unit 284 is a pixel (s-1, t), which is a pixel adjacent to the left of the pixel (s, t), and a pixel above the pixel (s, t). The average intensity with the pixel (s, t−1) is set as an interpolation value α2.

図4を用いて説明したモザイク配列231が用いられている場合、例えば、注目画素(s、t)がG強度を示す画素であったとき、画素(s−1、t)と画素(s、t−1)とは、R強度またはB強度を示し、注目画素(s、t)がR強度またはB強度を示す画素であったとき、画素(s−1、t)と画素(s、t−1)とは、G強度を示す。   When the mosaic arrangement 231 described with reference to FIG. 4 is used, for example, when the target pixel (s, t) is a pixel indicating G intensity, the pixel (s−1, t) and the pixel (s, t-1) indicates R intensity or B intensity, and when the target pixel (s, t) is a pixel indicating R intensity or B intensity, the pixel (s-1, t) and the pixel (s, t) -1) indicates the G intensity.

ステップS65において、粗補間処理部284は、画素(s、t)の右隣の画素(s+1、t)と、画素(s、t)の下の画素(s、t+1)との平均強度を補間値α3とする。   In step S65, the coarse interpolation processing unit 284 interpolates the average intensity of the pixel (s + 1, t) immediately adjacent to the pixel (s, t) and the pixel (s, t + 1) below the pixel (s, t). Let it be the value α3.

図4を用いて説明したモザイク配列231が用いられている場合、例えば、注目画素(s、t)がG強度を示す画素であったとき、画素(s+1、t)と画素(s、t+1)とは、R強度またはB強度(ただし、ステップS64により得られる画素の平均強度に対応する色と異なる色)を示し、注目画素(s、t)がR強度またはB強度を示す画素であったとき、画素(s+1、t)と画素(s、t+1)とは、G強度を示す。   When the mosaic arrangement 231 described with reference to FIG. 4 is used, for example, when the target pixel (s, t) is a pixel indicating G intensity, the pixel (s + 1, t) and the pixel (s, t + 1) Indicates R intensity or B intensity (however, a color different from the color corresponding to the average intensity of the pixels obtained in step S64), and the pixel of interest (s, t) is a pixel indicating R intensity or B intensity. At this time, the pixel (s + 1, t) and the pixel (s, t + 1) indicate G intensity.

ステップS66において、粗補間処理部284は、注目画素に対して、左斜め上、および、右斜め下方向である画素(s−1、t−1)と、画素(s+1、t+1)との平均強度を補間値α4とする。   In step S66, the coarse interpolation processing unit 284 averages the pixel (s−1, t−1) and the pixel (s + 1, t + 1) that are in the upper left direction and the lower right direction with respect to the target pixel. The intensity is an interpolation value α4.

図4を用いて説明したモザイク配列231が用いられている場合、例えば、注目画素(s、t)がG強度を示す画素であったとき、画素(s−1、t−1)と画素(s+1、t+1)とは、同じくG強度を示し、例えば、注目画素(s、t)がR強度を示す画素であったとき、画素(s−1、t−1)と画素(s+1、t+1)とは、同じくR強度を示し、例えば、注目画素(s、t)がB強度を示す画素であったとき、画素(s−1、t−1)と画素(s+1、t+1)とは、同じくB強度を示す。   When the mosaic arrangement 231 described with reference to FIG. 4 is used, for example, when the target pixel (s, t) is a pixel indicating G intensity, the pixel (s−1, t−1) and the pixel ( s + 1, t + 1) similarly indicates G intensity. For example, when the target pixel (s, t) is a pixel indicating R intensity, the pixel (s-1, t-1) and the pixel (s + 1, t + 1) Indicates the R intensity. For example, when the target pixel (s, t) is a pixel indicating the B intensity, the pixel (s−1, t−1) and the pixel (s + 1, t + 1) B intensity is shown.

ステップS67において、粗補間処理部284は、注目画素に対して、左斜め下、および、右斜め上方向である画素(s−1、t+1)と、画素(s+1、t−1)との平均強度を補間値α5とする。   In step S67, the coarse interpolation processing unit 284 averages the pixel (s-1, t + 1) and the pixel (s + 1, t-1) that are in the diagonally lower left direction and the diagonally upper right direction with respect to the target pixel. The intensity is an interpolation value α5.

図4を用いて説明したモザイク配列231が用いられている場合、例えば、注目画素(s、t)がG強度を示す画素であったとき、画素(s−1、t+1)と画素(s+1、t−1)とは、同じくG強度を示し、例えば、注目画素(s、t)がR強度を示す画素であったとき、画素(s−1、t+1)と画素(s+1、t−1)とは、B強度を示し、例えば、注目画素(s、t)がB強度を示す画素であったとき、画素(s−1、t+1)と画素(s+1、t−1)とは、R強度を示す。   When the mosaic arrangement 231 described with reference to FIG. 4 is used, for example, when the target pixel (s, t) is a pixel indicating G intensity, the pixel (s−1, t + 1) and the pixel (s + 1, t-1) similarly indicates G intensity. For example, when the target pixel (s, t) is a pixel indicating R intensity, the pixel (s-1, t + 1) and the pixel (s + 1, t-1) Indicates the B intensity. For example, when the target pixel (s, t) is a pixel indicating the B intensity, the pixel (s−1, t + 1) and the pixel (s + 1, t−1) have the R intensity. Indicates.

ステップS68において、粗補間処理部284は、ステップS63乃至ステップS66の処理により算出された補間値α1乃至α5が、それぞれ、RGBのいずれに対応するかを判定する。   In step S68, the coarse interpolation processing unit 284 determines which of RGB corresponds to the interpolation values α1 to α5 calculated by the processing of steps S63 to S66.

ステップS69において、粗補間処理部284は、Gに対応する2つの補間値の平均値を、画素(s、t)のG補間値とする。   In step S69, the coarse interpolation processing unit 284 sets the average value of the two interpolation values corresponding to G as the G interpolation value of the pixel (s, t).

ステップS70において、粗補間処理部284は、Rに対応する補間値(2つであればその平均値)を、画素(s、t)のR補間値とする。   In step S70, the coarse interpolation processing unit 284 sets the interpolation value corresponding to R (the average value if there are two) as the R interpolation value of the pixel (s, t).

ステップS71において、粗補間処理部284は、Bに対応する補間値(2つであればその平均値)を、画素(s、t)のB補間値とする。   In step S71, the coarse interpolation processing unit 284 sets the interpolation value corresponding to B (the average value if there are two) as the B interpolation value of the pixel (s, t).

ステップS72において、粗補間処理部284は、処理を実行する画素位置を示す第2のレジスタの値tを参照し、t=n−1であるか否かを判断する。   In step S72, the coarse interpolation processing unit 284 refers to the value t of the second register indicating the pixel position where the process is executed, and determines whether t = n−1.

ステップS72において、t=n−1ではないと判断された場合、ステップS73において、粗補間処理部284は、処理を実行する画素位置を示す第2のレジスタの値tを、t=t+1とし、処理は、ステップS63に戻り、それ以降の処理が繰り返される。   When it is determined in step S72 that t = n−1 is not satisfied, in step S73, the coarse interpolation processing unit 284 sets the value t of the second register indicating the pixel position to be processed to t = t + 1, The process returns to step S63, and the subsequent processes are repeated.

ステップS72において、t=n−1であると判断された場合、ステップS74において、粗補間処理部284は、処理を実行する画素位置を示す第1のレジスタの値sを参照し、s=n−1であるか否かを判断する。   If it is determined in step S72 that t = n−1, in step S74, the coarse interpolation processing unit 284 refers to the value s of the first register indicating the pixel position to be processed, and s = n It is determined whether or not -1.

ステップS74において、s=n−1ではないと判断された場合、ステップS75において、粗補間処理部284は、処理を実行する画素位置を示す第1のレジスタの値sを、s=s+1とし、処理は、ステップS62に戻り、それ以降の処理が繰り返される。   If it is determined in step S74 that s = n−1 is not satisfied, in step S75, the coarse interpolation processing unit 284 sets the value s of the first register indicating the pixel position to be processed to s = s + 1, The process returns to step S62, and the subsequent processes are repeated.

ステップS74において、s=n−1であると判断された場合、ステップS76において、粗補間処理部284は、注目画素付近の(n−2)の2乗個の画素のRGBの補間値の組を、統計量算出部285−1乃至285−3のそれぞれに出力し、処理は、図18のステップS47に進む。   If it is determined in step S74 that s = n−1, in step S76, the coarse interpolation processing unit 284 sets a set of RGB interpolation values of (n−2) square pixels near the target pixel. Is output to each of the statistic calculation units 285-1 to 285-3, and the process proceeds to step S47 in FIG.

このような処理により、局所領域として抽出されたn×nの画素に対して、注目画素を中心とした(n−2)×(n−2)個所の画素位置のそれぞれにおけるRGBの補間値が算出される。   By such processing, the RGB interpolated values at the (n−2) × (n−2) pixel positions centered on the target pixel are obtained with respect to the n × n pixels extracted as the local region. Calculated.

ただし、図19を用いて説明した粗補間処理において、ステップS63乃至ステップS67の処理は相互に順序を入れ替えてもかまわなく、更に、ステップS69乃至ステップS71の処理も、相互に順序を入れ替えてもかまわない。   However, in the rough interpolation process described with reference to FIG. 19, the processes in steps S63 to S67 may be interchanged with each other, and the processes in steps S69 to S71 may be interchanged with each other. It doesn't matter.

次に、図20のフローチャートを参照して、図18のステップS46において実行される粗補間処理2について説明する。   Next, the rough interpolation process 2 executed in step S46 of FIG. 18 will be described with reference to the flowchart of FIG.

粗補間処理部284は、ステップS91において、供給された局所領域の画素のうち、処理を実行する画素位置を示す第1のレジスタの値sを初期化して、s=2とし、ステップS92において、供給された局所領域の画素のうち、処理を実行する画素位置を示す第2のレジスタの値tを初期化して、t=2とする。   In step S91, the coarse interpolation processing unit 284 initializes the value s of the first register indicating the pixel position where the process is performed among the pixels of the supplied local region, sets s = 2, and in step S92, Among the supplied local area pixels, the value t of the second register indicating the pixel position where the process is executed is initialized to t = 2.

ステップS93において、粗補間処理部284は、画素(s、t)の画素強度を補間値α1とする。   In step S93, the coarse interpolation processing unit 284 sets the pixel intensity of the pixel (s, t) as the interpolation value α1.

ステップS94において、粗補間処理部284は、画素(s、t)の上下の画素である画素(s、t−1)と、画素(s、t+1)との平均強度を補間値α2とする。   In step S94, the coarse interpolation processing unit 284 sets the average intensity of the pixel (s, t−1), which is a pixel above and below the pixel (s, t), and the pixel (s, t + 1) as the interpolation value α2.

図5を用いて説明したモザイク配列241が用いられている場合、例えば、注目画素(s、t)がG強度を示す画素であったとき、画素(s、t−1)と、画素(s、t+1)とは、G強度を示し、注目画素(s、t)がR強度を示す画素であったとき、画素(s、t−1)と、画素(s、t+1)とは、B強度を示し、注目画素(s、t)がB強度を示す画素であったとき、画素(s、t−1)と、画素(s、t+1)とは、R強度を示す。   When the mosaic arrangement 241 described with reference to FIG. 5 is used, for example, when the target pixel (s, t) is a pixel indicating G intensity, the pixel (s, t−1) and the pixel (s , T + 1) indicates the G intensity, and when the target pixel (s, t) is a pixel indicating the R intensity, the pixel (s, t−1) and the pixel (s, t + 1) have the B intensity. When the target pixel (s, t) is a pixel indicating B intensity, the pixel (s, t−1) and the pixel (s, t + 1) indicate R intensity.

ステップS95において、粗補間処理部284は、画素(s、t)の右斜め上の画素である画素(s+1、t−1)、画素(s、t)の左の画素である画素(s−1、t)、および、画素(s、t)右斜め下の画素である画素(s+1、t+1)との平均強度を補間値α3とする。   In step S95, the coarse interpolation processing unit 284 is a pixel (s + 1, t-1) that is an upper right pixel of the pixel (s, t), and a pixel (s-) that is the pixel to the left of the pixel (s, t). 1, t) and the average intensity of the pixel (s, t) and the pixel (s + 1, t + 1), which is a pixel diagonally lower right, is an interpolation value α3.

図5を用いて説明したモザイク配列241が用いられている場合、例えば、注目画素(s、t)がG強度を示す画素であったとき、画素(s+1、t−1)、画素(s−1、t)、および、画素(s+1、t+1)は、いずれもR強度を示すか、いずれもB強度を示し、例えば、注目画素(s、t)がR強度、または、B強度を示す画素であったとき、画素(s+1、t−1)、画素(s−1、t)、および、画素(s+1、t+1)は、いずれもG強度を示す。   When the mosaic arrangement 241 described with reference to FIG. 5 is used, for example, when the target pixel (s, t) is a pixel indicating G intensity, the pixel (s + 1, t−1), the pixel (s− 1, t) and pixel (s + 1, t + 1) all indicate R intensity, or both indicate B intensity. For example, a pixel of interest (s, t) indicates R intensity or B intensity. The pixel (s + 1, t−1), the pixel (s−1, t), and the pixel (s + 1, t + 1) all exhibit G intensity.

ステップS96において、粗補間処理部284は、注目画素に対して、左斜め上、左斜め下、および、右の画素である画素(s−1、t−1)、画素(s−1、t+1)、および、画素(s+1、t)の平均強度を補間値α4とする。   In step S <b> 96, the coarse interpolation processing unit 284 performs the pixel (s−1, t−1) and pixel (s−1, t + 1) that are the upper left, lower left, and right pixels with respect to the target pixel. ) And the average intensity of the pixel (s + 1, t) is an interpolation value α4.

図5を用いて説明したモザイク配列241が用いられている場合、例えば、注目画素(s、t)がG強度を示す画素であったとき、画素(s+1、t−1)、画素(s−1、t)、および、画素(s+1、t+1)は、いずれもR強度を示すか、いずれもB強度を示し、例えば、注目画素(s、t)がR強度、または、B強度を示す画素であったとき、画素(s+1、t−1)、画素(s−1、t)、および、画素(s+1、t+1)は、いずれもG強度を示す。   When the mosaic arrangement 241 described with reference to FIG. 5 is used, for example, when the target pixel (s, t) is a pixel indicating G intensity, the pixel (s + 1, t−1), the pixel (s− 1, t) and pixel (s + 1, t + 1) all indicate R intensity, or both indicate B intensity. For example, a pixel of interest (s, t) indicates R intensity or B intensity. The pixel (s + 1, t−1), the pixel (s−1, t), and the pixel (s + 1, t + 1) all exhibit G intensity.

ステップS97において、粗補間処理部284は、ステップS93乃至ステップS96の処理により算出された補間値α1乃至α4が、それぞれ、RGBのいずれに対応するかを判定する。   In step S97, the coarse interpolation processing unit 284 determines which of RGB corresponds to the interpolation values α1 to α4 calculated by the processing of steps S93 to S96.

ステップS98において、粗補間処理部284は、Gに対応する2つの補間値の平均値を、画素(s、t)のG補間値とする。   In step S98, the coarse interpolation processing unit 284 sets the average value of the two interpolation values corresponding to G as the G interpolation value of the pixel (s, t).

ステップS99において、粗補間処理部284は、Rに対応する補間値を、画素(s、t)のR補間値とする。   In step S99, the coarse interpolation processing unit 284 sets the interpolation value corresponding to R as the R interpolation value of the pixel (s, t).

ステップS100において、粗補間処理部284は、Bに対応する補間値を、画素(s、t)のB補間値とする。   In step S100, the coarse interpolation processing unit 284 sets the interpolation value corresponding to B as the B interpolation value of the pixel (s, t).

ステップS101において、粗補間処理部284は、処理を実行する画素位置を示す第2のレジスタの値tを参照し、t=m−1であるか否かを判断する。   In step S101, the coarse interpolation processing unit 284 refers to the value t of the second register indicating the pixel position where the process is executed, and determines whether t = m−1.

ステップS101において、t=m−1ではないと判断された場合、ステップS102において、粗補間処理部284は、処理を実行する画素位置を示す第2のレジスタの値tを、t=t+1とし、処理は、ステップS93に戻り、それ以降の処理が繰り返される。   If it is determined in step S101 that t = m−1 is not satisfied, in step S102, the coarse interpolation processing unit 284 sets the value t of the second register indicating the pixel position to be processed to t = t + 1, The process returns to step S93, and the subsequent processes are repeated.

ステップS101において、t=m−1であると判断された場合、ステップS103において、粗補間処理部284は、処理を実行する画素位置を示す第1のレジスタの値sを参照し、s=n−1であるか否かを判断する。   When it is determined in step S101 that t = m−1, in step S103, the coarse interpolation processing unit 284 refers to the value s of the first register indicating the pixel position where the process is performed, and s = n It is determined whether or not -1.

ステップS103において、s=n−1ではないと判断された場合、ステップS104において、粗補間処理部284は、処理を実行する画素位置を示す第1のレジスタの値sを、s=s+1とし、処理は、ステップS92に戻り、それ以降の処理が繰り返される。   If it is determined in step S103 that s = n−1 is not satisfied, in step S104, the coarse interpolation processing unit 284 sets the value s of the first register indicating the pixel position to be processed to s = s + 1, The process returns to step S92, and the subsequent processes are repeated.

ステップS103において、s=n−1であると判断された場合、ステップS105において、粗補間処理部284は、注目画素付近の(n−2)(m−2)の画素のRGBの補間値の組を、統計量算出部285−1乃至285−3のそれぞれに出力し、処理は、図18のステップS47に進む。   When it is determined in step S103 that s = n−1, in step S105, the coarse interpolation processing unit 284 determines the RGB interpolation values of the (n−2) and (m−2) pixels near the target pixel. The set is output to each of the statistic calculators 285-1 to 285-3, and the process proceeds to step S47 in FIG.

このような処理により、局所領域として抽出されたn×nの画素に対して、注目画素を中心とした(n−2)(m−2)個所の画素位置のそれぞれにおけるRGBの補間値が算出される。   By such processing, RGB interpolation values at each of (n−2) and (m−2) pixel positions centered on the target pixel are calculated for n × n pixels extracted as the local region. Is done.

ただし、図20を用いて説明した粗補間処理において、ステップS93乃至ステップS96の処理は相互に順序を入れ替えてもかまわなく、更に、ステップS98乃至ステップS100の処理も、相互に順序を入れ替えてもかまわない。   However, in the coarse interpolation process described with reference to FIG. 20, the order of steps S93 to S96 may be interchanged, and the order of steps S98 to S100 may also be interchanged. It doesn't matter.

次に、図21のフローチャートを参照して、図18のステップS48において信頼度算出部283により実行される、信頼度算出処理について説明する。   Next, the reliability calculation processing executed by the reliability calculation unit 283 in step S48 of FIG. 18 will be described with reference to the flowchart of FIG.

ステップS121において、信頼度算出部283の高周波抽出部321−1乃至321−6は、図10または図11を用いて説明した、注目画素付近の所定の12の位置のG補間値、すなわち、自分自身が抽出する高周波を求めるために必要な画素位置のG補間値を算出する。   In step S121, the high-frequency extraction units 321-1 to 321-6 of the reliability calculation unit 283 explain the G interpolation values at the predetermined 12 positions near the target pixel described with reference to FIG. The G interpolation value of the pixel position necessary for obtaining the high frequency extracted by itself is calculated.

ステップS122において、高周波抽出部321−1乃至321−6は、ステップS121の処理において算出されたG補間値を基に、注目画素を中心とした、6方向の高周波成分を、それぞれ抽出し、加算処理部322に供給する。   In step S122, the high-frequency extraction units 321-1 to 321-6 extract and add high-frequency components in six directions centered on the pixel of interest based on the G interpolation value calculated in the processing of step S121. The data is supplied to the processing unit 322.

ステップS123において、加算処理部322は、高周波抽出部321−1乃至321−6から供給された、6つの高周波成分を加算して、クリッピング処理部323に出力する。   In step S123, the addition processing unit 322 adds the six high frequency components supplied from the high frequency extraction units 321-1 to 321-6 and outputs the result to the clipping processing unit 323.

ステップS124において、クリッピング処理部323は、加算処理部322から供給された加算結果をクリッピングし、その値を信頼度値として、回帰演算処理部286−1乃至286−3に出力し、処理は、図18のステップS49に進む。   In step S124, the clipping processing unit 323 clips the addition result supplied from the addition processing unit 322, and outputs the value as a reliability value to the regression calculation processing units 286-1 to 286-3. Proceed to step S49 of FIG.

このような処理により、注目画素近辺に高周波成分が存在するか否かを示す信頼度値が算出されて、回帰演算処理部286−1乃至286−3に出力される。算出される信頼度値は、細い縞模様状のテクスチャの強度が大きいほど信頼度値が大きくなるので、信頼度値が小さいほうが統計量による色分布形状の推定が確かである可能性が高い。   Through such processing, a reliability value indicating whether or not a high-frequency component exists in the vicinity of the target pixel is calculated and output to the regression calculation processing units 286-1 to 286-3. The calculated reliability value increases as the strength of the thin striped texture increases, so the smaller the reliability value, the higher the probability that the color distribution shape is estimated by the statistics.

次に、図22のフローチャートを参照して、図18のステップS49において、統計量算出部285−1乃至285−3において実行される、2色分布形状の統計量算出処理について説明する。   Next, the two-color distribution shape statistic calculation process executed in the statistic calculation units 285-1 to 285-3 in step S49 of FIG. 18 will be described with reference to the flowchart of FIG.

なお、統計量算出部285−1乃至285−3においては、それぞれ、RGBのうち、2色の粗補間値の供給を受け(統計量算出部285−2においては、Gの粗補間値を2系統で供給される)、その統計量を同様の処理により算出することができるようになされているので、図22のフローチャートにおいては、統計量算出部285に供給される2色の粗補間値を、それぞれ、第1の信号および第2の信号として説明する。   Each of the statistic calculation units 285-1 to 285-3 receives supply of rough interpolation values of two colors of RGB (the statistic calculation unit 285-2 converts the rough interpolation value of G to 2). Since the statistics can be calculated by the same processing, the two-color coarse interpolation values supplied to the statistics calculation unit 285 are represented in the flowchart of FIG. These will be described as a first signal and a second signal, respectively.

ステップS131において、統計量算出部285の平均値算出部331は、粗補間値処理部284から供給された粗補間値のうちの、第1の信号(統計量算出部285−1乃至285−3のいずれにおいてもGの粗補間値)を取得する。   In step S131, the average value calculation unit 331 of the statistic calculation unit 285 includes the first signal (statistic calculation units 285-1 to 285-3) among the rough interpolation values supplied from the rough interpolation value processing unit 284. In either case, the coarse interpolation value of G) is acquired.

ステップS132において、平均値算出部331は、図23または図24のフローチャートを用いて後述する平均値計算処理を実行する。   In step S132, the average value calculation unit 331 executes an average value calculation process to be described later using the flowchart of FIG. 23 or FIG.

ステップS133において、平均値算出部333は、粗補間値処理部284から供給された粗補間値のうちの、第2の信号(統計量算出部285−1においては、Rの粗補間値であり、粗補間値処理部285−2においてはGの粗補間値であり、粗補間値処理部285−3においてはBの粗補間値である)を取得する。   In step S133, the average value calculation unit 333 is the second signal (in the statistical value calculation unit 285-1, the rough interpolation value of R of the rough interpolation values supplied from the rough interpolation value processing unit 284). The coarse interpolation value processing unit 285-2 obtains the G coarse interpolation value, and the coarse interpolation value processing unit 285-3 obtains the B coarse interpolation value).

ステップS134において、平均値算出部333は、図23または図24のフローチャートを用いて後述する平均値計算処理を実行する。   In step S134, the average value calculation unit 333 executes an average value calculation process to be described later using the flowchart of FIG. 23 or FIG.

ステップS135において、分散算出部332は、図25のフローチャートを用いて後述する、分散計算処理を実行する。   In step S135, the variance calculation unit 332 executes a variance calculation process, which will be described later using the flowchart of FIG.

ステップS136において、共分散算出部334は、図26のフローチャートを用いて後述する、共分散計算処理を実行し、処理は、図18のステップS50に戻る。   In step S136, the covariance calculation unit 334 executes a covariance calculation process, which will be described later using the flowchart of FIG. 26, and the process returns to step S50 of FIG.

次に、図23のフローチャートを参照して、図22のステップS132またはステップS134において実行される平均値計算処理1について説明する。   Next, the average value calculation process 1 executed in step S132 or step S134 in FIG. 22 will be described with reference to the flowchart in FIG.

ステップS141において、平均値算出部331または平均値算出部333は、演算結果である平均値Mx(平均値Mxの添え字xは、G補間値の平均値が算出される場合Gに、R補間値の平均値が算出される場合Rに、B補間値の平均値が算出される場合Bに、それぞれ置き換えられる)を初期化する。   In step S141, the average value calculation unit 331 or the average value calculation unit 333 calculates the average value Mx as the calculation result (the subscript x of the average value Mx is R-interpolated when the average value of the G interpolation value is calculated). When the average value of the values is calculated, R is replaced with R when the average value of the B interpolation values is calculated.

ステップS142において、平均値算出部331または平均値算出部333は、取得した補間値(ここでは、(n−2)の2乗個の補間値)を合計する。   In step S142, the average value calculation unit 331 or the average value calculation unit 333 sums the acquired interpolation values (here, (n−2) square interpolation values).

ステップS143において、平均値算出部331または平均値算出部333は、ステップS142において算出された合計値を、取得した値の数(ここでは、(n−2)の2乗個)で除算する。   In step S143, the average value calculation unit 331 or the average value calculation unit 333 divides the total value calculated in step S142 by the number of acquired values (here, the square of (n−2)).

ステップS144において、平均値算出部331または平均値算出部333は、ステップS143の処理により算出された除算結果を出力し、処理は、図22のステップS133、または、ステップS135に進む。   In step S144, the average value calculation unit 331 or the average value calculation unit 333 outputs the division result calculated by the process of step S143, and the process proceeds to step S133 or step S135 of FIG.

また、平均値を求める場合、粗補間されたRGBのそれぞれの強度に、例えば、図13または図14を用いて説明したように、注目画素からの距離により、重み付けを施して、重み付けが施されたRGB強度を基に、平均値を求めるようにしても良い。   Further, when obtaining the average value, each of the intensity of RGB subjected to coarse interpolation is weighted by weighting the distance from the target pixel as described with reference to FIG. 13 or FIG. 14, for example. The average value may be obtained based on the RGB intensity.

図24のフローチャートを参照して、図22のステップS132またはステップS134において実行される平均値計算処理2について説明する。   The average value calculation process 2 executed in step S132 or step S134 of FIG. 22 will be described with reference to the flowchart of FIG.

ステップS151において、平均値算出部331または平均値算出部333は、演算結果である平均値Mx(平均値Mxの添え字xは、G補間値の平均値が算出される場合Gに、R補間値の平均値が算出される場合Rに、B補間値の平均値が算出される場合Bに、それぞれ置き換えられる)を初期化する。   In step S151, the average value calculation unit 331 or the average value calculation unit 333 calculates the average value Mx (the subscript x of the average value Mx is the result of the calculation when the average value of the G interpolation value is calculated. When the average value of the values is calculated, R is replaced with R when the average value of the B interpolation values is calculated.

ステップS152において、平均値算出部331または平均値算出部333は、取得した補間値(ここでは、(n−2)の2乗個の補間値)に、例えば、図13または図14を用いて説明したような重み付けを施し、重み付けられた値を合計する。   In step S152, the average value calculation unit 331 or the average value calculation unit 333 uses, for example, FIG. 13 or FIG. 14 as the acquired interpolation value (here, (n−2) square interpolation values). Apply the weights as described and sum the weighted values.

ステップS153において、平均値算出部331または平均値算出部333は、重み付けの総和を演算する。   In step S153, the average value calculation unit 331 or the average value calculation unit 333 calculates the sum of weights.

ステップS154において、平均値算出部331または平均値算出部333は、上述した式(1)を演算する。すなわち、ステップS154において、平均値算出部331または平均値算出部333は、ステップS152において算出された合計値を、取得した値の数(ここでは、(n−2)の2乗個)と、ステップS153において算出された重み付けの総和との積で除算する。   In step S154, the average value calculation unit 331 or the average value calculation unit 333 calculates the above-described equation (1). That is, in step S154, the average value calculation unit 331 or the average value calculation unit 333 calculates the total value calculated in step S152 as the number of acquired values (here, the square of (n−2)), Divide by the product of the weighted sum calculated in step S153.

ステップS155において、平均値算出部331または平均値算出部333は、ステップS154の処理により算出された除算結果を出力し、処理は、図22のステップS133、または、ステップS135に進む。   In step S155, the average value calculation unit 331 or the average value calculation unit 333 outputs the division result calculated by the process of step S154, and the process proceeds to step S133 of FIG. 22 or step S135.

次に、図25のフローチャートを参照して、図22のステップS135において実行される分散計算処理1について説明する。   Next, the distributed calculation process 1 executed in step S135 of FIG. 22 will be described with reference to the flowchart of FIG.

ステップS171において、統計量算出部285の分散算出部332は、演算結果であるとして出力する分散値Vxx(ここでは、第1の信号は、全てG強度であるので、G補間値の分散値が算出される。したがって、Vxxの添え字xは、Gに置き換えられる)を初期化する。   In step S171, the variance calculation unit 332 of the statistic calculation unit 285 outputs the variance value Vxx (assuming that the first signal is all the G intensity because the first signal is all G intensity, and therefore the variance value of the G interpolation value is Therefore, the subscript x of Vxx is replaced with G).

ステップS172において、分散算出部332は、平均値算出部331により算出された第1の信号の平均値Mx(ここでは、第1の信号は、全てG強度であるので、Mxの添え字xは、Gに置き換えられる)を取得する。   In step S172, the variance calculation unit 332 calculates the average value Mx of the first signal calculated by the average value calculation unit 331 (here, since all the first signals have G intensity, the subscript x of Mx is , G).

分散算出部332は、ステップS173において、局所領域のうちの一部(注目画素を中心とした、(n−2)×(n−2)の範囲)の画素の粗補間値の供給を受け、そのうち、処理を実行する画素位置を示す第1のレジスタの値s'を初期化して、s'=1とし、ステップS174において、局所領域のうちの一部(注目画素を中心とした、(n−2)×(n−2)の範囲)の画素の粗補間値のうち、処理を実行する画素位置を示す第2のレジスタの値t'を初期化して、t'=1とする。   In step S173, the variance calculation unit 332 receives the rough interpolation value of a part of the local region (range of (n−2) × (n−2) centered on the target pixel), Among them, the value s ′ of the first register indicating the pixel position to be processed is initialized to s ′ = 1, and in step S174, a part of the local region (centered on the target pixel (n −2) × (n−2) range) of pixels, the second register value t ′ indicating the pixel position to be processed is initialized, and t ′ = 1.

ステップS175において、分散算出部332は、画素(s’,t’)の強度X(ここでは、G強度)から、ステップS172において取得された平均値Mxを減算し、減算結果を2乗して、現在の分散値Vxxに加えた値を、分散値Vxxとして更新する。すなわち、分散算出部332は、Vxx=Vxx+(|画素(s’,t’)の強度X−平均値Mx|)2を演算する。分散算出部332は、この演算において、画素(s’,t’)の強度Xに対して、例えば、図13または図14を用いて説明したような重み付けを施すようにしても良い。 In step S175, the variance calculation unit 332 subtracts the average value Mx acquired in step S172 from the intensity X (here, G intensity) of the pixel (s ′, t ′), and squares the subtraction result. The value added to the current variance value Vxx is updated as the variance value Vxx. That is, the variance calculation unit 332 calculates Vxx = Vxx + (| intensity X−average value Mx |) 2 of | pixel (s ′, t ′). In this calculation, the variance calculation unit 332 may weight the intensity X of the pixel (s ′, t ′) as described with reference to FIG. 13 or FIG.

ステップS176において、分散算出部332は、処理を実行する画素位置を示す第2のレジスタの値t'を参照し、t'=n−2またはm−2であるか否か(間引きされていない画像信号に対しては、t'=n−2であるか否か、間引きされている画像信号に対しては、t'=m−2であるか否か)を判断する。   In step S176, the variance calculation unit 332 refers to the value t ′ of the second register indicating the pixel position for executing the process, and determines whether t ′ = n−2 or m−2 (not thinned out). It is determined whether or not t ′ = n−2 for the image signal and t ′ = m−2 for the thinned image signal).

ステップS176において、t'=n−2またはm−2ではないと判断された場合、ステップS177において、分散算出部332は、第2のレジスタの値t'を、t'=t'+1に更新して、処理は、ステップS175に戻り、それ以降の処理が繰り返される。   When it is determined in step S176 that t ′ = n−2 or m−2 is not satisfied, in step S177, the variance calculation unit 332 updates the value t ′ of the second register to t ′ = t ′ + 1. Then, the process returns to step S175, and the subsequent processes are repeated.

ステップS176において、t'=n−2またはm−2であると判断された場合、ステップS178において、分散算出部332は、処理を実行する画素位置を示す第1のレジスタの値s'を参照し、s'=n−2であるか否かを判断する。   When it is determined in step S176 that t ′ = n−2 or m−2, in step S178, the variance calculation unit 332 refers to the value s ′ of the first register indicating the pixel position where the process is executed. Then, it is determined whether or not s ′ = n−2.

ステップS178において、s'=n−2ではないと判断された場合、ステップS179において、分散算出部332は、第1のレジスタの値s'を、s'=s'+1に更新して、処理は、ステップS174に戻り、それ以降の処理が繰り返される。   When it is determined in step S178 that s ′ = n−2 is not satisfied, in step S179, the variance calculation unit 332 updates the value s ′ of the first register to s ′ = s ′ + 1 to perform processing. Returns to step S174, and the subsequent processing is repeated.

ステップS178において、s'=n−2であると判断された場合、ステップS180において、分散算出部332は、局所領域のうちの一部(注目画素を中心とした、(n−2)×(n−2)の範囲)の粗補間値の分散値Vxxを出力し、処理は、図22のステップS136に戻る。   If it is determined in step S178 that s ′ = n−2, in step S180, the variance calculation unit 332 selects a part of the local region ((n−2) × ( The variance value Vxx of the coarse interpolation value in the range n-2) is output, and the process returns to step S136 in FIG.

分散値の算出は、定義上では、(|画素(s’,t’)の強度X−平均値Mx|)2を分散値の演算に用いた画素の数で除算する必要があるが、分散値の算出結果は、後述する処理により、共分散値の算出結果の除算に用いられるため、共分散値の算出においても同数で除算される場合は、除算処理を、分散値の演算および共分散値の演算の両方にて省略することが可能である。 For the calculation of the variance value, by definition, it is necessary to divide (| intensity X of pixel (s ′, t ′) − average value Mx |) 2 by the number of pixels used for calculating the variance value. Since the calculation result of the value is used to divide the calculation result of the covariance value by a process described later, when the covariance value is divided by the same number, the division process is performed by calculating the variance value and covariance. It can be omitted in both the calculation of values.

なお、分散値の算出において、重み付けが施された場合、式(2)を用いて説明した分散値の定義に示されるように、(|画素(s’,t’)の強度X−平均値Mx|)2を重み係数の総和で除算することにより、分散値を算出することができる。しかしながら、分散値の算出結果は、後述する処理により、共分散値の算出結果の除算に用いられるため、共分散値の算出においても重み付けが施されているときは、重み係数の総和での除算処理を、分散値の演算および共分散値の演算の両方にて省略することが可能である。 In addition, in the calculation of the variance value, when weighting is performed, as shown in the definition of the variance value described using Expression (2), (| intensity X−average value of pixels (s ′, t ′)] The variance value can be calculated by dividing Mx |) 2 by the sum of the weighting factors. However, since the calculation result of the variance value is used to divide the calculation result of the covariance value by the processing described later, when weighting is also applied in the calculation of the covariance value, the division by the sum of the weighting factors is performed. The processing can be omitted in both the variance value calculation and the covariance value calculation.

また、図25を用いて説明した分散計算処理1においては、2乗の計算があるため、演算処理に時間がかかったり、ハードウェアの規模が大きくなるという問題が発生する。そこで、近似計算により2乗の計算を省略するようにしても良い。   In addition, in the distributed calculation process 1 described with reference to FIG. 25, since there is a square calculation, there is a problem that the calculation process takes time and the scale of hardware increases. Therefore, the square calculation may be omitted by approximate calculation.

次に、図26のフローチャートを参照して、近似計算により2乗の計算を省略する場合に、図22のステップS135において実行される分散計算処理2について説明する。   Next, the variance calculation process 2 executed in step S135 in FIG. 22 when the square calculation is omitted by the approximate calculation will be described with reference to the flowchart in FIG.

ステップS191乃至ステップS194においては、図25を用いて説明したステップS171乃至ステップS174と同様の処理が実行される。   In step S191 to step S194, the same processing as step S171 to step S174 described with reference to FIG. 25 is executed.

ステップS195において、分散算出部332は、画素(s’,t’)の強度X(ここでは、G強度)から、ステップS142において取得された平均値Mxを減算し、減算結果を2乗して、現在の分散値Vxxに加えた値を、分散値Vxxとして更新する。すなわち、分散算出部332は、Vxx=Vxx+(|画素(s’,t’)の強度X−平均値Mx|)を演算する。分散算出部332は、この演算において、画素(s’,t’)の強度Xに対して、例えば、図13または図14を用いて説明したような重み付けを施すようにしても良い。   In step S195, the variance calculation unit 332 subtracts the average value Mx acquired in step S142 from the intensity X (here, G intensity) of the pixel (s ′, t ′), and squares the subtraction result. The value added to the current variance value Vxx is updated as the variance value Vxx. That is, the variance calculation unit 332 calculates Vxx = Vxx + (| intensity X−average value Mx |) of pixel (s ′, t ′). In this calculation, the variance calculation unit 332 may weight the intensity X of the pixel (s ′, t ′) as described with reference to FIG. 13 or FIG. 14, for example.

値|p|が正規化され、0≦|P|<1が成り立っているとき、p2は|p|で近似することが可能である。これは、式(4)または式(5)を用いて、式(3)に示される共分散の演算に対する近似演算が可能であることと同様である。 When the value | p | is normalized and 0 ≦ | P | <1, p 2 can be approximated by | p |. This is similar to the fact that the approximation calculation for the covariance calculation shown in Expression (3) is possible using Expression (4) or Expression (5).

そして、ステップS196乃至ステップS200においては、図25を用いて説明したステップS176乃至ステップS180と同様の処理が実行され、処理は、図22のステップS136に戻る。   In steps S196 to S200, the same processes as those in steps S176 to S180 described with reference to FIG. 25 are executed, and the process returns to step S136 in FIG.

このように、式(4)または式(5)を用いて、式(3)に示される共分散の演算に対する近似演算を行う場合と同様の近似演算処理により、分散値の演算に必要な2乗の計算を省略した近似演算により、分散値の近似値を求めることが可能となる。   In this way, by using the approximate calculation processing similar to the case of performing the approximate calculation for the covariance calculation shown in Expression (3) using Expression (4) or Expression (5), 2 necessary for calculating the variance value is used. It is possible to obtain an approximate value of the variance value by an approximation operation that omits the calculation of the power.

次に、図27のフローチャートを参照して、図22のステップS136において実行される、共分散計算処理について説明する。   Next, the covariance calculation process executed in step S136 of FIG. 22 will be described with reference to the flowchart of FIG.

ステップS211において、共分散算出部334は、出力される値である共分散値Vxy(ここでは、第1の信号は、全てG強度であるので、Vxyの添え字xは、Gに置き換えられる。そして、第2の信号がR強度であるときVxyの添え字yはRに置き換えられ、第2の信号がG強度であるときVxyの添え字yはGに置き換えられる)を初期化する。   In step S211, the covariance calculation unit 334 outputs a covariance value Vxy that is an output value (here, since all the first signals have G intensity, the subscript x of Vxy is replaced with G. Then, the subscript y of Vxy is replaced with R when the second signal has R intensity, and the subscript y of Vxy is replaced with G when the second signal has G intensity).

ステップS212において、共分散算出部334は、平均値算出部331による図22のステップS92の処理により算出された第1の信号の平均値Mx、および、平均値算出部333による図22のステップS94の処理により算出された第2の平均値Myを取得する。   In step S212, the covariance calculation unit 334 calculates the average value Mx of the first signal calculated by the process of step S92 of FIG. 22 by the average value calculation unit 331, and step S94 of FIG. 22 by the average value calculation unit 333. The second average value My calculated by the process is acquired.

ステップS213において、共分散算出部334は、局所領域のうちの一部(注目画素を中心とした、(n−2)×(n−2)の範囲)の画素の粗補間値の供給を受け、そのうち、処理を実行する画素位置を示す第1のレジスタの値s'を初期化して、s’=1とする   In step S213, the covariance calculation unit 334 receives a rough interpolation value of a part of the local region (range (n−2) × (n−2) centered on the target pixel). Among them, the value s ′ of the first register indicating the pixel position where the process is executed is initialized, and s ′ = 1.

ステップS214において、共分散算出部334は、局所領域のうちの一部(注目画素を中心とした、(n−2)×(n−2)の範囲)の画素の粗補間値のうち、処理を実行する画素位置を示す第2のレジスタの値t'を初期化して、t’=1とする   In step S214, the covariance calculation unit 334 performs processing among coarse interpolation values of pixels of a part of the local region (range of (n−2) × (n−2) centered on the target pixel). Initialize the value t ′ of the second register indicating the pixel position to execute t ′ = 1.

ステップS215において、図28または図29を用いて後述する積算処理が実行される。   In step S215, integration processing described later with reference to FIG. 28 or FIG. 29 is executed.

ステップS216において、共分散算出部334は、処理を実行する画素位置を示す第2のレジスタの値t'を参照し、t’=n−2またはm−2であるか否か(間引きされていない画像信号に対しては、t'=n−2であるか否か、間引きされている画像信号に対しては、t'=m−2であるか否か)を判断する。   In step S216, the covariance calculation unit 334 refers to the value t ′ of the second register indicating the pixel position to be processed, and determines whether t ′ = n−2 or m−2 (decimated). It is determined whether or not t ′ = n−2 for a non-image signal, and t ′ = m−2 for a thinned image signal).

ステップS216において、t'=n−2またはm−2ではないと判断された場合、ステップS217において、共分散算出部334は、第2のレジスタの値t'を、t'=t'+1に更新して、処理は、ステップS215に戻り、それ以降の処理が繰り返される。   When it is determined in step S216 that t ′ = n−2 or m−2 is not satisfied, in step S217, the covariance calculation unit 334 sets the value t ′ of the second register to t ′ = t ′ + 1. After updating, the process returns to step S215, and the subsequent processes are repeated.

ステップS216において、t'=n−2またはm−2であると判断された場合、ステップS218において、共分散算出部334は、処理を実行する画素位置を示す第1のレジスタの値s'を参照し、s'=n−2であるか否かを判断する。   When it is determined in step S216 that t ′ = n−2 or m−2, in step S218, the covariance calculation unit 334 sets the value s ′ of the first register indicating the pixel position where the process is performed. It is determined whether or not s ′ = n−2.

ステップS218において、s'=n−2ではないと判断された場合、ステップS219において、共分散算出部334は、第1のレジスタの値s'を、s'=s'+1に更新して、処理は、ステップS144に戻り、それ以降の処理が繰り返される。   If it is determined in step S218 that s ′ = n−2 is not satisfied, in step S219, the covariance calculation unit 334 updates the value s ′ of the first register to s ′ = s ′ + 1, The processing returns to step S144, and the subsequent processing is repeated.

ステップS218において、s'=n−2であると判断された場合、ステップS220において、共分散算出部334は、共分散値Vxyを出力して、処理は、図18のステップS50に進む。   When it is determined in step S218 that s ′ = n−2, in step S220, the covariance calculation unit 334 outputs the covariance value Vxy, and the process proceeds to step S50 in FIG.

共分散値の算出は、定義上では、(|画素(s’,t’)の強度X−平均値Mx|)(|画素(s’,t’)の強度y−平均値My|)を、共分散値の演算に用いた画素の数で除算する必要があるが、共分散値の算出結果は、後述する処理により、分散値の算出結果で除算されるため、分散値の算出においても同数で除算される場合は、除算処理を、分散値の演算および共分散値の演算の両方にて省略することが可能である。   The definition of the covariance value is defined by (| intensity X of pixel (s ′, t ′) − average value Mx |) (| intensity y of pixel (s ′, t ′) − average value My |). , It is necessary to divide by the number of pixels used in the calculation of the covariance value, but the calculation result of the covariance value is divided by the calculation result of the dispersion value by the process described later. In the case of division by the same number, the division process can be omitted in both the variance value calculation and the covariance value calculation.

なお、共分散値の算出において、重み付けが施された場合、式(3)を用いて説明した分散値の定義に示されるように、(|画素(s’,t’)の強度X−平均値Mx|)(|画素(s’,t’)の強度y−平均値My|)を重み係数の総和で除算することにより、共分散値を算出することができる。しかしながら、共分散値の算出結果は、後述する処理により、分散値の算出結果で除算されるため、分散値の算出においても重み付けが施されているときは、重み係数の総和での除算処理を、分散値の演算および共分散値の演算の両方にて省略することが可能である。   In addition, in the calculation of the covariance value, when weighting is performed, as shown in the definition of the dispersion value described using Expression (3), the intensity X−average of (| pixel (s ′, t ′) The covariance value can be calculated by dividing the value Mx |) (| intensity y of pixels (s ′, t ′) − average value My |) by the sum of the weighting coefficients. However, since the calculation result of the covariance value is divided by the calculation result of the dispersion value by a process described later, when weighting is applied also in the calculation of the dispersion value, the division process by the sum of the weighting coefficients is performed. It is possible to omit both the calculation of the variance value and the calculation of the covariance value.

上述した図27の共分散計算処理のステップS215において実行される積算処理には、上述した式(3)を用いて、定義どおり、共分散値が算出される場合に実行される積算処理1と、近似演算を用いて共分散値が算出される場合に実行される積算処理2との、2種類の処理がある。   The integration process executed in step S215 of the above-described covariance calculation process of FIG. 27 includes the integration process 1 executed when the covariance value is calculated as defined using the above-described equation (3). There are two types of processing: integration processing 2 executed when the covariance value is calculated using approximate calculation.

次に、図28のフローチャートを参照して、図27のステップS215において実行される積算処理1について説明する。積算処理1は、上述した式(3)を用いて、定義どおり、共分散値が算出される場合に実行される処理である。   Next, the integration process 1 executed in step S215 of FIG. 27 will be described with reference to the flowchart of FIG. The integration process 1 is a process executed when a covariance value is calculated as defined using the above-described equation (3).

ステップS231において、共分散算出部334は、(第1の信号の画素(s’,t’)の強度X−第1の信号の平均値Mx)と、(第2の信号の画素(s’,t’)の強度Y−第2の信号の平均値My)の積を演算する。   In step S231, the covariance calculation unit 334 (the intensity X of the pixel (s ′, t ′ of the first signal) −the average value Mx of the first signal) and the pixel (s ′ of the second signal (s ′ , T ′), the product of intensity Y−second signal average value My).

ステップS232において、共分散算出部334は、Vxy=Vxy+wi(積算結果)とし、処理は、図27のステップS216に進む。ここで、wiは、画素(s’,t’)における重み付けの値である。   In step S232, the covariance calculation unit 334 sets Vxy = Vxy + wi (integration result), and the process proceeds to step S216 in FIG. Here, wi is a weighting value in the pixel (s ′, t ′).

このような積算処理が実行されることにより、上述した式(3)を用いて、定義どおり、共分散値が算出される。積算処理1が実行された場合、定義どおりの演算であるので、その演算結果は、非常に精度の高いものであるが、そのかわり、演算に時間がかかったり、ハードウェア実装におけるゲート数の増加を招いてしまう。   By executing such integration processing, a covariance value is calculated as defined using the above-described equation (3). When integration process 1 is executed, the calculation is as defined, so the calculation result is very accurate. Instead, the calculation takes time or the number of gates in the hardware implementation increases. Will be invited.

次に、図29のフローチャートを参照して、図27のステップS215において実行される積算処理2について説明する。積算処理2は、上述した式(4)または式(5)を用いて、近似された共分散値が算出される場合に実行される処理である。   Next, the integration process 2 executed in step S215 of FIG. 27 will be described with reference to the flowchart of FIG. The integration process 2 is a process executed when an approximate covariance value is calculated using the above-described equation (4) or equation (5).

ステップS241において、共分散算出部334は、{第1の信号の画素(s’,t’)の強度X−第1の信号の平均値Mx}をpとする。   In step S241, the covariance calculation unit 334 sets {the intensity X of the pixel (s ′, t ′) of the first signal−the average value Mx of the first signal} to p.

ステップS242において、共分散算出部334は、{第2の信号の画素(s’,t’)の強度Y−第2の信号の平均値My}をqとする。   In step S242, the covariance calculation unit 334 sets {the intensity Y of the pixel (s ′, t ′) of the second signal−the average value My of the second signal} to q.

ステップS243において、図30、または、図31を用いて後述する積算近似処理が実行される。   In step S243, an integration approximation process described later with reference to FIG. 30 or FIG. 31 is executed.

ステップS244において、共分散算出部334は、Vxy=Vxy+(pqの近似値)とし、処理は、処理は、図27のステップS216に進む。   In step S244, the covariance calculation unit 334 sets Vxy = Vxy + (approximate value of pq), and the process proceeds to step S216 in FIG.

次に、図30のフローチャートを参照して、図29のステップS243において実行される積算近似処理1について説明する。積算近似処理1は、上述した式(4)を用いて、近似された共分散値が算出される場合に実行される処理である。   Next, with reference to the flowchart of FIG. 30, the integration approximation process 1 executed in step S243 of FIG. 29 will be described. The integrated approximation process 1 is a process executed when an approximate covariance value is calculated using the above-described equation (4).

ステップS261において、共分散算出部334は、図29のステップS241およびステップS242において置き換えられた値pおよびqを用いて、|p|≧|q|であるか否かを判断する。   In step S261, the covariance calculation unit 334 determines whether or not | p | ≧ | q | using the values p and q replaced in steps S241 and S242 of FIG.

ステップS261において、|p|≧|q|であると判断された場合、ステップS262において、共分散算出部334は、p≧0であるか否かを判断する。   If it is determined in step S261 that | p | ≧ | q |, in step S262, the covariance calculation unit 334 determines whether p ≧ 0.

ステップS262において、p≧0であると判断された場合、ステップS263において、共分散算出部334は、pqの近似値=+qとし、処理は、図29のステップS244に戻る。   If it is determined in step S262 that p ≧ 0, in step S263, the covariance calculation unit 334 sets pq approximate value = + q, and the process returns to step S244 in FIG.

ステップS262において、p≧0ではないと判断された場合、ステップS264において、共分散算出部334は、pqの近似値=−qとし、処理は、図29のステップS244に戻る。   If it is determined in step S262 that p ≧ 0 is not satisfied, in step S264, the covariance calculation unit 334 sets an approximate value of pq = −q, and the process returns to step S244 in FIG.

ステップS261において、|p|≧|q|ではないと判断された場合、ステップS265において、共分散算出部334は、q≧0であるか否かを判断する。   When it is determined in step S261 that | p | ≧ | q | is not satisfied, in step S265, the covariance calculation unit 334 determines whether q ≧ 0.

ステップS265において、q≧0であると判断された場合、ステップS266において、共分散算出部334は、pqの近似値=+pとし、処理は、図29のステップS244に戻る。   If it is determined in step S265 that q ≧ 0, in step S266, the covariance calculation unit 334 sets pq approximate value = + p, and the process returns to step S244 in FIG.

ステップS265において、q≧0ではないと判断された場合、ステップS267において、共分散算出部334は、pqの近似値=−pとし、処理は、図29のステップS244に戻る。   If it is determined in step S265 that q ≧ 0 is not satisfied, in step S267, the covariance calculation unit 334 sets an approximate value of pq = −p, and the process returns to step S244 in FIG.

この処理において、qまたはpが0である場合、pqの近似値は必ず0となる。具体的には、qが0であるとき、|p|≧|q|は必ず成り立つので、pの値に関わらず、pqの近似値は0となる。また、pが0であるとき、|p|≧|q|は必ず成り立たないので、qの値に関わらず、pqの近似値は0となる。   In this process, when q or p is 0, the approximate value of pq is always 0. Specifically, when q is 0, | p | ≧ | q | always holds, so that the approximate value of pq is 0 regardless of the value of p. Also, when p is 0, | p | ≧ | q | does not always hold, so the approximate value of pq is 0 regardless of the value of q.

図30を用いて説明した処理により、上述した式(4)を用いて、共分散値を近似することが可能である。   With the processing described with reference to FIG. 30, the covariance value can be approximated using the above-described equation (4).

次に、図31のフローチャートを参照して、図29のステップS243において実行される積算近似処理2について説明する。積算近似処理1は、上述した式(5)を用いて、近似された共分散値が算出される場合に実行される処理である。   Next, the integration approximation process 2 executed in step S243 in FIG. 29 will be described with reference to the flowchart in FIG. The integrated approximation process 1 is a process executed when an approximate covariance value is calculated using the above-described equation (5).

ステップS281において、共分散算出部334は、図29のステップS241およびステップS242において置き換えられた値pおよびqを用いて、pまたはqが0であるか否かを判断する。   In step S281, the covariance calculation unit 334 determines whether p or q is 0 using the values p and q replaced in steps S241 and S242 of FIG.

ステップS281において、pまたはqが0であると判断された場合、ステップS281において、共分散算出部334は、pqの近似値を0とし、処理は、図29のステップS244に戻る。   If it is determined in step S281 that p or q is 0, in step S281, the covariance calculation unit 334 sets the approximate value of pq to 0, and the process returns to step S244 in FIG.

ステップS281において、pおよびqはいずれも0ではないと判断された場合、ステップS283において、共分散算出部334は、pおよびqの関係は、p>0かつq>0、または、p<0かつq<0のうちのいずれか一方であるか否かを判断する。   If it is determined in step S281 that p and q are not 0, in step S283, the covariance calculation unit 334 determines that the relationship between p and q is p> 0 and q> 0, or p <0. In addition, it is determined whether any one of q <0 is satisfied.

ステップS283において、pおよびqの関係は、p>0かつq>0、または、p<0かつq<0のうちのいずれか一方であると判断された場合、ステップS284において、共分散算出部334は、pqの近似値を(|p|+|q|)/2とし、処理は、図29のステップS244に戻る。   If it is determined in step S283 that the relationship between p and q is either p> 0 and q> 0, or p <0 and q <0, in step S284, the covariance calculation unit In step 334, the approximate value of pq is set to (| p | + | q |) / 2, and the process returns to step S244 in FIG.

テップS283において、pおよびqの関係は、p>0かつq>0、または、p<0かつq<0のうちのいずれでもないと判断された場合、ステップS285において、共分散算出部334は、pqの近似値を、(−|p|−|q|)/2とし、処理は、図29のステップS244に戻る。   In step S283, when it is determined that the relationship between p and q is neither p> 0 and q> 0, or p <0 and q <0, the covariance calculation unit 334 determines in step S285. , Pq is set to (− | p | − | q |) / 2, and the process returns to step S244 in FIG.

なお、図29のステップS241およびステップS242において置き換えられた値pまたはqが、0の値を取ることは、非常にまれである。そこで、ステップS281およびステップS282の処理を省略するようにしてもよい。このようにすることにより、演算処理速度を高速化したり、ハードウェアの実装規模を縮小するようにすることが可能である。   Note that it is very rare that the value p or q replaced in step S241 and step S242 in FIG. 29 takes a value of 0. Therefore, the processing in step S281 and step S282 may be omitted. By doing so, it is possible to increase the calculation processing speed and reduce the hardware implementation scale.

図31を用いて説明した処理により、上述した式(5)を用いて、共分散値を近似することが可能である。   By the processing described with reference to FIG. 31, the covariance value can be approximated using the above-described equation (5).

図29乃至図31を用いて説明した積算処理が実行されることにより、上述した式(4)または式(5)を用いて、共分散値を近似することが可能である。このようにした場合、式(3)に示される定義どおりの共分散値の演算が実行された場合と比較して、計算速度が高速化されたり、計算のために実装されるハードウェアのゲート数を少なくすることができるなどの利点が発生する。   By executing the integration process described with reference to FIGS. 29 to 31, the covariance value can be approximated using the above-described equation (4) or equation (5). In such a case, compared with the case where the calculation of the covariance value as defined in Expression (3) is executed, the calculation speed is increased or the hardware gate implemented for the calculation is used. Advantages such as being able to reduce the number occur.

次に、図32のフローチャートを参照して、図18のステップS27において実行される、補間画素推定処理について説明する。   Next, the interpolation pixel estimation process executed in step S27 of FIG. 18 will be described with reference to the flowchart of FIG.

ステップS321において、傾き算出部351は、上述した式(6)を用いて、平均値に基づく傾き推定値Kmを算出し、傾き合成部353に出力する。   In step S <b> 321, the inclination calculation unit 351 calculates the estimated inclination value Km based on the average value using the above-described equation (6), and outputs it to the inclination synthesis unit 353.

ステップS322において、傾き算出部352は、上述した式(7)を用いて、分散値および共分散値に基づく傾き推定値Ksを算出し、傾き合成部353に出力する。   In step S322, the inclination calculation unit 352 calculates the inclination estimation value Ks based on the variance value and the covariance value using the above-described equation (7), and outputs the inclination estimation value Ks to the inclination synthesis unit 353.

ここで、傾き算出部352は、上述した式(7)に示されるように、傾きKsの分母に対するクリッピング処理を行う。このクリッピング処理は、画像が平坦かどうかの判定と出力振幅の抑制との両方の処理を実行した場合と同様に、ノイズ低減の作用がある。この処理が実行されることにより、別途ノイズ低減処理を追加しなくても画像の平坦な部分で目立つノイズを抑制することができる。   Here, the inclination calculation unit 352 performs clipping processing on the denominator of the inclination Ks as shown in the above-described equation (7). This clipping process has the effect of reducing noise, as in the case where both the determination of whether an image is flat and the process of suppressing the output amplitude are executed. By executing this process, it is possible to suppress noise that is noticeable in a flat portion of an image without adding a separate noise reduction process.

ステップS323において、傾き合成部353は、ステップS321において算出された傾き推定値Kmと、ステップS322において算出された傾き推定値Ksとを、上述した式(8)を用いて、信頼度hに基づいて合成し、傾き推定値Kを算出し、画素強度推定部354に出力する。   In step S323, the inclination synthesis unit 353 uses the inclination estimation value Km calculated in step S321 and the inclination estimation value Ks calculated in step S322 based on the reliability h using the above-described equation (8). Are combined to calculate an estimated inclination value K and output the result to the pixel intensity estimation unit 354.

ステップS324において、素強度推定部354は、ステップS323において算出された傾き推定値K、2つの平均値MGおよびMR(またはMB)、並びに、注目画素位置のG強度とを基に、上述した式(9)または式(10)の線形回帰式を用いて、注目画素位置のR強度(またはB強度)の推定値を算出し、処理は、図18のステップS28に戻る。 In step S324, the elementary intensity estimation unit 354, based on the estimated slope value K calculated in step S323, the two average values M G and M R (or M B ), and the G intensity of the target pixel position, The estimated value of the R intensity (or B intensity) of the target pixel position is calculated using the linear regression expression of the above-described Expression (9) or Expression (10), and the process returns to Step S28 in FIG.

このような処理により、注目画素位置の各色の推定強度を算出することができる。特に、推定強度を算出する場合の線形回帰式に、上述した式(10)を用いて、傾きKに、1より大きな適当な定数uを乗算することにより、その高周波成分を少し増強して、Rに対する適切な高域補正を実行した場合と同様の効果を得ることができる。このようにすることにより、別途高域補正処理を追加しなくても高域が補正された画像を得ることができる。   Through such processing, the estimated intensity of each color at the target pixel position can be calculated. In particular, the high frequency component is slightly enhanced by multiplying the slope K by an appropriate constant u greater than 1 using the above-described equation (10) in the linear regression equation for calculating the estimated intensity, An effect similar to that obtained when appropriate high-frequency correction for R is executed can be obtained. By doing so, it is possible to obtain an image in which the high frequency is corrected without adding a separate high frequency correction process.

以上説明したように、図4を用いて説明したモザイク配列231(全画素読み出し)は、G信号が市松上に配置されるようになされ、水平垂直方向のいずれにも均等に分布し、かつ、R信号およびB信号も、水平垂直方向のいずれにも均等に分布しており、更に、図5を用いて説明したモザイク配列241(間引き読み出し)においても、得られる色配列は、1列おきのGストライプとなり、Gではない列には、RとBが、それぞれ同一水平ラインに均一に混在し、かつ、同一垂直ラインに交互に配列されるようになされている。すなわち、図4および図5を用いて説明したフィルタ配列を用いた本発明のデジタルスチルカメラ201は、従来用いられてきたフィルタ配列により画像信号が取得される場合と比較して、全画素読み出しおよび間引き読み出しのいずれにおいても、精度良くGの補間処理を行うことが可能となり、更に、RBの補間精度の方向によるばらつきが発生しにくいため、偽色などの発生を抑えることができる。   As described above, the mosaic arrangement 231 (all pixel readout) described with reference to FIG. 4 is such that the G signal is arranged on the checkered pattern, is evenly distributed in both the horizontal and vertical directions, and The R signal and the B signal are evenly distributed in both the horizontal and vertical directions. Further, in the mosaic arrangement 241 (decimation readout) described with reference to FIG. 5, the obtained color arrangement is every other column. In the non-G column, R and B are uniformly mixed on the same horizontal line and alternately arranged on the same vertical line. In other words, the digital still camera 201 of the present invention using the filter arrangement described with reference to FIGS. 4 and 5 is capable of reading out all pixels and comparing the image signal acquired with the conventionally used filter arrangement. In any of the thinning-out readings, it is possible to perform the G interpolation process with high accuracy, and furthermore, since it is difficult for the RB interpolation accuracy to vary depending on the direction, false colors and the like can be suppressed.

以上の説明においては、RGBの同時化処理を、線形回帰直線を求めることにより実現するものとして説明したが、RGBの同時化処理を、線形回帰直線を求める以外の、例えば、以下のような方法で算出することで実現してもよい。   In the above description, the RGB synchronization processing has been described as being realized by obtaining a linear regression line. However, the RGB synchronization processing other than obtaining a linear regression line, for example, the following method You may implement | achieve by calculating by.

第1の方法・・・局所領域内で色の変化は少ないと仮定して、求める色の情報のみを用いて、重み付け平均で算出する。
第2の方法・・・局所領域内で低周波の色の比率と高周波の色の比率は、略等しいと仮定して算出する。
第3の方法・・・局所領域内のG強度信号と、R強度信号またはB強度信号との相関は高いと仮定して算出する。
First method: Assuming that there is little change in color within the local region, calculation is performed by weighted average using only the information of the color to be obtained.
Second method: Calculation is performed on the assumption that the ratio of the low frequency color and the ratio of the high frequency color in the local region are substantially equal.
Third method: Calculation is performed on the assumption that the correlation between the G intensity signal in the local region and the R intensity signal or the B intensity signal is high.

次に、前記の具体的な方法について、図33を用いて、間引きされた5×3のモザイク配列の中央の画素であるG5の位置に対応するRを算出する場合を例として説明する。なお、図33に対応する重み付け係数には、図14を用いて説明した重み付け係数を使用する。   Next, the specific method will be described with reference to FIG. 33 as an example of calculating R corresponding to the position of G5 which is the center pixel of the thinned 5 × 3 mosaic array. Note that the weighting coefficient described with reference to FIG. 14 is used as the weighting coefficient corresponding to FIG.

上述した第1の方法において、G5の位置のRは次の式(15)で示される。   In the first method described above, R at the position of G5 is represented by the following equation (15).

R=(R1×2+R2×6+R3×2)/10・・・(15)       R = (R1 × 2 + R2 × 6 + R3 × 2) / 10 (15)

上述した第2の方法において、G5の位置のRは次の式(16)で示される。   In the second method described above, R at the position of G5 is expressed by the following equation (16).

R=G5×LPF(R)/LPF(G)・・・(16)       R = G5 × LPF (R) / LPF (G) (16)

なお、式(16)において、LPF(R)=(R1×2+R2×6+R3×2)/10であり、LPF(G)=(G1+G3+G7+G9+(G2+G4+G6+G8)×3+G5×9)/25である。   In the equation (16), LPF (R) = (R1 × 2 + R2 × 6 + R3 × 2) / 10 and LPF (G) = (G1 + G3 + G7 + G9 + (G2 + G4 + G6 + G8) × 3 + G5 × 9) / 25.

そして、上述した第3の方法において、G5の位置のRは次の式(17)で示される。   And in the 3rd method mentioned above, R of the position of G5 is shown by following Formula (17).

R=k×(G5―LPF(G))+LPF(R)・・・(17)   R = k × (G5−LPF (G)) + LPF (R) (17)

なお、式(17)において、LPF(R)=(R1×2+R2×6+R3×2)/10であり、LPF(G)=(G1+G3+G7+G9+(G2+G4+G6+G8)×3+G5×9)/25であり、kは、局所領域内のRとGの統計量から算出した回帰直線の傾きである。   In Expression (17), LPF (R) = (R1 × 2 + R2 × 6 + R3 × 2) / 10, LPF (G) = (G1 + G3 + G7 + G9 + (G2 + G4 + G6 + G8) × 3 + G5 × 9) / 25, and k is It is the slope of the regression line calculated from the R and G statistics within the local region.

上述したように、本発明を適用した図4のモザイク配列231を有するカラーフィルタを用いた場合、全画素読み出しおよび間引き読み出しのいずれにおいても、RGBの分布が従来における場合よりも特定方向に偏らず均一であるため、特定方向に解像度の劣化が生じてしまうことなく、偽色、および、方向による解像度のばらつきが抑えられ、高品質な画像を得ることができる。   As described above, when the color filter having the mosaic arrangement 231 of FIG. 4 to which the present invention is applied is used, the RGB distribution is not biased in a specific direction as compared with the conventional case in both the all pixel readout and the thinning readout. Since it is uniform, the deterioration of resolution in a specific direction does not occur, and variations in resolution due to false colors and directions can be suppressed, and a high-quality image can be obtained.

また、CCDイメージセンサ213のオンチップカラーフィルタに用いられているモザイク配列には、図4を用いて説明した第1の例のモザイク配列231以外にも、例えば、図34に示されるように、色フィルタ配列は第1の例と同じであるが、それに加えて、行ごとに異なる感度を交互に適用しているモザイク配列361を用いるようにしても良い。   In addition to the mosaic arrangement 231 of the first example described with reference to FIG. 4, the mosaic arrangement used for the on-chip color filter of the CCD image sensor 213 includes, for example, as shown in FIG. Although the color filter array is the same as that of the first example, a mosaic array 361 that alternately applies different sensitivities for each row may be used.

図34においては、色情報に付加された数字において、1が明るい感度、0が暗い感度を示しているものとする。   In FIG. 34, in the numbers added to the color information, it is assumed that 1 indicates bright sensitivity and 0 indicates dark sensitivity.

図34に示されるモザイク配列361がCCDイメージセンサ213のオンチップカラーフィルタに用いられている場合、第1の例のモザイク配列231がCCDイメージセンサ213のオンチップカラーフィルタに用いられている場合とは異なり、1行おきに間引き処理を行ってしまっては、間引き後のモザイク画像には、いずれか一方の感度の色強度信号しか残らなくなってしまう。したがって、CPU223は、タイミングジェネレータ217を制御し、CCDイメージセンサ213において取得された画像信号の読み出しを、2行ごとに読出し、スキップが交互に実行されるようにする。   When the mosaic arrangement 361 shown in FIG. 34 is used for the on-chip color filter of the CCD image sensor 213, the mosaic arrangement 231 of the first example is used for the on-chip color filter of the CCD image sensor 213, and In contrast, if the thinning process is performed every other line, only one of the color intensity signals having the sensitivity remains in the mosaic image after the thinning. Therefore, the CPU 223 controls the timing generator 217 to read out the image signal acquired by the CCD image sensor 213 every two rows so that skipping is executed alternately.

このような2行ごとの間引き読み出しにより得られる間引きされたモザイク配列を図35に示す。図35のモザイク配列362においては、1行ごとに、明るい感度の画像信号と暗い感度の画像信号を得ることが可能となる。したがって、第2の例に示されるモザイク配列のオンチップカラーフィルタを用いたデジタルスチルカメラ201は、DSPブロック216において、双方の感度の色強度情報を用いてデモザイク処理を行うことができるので、偽色などのノイズの発生を防止することができるのみならず、白とびや黒つぶれを防止して、より高画質の画像を得ることができる。   FIG. 35 shows a thinned mosaic array obtained by such thinning-out reading every two rows. In the mosaic array 362 of FIG. 35, it is possible to obtain a bright-sensitive image signal and a dark-sensitive image signal for each row. Therefore, the digital still camera 201 using the mosaic arrangement on-chip color filter shown in the second example can perform demosaic processing using the color intensity information of both sensitivities in the DSP block 216. In addition to preventing the occurrence of noise such as color, it is possible to prevent overexposure and underexposure and obtain a higher quality image.

図34に示されるモザイク配列361がCCDイメージセンサ213のオンチップカラーフィルタに用いられている場合、デジタルスチルカメラ201のDSPブロック216は、図7を用いて説明したデモザイク処理部253に代わって、図36のデモザイク処理部371が用いられる。   When the mosaic arrangement 361 shown in FIG. 34 is used for the on-chip color filter of the CCD image sensor 213, the DSP block 216 of the digital still camera 201 is replaced with the demosaic processing unit 253 described with reference to FIG. The demosaic processing unit 371 in FIG. 36 is used.

なお、図7と対応する部分には同一の符号を付してあり、その説明は適宜省略する。すなわち、図36のデモザイク処理部371は、図34および図35を用いて説明したモザイク配列のモザイク画像データを処理するために必要な感度補償部375が新たに設けられている以外は、基本的に、図7のデモザイク処理部253と同様の構成を有するものである。   Note that portions corresponding to those in FIG. 7 are denoted by the same reference numerals, and description thereof is omitted as appropriate. That is, the demosaic processing unit 371 in FIG. 36 is basically the same except that a sensitivity compensation unit 375 necessary for processing the mosaic image data having the mosaic arrangement described with reference to FIGS. 34 and 35 is newly provided. Further, it has the same configuration as the demosaic processing unit 253 of FIG.

感度補償部375は、局所領域抽出部281により抽出された局所領域のモザイク画像の入力を受け、更に、CPU223より、CCDイメージセンサ213のオンチップカラーフィルタに用いられているモザイク配列361の高感度と低感度との感度比の供給を受け、モザイク画像の各画素の信号強度が有効値(すなわち、白とびや黒つぶれをしていない値)であれば、低感度の画素の色成分信号を、高感度で撮影されたものに相当するように補償して、得られた感度補償済みの局所的な色モザイク画像を、G強度補間処理部282、信頼度算出部283、および、粗補間処理部284に供給する。   The sensitivity compensation unit 375 receives the input of the mosaic image of the local region extracted by the local region extraction unit 281, and further receives the high sensitivity of the mosaic array 361 used for the on-chip color filter of the CCD image sensor 213 from the CPU 223. If the signal intensity of each pixel of the mosaic image is an effective value (ie, a value that does not cause overexposure or underexposure), the color component signal of the low sensitivity pixel is received. Then, compensation is performed so as to correspond to a high-sensitivity photographed image, and the obtained sensitivity-compensated local color mosaic image is converted into a G intensity interpolation processing unit 282, a reliability calculation unit 283, and rough interpolation processing. Supplied to the unit 284.

図37は、感度補償部375の構成を示すブロック図である。   FIG. 37 is a block diagram showing the configuration of the sensitivity compensation unit 375.

感度補償部375の乗算部381は、局所領域抽出部281から供給されたモザイク画像の各画素に対して、高感度で撮影された画素と低感度で撮影された画素の感度比を乗算し、セレクタ382に出力する。セレクタ382は、モザイク画像と、乗算部381が出力する感度補償されたモザイク画像の入力を受け、予め保持しているモザイク画像の感度配列を示す情報に基づき、高感度の画素位置の色強度信号については、モザイク画像の色強度信号を有効性判定部383にそのまま出力し、低感度の画素位置については、乗算部381から供給された、感度補償されたモザイク画像の色強度信号を、有効性判定部383に出力する。   The multiplication unit 381 of the sensitivity compensation unit 375 multiplies each pixel of the mosaic image supplied from the local region extraction unit 281 by the sensitivity ratio between the pixel photographed with high sensitivity and the pixel photographed with low sensitivity. Output to the selector 382. The selector 382 receives the mosaic image and the sensitivity-compensated mosaic image output from the multiplication unit 381, and based on the information indicating the sensitivity arrangement of the mosaic image stored in advance, the color intensity signal at the pixel position with high sensitivity. For the low-sensitivity pixel position, the mosaic intensity color intensity signal supplied from the multiplication section 381 is output as the validity of the mosaic image color intensity signal. The data is output to the determination unit 383.

有効性判定383は、セレクタ382から入力される、画素の撮影時の感度が高感度に統一された局所的なモザイク画像を構成する画素のうち、その画素値(色成分の値)が所定のノイズレベル以下(すなわち、黒つぶれ)であるもの、または、その画素値が所定の飽和レベル以上であるもの(すなわち、白とび)を無効な画素であると判定し、画素値を無効な画素であることを示す値(例えば、負の値)に置換して、G強度補間処理部282、信頼度算出部283、および、粗補間処理部284に出力する。   The validity determination 383 is a pixel value (color component value) that is input from the selector 382 and has a predetermined pixel value (color component value) among pixels constituting a local mosaic image in which the sensitivity at the time of pixel shooting is unified. A pixel whose noise level is below (ie, blackout) or whose pixel value is above a predetermined saturation level (ie, overexposure) is determined to be an invalid pixel, and the pixel value is determined to be an invalid pixel. The value is substituted with a value indicating that it is present (for example, a negative value), and is output to the G intensity interpolation processing unit 282, the reliability calculation unit 283, and the coarse interpolation processing unit 284.

次に、図38のフローチャートを参照して、図36のデモザイク処理部371が実行するデモザイク処理2について説明する。   Next, the demosaic process 2 executed by the demosaic processor 371 of FIG. 36 will be described with reference to the flowchart of FIG.

ステップS351において、局所領域抽出部281は、未処理の画素のうちのいずれかを注目画素とする。   In step S351, the local region extraction unit 281 sets one of unprocessed pixels as a target pixel.

ステップS352において、感度補償部375は、供給されたモザイク画像データの感度補償処理を行う。具体的には、図37を用いて説明したように、乗算部381は、局所領域抽出部281から供給されたモザイク画像の各画素に対して、高感度で撮影された画素と低感度で撮影された画素の感度比を乗算し、セレクタ382は、予め保持しているモザイク画像の感度配列を示す情報に基づき、高感度の画素位置の色強度信号については、モザイク画像の色強度信号を有効性判定部383にそのまま出力し、低感度の画素位置については、乗算部381から供給された、感度補償されたモザイク画像の色強度信号を、有効性判定部383に出力する。有効性判定383は、画素値が所定のノイズレベル以下であるもの、または、その画素値が所定の飽和レベル以上であるものを無効な画素であると判定し、画素値を無効な画素であることを示す値に置換して、G強度補間処理部282、信頼度算出部283、および、粗補間処理部284に出力する。   In step S352, the sensitivity compensation unit 375 performs sensitivity compensation processing on the supplied mosaic image data. Specifically, as described with reference to FIG. 37, the multiplication unit 381 captures the pixels of the mosaic image supplied from the local region extraction unit 281 with the pixels captured with high sensitivity and the low sensitivity. The selector 382 multiplies the sensitivity ratio of the selected pixel, and the selector 382 validates the color intensity signal of the mosaic image with respect to the color intensity signal of the highly sensitive pixel position based on the information indicating the sensitivity array of the mosaic image stored in advance. The output is output as it is to the sex determination unit 383, and the sensitivity-compensated mosaic image color intensity signal supplied from the multiplication unit 381 is output to the validity determination unit 383 for the low sensitivity pixel position. The validity determination 383 determines that the pixel value is equal to or lower than a predetermined noise level or the pixel value equal to or higher than the predetermined saturation level as an invalid pixel, and the pixel value is an invalid pixel. This value is replaced with a value indicating this, and output to the G intensity interpolation processing unit 282, the reliability calculation unit 283, and the coarse interpolation processing unit 284.

ステップS353乃至ステップS362において図18のステップS42乃至ステップS51と同等の処理が実行される。すなわち、間引きされた画像であるか否かが判断されて、間引きされていない、全画素読み出し画像に対しては、注目画素位置の周辺の所定数(n×n)の画素が局所領域として抽出され、図19のフローチャートを用いて説明した粗補間処理1が実行される。   In steps S353 to S362, processing equivalent to steps S42 to S51 of FIG. 18 is executed. That is, it is determined whether or not the image has been thinned out, and for all pixel readout images that have not been thinned out, a predetermined number (n × n) of pixels around the target pixel position are extracted as local regions. Then, the rough interpolation process 1 described with reference to the flowchart of FIG. 19 is executed.

そして、間引きされた画像であると判断された場合、注目画素位置の周辺の所定数(n×m)の画素が局所領域として抽出され、図20のフローチャートを用いて説明した粗補間処理2が実行される。   When it is determined that the image is a thinned image, a predetermined number (n × m) of pixels around the target pixel position are extracted as local regions, and the rough interpolation process 2 described with reference to the flowchart of FIG. 20 is performed. Executed.

粗補間処理1または粗補間処理2の終了後、注目画素位置のG強度が算出され、図21のフローチャートを用いて説明した値算出処理が実行され、図22のフローチャートを用いて説明した2色分布形状の統計量算出処理が実行され、図32のフローチャートを用いて説明した補間画素推定処理が実行される。   After the rough interpolation process 1 or the rough interpolation process 2, the G intensity at the target pixel position is calculated, the value calculation process described with reference to the flowchart of FIG. 21 is executed, and the two colors described with reference to the flowchart of FIG. The distribution shape statistic calculation processing is executed, and the interpolation pixel estimation processing described with reference to the flowchart of FIG. 32 is executed.

そして、全ての画素において処理が終了したか否かを判断する。ステップS351に戻り、それ以降の処理が繰り返される。全ての画素において処理が終了したと判断された場合、処理は、図17のステップS25に戻る。   Then, it is determined whether or not processing has been completed for all pixels. Returning to step S351, the subsequent processing is repeated. If it is determined that the processing has been completed for all the pixels, the processing returns to step S25 in FIG.

このような処理により、CCDイメージセンサ213が有するカラーフィルタの配列に基づいて得られるモザイク画像をデモザイク(色補間、または、同時化)して、各画素において、カラーフィルタを構成する各色が補間され、かつ、黒つぶれや色とびが無い画像データを得ることができる。   By such processing, the mosaic image obtained based on the color filter array of the CCD image sensor 213 is demosaiced (color interpolation or synchronization), and each color constituting the color filter is interpolated in each pixel. In addition, it is possible to obtain image data that is free from blackout and color skipping.

また、本発明を適用したデジタルスチルカメラ201は、図6を用いて説明したDSPブロック216に代わって、図39に示されるDSPブロック391を備えるようにしても良い。   Further, the digital still camera 201 to which the present invention is applied may include a DSP block 391 shown in FIG. 39 instead of the DSP block 216 described with reference to FIG.

なお、図6と対応する部分には同一の符号を付してあり、その説明は適宜省略する。すなわち、図39のDSPブロック391は、信号処理用プロセッサ242に代わって、信号処理用プロセッサ395が設けられている以外は、基本的に、図6を用いて説明したDSPブロック216と同様の構成を有しており、信号処理用プロセッサ395は、スイッチ254がガンマ補正部252の後段に設けられ、水平方向縮小処理部255に代わって、水平方向縮小処理部398が設けられ、スイッチ254の一方の出力と水平方向縮小処理部398の出力がデモザイク処理部253に供給されている以外は、基本的に、図6を用いて説明した信号処理用プロセッサ242と同様の構成を有しているものである。   Note that portions corresponding to those in FIG. 6 are denoted by the same reference numerals, and description thereof is omitted as appropriate. That is, the DSP block 391 in FIG. 39 is basically the same configuration as the DSP block 216 described with reference to FIG. 6 except that a signal processor 395 is provided instead of the signal processor 242. In the signal processing processor 395, a switch 254 is provided at the subsequent stage of the gamma correction unit 252, and a horizontal direction reduction processing unit 398 is provided instead of the horizontal direction reduction processing unit 255, and one of the switches 254 is provided. And the output of the horizontal reduction processing unit 398 are basically the same as the signal processing processor 242 described with reference to FIG. 6, except that the demosaic processing unit 253 is supplied. It is.

水平方向縮小処理部398は、スイッチ254から供給された間引きされたモザイク画像の縦横比を、間引きされていないモザイク画像と同一にするために、水平方向の縮小処理を実行する。ここで、水平方向縮小処理部398は、スイッチ254から供給された間引きされたモザイク画像のモザイク配列を変更することなく、縦横比を間引きされていないモザイク配列と同一になるように変更する。   The horizontal direction reduction processing unit 398 performs horizontal reduction processing so that the aspect ratio of the thinned mosaic image supplied from the switch 254 is the same as that of the mosaic image that has not been thinned. Here, the horizontal direction reduction processing unit 398 does not change the mosaic arrangement of the thinned mosaic image supplied from the switch 254, but changes the aspect ratio to be the same as that of the non-decimated mosaic arrangement.

具体的には、水平方向縮小処理部398は、供給された間引き後のモザイク配列241またはモザイク配列362を4列ごとに間引いたり、所定のフィルタを用いることにより、水平方向に縮小された同一配列のモザイク画像データを作成する。   Specifically, the horizontal direction reduction processing unit 398 thins the supplied mosaic array 241 or mosaic array 362 every four columns or uses a predetermined filter to reduce the same array in the horizontal direction. Create mosaic image data.

水平方向の間引きに用いられるフィルタの例について、図40を用いて説明する。   An example of a filter used for horizontal thinning will be described with reference to FIG.

水平方向縮小処理部398は、モザイク配列を変更することなく水平方向の画素数を1/2に減少させるために、1行に配置された画素の色強度信号を用いて、元のモザイク配列のBの強度信号を有する画素の位置にGの強度信号を生成し、元のモザイク配列のRの強度信号を有する画素の位置にRまたはBの強度信号を生成する。   In order to reduce the number of pixels in the horizontal direction to ½ without changing the mosaic arrangement, the horizontal reduction processing unit 398 uses the color intensity signal of the pixels arranged in one row to change the original mosaic arrangement. A G intensity signal is generated at the position of the pixel having the B intensity signal, and an R or B intensity signal is generated at the position of the pixel having the R intensity signal of the original mosaic arrangement.

このとき、水平方向縮小処理部398は、作成される強度信号と同一の列の近傍の同色の色信号を用いて、重み付け平均演算により、RGBのそれぞれの色強度を有する画素の値を演算する。   At this time, the horizontal reduction processing unit 398 calculates the values of pixels having the respective color intensities of RGB by weighted average calculation using color signals of the same color in the vicinity of the same column as the generated intensity signal. .

例えば、水平方向縮小処理部398は、Gの色強度を有する画素信号を作成するために、画素の補間位置の近傍の4画素G1,G2,G3,G4を用いて、次の式(18)を用いて、色強度を演算し、Rの色強度を有する画素信号を作成するために、画素の補間位置の近傍の5画素R1,R2,R3,R4,R5を用いて、次の式(19)を用いて、色強度を演算し、Bの色強度を有する画素信号を作成するために、画素の補間位置の近傍の4画素B1,B2,B3,B4を用いて、次の式(20)を用いて、色強度を演算することができる。   For example, the horizontal reduction processing unit 398 uses the four pixels G1, G2, G3, and G4 in the vicinity of the pixel interpolation position to generate a pixel signal having the G color intensity, and uses the following equation (18): Is used to calculate a color intensity and create a pixel signal having an R color intensity, and using the five pixels R1, R2, R3, R4, and R5 in the vicinity of the pixel interpolation position, 19) is used to calculate the color intensity and create a pixel signal having the B color intensity, using the four pixels B1, B2, B3, and B4 in the vicinity of the pixel interpolation position, 20) can be used to calculate the color intensity.

G=(G1+G2×3+G3×3+G4)/8 ・・・(18)
R=(R1+R2×4+R4×6+R4×4+R5)/16 ・・・(19)
B=(B1+B2×3+B3×3+B4)/8 ・・・(20)
G = (G1 + G2 × 3 + G3 × 3 + G4) / 8 (18)
R = (R1 + R2 × 4 + R4 × 6 + R4 × 4 + R5) / 16 (19)
B = (B1 + B2 × 3 + B3 × 3 + B4) / 8 (20)

このようにして、水平方向縮小処理部398は、供給されたモザイク画像のモザイク配列を変更することなく、画素信号の縦横比を間引きされていないモザイク画像と同一にするために、水平方向の縮小処理を実行することができる。   In this way, the horizontal reduction processing unit 398 reduces the horizontal direction in order to make the aspect ratio of the pixel signal the same as that of the non-decimated mosaic image without changing the mosaic arrangement of the supplied mosaic image. Processing can be executed.

次に、図41のフローチャートを参照して、図39に示されるDSPブロック391が実行する画像処理2について説明する。   Next, image processing 2 executed by the DSP block 391 shown in FIG. 39 will be described with reference to the flowchart of FIG.

ステップS401乃至ステップS403において、図17のステップS21乃至ステップS23と同様の処理が実行される。すなわち、画像用RAM241は、CCDイメージセンサ213に用いられているカラーフィルタにより定められる配列の周期的なパターンの強度信号により構成されるモザイク画像を取得して、一時保存し、ホワイトバランス調整部251は、モザイク画像に対して、無彩色の被写体領域の色バランスが無彩色になるように、各画素強度の持つ色に応じて適切な係数をかける処理であるホワイトバランス調整処理を行い、ガンマ補正部252は、ホワイトバランスがとられたモザイク画像の各画素強度に対し、表示部220に表示される画像の明るさや色の彩度が正しく表示されるようにガンマ補正を行う。   In steps S401 to S403, the same processing as in steps S21 to S23 of FIG. 17 is executed. In other words, the image RAM 241 acquires a mosaic image composed of intensity signals of a periodic pattern having an arrangement determined by the color filter used in the CCD image sensor 213, temporarily stores it, and the white balance adjustment unit 251. Performs a white balance adjustment process that applies an appropriate coefficient according to the color of each pixel intensity so that the color balance of the achromatic subject area is achromatic for the mosaic image, and gamma correction The unit 252 performs gamma correction on each pixel intensity of the mosaic image with white balance so that the brightness and color saturation of the image displayed on the display unit 220 are correctly displayed.

ステップS404において、スイッチ254は、供給されたRGBの画像データが、間引きされた画像であるか否かを判断する。ステップS404において、間引きされた画像ではないと判断された場合、スイッチ254は、供給された画像をデモザイク処理部253に供給するので、処理は、ステップS406に進む。   In step S404, the switch 254 determines whether or not the supplied RGB image data is a thinned image. If it is determined in step S404 that the image is not a thinned image, the switch 254 supplies the supplied image to the demosaic processing unit 253, and thus the process proceeds to step S406.

ステップS404において、間引きされた画像であると判断された場合、ステップS405において、スイッチ254は、供給された画像を水平方向縮小処理部398に供給する。水平方向縮小処理部398は、供給された画像の縦横比が、間引きされていない画像と同一になるように水平方向に画像を縮小する。   If it is determined in step S404 that the image is a thinned image, the switch 254 supplies the supplied image to the horizontal reduction processing unit 398 in step S405. The horizontal direction reduction processing unit 398 reduces the image in the horizontal direction so that the aspect ratio of the supplied image is the same as that of the non-thinned image.

ステップS404において、間引きされた画像ではないと判断された場合、または、ステップS405の処理の終了後、ステップS406において、デモザイク処理部253により、図18を用いて説明したデモザイク処理が実行される。   If it is determined in step S404 that the image is not a thinned image, or after the process of step S405 is completed, the demosaic processing unit 253 performs the demosaic process described with reference to FIG. 18 in step S406.

ステップS407乃至ステップS409において、図17のステップS27乃至ステップS29と同様の処理が実行される。すなわち、階調変換処理部256は、供給された画像信号の階調を圧縮する階調変換処理を実行し、階調変換された画像信号をYC変換部257に供給する。そして、YC変換部257は、R,G,Bの3チャネル画像に、マトリックス処理およびクロマ成分に対する帯域制限を行うことで、YC変換を行い、Y画像およびC画像を生成して出力し、処理が終了される。   In steps S407 to S409, processing similar to that in steps S27 to S29 in FIG. 17 is executed. That is, the gradation conversion processing unit 256 executes gradation conversion processing for compressing the gradation of the supplied image signal, and supplies the image signal subjected to gradation conversion to the YC conversion unit 257. Then, the YC conversion unit 257 performs YC conversion on the R, G, and B three-channel images by performing matrix processing and band limitation on chroma components, and generates and outputs Y images and C images. Is terminated.

このような処理により、DSPブロック391は、供給されたモザイク画像信号に対して、各種処理を施して、Y画像およびC画像を生成し、CPU223の制御に基づいて、その画像データを表示部220に表示させる場合は、D/Aコンバータ218に、メモリ222に記憶させる場合は、コーデック処理部221に供給することができる。   Through such processing, the DSP block 391 performs various processing on the supplied mosaic image signal to generate a Y image and a C image, and displays the image data on the display unit 220 under the control of the CPU 223. Can be displayed in the D / A converter 218, and can be supplied to the codec processing unit 221 when stored in the memory 222.

以上説明したように、本発明によれば、水平ラインがRGBの3色で構成され、Gが市松配置され、かつRBが斜め方向に配置された、図4に示される色フィルタ配列のカラー固体撮像素子を用いたデジタルスチルカメラ201においては、例えば、静止画像の撮像モードにおいて、方向による解像度のばらつきが少ないために高画質な高解像度画像を得ることができるとともに、間引き後の色配列においても、従来と比較して、R強度信号やB強度信号がより均等に分布されているので、モニタ表示等の撮像モードにおいて、1行ごとに読出し、スキップを繰り返す間引き読み出しを行うことにより、読出しおよび画像処理を高速化することができ、偽色などが抑えられた高品質な低解像度画像を得ることが可能となる。また、水平ラインがRGBの3色で構成され、Gが市松配置され、かつRBが斜め方向に配置され、更に、1行おきに感度が異なるようになされている、図22に示される色フィルタ配列のカラー固体撮像素子を用いたデジタルスチルカメラ201においても、同様に、従来と比較して、偽色などが抑えられた高品質な低解像度画像を得ることが可能となるとともに、撮像された画像の白とびや黒つぶれを防止することが可能となる。このように、本発明を適用したデジタルスチルカメラ201においては、高品質かつ高速な低解像度画像出力、高品質な高解像度画像出力の両方に対応することが可能となる。   As described above, according to the present invention, the color line of the color filter array shown in FIG. 4 in which the horizontal line is composed of three colors of RGB, G is checkered, and RB is diagonally arranged. In the digital still camera 201 using the image pickup device, for example, in the still image pickup mode, since there is little variation in resolution depending on the direction, a high-quality high-resolution image can be obtained, and also in the color arrangement after thinning Since the R intensity signal and the B intensity signal are more evenly distributed as compared with the prior art, reading and skipping are repeated by reading each line and repeating skipping in an imaging mode such as monitor display. Image processing can be speeded up, and it is possible to obtain a high-quality low-resolution image in which false colors and the like are suppressed. Further, the color filter shown in FIG. 22 is configured such that the horizontal line is composed of three colors of RGB, G is a checkered arrangement, RB is arranged in an oblique direction, and the sensitivity is different every other row. Similarly, in the digital still camera 201 using the array of color solid-state imaging devices, it is possible to obtain a high-quality low-resolution image in which false colors and the like are suppressed as compared with the conventional one, and the image is captured. It is possible to prevent overexposure and underexposure of an image. Thus, the digital still camera 201 to which the present invention is applied can cope with both high-quality and high-speed low-resolution image output and high-quality high-resolution image output.

更に、従来のデモザイク技術は、いずれも、本発明を適用した、図7または図36のの粗補間処理部284のようなC1とC2の強度の組を生成する手段を持たないので、色分布が正の相関を有していない場合などにおいて、正しい色強度の推定を行いことはできない。これに対して、本発明を適用したデモザイク処理部253においては、色分布の右下がり、右上がりにかかわらず(すなわち、色間が正の相関を有しているか、不の相関を有しているかにかかわらず)、正しい推定を行うことができるという、顕著な効果を奏することができる。   Further, since none of the conventional demosaic techniques has means for generating a pair of C1 and C2 intensities like the rough interpolation processing unit 284 of FIG. 7 or FIG. For example, in the case where does not have a positive correlation, the correct color intensity cannot be estimated. On the other hand, in the demosaic processing unit 253 to which the present invention is applied, regardless of whether the color distribution is descending to the right or to the right (that is, the color has a positive correlation or an uncorrelated correlation). Whether or not) can make a correct estimation.

更に、本発明では、分散、共分散、相関係数等の、計算コストが大きい統計量計算を簡易な計算に置き換えて近似演算することができるようになされている。本発明で用いるこれらの統計量計算の簡易化は、デモザイク処理における2色間の相関関係推定において妥当な近似値を獲得するのに十分な精度をもっている。   Furthermore, in the present invention, a statistical calculation such as variance, covariance, correlation coefficient, etc., which has a large calculation cost, can be replaced with a simple calculation to perform an approximate calculation. The simplification of these statistic calculations used in the present invention has sufficient accuracy to obtain a reasonable approximate value in estimating the correlation between two colors in demosaic processing.

また、従来は、高域補正やノイズ低減処理を行うためのプロセスまたは回路を別途付加していたが、本発明を用いた場合、高域補正やノイズ低減処理を行うためのプロセスまたは回路を別途付加することなく、デモザイク処理で色を推定して補間すると同時に、高域補正やノイズ低減の効果を得ることができる。したがって、本発明を適用することにより、高域補正やノイズ低減処理などの性能を有する、簡素なカメラシステムを構築することが可能となる。   Conventionally, a process or circuit for performing high-frequency correction and noise reduction processing has been added separately. However, when the present invention is used, a process or circuit for performing high-frequency correction and noise reduction processing is separately provided. Without adding, it is possible to obtain the effects of high-frequency correction and noise reduction at the same time as estimating and interpolating colors by demosaic processing. Therefore, by applying the present invention, it is possible to construct a simple camera system having performances such as high-frequency correction and noise reduction processing.

以上説明した処理においては、3色配列を用いたデジタルスチルカメラ201における画像処理において演算近似が実行される場合について説明したが、動画像を撮像することが可能なデジタルビデオカメラについても、本発明は適用可能である。デジタルビデオカメラに本発明が適用される場合、コーデック処理部221は、例えば、MPEG(Moving Picture Coding Experts Group/Moving Picture Experts Group)などの、デジタル画像データの圧縮または伸張アルゴリズムによる処理を実行する。   In the above-described processing, the case where arithmetic approximation is performed in the image processing in the digital still camera 201 using the three-color array has been described. However, the present invention also applies to a digital video camera that can capture a moving image. Is applicable. When the present invention is applied to a digital video camera, the codec processing unit 221 executes processing by digital image data compression or decompression algorithm such as MPEG (Moving Picture Coding Experts Group / Moving Picture Experts Group).

また、本発明は、撮像素子にCCDイメージセンサを用いたデジタルスチルカメラ201のみならず、撮像素子として、全画素読み出しおよびラインごとの間引き読み出しが可能であり、所定の色配列のモザイク画像を撮像することが可能な撮像素子であれば、例えば、CMOSや、他の画像センサなど、いかなるものが用いられていても適用可能であることはいうまでもない。   In addition to the digital still camera 201 using a CCD image sensor as an image pickup device, the present invention can read out all pixels and perform line-by-line readout as an image pickup device, and picks up a mosaic image with a predetermined color arrangement. Needless to say, any image sensor can be used as long as it can be used, for example, a CMOS or other image sensor.

上述した一連の処理は、ハードウェアにより実行させることもできるが、ソフトウェアにより実行させることもできる。   The series of processes described above can be executed by hardware, but can also be executed by software.

この場合、ソフトウェアをDSPブロック216が実行することにより、上述した機能が実現される。また、例えば、デジタルスチルカメラ201の処理の一部は、図42に示されるようなパーソナルコンピュータ401により実行することが可能となる。   In this case, the above-described functions are realized by executing the software by the DSP block 216. Further, for example, a part of the processing of the digital still camera 201 can be executed by a personal computer 401 as shown in FIG.

図42において、CPU(Central Processing Unit)411は、ROM(Read Only Memory)412に記憶されているプログラム、または記憶部418からRAM(Random Access Memory)413にロードされたプログラムに従って、各種の処理を実行する。RAM413にはまた、CPU411が各種の処理を実行する上において必要なデータなども適宜記憶される。   42, a CPU (Central Processing Unit) 411 performs various processes according to a program stored in a ROM (Read Only Memory) 412 or a program loaded from a storage unit 418 to a RAM (Random Access Memory) 413. Execute. The RAM 413 also appropriately stores data necessary for the CPU 411 to execute various processes.

CPU411、ROM412、およびRAM413は、バス414を介して相互に接続されている。このバス414にはまた、入出力インタフェース415も接続されている。   The CPU 411, ROM 412, and RAM 413 are connected to each other via a bus 414. An input / output interface 415 is also connected to the bus 414.

入出力インタフェース415には、キーボード、マウスなどよりなる入力部416、ディスプレイやスピーカなどよりなる出力部417、ハードディスクなどより構成される記憶部418、モデム、ターミナルアダプタなどより構成される通信部419が接続されている。通信部419は、インターネットを含むネットワークを介しての通信処理を行う。   The input / output interface 415 includes an input unit 416 including a keyboard and a mouse, an output unit 417 including a display and a speaker, a storage unit 418 including a hard disk, and a communication unit 419 including a modem and a terminal adapter. It is connected. The communication unit 419 performs communication processing via a network including the Internet.

入出力インタフェース415にはまた、必要に応じてドライブ420が接続され、磁気ディスク431、光ディスク432、光磁気ディスク433、もしくは、半導体メモリ434などが適宜装着され、それらから読み出されたコンピュータプログラムが、必要に応じて記憶部418にインストールされる。   A drive 420 is connected to the input / output interface 415 as necessary, and a magnetic disk 431, an optical disk 432, a magneto-optical disk 433, a semiconductor memory 434, or the like is appropriately mounted, and a computer program read from these is loaded. The storage unit 418 is installed as necessary.

一連の処理をソフトウェアにより実行させる場合には、そのソフトウェアを構成するプログラムが、専用のハードウェア(例えば、DSPブロック216や、その中に含まれている、デモザイク処理部253)に組み込まれているコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、例えば汎用のパーソナルコンピュータなどに、ネットワークや記録媒体からインストールされる。   When a series of processing is executed by software, a program constituting the software is incorporated in dedicated hardware (for example, the DSP block 216 and the demosaic processing unit 253 included therein). For example, a general-purpose personal computer that can execute various functions by installing a computer or various programs is installed from a network or a recording medium.

この記録媒体は、図42に示されるように、装置本体とは別に、ユーザにプログラムを供給するために配布される、プログラムが記憶されている磁気ディスク431(フロッピディスクを含む)、光ディスク432(CD-ROM(Compact Disk-Read Only Memory),DVD(Digital Versatile Disk)を含む)、光磁気ディスク433(MD(Mini-Disk)(商標)を含む)、もしくは半導体メモリ434などよりなるパッケージメディアにより構成されるだけでなく、装置本体に予め組み込まれた状態でユーザに供給される、プログラムが記憶されているROM412や、記憶部418に含まれるハードディスクなどで構成される。   As shown in FIG. 42, this recording medium is distributed to supply a program to the user separately from the apparatus main body, and includes a magnetic disk 431 (including a floppy disk) on which a program is stored, an optical disk 432 ( CD-ROM (including Compact Disk-Read Only Memory), DVD (including Digital Versatile Disk)), magneto-optical disk 433 (including MD (Mini-Disk) (trademark)), or semiconductor memory 434 or other package media In addition to being configured, it is configured by a ROM 412 in which a program is stored and a hard disk included in the storage unit 418, which is supplied to the user in a state of being pre-installed in the apparatus main body.

なお、本明細書において、記録媒体に記憶されるプログラムを記述するステップは、含む順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的もしくは個別に実行される処理をも含むものである。   In the present specification, the step of describing the program stored in the recording medium is not limited to the processing performed in chronological order in the order in which they are included, but is not necessarily processed in chronological order, either in parallel or individually. The process to be executed is also included.

従来用いられているベイヤー配列と、ベイヤー配列を用いた場合の間引きされたモザイク配列について説明するための図である。It is a figure for demonstrating the mosaic arrangement | sequence thinned out when the Bayer arrangement | sequence used conventionally and a Bayer arrangement | sequence are used. 1行のデータに全ての色の情報を含んでいる色配列のカラーフィルタの配列と、その場合において間引きされたモザイク配列について説明するための図である。It is a figure for demonstrating the arrangement | sequence of the color filter of the color arrangement | sequence which contains the information of all the colors in the data of 1 line, and the mosaic arrangement | sequence thinned out in that case. 本発明を適用したデジタルスチルカメラの構成を示すブロック図である。It is a block diagram which shows the structure of the digital still camera to which this invention is applied. 本発明を適用したデジタルスチルカメラで用いられているカラーフィルタのモザイク配列の第1の例について説明するための図である。It is a figure for demonstrating the 1st example of the mosaic arrangement | sequence of the color filter used with the digital still camera to which this invention is applied. 図4のモザイク配列を間引きした場合のモザイク配列について説明するための図である。It is a figure for demonstrating a mosaic arrangement | sequence at the time of thinning out the mosaic arrangement | sequence of FIG. 図3のDSPブロックの構成を示すブロック図である。It is a block diagram which shows the structure of the DSP block of FIG. 図6のデモザイク処理部の構成を示すブロック図である。It is a block diagram which shows the structure of the demosaic process part of FIG. 図6の信頼度算出部の構成を示すブロック図である。It is a block diagram which shows the structure of the reliability calculation part of FIG. 信頼度算出部における画素強度の抽出位置について説明するための図である。It is a figure for demonstrating the extraction position of the pixel intensity | strength in a reliability calculation part. 信頼度算出部における画素強度の抽出位置について説明するための図である。It is a figure for demonstrating the extraction position of the pixel intensity | strength in a reliability calculation part. 信頼度算出部において高周波成分を抽出するための画素強度の組について説明するための図である。It is a figure for demonstrating the group of the pixel intensity | strength for extracting a high frequency component in a reliability calculation part. 図6の統計量算出部の構成を示すブロック図である。It is a block diagram which shows the structure of the statistic calculation part of FIG. 重み付け係数の例について説明するための図である。It is a figure for demonstrating the example of a weighting coefficient. 重み付け係数の例について説明するための図である。It is a figure for demonstrating the example of a weighting coefficient. 図6の回帰演算処理部の構成を示すブロック図である。It is a block diagram which shows the structure of the regression calculation process part of FIG. 撮像処理について説明するためのフローチャートである。It is a flowchart for demonstrating an imaging process. 図6のDSPブロックが実行する画像処理1についてについて説明するためのフローチャートである。It is a flowchart for demonstrating about the image process 1 which the DSP block of FIG. 6 performs. デモザイク処理1について説明するためのフローチャートである。10 is a flowchart for explaining demosaic processing 1; 粗補間処理1について説明するためのフローチャートである。6 is a flowchart for explaining rough interpolation processing 1; 粗補間処理2について説明するためのフローチャートである。10 is a flowchart for explaining rough interpolation processing 2; 信頼度算出処理について説明するためのフローチャートである。It is a flowchart for demonstrating reliability calculation processing. 2色分布形状の統計量算出処理について説明するためのフローチャートである。It is a flowchart for demonstrating the statistic amount calculation process of 2 color distribution shape. 平均値計算処理1について説明するためのフローチャートである。6 is a flowchart for explaining an average value calculation process 1; 平均値計算処理2について説明するためのフローチャートである。10 is a flowchart for explaining average value calculation processing 2; 分散計算処理1について説明するためのフローチャートである。10 is a flowchart for explaining distributed calculation processing 1; 分散計算処理2について説明するためのフローチャートである。10 is a flowchart for explaining distributed calculation processing 2; 共分散計算処理について説明するためのフローチャートである。It is a flowchart for demonstrating a covariance calculation process. 積算処理1について説明するためのフローチャートである。5 is a flowchart for explaining an integration process 1; 積算処理2について説明するためのフローチャートである。5 is a flowchart for explaining an integration process 2; 積算近似処理1について説明するためのフローチャートである。5 is a flowchart for explaining integration approximation processing 1; 積算近似処理2について説明するためのフローチャートである。10 is a flowchart for explaining integration approximation processing 2; 補間画素推定処理について説明するためのフローチャートである。It is a flowchart for demonstrating an interpolation pixel estimation process. 重み付け平均演算について説明するための図である。It is a figure for demonstrating a weighted average calculation. 本発明を適用したデジタルスチルカメラで用いられているカラーフィルタのモザイク配列の第2の例について説明するための図である。It is a figure for demonstrating the 2nd example of the mosaic arrangement | sequence of the color filter used with the digital still camera to which this invention is applied. 図34のモザイク配列を間引きした場合のモザイク配列について説明するための図である。It is a figure for demonstrating a mosaic arrangement | sequence at the time of thinning out the mosaic arrangement | sequence of FIG. 図6のデモザイク処理部の異なる構成を示すブロック図である。It is a block diagram which shows a different structure of the demosaic process part of FIG. 図36の感度補償部の構成を示すブロック図である。It is a block diagram which shows the structure of the sensitivity compensation part of FIG. デモザイク処理2について説明するためのフローチャートである。10 is a flowchart for explaining demosaic processing 2; 図3のDSPブロックの異なる構成を示すブロック図である。FIG. 4 is a block diagram showing a different configuration of the DSP block of FIG. 3. 図39の水平方向縮小処理部の処理について説明するための図である。It is a figure for demonstrating the process of the horizontal direction reduction process part of FIG. 図39のDSPブロックが実行する画像処理2についてについて説明するためのフローチャートである。It is a flowchart for demonstrating about the image process 2 which the DSP block of FIG. 39 performs. パーソナルコンピュータの構成を示すブロック図である。It is a block diagram which shows the structure of a personal computer.

符号の説明Explanation of symbols

201 デジタルスチルカメラ, 216 DSPブロック, 231モザイク配列, 241 モザイク配列, 242 信号処理用プロセッサ, 253 デモザイク処理部, 254 スイッチ, 255 水平方向縮小処理部, 281 局所領域抽出部, 282 G強度補間処理部, 283 信頼度算出部, 284 粗補間処理部, 285 統計量算出部, 286 回帰演算処理部, 321 高周波抽出部, 322 加算処理部, 323 クリップ処理部, 331 平均値算出部, 332 分散値算出部, 333 平均値算出部, 334 共分散算出部, 351,352 傾き算出部, 353 傾き合成部, 354 画素強度推定部, 361,362 モザイク配列, 375 感度補償部, 391 信号処理用プロセッサ, 398 水平方向縮小処理部   201 Digital Still Camera, 216 DSP Block, 231 Mosaic Array, 241 Mosaic Array, 242 Signal Processing Processor, 253 Demosaic Processor, 254 Switch, 255 Horizontal Reduction Unit, 281 Local Area Extractor, 282 G Intensity Interpolator , 283 reliability calculation unit, 284 coarse interpolation processing unit, 285 statistics calculation unit, 286 regression calculation processing unit, 321 high frequency extraction unit, 322 addition processing unit, 323 clip processing unit, 331 average value calculation unit, 332 variance value calculation Unit, 333 average value calculation unit, 334 covariance calculation unit, 351, 352 inclination calculation unit, 353 inclination combination unit, 354 pixel intensity estimation unit, 361, 362 mosaic arrangement, 375 sensitivity compensation unit, 391 signal processing processor, 39 8 Horizontal reduction processor

Claims (8)

分光感度が異なる3種類のフィルタを有し、複数種類の前記フィルタのうちのいずれかが画素ごとに用いられている画像センサによって得られたモザイク画像信号から、前記フィルタの前記分光感度により決まる3つの色に対応する前記画素位置毎の強度情報が全画素でそろうようなカラー画像を生成する画像処理装置において、
前記画像センサからの信号の読み出しを制御する制御手段と、
前記画像センサによって得られたモザイク画像信号から、前記フィルタの前記分光感度により決まる3種類の色のそれぞれに対応する強度情報が全画素でそろうような3つの単色画像データを生成する生成手段と
を備え、
前記画像センサは、
第1のフィルタが市松状に配置され、
第2のフィルタが斜め方向に連続し、かつ、水平および垂直方向に1画素おきに配置され、
第3のフィルタが斜め方向に連続し、かつ、水平および垂直方向に1画素おきに配置されたフィルタ配列を有し、
前記制御手段は、前記画像センサからの信号の、全画素読み出しおよび間引き読み出しを制御する
ことを特徴とする画像処理装置。
3 types determined by the spectral sensitivity of the filter from a mosaic image signal obtained by an image sensor having three types of filters with different spectral sensitivities, and any one of the plurality of types of filters is used for each pixel. In an image processing apparatus for generating a color image in which intensity information for each pixel position corresponding to one color is aligned with all pixels,
Control means for controlling readout of signals from the image sensor;
Generating means for generating, from a mosaic image signal obtained by the image sensor, three single-color image data in which intensity information corresponding to each of the three types of colors determined by the spectral sensitivity of the filter is aligned in all pixels; ,
The image sensor
The first filter is arranged in a checkered pattern,
The second filter is continuous in an oblique direction and arranged every other pixel in the horizontal and vertical directions;
The third filter has a filter array that is arranged in an oblique direction and arranged every other pixel in the horizontal and vertical directions;
The image processing apparatus, wherein the control unit controls reading of all pixels and thinning-out reading of a signal from the image sensor.
前記制御手段により前記画像センサからの間引き読み出しが制御されたとき、前記間引き読み出しにより得られた前記モザイク画像信号を基に前記生成手段により生成された3つの前記単色画像データを基に、前記単色画像データに対応する水平方向に縮小された単色画像データを生成する生成手段を更に備える
ことを特徴とする請求項1に記載の画像処理装置。
When thinning readout from the image sensor is controlled by the control means, the single color is based on the three monochrome image data generated by the generation means based on the mosaic image signal obtained by the thinning readout. The image processing apparatus according to claim 1, further comprising generating means for generating monochrome image data reduced in the horizontal direction corresponding to the image data.
前記制御手段により前記画像センサからの間引き読み出しが制御されたとき、前記間引き読み出しにより得られた前記モザイク画像信号を基に、前記モザイク画像信号に対応する水平方向に縮小されたモザイク画像信号を生成する生成手段を更に備える
ことを特徴とする請求項1に記載の画像処理装置。
When thinning readout from the image sensor is controlled by the control means, a mosaic image signal reduced in the horizontal direction corresponding to the mosaic image signal is generated based on the mosaic image signal obtained by the thinning readout. The image processing apparatus according to claim 1, further comprising: generating means for performing the processing.
前記制御手段は、前記画像センサからの信号の、1行ごとの読み出しおよびスキップによる前記間引き読み出しを制御する
ことを特徴とする請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the control unit controls reading of the signal from the image sensor for each line and skipping by skipping.
前記画像センサは、少なくとも1水平ラインは同一の感度となるような、複数種類の感度で画像信号を得る
ことを特徴とする請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the image sensor obtains image signals with a plurality of types of sensitivity such that at least one horizontal line has the same sensitivity.
前記制御手段は、前記画像センサからの信号を、前記複数種類の感度がすべてそろうような均一な行数の読み出しおよびスキップによる前記間引き読み出しを制御する
ことを特徴とする請求項5に記載の画像処理装置。
6. The image according to claim 5, wherein the control unit controls reading of the signals from the image sensor with a uniform number of rows in which the plurality of types of sensitivities are all aligned and skipping by skipping. Processing equipment.
分光感度が異なる3種類のフィルタを有し、複数種類の前記フィルタのうちのいずれかが画素ごとに用いられている画像センサによって得られたモザイク画像信号から、前記フィルタの前記分光感度により決まる3つの色に対応する前記画素位置毎の強度情報が全画素でそろうようなカラー画像を生成する画像処理装置の画像処理方法において、
前記画像センサからの信号の読み出しを制御する制御ステップと、
前記画像センサによって得られたモザイク画像信号から、前記フィルタの前記分光感度により決まる3種類の色のそれぞれに対応する強度情報が全画素でそろうような3つの単色画像データを生成する生成ステップと
を含み、
前記画像センサは、
第1のフィルタが市松状に配置され、
第2のフィルタが斜め方向に連続し、かつ、水平および垂直方向に1画素おきに配置され、
第3のフィルタが斜め方向に連続し、かつ、水平および垂直方向に1画素おきに配置されたフィルタ配列を有し、
前記制御ステップの処理では、前記画像センサからの信号の、全画素読み出しおよび間引き読み出しを制御する
ことを特徴とする画像処理方法。
3 types determined by the spectral sensitivity of the filter from a mosaic image signal obtained by an image sensor having three types of filters with different spectral sensitivities, and any one of the plurality of types of filters is used for each pixel. In an image processing method of an image processing apparatus for generating a color image in which intensity information for each pixel position corresponding to one color is aligned in all pixels,
A control step for controlling reading of a signal from the image sensor;
Generating three monochromatic image data in which intensity information corresponding to each of the three types of colors determined by the spectral sensitivity of the filter is aligned in all pixels from the mosaic image signal obtained by the image sensor. ,
The image sensor
The first filter is arranged in a checkered pattern,
The second filter is continuous in an oblique direction and arranged every other pixel in the horizontal and vertical directions;
The third filter has a filter array that is arranged in an oblique direction and arranged every other pixel in the horizontal and vertical directions;
In the process of the control step, all pixel readout and thinning readout of a signal from the image sensor are controlled.
分光感度が異なる3種類のフィルタを有し、複数種類の前記フィルタのうちのいずれかが画素ごとに用いられている画像センサによって得られたモザイク画像信号から、前記フィルタの前記分光感度により決まる3つの色に対応する前記画素位置毎の強度情報が全画素でそろうようなカラー画像を生成する処理をコンピュータに実行させるためのプログラムであって、
前記画像センサからの信号の読み出しを制御する制御ステップと、
前記画像センサによって得られたモザイク画像信号から、前記フィルタの前記分光感度により決まる3種類の色のそれぞれに対応する強度情報が全画素でそろうような3つの単色画像データを生成する生成ステップと
を含み、
前記画像センサは、
第1のフィルタが市松状に配置され、
第2のフィルタが斜め方向に連続し、かつ、水平および垂直方向に1画素おきに配置され、
第3のフィルタが斜め方向に連続し、かつ、水平および垂直方向に1画素おきに配置されたフィルタ配列を有し、
前記制御ステップの処理では、前記画像センサからの信号の、全画素読み出しおよび間引き読み出しを制御する
ことを特徴とするプログラム。
3 types determined by the spectral sensitivity of the filter from a mosaic image signal obtained by an image sensor having three types of filters with different spectral sensitivities, and any one of the plurality of types of filters is used for each pixel. A program for causing a computer to execute a process of generating a color image in which intensity information for each pixel position corresponding to one color is aligned in all pixels,
A control step for controlling reading of a signal from the image sensor;
Generating three monochromatic image data in which intensity information corresponding to each of the three types of colors determined by the spectral sensitivity of the filter is aligned in all pixels from the mosaic image signal obtained by the image sensor. ,
The image sensor
The first filter is arranged in a checkered pattern,
The second filter is continuous in an oblique direction and arranged every other pixel in the horizontal and vertical directions;
The third filter has a filter array that is arranged in an oblique direction and arranged every other pixel in the horizontal and vertical directions;
In the process of the control step, all pixel readout and thinning readout of a signal from the image sensor are controlled.
JP2004012176A 2004-01-20 2004-01-20 Image processing apparatus, image processing method, and program Expired - Fee Related JP4556102B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004012176A JP4556102B2 (en) 2004-01-20 2004-01-20 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004012176A JP4556102B2 (en) 2004-01-20 2004-01-20 Image processing apparatus, image processing method, and program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2010118707A Division JP5131567B2 (en) 2010-05-24 2010-05-24 Image processing apparatus, image processing method, program, and recording medium

Publications (2)

Publication Number Publication Date
JP2005210218A true JP2005210218A (en) 2005-08-04
JP4556102B2 JP4556102B2 (en) 2010-10-06

Family

ID=34898635

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004012176A Expired - Fee Related JP4556102B2 (en) 2004-01-20 2004-01-20 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP4556102B2 (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007228261A (en) * 2006-02-23 2007-09-06 Fujifilm Corp Solid-state imaging element
JP2007228262A (en) * 2006-02-23 2007-09-06 Fujifilm Corp Solid-state imaging element
JP2008042482A (en) * 2006-08-04 2008-02-21 Sony Corp Color filter, image processing apparatus and image processing method, imaging apparatus and imaging method, program, and recording medium
JP2010239337A (en) * 2009-03-31 2010-10-21 Sony Corp Solid-state imaging apparatus, signal processing method of the same and imaging apparatus
WO2013100097A1 (en) * 2011-12-27 2013-07-04 富士フイルム株式会社 Imaging device, control method for imaging device, and control program
US8599291B2 (en) 2009-10-14 2013-12-03 Samsung Electronics Co., Ltd. Color filter array, image sensor having the same, and signal interpolating method
CN104349146A (en) * 2013-07-29 2015-02-11 索尼公司 Solid-state imaging device, driving method for the same, and electronic apparatus
EP2800378A4 (en) * 2011-12-27 2015-06-17 Fujifilm Corp Color imaging element
KR20160138885A (en) 2015-05-26 2016-12-06 한화테크윈 주식회사 Image processing apparatus, image processing method, and photographing apparatus
KR20160148438A (en) 2015-06-16 2016-12-26 한화테크윈 주식회사 Image processing apparatus, image processing method, and photographing apparatus
CN116485786A (en) * 2023-06-15 2023-07-25 贵州医科大学附属医院 Intelligent analysis method for endocrine test paper

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0984033A (en) * 1995-09-13 1997-03-28 Sony Corp Image pickup device and processing method for result of image pickup
JP2000224604A (en) * 1999-01-29 2000-08-11 Fuji Photo Film Co Ltd Image processor
JP2003224853A (en) * 2003-02-06 2003-08-08 Nec Corp Moving picture encoding method and system, and moving picture decoding method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0984033A (en) * 1995-09-13 1997-03-28 Sony Corp Image pickup device and processing method for result of image pickup
JP2000224604A (en) * 1999-01-29 2000-08-11 Fuji Photo Film Co Ltd Image processor
JP2003224853A (en) * 2003-02-06 2003-08-08 Nec Corp Moving picture encoding method and system, and moving picture decoding method and system

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007228262A (en) * 2006-02-23 2007-09-06 Fujifilm Corp Solid-state imaging element
JP4613137B2 (en) * 2006-02-23 2011-01-12 富士フイルム株式会社 Solid-state image sensor
JP4667268B2 (en) * 2006-02-23 2011-04-06 富士フイルム株式会社 Solid-state image sensor
JP2007228261A (en) * 2006-02-23 2007-09-06 Fujifilm Corp Solid-state imaging element
JP2008042482A (en) * 2006-08-04 2008-02-21 Sony Corp Color filter, image processing apparatus and image processing method, imaging apparatus and imaging method, program, and recording medium
JP2010239337A (en) * 2009-03-31 2010-10-21 Sony Corp Solid-state imaging apparatus, signal processing method of the same and imaging apparatus
US8599291B2 (en) 2009-10-14 2013-12-03 Samsung Electronics Co., Ltd. Color filter array, image sensor having the same, and signal interpolating method
CN104025576A (en) * 2011-12-27 2014-09-03 富士胶片株式会社 Imaging device, control method for imaging device, and control program
WO2013100097A1 (en) * 2011-12-27 2013-07-04 富士フイルム株式会社 Imaging device, control method for imaging device, and control program
JP5624228B2 (en) * 2011-12-27 2014-11-12 富士フイルム株式会社 IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND CONTROL PROGRAM
EP2800378A4 (en) * 2011-12-27 2015-06-17 Fujifilm Corp Color imaging element
EP2800374A4 (en) * 2011-12-27 2015-10-14 Fujifilm Corp Imaging device, control method for imaging device, and control program
CN104349146A (en) * 2013-07-29 2015-02-11 索尼公司 Solid-state imaging device, driving method for the same, and electronic apparatus
US9317897B2 (en) 2013-07-29 2016-04-19 Sony Corporation Solid-state imaging device, driving method for the same, and electronic apparatus
KR20160138885A (en) 2015-05-26 2016-12-06 한화테크윈 주식회사 Image processing apparatus, image processing method, and photographing apparatus
KR20160148438A (en) 2015-06-16 2016-12-26 한화테크윈 주식회사 Image processing apparatus, image processing method, and photographing apparatus
CN116485786A (en) * 2023-06-15 2023-07-25 贵州医科大学附属医院 Intelligent analysis method for endocrine test paper
CN116485786B (en) * 2023-06-15 2023-09-01 贵州医科大学附属医院 Intelligent analysis method for endocrine test paper

Also Published As

Publication number Publication date
JP4556102B2 (en) 2010-10-06

Similar Documents

Publication Publication Date Title
JP4385282B2 (en) Image processing apparatus and image processing method
JP5007767B2 (en) Image processing apparatus and method
JP4228699B2 (en) Imaging device and imaging device
KR101081000B1 (en) Image processing apparatus and image processing method, and recording medium
JP5016715B2 (en) Multi-exposure pattern to improve image dynamic range
JP4351825B2 (en) How to collect color digital images
JP2004221839A (en) Apparatus and method for image processing, recording medium, and program
KR20090087811A (en) Imaging device, image processing device, image processing method, program for image processing method, and recording medium having program for image processing method recorded thereon
WO2002056602A1 (en) Image processing device
JP2004221838A (en) Apparatus and method for image processing, recording medium, and program
JP5513978B2 (en) Imaging apparatus, integrated circuit, and image processing method
JP4556102B2 (en) Image processing apparatus, image processing method, and program
JP5131567B2 (en) Image processing apparatus, image processing method, program, and recording medium
JP4449696B2 (en) Image processing apparatus, image processing method, and program
JP2005117540A (en) Apparatus and method for image processing, program
JP4501070B2 (en) Image processing apparatus, image processing method, and program
JP2003134523A (en) Image pickup apparatus and method
JP2004172859A (en) Imaging unit and imaging method
JP3965556B2 (en) Image processing apparatus and method, recording medium, and program
JP4325251B2 (en) Image processing apparatus and method, recording medium, and program
JP2004172858A (en) Imaging apparatus and imaging method
JP4352328B2 (en) Information processing apparatus, information processing method, and program
Lee et al. A cost-effective demosaicked image enhancement for a single chip CMOS image sensor
Lukac et al. Bayer pattern demosaicking using local-correlation approach

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070117

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090625

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090702

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090828

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100325

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100524

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100707

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

Free format text: PAYMENT UNTIL: 20130730

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees