JP4613510B2 - Image processing method and apparatus, and program - Google Patents

Image processing method and apparatus, and program Download PDF

Info

Publication number
JP4613510B2
JP4613510B2 JP2004122523A JP2004122523A JP4613510B2 JP 4613510 B2 JP4613510 B2 JP 4613510B2 JP 2004122523 A JP2004122523 A JP 2004122523A JP 2004122523 A JP2004122523 A JP 2004122523A JP 4613510 B2 JP4613510 B2 JP 4613510B2
Authority
JP
Japan
Prior art keywords
image
pixel
pixel value
value
true
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2004122523A
Other languages
Japanese (ja)
Other versions
JP2005038396A (en
Inventor
光晴 大木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2004122523A priority Critical patent/JP4613510B2/en
Publication of JP2005038396A publication Critical patent/JP2005038396A/en
Application granted granted Critical
Publication of JP4613510B2 publication Critical patent/JP4613510B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Description

本発明は、画像処理方法および装置、並びにプログラムに関し、特に、例えば、単板センサを採用した撮像装置において、より鮮明な画像を得ることができるようにする画像処理方法および装置、並びにプログラムに関する。   The present invention relates to an image processing method, apparatus, and program, and more particularly, to an image processing method, apparatus, and program that enable a clearer image to be obtained, for example, in an imaging apparatus that employs a single plate sensor.

近年、カメラとしてはデジタルカメラが一般的となっている。デジタルカメラにおいて、CCD(Charge Coupled Device)やCMOS(Complementary Mental Oxide Semiconductor)等の撮像素子により撮像された画像(以下、撮像画像と称する)は、デジタルカメラに設けられたLCD(Liquid Crystal Display)などのモニタに表示され、ユーザにより確認される。さらに、撮像画像の画像信号がデジタル化され、フラッシュメモリなどの記録媒体を介して、あるいは、ケーブル接続や赤外線通信などの有線または無線通信により、例えば、パーソナルコンピュータ(PC)などの画像処理装置に転送される。そして、転送先であるパーソナルコンピュータでは、デジタルカメラの撮像画像をCRT(Cathode Ray Tube)や液晶ディスプレイ(LCD)などのモニタに表示し、ユーザは撮像画像を確認したり、編集することができる。   In recent years, digital cameras have become common as cameras. In a digital camera, an image captured by an image sensor such as a CCD (Charge Coupled Device) or CMOS (Complementary Mental Oxide Semiconductor) (hereinafter referred to as a captured image) is an LCD (Liquid Crystal Display) provided in the digital camera, etc. Displayed on the monitor and confirmed by the user. In addition, the image signal of the captured image is digitized and is transmitted to an image processing apparatus such as a personal computer (PC) via a recording medium such as a flash memory or by wired or wireless communication such as cable connection or infrared communication. Transferred. In the personal computer that is the transfer destination, the captured image of the digital camera is displayed on a monitor such as a CRT (Cathode Ray Tube) or a liquid crystal display (LCD), and the user can confirm or edit the captured image.

さて、デジタルカメラにおいて、例えば、日陰などの十分に太陽光線が当たらない場所や薄暗い部屋などで、十分な明るさが得られない被写体を撮像する場合、デジタルカメラでは、適正な露出を得るためにシャッタ速度を遅くする必要がある(シャッタ時間が長くなる)。   In digital cameras, for example, when shooting a subject that does not have sufficient brightness, such as in a shaded place or in a dimly lit room, the digital camera must have a proper exposure. It is necessary to reduce the shutter speed (shutter time becomes longer).

このようなシャッタ時間の長い撮像では、デジタルカメラを三脚などに固定し、デジタルカメラがブレない(揺れない)ようにすればよい。しかしながら、例えば、デジタルカメラを手で持って撮像し、デジタルカメラがブレた場合(いわゆる、手ブレが発生した場合)、シャッタが開いている間(シャッタ時間)のデジタルカメラのブレ(揺れ)により、撮像画像は、被写体がボケた画像となってしまう。このボケた画像は、「手ブレ」した画像、または、「カメラブレ」した画像などと呼ばれる。   In such imaging with a long shutter time, the digital camera may be fixed on a tripod or the like so that the digital camera does not shake (shake). However, for example, when a digital camera is picked up by a hand and the digital camera shakes (so-called camera shake), the digital camera shakes (shakes) while the shutter is open (shutter time). The captured image is a blurred image of the subject. This blurred image is called an “hand shake” image or an “camera shake” image.

シャッタ速度を遅くする(シャッタ時間を長くする)他に、十分な露出を得るための方法として、複数枚の撮像画像を単に累積加算することにより、長時間露出と同等の露出を得られるようにする方法が提案されている(例えば、特許文献1参照)。   Besides slowing down the shutter speed (increasing the shutter time), as a method for obtaining sufficient exposure, it is possible to obtain exposure equivalent to long-time exposure by simply accumulating a plurality of captured images. A method has been proposed (see, for example, Patent Document 1).

しかしながら、特許文献1に示される方法では、単純に複数枚の撮像画像を累積加算するため、上述の手ブレが発生した場合には、シャッタ時間を長くする場合と同様に、ボケた画像となる。   However, in the method disclosed in Patent Document 1, since a plurality of captured images are simply cumulatively added, if the above-described camera shake occurs, the image becomes blurred as in the case where the shutter time is increased. .

手ブレが発生した場合においても画像がボケないようにする(「手ブレ」した画像を回避する)方法として、例えば、キャノン株式会社製のデジタルカメラで採用されている「イメージスタビライザー(略称IS)」と称する方法がある。   As a method for preventing blurring of images even when camera shake occurs (to avoid “camera shake” images), for example, “Image Stabilizer (abbreviated as IS)” used in digital cameras manufactured by Canon Inc. There is a method called "."

イメージスタビライザーでは、光学系レンズ内にプレセンサを設け、そのプレセンサによりデジタルカメラの揺れや振動を検知し、検知したデジタルカメラの揺れや振動を表すデジタル信号に従って、レンズ群の一部(補正光学系)を光軸に対し垂直方向に移動させ、像ブレを打ち消す方向に光線を屈折させる。   In the image stabilizer, a pre-sensor is provided in the optical system lens, and the pre-sensor detects the shake and vibration of the digital camera, and a part of the lens group (correction optical system) according to the digital signal representing the detected shake and vibration of the digital camera. Is moved in a direction perpendicular to the optical axis, and the light beam is refracted in a direction to cancel the image blur.

イメージスタビライザーによれば、長焦点やシャッタ速度が遅くなる場合において影響が大となる、手持ち撮影や、風などによる撮影台の微妙な振動の揺れに起因する画像のブレを抑え、シャープな(鮮明な)画像をユーザに提供することができる。   The image stabilizer suppresses image blurring caused by hand-held shooting or subtle vibrations of the camera platform caused by wind, which has a large effect when long focus or shutter speed is slow, and sharp (clear) A) image can be provided to the user.

しかしながら、イメージスタビライザーでは、ブレを検知する専用のセンサや、レンズ群の一部(補正光学系)を高速に動かす機構が必要となるため、構造が複雑になり、製造コストが高くなるという問題がある。   However, the image stabilizer requires a dedicated sensor for detecting blur and a mechanism for moving a part of the lens group (correction optical system) at high speed, which complicates the structure and increases the manufacturing cost. is there.

その他の「カメラブレ」した画像を回避する方法としては、高速シャッタにより連続で複数枚撮像し、撮像された複数枚の画像のうち、2枚目以降の撮像画像について1枚目の撮像画像とのズレ量を検出し、そのズレ量だけ2枚目以降の撮像画像を補正して1枚目の画像に順次加算する方法がある(例えば、特許文献2,3,4,5,6,7,8参照)。これら従来の方法では、基本的に、2枚目以降の撮像画像のそれぞれから、所定の補正または補間により、1枚目の撮像画像と同様のデータ配列を持つ補正画像が形成され、それらを、1枚目の撮像画像に、画素単位で、単純加算または線形加算する方式が採用されている。   As another method for avoiding “camera-blurred” images, a plurality of images are continuously captured by a high-speed shutter, and the second and subsequent captured images are compared with the first captured image among the captured images. There is a method of detecting a shift amount, correcting the second and subsequent captured images by the shift amount, and sequentially adding to the first image (for example, Patent Documents 2, 3, 4, 5, 6, 7, 8). In these conventional methods, basically, a corrected image having the same data arrangement as that of the first captured image is formed from each of the second and subsequent captured images by predetermined correction or interpolation. A simple addition method or a linear addition method is adopted for the first captured image in units of pixels.

この方法では、高速(連続)撮像された画像の一枚一枚は、シャッタ時間(露出時間)が短いため、ブレの小さい暗い画像となる。そして、1枚目の撮像画像に2枚目以降の撮像画像を加算するため、加算して得られる最終的な画像は、適正露出と同一の明るさの画像とすることができる。   In this method, each image captured at high speed (continuous) has a short shutter time (exposure time), and thus becomes a dark image with little blur. Since the second and subsequent captured images are added to the first captured image, the final image obtained by the addition can be an image having the same brightness as the appropriate exposure.

この方法は、2枚目以降の撮像画像について1枚目の撮像画像とのズレ量を検出し、そのズレ量だけ撮像画像を補正(補間)する際、1画素のR(Red)信号(赤色データ)、G(Green)信号(緑色データ)、B(Blue)信号(青色データ)のそれぞれの色信号(データ)を、線形補間、バイキュービック補間などの各種の補間関数を用いた補間方法により補間(補正)するものである。   This method detects the amount of deviation of the second and subsequent captured images from the first captured image, and corrects (interpolates) the captured image by the amount of displacement, so that an R (Red) signal (red) of one pixel is detected. Data), G (Green) signal (green data), and B (Blue) signal (blue data) with each interpolation method using various interpolation functions such as linear interpolation and bicubic interpolation. Interpolate (correct).

特開平05−236422号公報JP 05-236422 A 特開2000−217032号公報JP 2000-217032 A 特開2000−224460号公報JP 2000-224460 A 特開2000−244803号公報JP 2000-244803 A 特開2000−244797号公報JP 2000-244797 A 特開2000−069352号公報JP 2000-066952 A 特開平10−341367号公報Japanese Patent Laid-Open No. 10-341367 特開平09−261526号公報JP 09-261526 A

しかしながら、撮像素子として単板センサが採用されている撮像装置の場合、1画素からR信号、G信号、B信号のうちのいずれか1つの色信号しか出力されない。従って、上述したような各種の補間方法では、複数枚の画像のズレ量を補間することができず、また、単板センサの場合に適用可能なその他の補間方法も提案されていない。   However, in the case of an imaging apparatus in which a single-plate sensor is employed as the imaging element, only one color signal from the R signal, G signal, and B signal is output from one pixel. Therefore, with the various interpolation methods as described above, it is not possible to interpolate the shift amounts of a plurality of images, and no other interpolation method applicable to a single plate sensor has been proposed.

本発明は、このような状況に鑑みてなされたものであり、例えば、単板センサを採用した撮像装置において、カメラブレが発生している場合においても、より鮮明な画像を得ることができるようにするものである。   The present invention has been made in view of such a situation. For example, in an imaging apparatus employing a single plate sensor, a clearer image can be obtained even when camera shake occurs. To do.

本発明の画像処理方法は、1画素につき1個の色信号の画素値を有する画像を撮像する撮像手段が撮像した複数の入力画像のうちの所定の1枚の入力画像を基準画像として、複数の入力画像どうしの位置関係を検出する検出ステップと、R,G,Bの各色について、基準画像の各画素の画素中心を注目位置として、注目位置について、注目位置の真の色の光量と、基準画像以外の各入力画像を基準画像系上の位置に補正したとき注目位置の周辺で観測される基準画像以外の各入力画像の画素値である観測画素値との関係を、自然長がゼロで、観測画素値と注目位置の真の色の光量とが等価であることの確からしさをバネ定数とするバネモデルのバネ関係式として生成し、解くことにより、1画素につきR,G,Bの3個の色信号の画素値を有する出力画像を推定する画像推定ステップとを含むことを特徴とする。 The image processing method of the present invention uses a predetermined one input image among a plurality of input images captured by an imaging unit that captures an image having a pixel value of one color signal per pixel as a reference image. A detection step for detecting a positional relationship between the input images of the reference image; for each color of R, G, and B, with the pixel center of each pixel of the reference image as the target position; When each input image other than the reference image is corrected to a position on the reference image system, the natural length is zero in relation to the observed pixel value that is the pixel value of each input image other than the reference image observed around the target position. Thus, by generating and solving as a spring relational expression of a spring model with the probability that the observed pixel value is equivalent to the true color light quantity at the target position as a spring constant , R, G, B per pixel the pixel values of the three color signals Characterized in that it comprises an image estimation step of estimating the output image.

画像推定ステップには、注目位置の周辺の観測画素値のうち、予め設定された所定個数の観測画素値のみを用いて、バネモデルのバネ関係式を生成し、解くことにより、出力画像を推定させることができる。 In the image estimation step, an output image is estimated by generating and solving a spring relational expression of a spring model using only a predetermined number of observation pixel values set in advance among the observation pixel values around the target position . be able to.

画像推定ステップには、注目位置の周辺の観測画素値すべての平均値を求め、その平均値に近い順に所定個数の観測画素値のみを用いて、バネモデルのバネ関係式を生成し、解くことにより、出力画像を推定させることができる。 In the image estimation step, an average value of all the observed pixel values around the target position is obtained, and a spring relational expression of the spring model is generated and solved using only a predetermined number of observed pixel values in order from the average value. The output image can be estimated.

画像推定ステップには、注目位置の周辺の観測画素値のうち、注目位置との距離が短い順に所定個数の画素値のみを用いて、バネモデルのバネ関係式を生成し、解くことにより、出力画像を推定させることができる。 In the image estimation step , a spring relational expression of the spring model is generated and solved using only a predetermined number of pixel values in order from the shortest distance to the target position among the observed pixel values around the target position. Can be estimated .

画像推定ステップには、注目位置周辺にエッジ部分があるかを検出し、エッジ部分であると検出された位置の観測画素値を除いたバネモデルのバネ関係式を生成し、解くことにより、出力画像を推定させることができる。 In the image estimation step, it is detected whether there is an edge part around the target position, and a spring relational expression of the spring model excluding the observed pixel value at the position detected as the edge part is generated and solved to obtain an output image. Can be estimated .

画像推定ステップには、注目位置周辺にエッジ部分があるかを検出させ、エッジ部分であると検出された位置の観測画素値を、所定の画素値に変更したバネモデルのバネ関係式を生成し、解くことにより、出力画像を推定させることができる。 In the image estimation step, it is detected whether there is an edge part around the position of interest, and the spring relational expression of the spring model is generated by changing the observed pixel value of the position detected as the edge part to a predetermined pixel value, By solving, the output image can be estimated .

画像推定ステップには、所定の画素値として、エッジ部分の傾きを有し、エッジ部分の観測画素値を通る平面の、注目位置上の画素値に変更させることができる。 In the image estimation step, the predetermined pixel value can be changed to a pixel value on the target position on a plane having the inclination of the edge portion and passing through the observed pixel value of the edge portion .

画像推定ステップには、「縦方向のエッジ」、「横方向のエッジ」、「左上から右下方向のエッジ」、および「右上から左下方向のエッジ」の4つの方向の少なくとも1つについて、エッジ部分の有無を検出させることができる。 The image estimation step includes edges in at least one of the four directions of “vertical edge”, “lateral edge”, “upper left to lower right edge”, and “upper right to lower left edge”. The presence or absence of a part can be detected .

画像推定ステップには、バネ関係式の他に、GとR、GとB、及びRとBのうちの少なくとも2つについて、色の相関があることを条件として付加し、解くことにより、出力画像を推定させることができる。 In the image estimation step, in addition to the spring relational expression, at least two of G and R, G and B, and R and B are added on the condition that there is a color correlation and output by solving. An image can be estimated .

画像推定ステップには、GとR、GとB、またはRとBの2色の色相関の条件として、注目位置を中心とする近傍領域において、基準画像上の位置が所定の許容値以内である2色の観測画素値を求め、主成分分析を行い、主成分と直交する成分についての分散を求め、分散が小さいほどバネ定数が大きくなるような条件を付加させることができる。 In the image estimation step, the position on the reference image is within a predetermined allowable value in the vicinity region centered on the target position as a condition of color correlation between G and R, G and B, or R and B. It is possible to obtain observed pixel values of certain two colors, perform principal component analysis, obtain variances for components orthogonal to the principal components, and add conditions such that the smaller the variance, the greater the spring constant .

注目位置の真の色の光量は、注目位置と観測画素値の距離に応じた重みの重み付け加算として表され、重みは、注目位置(I’,J')、観測画素値の基準画像系上の位置(x,y)、キュービック関数Cubicを用いて、Cubic(I’−x)×Cubic(J’−y)により計算されるようにすることができる。 The light amount of the true color at the target position is expressed as a weighted addition according to the distance between the target position and the observed pixel value, and the weight is the target position (I ′, J ′) on the reference image system of the observed pixel value. Using the cubic function Cubic, the position (x, y) of Cubic (I′−x) × Cubic (J′−y) can be calculated .

画像推定ステップには、ΣCubic(I’−x)×Cubic(J’−y)が所定の閾値以上であるかを判定し、所定の閾値以上ではないと判定された場合には、注目位置の画素の周辺の周辺画素の画素値も用いて、注目位置の画素値を推定させることができる。 In the image estimation step, it is determined whether ΣCubic (I′−x) × Cubic (J′−y) is equal to or greater than a predetermined threshold value. The pixel value of the target position can also be estimated using the pixel values of peripheral pixels around the pixel .

検出ステップには、複数の入力画像が撮像された時間の、中間の時刻またはその近傍の時刻に撮像された入力画像を基準画像として、複数の入力画像どうしの位置関係を検出させることができる。In the detection step, the positional relationship between the plurality of input images can be detected using the input image captured at an intermediate time or a time in the vicinity of the time when the plurality of input images are captured as a reference image.

撮像手段には、複数の入力画像を、適正露出未満で撮像させ、複数の入力画像それぞれの画素値のゲインアップを行う露出補正ステップをさらに含むことができる。The imaging unit may further include an exposure correction step of capturing a plurality of input images with less than proper exposure and increasing the gain of each pixel value of the plurality of input images.

本発明の画像処理装置は、1画素につき1個の色信号の画素値を有する複数の入力画像を撮像する撮像手段と、複数の入力画像のうちの所定の1枚の入力画像を基準画像として、複数の入力画像どうしの位置関係を検出する検出手段と、R,G,Bの各色について、基準画像の各画素の画素中心を注目位置として、注目位置について、注目位置の真の色の光量と、基準画像以外の各入力画像を基準画像系上の位置に補正したとき注目位置の周辺で観測される基準画像以外の各入力画像の画素値である観測画素値との関係を、自然長がゼロで、観測画素値と注目位置の真の色の光量とが等価であることの確からしさをバネ定数とするバネモデルのバネ関係式として生成し、解くことにより、1画素につきR,G,Bの3個の色信号の画素値を有する出力画像を推定する画像推定手段とを備えることを特徴とする。An image processing apparatus according to the present invention includes an imaging unit that captures a plurality of input images having a pixel value of one color signal per pixel, and a predetermined one input image among the plurality of input images as a reference image. Detecting means for detecting a positional relationship among a plurality of input images, and for each of R, G, and B colors, with the pixel center of each pixel of the reference image as a target position, the light amount of the true color at the target position with respect to the target position And the observed pixel value of each input image other than the reference image observed around the target position when each input image other than the reference image is corrected to a position on the reference image system. Is generated as a spring relational expression of a spring model in which the probability that the observed pixel value and the true color light quantity at the target position are equivalent is equivalent to a spring constant, and R, G, Have pixel values of 3 color signals of B Characterized in that it comprises an image estimating means for estimating an output image that.

本発明のプログラムは、コンピュータに、1画素につき1個の色信号の画素値を有する画像を撮像する撮像手段が撮像した複数の入力画像のうちの所定の1枚の入力画像を基準画像として、複数の入力画像どうしの位置関係を検出する検出ステップと、R,G,Bの各色について、基準画像の各画素の画素中心を注目位置として、注目位置について、注目位置の真の色の光量と、基準画像以外の各入力画像を基準画像系上の位置に補正したとき注目位置の周辺で観測される基準画像以外の各入力画像の画素値である観測画素値との関係を、自然長がゼロで、観測画素値と注目位置の真の色の光量とが等価であることの確からしさをバネ定数とするバネモデルのバネ関係式として生成し、解くことにより、1画素につきR,G,Bの3個の色信号の画素値を有する出力画像を推定する画像推定ステップとを含む処理を実行させることを特徴とする。The program of the present invention uses, as a reference image, a predetermined one input image among a plurality of input images captured by an image capturing unit that captures an image having a pixel value of one color signal per pixel. A detection step for detecting a positional relationship between a plurality of input images, and for each color of R, G, and B, with the pixel center of each pixel of the reference image as the target position, the true color light quantity at the target position with respect to the target position When the input image other than the reference image is corrected to a position on the reference image system, the natural length is related to the observed pixel value that is the pixel value of each input image other than the reference image observed around the target position. It is generated as a spring relational expression of a spring model with the probability that the observed pixel value and the true color light quantity at the target position are equivalent to zero, and is solved by solving, and R, G, B per pixel The three colors of Characterized in that to execute a process including the image estimation step of estimating the output image having the pixel value.

本発明においては、1画素につき1個の色信号の画素値を有する画像を撮像する撮像手段が撮像した複数の入力画像のうちの所定の1枚の入力画像を基準画像として、複数の入力画像どうしの位置関係が検出され、R,G,Bの各色について、基準画像の各画素の画素中心を注目位置として、注目位置について、注目位置の真の色の光量と、基準画像以外の各入力画像を基準画像系上の位置に補正したとき注目位置の周辺で観測される基準画像以外の各入力画像の画素値である観測画素値との関係が、自然長がゼロで、観測画素値と注目位置の真の色の光量とが等価であることの確からしさをバネ定数とするバネモデルのバネ関係式として生成され、解かれることにより、1画素につきR,G,Bの3個の色信号の画素値を有する出力画像が推定される。In the present invention, a plurality of input images with a predetermined one input image among a plurality of input images captured by an imaging unit that captures an image having a pixel value of one color signal per pixel as a reference image. The positional relationship between the colors is detected, and for each color of R, G, and B, the pixel center of each pixel of the reference image is set as the target position, and the true color light quantity at the target position and each input other than the reference image for the target position. When the image is corrected to a position on the reference image system, the relationship between the observed pixel value of each input image other than the reference image observed around the position of interest is zero, the natural length is zero, The three color signals R, G, and B per pixel are generated and solved as a spring relational expression of a spring model with the probability that the true color light quantity at the target position is equivalent to the spring constant. An output image having a pixel value of It is constant.

画像処理装置は、独立した装置であっても良いし、1つの装置の画像処理を行うブロックであっても良い。   The image processing apparatus may be an independent apparatus or a block that performs image processing of one apparatus.

本発明によれば、より鮮明な画像を得ることができる。   According to the present invention, a clearer image can be obtained.

以下に本発明の実施の形態を説明するが、出願当初の請求項に記載の構成要件と、発明の実施の形態における具体例との対応関係を例示すると、次のようになる。この記載は、出願当初の請求項に記載されている発明をサポートする具体例が、発明の実施の形態に記載されていることを確認するためのものである。従って、発明の実施の形態中には記載されているが、構成要件に対応するものとして、ここには記載されていない具体例があったとしても、そのことは、その具体例が、その構成要件に対応するものではないことを意味するものではない。逆に、具体例が構成要件に対応するものとしてここに記載されていたとしても、そのことは、その具体例が、その構成要件以外の構成要件には対応しないものであることを意味するものでもない。   Embodiments of the present invention will be described below. Correspondences between constituent elements described in the claims at the beginning of the application and specific examples in the embodiments of the present invention are exemplified as follows. This description is for confirming that a specific example supporting the invention described in the claims at the beginning of the application is described in the embodiment of the invention. Therefore, even if there are specific examples that are described in the embodiment of the invention but are not described here as corresponding to the configuration requirements, the specific examples are not included in the configuration. It does not mean that it does not correspond to a requirement. On the contrary, even if a specific example is described here as corresponding to a configuration requirement, this means that the specific example does not correspond to a configuration requirement other than the configuration requirement. not.

さらに、この記載は、発明の実施の形態に記載されている具体例に対応する発明が、出願当初の請求項に全て記載されていることを意味するものではない。換言すれば、この記載は、発明の実施の形態に記載されている具体例に対応する発明であって、この出願の出願当初の請求項には記載されていない発明の存在、すなわち、将来、分割出願されたり、補正により追加される発明の存在を否定するものではない。   Further, this description does not mean that the inventions corresponding to the specific examples described in the embodiments of the invention are all described in the claims at the beginning of the application. In other words, this description is an invention corresponding to the specific example described in the embodiment of the invention, and is the existence of an invention that is not described in the claims at the time of filing of this application, that is, in the future, It does not deny the existence of an invention that has been filed for division or added by amendment.

請求項1に記載の画像処理方法は、複数の入力画像から出力画像を推定する画像処理方法において、1画素につき1個の色信号の画素値を有する画像を撮像する撮像手段が撮像した複数の入力画像のうちの所定の1枚の入力画像を基準画像として、複数の入力画像どうしの位置関係を検出する検出ステップ(例えば、図2のステップS3)と、R,G,Bの各色について、基準画像の各画素の画素中心を注目位置として、注目位置について、注目位置の真の色の光量と、基準画像以外の各入力画像を基準画像系上の位置に補正したとき注目位置の周辺で観測される基準画像以外の各入力画像の画素値である観測画素値との関係を、自然長がゼロで、観測画素値と注目位置の真の色の光量とが等価であることの確からしさをバネ定数とするバネモデルのバネ関係式として生成し、解くことにより、1画素につきR,G,Bの3個の色信号の画素値を有する出力画像を推定する画像推定ステップ(例えば、図2のステップS4)とを含むことを特徴とする。 The image processing method according to claim 1 is an image processing method for estimating an output image from a plurality of input images, and a plurality of images captured by an imaging unit that captures an image having a pixel value of one color signal per pixel . A detection step (for example, step S3 in FIG. 2) for detecting a positional relationship between a plurality of input images using a predetermined one of the input images as a reference image, and for each of R, G, and B colors, With the pixel center of each pixel of the reference image as the target position, when the target position is corrected to the true color light quantity of the target position and each input image other than the reference image to a position on the reference image system, With regard to the relationship with the observed pixel value, which is the pixel value of each input image other than the observed reference image, the probability that the natural length is zero and the observed pixel value is equivalent to the true color light quantity at the target position. With spring constant An image estimation step (for example, step S4 in FIG. 2) for estimating an output image having pixel values of three color signals of R, G, and B per pixel by generating and solving as a spring relational expression of the model ; It is characterized by including.

請求項14に記載の画像処理方法は、前記撮像手段は、前記複数の入力画像を、適正露出未満で撮像し、前記複数の入力画像それぞれの画素値のゲインアップを行う露出補正ステップ(例えば、図2のステップS2)をさらに含むことを特徴とする。 The image processing method according to claim 14 , wherein the imaging unit captures the plurality of input images with less than proper exposure, and performs an exposure correction step (for example, increasing the pixel value of each of the plurality of input images). Further comprising step S2) of FIG.

請求項15に記載の画像処理装置は、複数の入力画像から出力画像を推定する画像処理装置(例えば、図1のデジタルカメラ1)において、1画素につき1個の色信号の画素値を有する前記複数の入力画像を撮像する撮像手段(例えば、図1の撮像素子4)と、前記複数の入力画像のうちの所定の1枚の入力画像を基準画像として、前記複数の入力画像どうしの位置関係を検出する検出手段(例えば、図4の動き検出回路23)と、R,G,Bの各色について、前記基準画像の各画素の画素中心を注目位置として、前記注目位置について、前記注目位置の真の色の光量と、前記基準画像以外の各入力画像を前記基準画像系上の位置に補正したとき前記注目位置の周辺で観測される前記基準画像以外の各入力画像の画素値である観測画素値との関係を、自然長がゼロで、前記観測画素値と前記注目位置の真の色の光量とが等価であることの確からしさをバネ定数とするバネモデルのバネ関係式として生成し、解くことにより、1画素につきR,G,Bの3個の色信号の画素値を有する前記出力画像を推定する画像推定手段(例えば、図4の演算回路24)とを備えることを特徴とする。  The image processing apparatus according to claim 15, wherein the image processing apparatus (for example, the digital camera 1 in FIG. 1) that estimates an output image from a plurality of input images has a pixel value of one color signal per pixel. The positional relationship between the plurality of input images, with an imaging unit (for example, the image sensor 4 in FIG. 1) that captures a plurality of input images and a predetermined one input image of the plurality of input images as a reference image Detection means (for example, the motion detection circuit 23 in FIG. 4), and for each color of R, G, and B, the pixel center of each pixel of the reference image is set as the target position, and the target position of the target position is determined. Observation of the light amount of the true color and the pixel value of each input image other than the reference image observed around the target position when each input image other than the reference image is corrected to a position on the reference image system With pixel value By generating and solving the relationship as a spring relational expression of a spring model in which the natural length is zero and the probability that the observed pixel value and the true color light quantity of the target position are equivalent is a spring constant, Image estimation means (for example, an arithmetic circuit 24 in FIG. 4) for estimating the output image having pixel values of three color signals of R, G, and B per pixel is provided.

請求項16に記載のプログラムの各ステップの具体例も、請求項1に記載の画像処理方法の各ステップの発明の実施の形態における具体例と同様である。  A specific example of each step of the program according to the sixteenth aspect is the same as the specific example in the embodiment of the invention of each step of the image processing method according to the first aspect.

(第1実施の形態)
図1は、本発明を適用したデジタル(スチル)カメラ1の一実施の形態の構成例を示すブロック図である。
(First embodiment)
FIG. 1 is a block diagram showing a configuration example of an embodiment of a digital (still) camera 1 to which the present invention is applied.

図1のデジタルカメラ1は、レンズ2、絞り3、撮像素子4、相関2重サンプリング回路5、A/D(Analog/Digital)コンバータ6、信号処理回路7、タイミングジェネレータ8、D/A(Digital/Analog)コンバータ9、ビデオエンコーダ10、モニタ11、コーデック(CODEC)12、メモリ13、バス14、CPU(Central Processing Unit)15、および入力デバイス16で構成される。また、A/Dコンバータ6は、シフト回路21を、信号処理回路7は、フレームメモリ22をそれぞれ有している。   A digital camera 1 in FIG. 1 includes a lens 2, an aperture 3, an image sensor 4, a correlated double sampling circuit 5, an A / D (Analog / Digital) converter 6, a signal processing circuit 7, a timing generator 8, and a D / A (Digital / Analog) converter 9, video encoder 10, monitor 11, codec (CODEC) 12, memory 13, bus 14, CPU (Central Processing Unit) 15, and input device 16. The A / D converter 6 includes a shift circuit 21 and the signal processing circuit 7 includes a frame memory 22.

図示せぬ被写体からの光は、レンズ2、絞り3等の光学系を通過して、撮像素子4に入射される。CCDやCMOS等で構成される単板センサの撮像素子4は、所定の画素(撮像素子)数を有している。   Light from a subject (not shown) passes through an optical system such as the lens 2 and the diaphragm 3 and enters the image sensor 4. The image sensor 4 of a single plate sensor composed of a CCD, a CMOS, or the like has a predetermined number of pixels (image sensors).

撮像素子4は、タイミングジェネレータ8から供給される露光タイミング信号に従い、所定の間隔で、所定の時間(シャッタ時間)だけ、入射される被写体の光を受光する。そして、撮像素子4は、撮像面上の各受光素子に到達した受光量を光電変換により電気信号に変換し、その電気信号に変換された画像信号を相関2重サンプリング回路5に供給する。撮像素子4は、単板センサとなっているので、相関2重サンプリング回路5に供給する電気信号は、1画素につきR信号、G信号、B信号のうちのいずれか1個の色信号(データ)である。   The image sensor 4 receives incident subject light at predetermined intervals for a predetermined time (shutter time) in accordance with the exposure timing signal supplied from the timing generator 8. The image sensor 4 converts the amount of received light reaching each light receiving element on the imaging surface into an electric signal by photoelectric conversion, and supplies the image signal converted to the electric signal to the correlated double sampling circuit 5. Since the image pickup device 4 is a single plate sensor, the electrical signal supplied to the correlated double sampling circuit 5 is one color signal (data) of R signal, G signal, and B signal per pixel. ).

ここで、カメラブレが発生していても、より鮮明な画像を出力するために、撮像素子4は、適正露出におけるシャッタ速度(シャッタ時間(露出時間))よりも高速に(短いシャッタ時間で)複数枚(以下では、N枚とする)撮像するものとする。従って、撮像素子4で撮像されたN枚の画像(入力画像)は、適正露出で撮像された画像より、暗いもの(適正露出未満で撮像されたもの)となっており、適正露出で撮像された画像のMk分の1(=1/Mk)(k=1乃至N)の明るさであるとする。なお、Mkの値は、例えば、シャッタ速度により決定される。   Here, in order to output a clearer image even if camera shake occurs, the image pickup device 4 has a plurality of imaging elements 4 that are faster (with a shorter shutter time) than the shutter speed (shutter time (exposure time)) at appropriate exposure. Assume that images are captured (hereinafter referred to as N). Accordingly, the N images (input images) captured by the image sensor 4 are darker (those captured below the proper exposure) than the images captured at the appropriate exposure, and are captured at the appropriate exposure. It is assumed that the brightness is 1 / Mk of the image (= 1 / Mk) (k = 1 to N). Note that the value of Mk is determined by, for example, the shutter speed.

相関2重サンプリング回路5は、撮像素子4から供給される画像信号(電気信号)のノイズ成分を、相関2重サンプリングにより除去し、A/Dコンバータ6に供給する。A/Dコンバータ6は、相関2重サンプリング回路5から供給される、ノイズ除去された被写体の画像信号をA/D変換、即ち、サンプリングして量子化する。その後、シフト回路21が、適正露出以下の暗い画像であるA/D変換後のデジタル画像を、例えば、n'ビットシフトすることなどによってMk倍することにより、適正露出と同一の明るさ(値)の画像信号に変換し(ゲインアップし)、信号処理回路7に供給する。   The correlated double sampling circuit 5 removes the noise component of the image signal (electric signal) supplied from the image sensor 4 by correlated double sampling, and supplies it to the A / D converter 6. The A / D converter 6 A / D-converts, ie, samples and quantizes the noise-removed subject image signal supplied from the correlated double sampling circuit 5. Thereafter, the shift circuit 21 multiplies the digital image after A / D conversion, which is a dark image below the appropriate exposure, by Mk, for example, by shifting n ′ bits, thereby obtaining the same brightness (value) as the appropriate exposure. ) (The gain is increased) and supplied to the signal processing circuit 7.

相関2重サンプリング回路5では、画像信号のノイズ成分が除去されるが、ノイズ成分のすべてが完全に除去されるわけではない。従って、相関2重サンプリング回路5で除去されないノイズ成分も存在する。この場合、相関2重サンプリング回路5で除去されないノイズ成分は、画像信号の真値に対する誤差となり、シフト回路21において、画像信号とともにMk倍されることになる。従って、誤差は、シフト回路21におけるゲインアップの量に依存すると言える。ここで、相関2重サンプリング回路5で除去されないノイズ成分のノイズ量をEとする。このノイズ量Eとしては、撮像素子4の特性に応じて、例えば、考えられる最大値を採用することができる。ここで、A/Dコンバータ6から信号処理回路7に供給される画像信号には、ノイズ量EのMk倍(E×Mk)程度のノイズが含まれる。また、例えば、Mk=8とすると、シフト回路21では、n'=3として、k枚目の撮像画像が3ビットシフトされることにより、撮像画像が適正露出の場合と同一の明るさにされる。   In the correlated double sampling circuit 5, the noise component of the image signal is removed, but not all of the noise component is completely removed. Therefore, there are also noise components that are not removed by the correlated double sampling circuit 5. In this case, the noise component that is not removed by the correlated double sampling circuit 5 becomes an error with respect to the true value of the image signal, and is multiplied by Mk together with the image signal in the shift circuit 21. Therefore, it can be said that the error depends on the amount of gain increase in the shift circuit 21. Here, E is a noise amount of a noise component that is not removed by the correlated double sampling circuit 5. As the noise amount E, for example, a possible maximum value can be adopted according to the characteristics of the image sensor 4. Here, the image signal supplied from the A / D converter 6 to the signal processing circuit 7 includes noise about Mk times the noise amount E (E × Mk). For example, when Mk = 8, the shift circuit 21 sets n ′ = 3, and the k-th captured image is shifted by 3 bits, so that the captured image has the same brightness as in the case of proper exposure. The

Mk倍の明るさに変換され、適正露出と同一の明るさにゲインアップされた、A/Dコンバータ6から供給されるN枚の撮像画像の画像信号は、信号処理回路7のフレームメモリ22に一時的に格納(記憶)される。   Image signals of N captured images supplied from the A / D converter 6 that have been converted to a brightness of Mk times and gained up to the same brightness as that of the appropriate exposure are stored in the frame memory 22 of the signal processing circuit 7. Temporarily stored (stored).

信号処理回路7は、予め設定された各種のプログラムに従い、フレームメモリ22に記憶されている適正露出と同一の明るさにゲインアップされたN枚の撮像画像の画像信号に所定の処理を施す。   The signal processing circuit 7 performs predetermined processing on the image signals of N captured images gained up to the same brightness as the appropriate exposure stored in the frame memory 22 in accordance with various preset programs.

即ち、信号処理回路7は、N枚の撮像画像のうち、1枚目の撮像画像を基準画像、2乃至N枚目の撮像画像それぞれをターゲット画像とし、ターゲット画像が基準画像に対して、どのような位置ズレを起こしているか、基準画像とターゲット画像との位置ズレのズレ量(位置関係)を検出する。そして、信号処理回路7は、そのズレ量に基づいて、カメラブレが補正された1枚の鮮明な画像(出力画像)としての、1画素につきG信号、R信号、B信号のすべてを有する出力画像を求め、その求めた出力画像の画像信号を、D/Aコンバータ9またはコーデック12、あるいは、その両方に供給する。信号処理回路7は、DSP(Digial Signal Processor)等で構成することができる。なお、以下においては、特に断りがない場合においても、A/Dコンバータ6より後段で処理される画像信号は、適正露出と同一の明るさにゲインアップされたものであるとする。   That is, the signal processing circuit 7 uses the first captured image as the reference image and the second to Nth captured images among the N captured images as target images, and the target image is compared with the reference image. Whether or not such a positional deviation has occurred is detected. A positional deviation amount (positional relationship) between the reference image and the target image is detected. Then, the signal processing circuit 7 outputs an output image having all of the G signal, the R signal, and the B signal per pixel as one clear image (output image) in which camera shake is corrected based on the deviation amount. And the image signal of the obtained output image is supplied to the D / A converter 9, the codec 12, or both. The signal processing circuit 7 can be configured by a DSP (Digial Signal Processor) or the like. In the following, it is assumed that the image signal processed in the subsequent stage from the A / D converter 6 is gained up to the same brightness as that of the appropriate exposure even when there is no particular notice.

タイミングジェネレータ8は、所定の間隔でN枚の画像の撮像が行われるように、露光(露出)タイミング信号を、撮像素子4、相関2重サンプリング回路5、A/Dコンバータ6、および信号処理回路7に供給する。この間隔は、例えば、被写体の明るさなどに合わせて、ユーザが変更することができるようになっている。ユーザが間隔を変更する場合、入力デバイス16をユーザが操作することによりCPU15で決定される間隔の変更値が、CPU15よりバス14を介して、タイミングジェネレータ8に供給される。   The timing generator 8 outputs an exposure (exposure) timing signal to the image sensor 4, the correlated double sampling circuit 5, the A / D converter 6, and a signal processing circuit so that N images are captured at a predetermined interval. 7 is supplied. This interval can be changed by the user according to, for example, the brightness of the subject. When the user changes the interval, the interval change value determined by the CPU 15 when the user operates the input device 16 is supplied from the CPU 15 to the timing generator 8 via the bus 14.

D/Aコンバータ9は、信号処理回路7から供給された出力画像の画像信号をD/A変換し、ビデオエンコーダ10に供給する。ビデオエンコーダ10は、D/Aコンバータ9から供給された画像信号(アナログ信号)を、モニタ11で表示することができるビデオ信号に変換し、モニタ11に供給する。モニタ11は、デジタルカメラ1のファインダ等の役割を果たすもので、LCDやCRTなどで構成され、ビデオエンコーダ10から供給されるビデオ信号を表示する。これにより、モニタ11では、鮮明な画像が表示される。   The D / A converter 9 D / A converts the image signal of the output image supplied from the signal processing circuit 7 and supplies it to the video encoder 10. The video encoder 10 converts the image signal (analog signal) supplied from the D / A converter 9 into a video signal that can be displayed on the monitor 11, and supplies the video signal to the monitor 11. The monitor 11 serves as a finder for the digital camera 1 and is composed of an LCD, a CRT, or the like, and displays a video signal supplied from the video encoder 10. As a result, a clear image is displayed on the monitor 11.

コーデック12は、信号処理回路7から供給された出力画像の画像信号を、JPEG(Joint Photographic Experts Group)方式、MPEG(Moving Picture Experts Group)方式や、DV(Digital Video)方式などの所定の方式に従って符号化し、メモリ13に供給する。   The codec 12 converts the image signal of the output image supplied from the signal processing circuit 7 according to a predetermined method such as a JPEG (Joint Photographic Experts Group) method, an MPEG (Moving Picture Experts Group) method, or a DV (Digital Video) method. Encode and supply to the memory 13.

メモリ13は、フラッシュメモリなどの半導体メモリで構成され、コーデック12から供給される符号化された画像信号を一時的または永久的に記憶(記録)する。なお、メモリ13の代わりに、磁気ディスク、光(磁気)ディスク等の記録媒体を用いることができる。メモリ13またはメモリ13の代わりに用いる記録媒体は、デジタルカメラ1に対して着脱可能とすることができる。なお、デジタルカメラ1に内蔵される記録媒体と、デジタルカメラ1に着脱可能な記録媒体の両方を設けるようにすることも可能である。   The memory 13 is constituted by a semiconductor memory such as a flash memory, and temporarily (permanently) stores (records) the encoded image signal supplied from the codec 12. Instead of the memory 13, a recording medium such as a magnetic disk or an optical (magnetic) disk can be used. The memory 13 or a recording medium used instead of the memory 13 can be detachable from the digital camera 1. It is possible to provide both a recording medium built in the digital camera 1 and a recording medium detachable from the digital camera 1.

CPU15は、バス14を介して各部に制御信号を供給し、各種の処理を制御する。例えば、ユーザの操作に応じて入力デバイス16から供給される撮像開始の信号に従い、被写体を撮像し、その画像をメモリ13に記憶するように、各部に制御信号を供給する。   The CPU 15 supplies a control signal to each unit via the bus 14 and controls various processes. For example, a control signal is supplied to each unit so that a subject is imaged in accordance with an imaging start signal supplied from the input device 16 in accordance with a user operation, and the image is stored in the memory 13.

入力デバイス16は、デジタルカメラ1本体にあるレリーズボタンなどの操作ボタン類を有している。ユーザが操作ボタンを操作することにより発生する各種の信号が、バス14を介してCPU15に供給され、CPU15は、入力デバイス16からバス14を介して供給される各種の信号に従う処理を実行するように各部を制御する。なお、入力デバイス16の1以上の操作ボタンは、モニタ11に表示することが可能である。モニタ11に表示された操作ボタンの操作は、例えば、モニタ11上に透明なタブレットを設け、そのタブレットにより検出するようにすることができる。   The input device 16 has operation buttons such as a release button on the digital camera 1 body. Various signals generated when the user operates the operation buttons are supplied to the CPU 15 via the bus 14, and the CPU 15 performs processing according to the various signals supplied from the input device 16 via the bus 14. Control each part. One or more operation buttons of the input device 16 can be displayed on the monitor 11. The operation of the operation button displayed on the monitor 11 can be detected by, for example, providing a transparent tablet on the monitor 11 and using the tablet.

図2のフローチャートを参照して、デジタルカメラ1の撮像処理について説明する。   The imaging process of the digital camera 1 will be described with reference to the flowchart of FIG.

初めに、ステップS1において、撮像素子4は、被写体を撮像する。即ち、撮像素子4は、1回のレリーズボタン(シャッタボタン)押下による撮影において、タイミングジェネレータ8から供給される露光タイミング信号に従い、所定の間隔でN回連続して、入射される被写体の光を受光することにより、N回の高速撮像を行う。従って、1回の撮影において、N枚の撮像画像が得られ、各撮像画像は、適正露出以下の暗い画像となる。受光された被写体の光は、光電変換され、相関2重サンプリング回路5においてノイズ成分が除去された後、A/Dコンバータ6に供給される。そして、ステップS2に進む。   First, in step S1, the imaging device 4 images a subject. That is, the imaging device 4 captures the incident subject light N times continuously at a predetermined interval in accordance with the exposure timing signal supplied from the timing generator 8 in shooting by pressing the release button (shutter button) once. By receiving light, high-speed imaging is performed N times. Therefore, N captured images are obtained in one shooting, and each captured image is a dark image having an appropriate exposure or less. The received light of the subject is photoelectrically converted, and after the noise component is removed by the correlated double sampling circuit 5, it is supplied to the A / D converter 6. Then, the process proceeds to step S2.

ステップS2において、A/Dコンバータ6は、相関2重サンプリング回路5から供給される、ノイズ除去された被写体の画像信号をデジタル変換する。その後、シフト回路21が、適正露出以下の暗い画像を、n'ビットシフトして適正露出と同じ明るさ(値)の画像信号に変換し(ゲインアップし)、信号処理回路7に供給して、ステップS3に進む。   In step S <b> 2, the A / D converter 6 digitally converts the image signal of the subject from which noise is removed, which is supplied from the correlated double sampling circuit 5. After that, the shift circuit 21 shifts the dark image below the appropriate exposure by n ′ bits, converts it to an image signal having the same brightness (value) as the appropriate exposure (gain increase), and supplies it to the signal processing circuit 7. The process proceeds to step S3.

ステップS3において、信号処理回路7は、1枚目の画像を基準画像とするとともに、2枚目以降の各画像をターゲット画像として、ターゲット画像(2乃至N枚目の画像)が基準画像に対して、どのような位置ずれを起こしているか、即ち、基準画像に対するターゲット画像の位置ズレのズレ量(動き量)を検出して、ステップS4に進む。   In step S3, the signal processing circuit 7 uses the first image as a reference image, sets the second and subsequent images as target images, and sets the target image (second to Nth images) to the reference image. Then, what kind of positional deviation has occurred, that is, the amount of positional deviation (movement amount) of the target image with respect to the reference image is detected, and the process proceeds to step S4.

ステップS4において、信号処理回路7は、N枚の撮像画像と、ステップS3で検出された基準画像に対するターゲット画像の位置ズレのズレ量に基づいて、画像推定処理を行い、ステップS5に進む。画像推定処理の詳細は後述するが、この処理により、信号処理回路7は、カメラブレが補正された1枚の鮮明な画像(出力画像)としての1画素がG信号、R信号、B信号のすべてを有する出力画像を求め、その求めた出力画像の画像信号を、D/Aコンバータ9またはコーデック12、あるいは、その両方に供給する。   In step S4, the signal processing circuit 7 performs image estimation processing on the basis of the N captured images and the amount of positional deviation of the target image with respect to the reference image detected in step S3, and proceeds to step S5. Although details of the image estimation process will be described later, by this process, the signal processing circuit 7 has all the G signal, R signal, and B signal as one pixel as one clear image (output image) in which camera shake is corrected. And an image signal of the obtained output image is supplied to the D / A converter 9 or the codec 12 or both.

ステップS5では、モニタ11が出力画像を表示し、フラッシュメモリ等のメモリ13に出力画像を記録して、処理を終了する。即ち、ステップS5では、ステップS4で信号処理回路7からD/Aコンバータ9に供給された画像信号がアナログ信号に変換され、ビデオエンコーダ10に供給される。さらに、ステップS5では、ビデオエンコーダ10は、D/Aコンバータ9から供給された画像信号のアナログ信号を、モニタ11に表示することができるビデオ信号に変換し、モニタ11に供給する。そして、ステップS5において、モニタ11は、ビデオエンコーダ10から供給されたビデオ信号に基づいて、画像を表示して、処理を終了する。また、ステップS5では、ステップS4で信号処理回路7からコーデック12に供給された画像信号に対し、JPEGやMPEG等の所定の符号化が施され、フラッシュメモリ等のメモリ13に記録され、処理を終了する。   In step S5, the monitor 11 displays the output image, records the output image in the memory 13 such as a flash memory, and the process ends. That is, in step S5, the image signal supplied from the signal processing circuit 7 to the D / A converter 9 in step S4 is converted into an analog signal and supplied to the video encoder 10. In step S 5, the video encoder 10 converts the analog signal of the image signal supplied from the D / A converter 9 into a video signal that can be displayed on the monitor 11, and supplies the video signal to the monitor 11. In step S5, the monitor 11 displays an image based on the video signal supplied from the video encoder 10, and ends the process. In step S5, the image signal supplied from the signal processing circuit 7 to the codec 12 in step S4 is subjected to predetermined encoding such as JPEG or MPEG and recorded in the memory 13 such as a flash memory for processing. finish.

図3は、撮像素子4の画素の配列を示している。なお、図3では、撮像素子4のうちの左上の一部分の画素(横方向6画素、縦方向4画素の計24画素)を示しているが、それ以外の部分の画素も同様に配置されているものとする。   FIG. 3 shows an array of pixels of the image sensor 4. Note that FIG. 3 shows a part of the upper left part of the image sensor 4 (24 pixels in total, 6 pixels in the horizontal direction and 4 pixels in the vertical direction), but the other pixels are arranged in the same manner. It shall be.

ここで、図3において、撮像素子4の左上の角を原点として、横(右)方向をX方向、縦(下)方向をY方向とするX−Y座標系を設定する。また、1画素の縦および横方向の長さ(幅)をそれぞれ1とする。この場合、左からi番目で、上からj番目の画素の位置(中心位置)は、(i−0.5、j−0.5)と表すことができる。   In FIG. 3, an XY coordinate system is set in which the upper left corner of the image sensor 4 is the origin, the horizontal (right) direction is the X direction, and the vertical (lower) direction is the Y direction. Further, the length (width) of one pixel in the vertical and horizontal directions is set to 1, respectively. In this case, the position (center position) of the i-th pixel from the left and the j-th pixel from the top can be expressed as (i−0.5, j−0.5).

図3において、撮像素子4の画素の配列は、いわゆる、ベイヤー配列となっている。   In FIG. 3, the pixel array of the image sensor 4 is a so-called Bayer array.

即ち、G信号を取り出すことのできる画素としては、原点からX方向に1番目で、Y方向に1番目の画素である画素G00、原点からX方向に3番目で、Y方向に1番目の画素である画素G02、原点からX方向に5番目で、Y方向に1番目の画素である画素G04、原点からX方向に2番目で、Y方向に2番目の画素である画素G11、以下、同様に、画素G13、画素G15、画素G20、画素G22,画素G24、画素G31、画素G33、画素G35が配置されている。   That is, the pixel from which the G signal can be extracted is the first pixel in the X direction from the origin, the first pixel in the Y direction, the third pixel in the X direction, and the first pixel in the Y direction. A pixel G02 that is the fifth pixel in the X direction from the origin and the first pixel G04 in the Y direction, a pixel G11 that is the second pixel in the X direction and the second pixel in the Y direction, and so on. In addition, a pixel G13, a pixel G15, a pixel G20, a pixel G22, a pixel G24, a pixel G31, a pixel G33, and a pixel G35 are arranged.

また、R信号を取り出すことのできる画素としては、原点からX方向に2番目で、Y方向に1番目の画素である画素R01、原点からX方向に4番目で、Y方向に1番目の画素である画素R03、原点からX方向に6番目で、Y方向に1番目の画素である画素R05、原点からX方向に2番目で、Y方向に3番目の画素である画素R21、以下、同様に、画素R23、画素R25が配置されている。   Also, the pixel from which the R signal can be extracted is the second pixel in the X direction from the origin, the first pixel R01 in the Y direction, the fourth pixel in the X direction from the origin, and the first pixel in the Y direction. A pixel R03 that is the sixth pixel in the X direction from the origin and a pixel R05 that is the first pixel in the Y direction, a pixel R21 that is the second pixel in the X direction from the origin and the third pixel in the Y direction, and so on. In addition, a pixel R23 and a pixel R25 are arranged.

さらに、B信号を取り出すことのできる画素としては、原点からX方向に1番目で、Y方向に2番目の画素である画素B10、原点からX方向に3番目で、Y方向に2番目の画素である画素B12、原点からX方向に5番目で、Y方向に2番目の画素である画素B14、原点からX方向に1番目で、Y方向に4番目の画素である画素B30、以下、同様に、画素B32、画素B34が配置されている。   Further, the pixel from which the B signal can be extracted is the first pixel in the X direction from the origin, the second pixel in the Y direction, the third pixel in the X direction from the origin, and the second pixel in the Y direction. Pixel B12, the fifth pixel in the X direction from the origin, the second pixel in the Y direction, the pixel B14, the first pixel in the X direction from the origin, and the fourth pixel in the Y direction, and so on. In addition, a pixel B32 and a pixel B34 are arranged.

ここで、撮像素子4のX−Y座標系における所定の位置(x,y)(x,yは実数)について、カメラブレがない1枚の鮮明な画像のG信号、R信号、B信号を、それぞれLg(x,y),Lr(x,y),Lb(x,y)とする。さらに、左からi番目で、上からj番目である「i番目、j番目の画素」について、カメラブレがない1枚の鮮明な画像のG信号、R信号、B信号を、それぞれLg(i,j),Lr(i,j),Lb(i,j)とする。即ち、Lg(x,y),Lr(x,y),Lb(x,y)(Lg(i,j),Lr(i,j),Lb(i,j))それぞれは、所定の位置(x,y)(「i番目、j番目の画素」)における、カメラブレや、ノイズのない、真の緑色、赤色、青色の光量(データ)を表す。従って、以下においては、Lg(x,y),Lr(x,y),Lb(x,y)(Lg(i,j),Lr(i,j),Lb(i,j))それぞれを真の緑色の光量Lg(x,y)(Lg(i,j))、真の赤色の光量Lr(x,y)(Lr(i,j))、真の青色の光量Lb(x,y)(Lb(i,j))と称する。なお、x=i−0.5,y=j−0.5である場合、Lg(x,y)=Lg(i,j),Lr(x,y)=Lr(i,j),Lb(x,y)=Lb(i,j)である。   Here, with respect to a predetermined position (x, y) (x and y are real numbers) in the XY coordinate system of the image sensor 4, the G signal, R signal, and B signal of one clear image without camera shake are Let Lg (x, y), Lr (x, y), and Lb (x, y), respectively. Further, for the “i-th and j-th pixels” that are i-th from the left and j-th from the top, the G signal, R signal, and B signal of one clear image without camera shake are respectively represented by Lg (i, j), Lr (i, j), and Lb (i, j). That is, each of Lg (x, y), Lr (x, y), Lb (x, y) (Lg (i, j), Lr (i, j), Lb (i, j)) has a predetermined position. In (x, y) (“i-th, j-th pixel”), it represents the true green, red, and blue light amounts (data) without camera shake and noise. Therefore, in the following, Lg (x, y), Lr (x, y), Lb (x, y) (Lg (i, j), Lr (i, j), Lb (i, j)) will be described. True green light quantity Lg (x, y) (Lg (i, j)), true red light quantity Lr (x, y) (Lr (i, j)), true blue light quantity Lb (x, y) ) (Lb (i, j)). When x = i−0.5 and y = j−0.5, Lg (x, y) = Lg (i, j), Lr (x, y) = Lr (i, j), Lb (X, y) = Lb (i, j).

また、本実施の形態においては、撮像素子4の画素の配列は、ベイヤー配列であるものとするが、画素の配列は、ベイヤー配列に限定されるものではなく、その他の配列でもよい。   In the present embodiment, the pixel array of the image sensor 4 is a Bayer array, but the pixel array is not limited to the Bayer array and may be any other array.

次に、G信号、R信号、B信号それぞれの画素について使用する変数ig,jg,ir,jr,ib,jbを定義する。   Next, variables ig, jg, ir, jr, ib, and jb used for each pixel of the G signal, R signal, and B signal are defined.

変数ig,jgそれぞれは、G信号を取り出すことのできる画素についての、X方向の位置i、Y方向の位置jを表す。即ち、変数ig,jgの組み合わせは、G信号を取り出すことのできる、変数i,jの組み合わせと等しい。ベイヤー配列の場合には、その配列の性質から、変数iとjとの差(i−j)が偶数であるという条件を満たす変数ig,jgということができる。なお、当然ながら、変数igとjgとの差(ig−jg)も偶数となる。従って、「ig番目,jg番目の画素」とは、G信号を取り出すことのできる画素である。なお、ベイヤー配列以外の配列の場合には、その配列の性質に応じた変数ig,jgの条件となる。   Each of the variables ig and jg represents a position i in the X direction and a position j in the Y direction for a pixel from which the G signal can be extracted. That is, the combination of variables ig and jg is equal to the combination of variables i and j from which the G signal can be extracted. In the case of the Bayer array, it can be said that the variables ig and jg satisfy the condition that the difference (i−j) between the variables i and j is an even number. Of course, the difference (ig−jg) between the variables ig and jg is an even number. Therefore, “ig-th and jg-th pixels” are pixels from which the G signal can be extracted. In the case of an array other than the Bayer array, the conditions for variables ig and jg according to the nature of the array are used.

変数ir,jrそれぞれは、R信号を取り出すことのできる画素についての、X方向の位置i、Y方向の位置jを表す。即ち、変数ir,jrの組み合わせは、R信号を取り出すことのできる、変数i,jの組み合わせと等しい。ベイヤー配列の場合には、その配列の性質から、変数iが偶数、かつ変数iとjとの差(i−j)が奇数であるという条件を満たす変数ir,jrということができる。なお、当然ながら、変数irとjrとの差(ir−jr)も奇数となる。従って、「ir番目,jr番目の画素」とは、R信号を取り出すことのできる画素である。なお、ベイヤー配列以外の配列の場合には、その配列の性質に応じた変数ir,jrの条件となる。   Each of the variables ir and jr represents a position i in the X direction and a position j in the Y direction with respect to a pixel from which the R signal can be extracted. That is, the combination of the variables ir and jr is equal to the combination of the variables i and j from which the R signal can be extracted. In the case of the Bayer array, it can be said that the variables ir and jr satisfy the condition that the variable i is an even number and the difference (ij) between the variables i and j is an odd number. Of course, the difference (ir−jr) between the variables ir and jr is also an odd number. Therefore, the “irth and jrth pixels” are pixels from which the R signal can be extracted. In the case of an array other than the Bayer array, the conditions of the variables ir and jr according to the nature of the array are used.

変数ib,jbそれぞれは、B信号を取り出すことのできる画素についての、X方向の位置i、Y方向の位置jを表す。即ち、変数ib,jbの組み合わせは、B信号を取り出すことのできる、変数i,jの組み合わせと等しい。ベイヤー配列の場合には、その配列の性質から、変数iが奇数、かつ変数iとjとの差(i−j)が奇数であるという条件を満たす変数ib,jbということができる。なお、当然ながら、変数ibとjbとの差(ib−jb)も奇数となる。従って、「ib番目,jb番目の画素」とは、B信号を取り出すことのできる画素である。なお、ベイヤー配列以外の配列の場合には、その配列の性質に応じた変数ib,jbの条件となる。   Each of the variables ib and jb represents a position i in the X direction and a position j in the Y direction with respect to a pixel from which the B signal can be extracted. That is, the combination of variables ib and jb is equal to the combination of variables i and j from which the B signal can be extracted. In the case of the Bayer array, it can be said that the variable ib and jb satisfy the condition that the variable i is an odd number and the difference (i−j) between the variables i and j is an odd number. Of course, the difference (ib−jb) between the variables ib and jb is also an odd number. Therefore, the “ib-th and jb-th pixels” are pixels from which the B signal can be extracted. In the case of an array other than the Bayer array, the conditions of the variables ib and jb according to the nature of the array are used.

次に、図3に示した撮像素子4の各画素で受光して得られる色信号(G信号、R信号、B信号)の値(画素値)について定義する。   Next, the values (pixel values) of color signals (G signal, R signal, B signal) obtained by receiving light at each pixel of the image sensor 4 shown in FIG. 3 will be defined.

上述したように、撮像素子4では、N枚の画像が撮像される。従って、撮像素子4の1つの画素についてN個の画素値が得られる。そこで、k枚目(k=1乃至N)の「ig番目,jg番目の画素」で得られる画素値をGobs(k,ig,jg)、k枚目(k=1乃至N)の「ir番目,jr番目の画素」で得られる画素値をRobs(k,ir,jr)、k枚目(k=1乃至N)の「ib番目,jb番目の画素」で得られる画素値をBobs(k,ib,jb)とする。例えば、1枚目の画素G00で得られる画素値は、Gobs(1,1,1)で表され、2枚目のG04で得られる画素値は、Gobs(2,5,1)で表される。なお、以下において、特に断りがない場合、kは、1乃至Nの整数を表すものとする。   As described above, the image sensor 4 captures N images. Accordingly, N pixel values are obtained for one pixel of the image sensor 4. Therefore, the pixel values obtained from the “ig-th and jg-th pixels” of the k-th (k = 1 to N) are set to Gobs (k, ig, jg) and “ir” of the k-th (k = 1 to N). The pixel value obtained at the “th, jr-th pixel” is Robs (k, ir, jr), and the pixel value obtained at the k-th (k = 1 to N) “ib-th, jb-th pixel” is Bobs ( k, ib, jb). For example, the pixel value obtained by the first pixel G00 is represented by Gobs (1, 1, 1), and the pixel value obtained by the second pixel G04 is represented by Gobs (2, 5, 1). The In the following description, k represents an integer of 1 to N unless otherwise specified.

逆に言うと、画素値Gobs(k,ig,jg)、Robs(k,ir,jr)、Bobs(k,ib,jb)をもつ画素は、それぞれ、画素G(jg−1)(ig−1)、R(jr−1)(ir−1)、B(jb−1)(ib−1)である。   Conversely, pixels having pixel values Gobs (k, ig, jg), Robs (k, ir, jr), and Bobs (k, ib, jb) are respectively represented by pixel G (jg-1) (ig− 1), R (jr-1) (ir-1), and B (jb-1) (ib-1).

図4は、図1の信号処理回路7の一部分についての詳細な構成例を示している。   FIG. 4 shows a detailed configuration example of a part of the signal processing circuit 7 of FIG.

信号処理回路7は、フレームメモリ22、動き検出回路23、演算回路24、コントローラ25で構成されている。また、フレームメモリ22は、フレームメモリ22−1乃至22−N、動き検出回路23は、動き検出回路23−1乃至23−(N−1)で構成されている。   The signal processing circuit 7 includes a frame memory 22, a motion detection circuit 23, an arithmetic circuit 24, and a controller 25. The frame memory 22 includes frame memories 22-1 to 22-N, and the motion detection circuit 23 includes motion detection circuits 23-1 to 23- (N-1).

上述したように、A/Dコンバータ6からN枚の撮像画像がフレームメモリ22に供給される。フレームメモリ22−1は、A/Dコンバータ6から供給される1枚目の撮像画像を記憶(格納)する。フレームメモリ22−2は、A/Dコンバータ6から供給される2枚目の撮像画像を記憶する。以下同様にして、フレームメモリ22−kは、A/Dコンバータ6から供給されるk枚目の撮像画像をフレームメモリ22−kに記憶する(k=3乃至N)。   As described above, N captured images are supplied from the A / D converter 6 to the frame memory 22. The frame memory 22-1 stores (stores) the first captured image supplied from the A / D converter 6. The frame memory 22-2 stores the second captured image supplied from the A / D converter 6. Similarly, the frame memory 22-k stores the k-th captured image supplied from the A / D converter 6 in the frame memory 22-k (k = 3 to N).

フレームメモリ22−1は、所定のタイミングにおいて、記憶している1枚目の撮像画像を演算回路24と動き検出回路23−1乃至23−(N−1)に供給する。フレームメモリ22−2は、所定のタイミングにおいて、記憶している2枚目の撮像画像を演算回路24と動き検出回路23−1に供給する。以下、同様にして、フレームメモリ22−kは、所定のタイミングにおいて、記憶しているk枚目の撮像画像を演算回路24と動き検出回路23−(k−1)に供給する。   The frame memory 22-1 supplies the stored first captured image to the arithmetic circuit 24 and the motion detection circuits 23-1 to 23- (N-1) at a predetermined timing. The frame memory 22-2 supplies the stored second captured image to the arithmetic circuit 24 and the motion detection circuit 23-1 at a predetermined timing. Similarly, the frame memory 22-k supplies the k-th captured image stored therein to the arithmetic circuit 24 and the motion detection circuit 23- (k−1) at a predetermined timing.

動き検出回路23は、2枚の撮像画像どうしの位置関係を検出する。即ち、動き検出回路23は、1枚目の撮像画像を基準画像とするとともに、2枚目以降の各撮像画像をターゲット画像として、ターゲット画像(2乃至N枚目の画像)が基準画像に対して、どのような位置ずれを起こしているか、基準画像に対するターゲット画像の位置ズレのズレ量(動き量)を検出する。なお、このズレ量は、例えば、手ブレにより生じるものである。   The motion detection circuit 23 detects the positional relationship between the two captured images. That is, the motion detection circuit 23 uses the first captured image as a reference image, sets the second and subsequent captured images as target images, and sets the target image (second to Nth images) to the reference image. Thus, the amount of positional deviation (movement amount) of the target image relative to the reference image is detected. The amount of deviation is caused by, for example, camera shake.

動き検出回路23−1には、基準画像としての1枚目の撮像画像がフレームメモリ22−1から、ターゲット画像としての2枚目の撮像画像がフレームメモリ22−2から、それぞれ供給される。   The motion detection circuit 23-1 is supplied with the first captured image as the reference image from the frame memory 22-1, and the second captured image as the target image from the frame memory 22-2.

動き検出回路23−1は、2枚目の撮像画像の各画素(あるいは、画面全体を複数のブロックに分割したときの各ブロック)が、1枚目の撮像画像のどの位置に対応しているかを検出し、1枚目の撮像画像と2枚目の撮像画像との位置関係が次式(1)で表されるような、回転角度θ2、スケールS2、平行移動量(T2x,T2y)で構成される変換パラメータ(θ2,T2x,T2y,S2)を求め、演算回路24に供給する。   The motion detection circuit 23-1 corresponds to which position of the first captured image each pixel of the second captured image (or each block when the entire screen is divided into a plurality of blocks). , And the positional relationship between the first captured image and the second captured image is expressed by the following equation (1) at a rotation angle θ2, a scale S2, and a parallel movement amount (T2x, T2y). The configured conversion parameters (θ2, T2x, T2y, S2) are obtained and supplied to the arithmetic circuit 24.

Figure 0004613510
・・・(1)
Figure 0004613510
... (1)

式(1)は、いわゆるアフィン変換の式であり、式(1)において、(X2,Y2)は2枚目の撮像画像の画素の位置であり、(X1(2),Y1(2))は1枚目の撮像画像上の位置である。下付きの(2)は、2枚目の撮像画像のある位置が位置変換されたことを表している。 Expression (1) is a so-called affine transformation expression. In Expression (1), (X2, Y2) is the pixel position of the second captured image, and (X1 (2) , Y1 (2) ) Is the position on the first captured image. Subscript (2) indicates that a position of a second captured image has been converted.

この変換パラメータ(θ2,T2x,T2y,S2)は、2枚目の撮像画像上の位置(X2,Y2)が、1枚目の撮像画像上の位置(X1,Y1)に対して、例えば、手持ち撮影のため、角度θ2だけ回転し、被写体方向にデジタルカメラ1が移動したために画像がS2倍だけ拡大(S2<1のときは、縮小)され、被写体に対して平行方向に(T2x,T2y)だけずれたことを意味する。なお、通常手ブレの場合には、撮像素子4の面と平行な横方向のブレ(揺れ)の影響が大きく、デジタルカメラ1から被写体の方向に対するブレ(揺れ)は少ないので、デジタルカメラ1から被写体の方向に対しては影響がないとして、S2=1と近似してもよい。   This conversion parameter (θ2, T2x, T2y, S2) indicates that the position (X2, Y2) on the second captured image is, for example, relative to the position (X1, Y1) on the first captured image. Since the digital camera 1 is rotated by an angle θ2 and moved in the direction of the subject for handheld shooting, the image is enlarged by S2 times (reduced when S2 <1), and is parallel to the subject (T2x, T2y) ) Means that it is shifted. In the case of normal camera shake, the influence of lateral blurring (shake) parallel to the surface of the image sensor 4 is large, and there is little blurring (shake) from the digital camera 1 to the direction of the subject. S2 = 1 may be approximated assuming that there is no effect on the direction of the subject.

また、動き検出回路23−2には、基準画像としての1枚目の撮像画像がフレームメモリ22−1から、ターゲット画像としての3枚目の撮像画像がフレームメモリ22−3から、それぞれ供給される。   The motion detection circuit 23-2 is supplied with the first captured image as the reference image from the frame memory 22-1, and the third captured image as the target image from the frame memory 22-3. The

動き検出回路23−2は、3枚目の撮像画像の各画素(あるいは、画面全体を複数のブロックに分割したときの各ブロック)が、1枚目の撮像画像のどの位置に対応しているかを検出し、1枚目の撮像画像と3枚目の撮像画像との位置関係が次式(2)で表されるような、回転角度θ3、スケールS3、平行移動量(T3x,T3y)で構成される変換パラメータ(θ3,T3x,T3y,S3)を求め、演算回路24に供給する。   In the motion detection circuit 23-2, each pixel of the third captured image (or each block when the entire screen is divided into a plurality of blocks) corresponds to which position of the first captured image. And the positional relationship between the first captured image and the third captured image is expressed by the following equation (2) with the rotation angle θ3, the scale S3, and the parallel movement amount (T3x, T3y). The configured conversion parameters (θ3, T3x, T3y, S3) are obtained and supplied to the arithmetic circuit 24.

Figure 0004613510
・・・(2)
Figure 0004613510
... (2)

式(2)は、いわゆるアフィン変換の式であり、式(2)において、(X3,Y3)は3枚目の撮像画像の画素の位置であり、(X1(3),Y1(3))は1枚目の撮像画像上の位置である。下付きの(3)は、3枚目の撮像画像のある位置が位置変換されたことを表している。 Expression (2) is a so-called affine transformation expression. In Expression (2), (X3, Y3) is the pixel position of the third captured image, and (X1 (3) , Y1 (3) ) Is the position on the first captured image. Subscript (3) indicates that a position of a third captured image has been converted.

この変換パラメータ(θ3、T3x、T3y、S3)は、3枚目の撮像画像上の位置(X3,Y3)が、1枚目の撮像画像上の位置(X1,Y1)に対して、手持ち撮影のため、角度θ3だけ回転し、被写体方向にデジタルカメラ1が移動したために画像がS3倍だけ拡大(S3<1のときは、縮小)され、被写体に対して平行方向に(T3x,T3y)だけずれたことを意味する。なお、通常手ブレの場合には、撮像素子4の面と平行な横方向のブレ(揺れ)の影響が大きく、デジタルカメラ1から被写体の方向に対するブレ(揺れ)は少ないので、デジタルカメラ1から被写体の方向に対しては影響がないとして、S3=1と近似してもよい。   This conversion parameter (θ3, T3x, T3y, S3) indicates that the position (X3, Y3) on the third captured image is hand-held shooting relative to the position (X1, Y1) on the first captured image. Therefore, since the digital camera 1 is rotated by the angle θ3 and moved in the direction of the subject, the image is enlarged by S3 times (reduced when S3 <1) and only in the direction parallel to the subject (T3x, T3y). It means that it has shifted. In the case of normal camera shake, the influence of lateral blurring (shake) parallel to the surface of the image sensor 4 is large, and there is little blurring (shake) from the digital camera 1 to the direction of the subject. S3 = 1 may be approximated assuming that there is no effect on the direction of the subject.

以下同様に、動き検出回路23−(k−1)には、基準画像としての1枚目の撮像画像がフレームメモリ22−1から、ターゲット画像としてのk枚目の撮像画像がフレームメモリ22−kから、それぞれ供給される。   Similarly, in the motion detection circuit 23- (k-1), the first captured image as the reference image is received from the frame memory 22-1, and the kth captured image as the target image is stored in the frame memory 22-. k, respectively.

動き検出回路23−(k−1)は、k枚目の撮像画像の各画素(あるいは、画面全体を複数のブロックに分割したときの各ブロック)が、1枚目の撮像画像のどの位置に対応しているかを検出し、1枚目の撮像画像とk枚目の撮像画像との位置関係が次式(3)で表されるような、回転角度θk、スケールSk、平行移動量(Tkx,Tky)で構成される変換パラメータ(θk,Tkx,Tky,Sk)を求め、演算回路24に供給する。   In the motion detection circuit 23- (k-1), each pixel of the k-th captured image (or each block when the entire screen is divided into a plurality of blocks) is located at which position of the first captured image. Rotation angle θk, scale Sk, and parallel movement amount (Tkx) such that the positional relationship between the first captured image and the kth captured image is expressed by the following equation (3). , Tky), conversion parameters (θk, Tkx, Tky, Sk) are obtained and supplied to the arithmetic circuit 24.

Figure 0004613510
・・・(3)
Figure 0004613510
... (3)

式(3)は、いわゆるアフィン変換の式であり、式(3)において、(Xk,Yk)はk枚目の撮像画像の画素の位置であり、(X1(k),Y1(k))は、1枚目の撮像画像上の位置である。下付きの(k)は、k枚目の画像のある位置が位置変換されたことを表している。 Expression (3) is a so-called affine transformation expression. In Expression (3), (Xk, Yk) is the pixel position of the k-th captured image, and (X1 (k) , Y1 (k) ) Is the position on the first captured image. The subscript (k) represents that a certain position of the k-th image has been converted.

この変換パラメータ(θk,Tkx,Tky,Sk)は、k枚目の撮像画像上の位置(Xk,Yk)が、1枚目の撮像画像上の位置(X1,Y1)に対して、手持ち撮影のため、角度θkだけ回転し、被写体方向にデジタルカメラ1が移動したために画像がSk倍だけ拡大(Sk<1のときは、縮小)され、被写体に対して平行方向に(Tkx,Tky)だけずれたことを意味する。なお、通常手ブレの場合には、撮像素子4の面と平行な横方向のブレ(揺れ)の影響が大きく、デジタルカメラ1から被写体の方向に対するブレ(揺れ)は少ないので、デジタルカメラ1から被写体の方向に対しては影響がないとして、Sk=1と近似してもよい。   The conversion parameters (θk, Tkx, Tky, Sk) are obtained by hand-held shooting with respect to the position (X1, Y1) on the first captured image at the position (Xk, Yk) on the kth captured image. Therefore, since the digital camera 1 is rotated by the angle θk and moved in the direction of the subject, the image is enlarged by Sk times (reduced when Sk <1) and only in the direction parallel to the subject (Tkx, Tky). It means that it has shifted. In the case of normal camera shake, the influence of lateral blurring (shake) parallel to the surface of the image sensor 4 is large, and there is little blurring (shake) from the digital camera 1 to the direction of the subject. Sk = 1 may be approximated assuming that there is no effect on the direction of the subject.

変換パラメータ(θk,Tkx,Tky,Sk)は、上述のように、1枚目の撮像画像を基準とする、k枚目の撮像画像の位置関係から求める他、デジタルカメラ1に加速度センサを設け、その加速度センサの出力から、いわば、メカニカル的に求めるようにすることもできる。   As described above, the conversion parameter (θk, Tkx, Tky, Sk) is obtained from the positional relationship of the k-th captured image with the first captured image as a reference, and the digital camera 1 is provided with an acceleration sensor. In other words, it can be mechanically obtained from the output of the acceleration sensor.

演算回路24には、フレームメモリ22−1乃至22−NからN枚の撮像画像が供給される。また、演算回路24には、動き検出回路23−1乃至23−(N−1)から1枚目の撮像画像とk枚目の撮像画像との位置関係を表す変換パラメータ(θk,Tkx,Tky,Sk)が供給される。   N captured images are supplied to the arithmetic circuit 24 from the frame memories 22-1 to 22-N. The arithmetic circuit 24 also includes conversion parameters (θk, Tkx, Tky) representing the positional relationship between the first captured image and the kth captured image from the motion detection circuits 23-1 to 23- (N-1). , Sk).

演算回路24は、動き検出回路23−1乃至23−(N−1)から供給される2乃至N枚目の撮像画像の、1枚目の撮像画像に対する位置関係に基づき、後述する画像推定処理を行うことにより、カメラブレを補正した1枚の鮮明な出力画像の画像信号(G信号、R信号、B信号)を推定し、D/Aコンバータ9またはコーデック12に供給する。A/Dコンバータ6から信号処理回路7に供給されるN枚の撮像画像それぞれは、1画素がG信号、R信号、B信号のうちのいずれか1つを有する信号であるのに対して、演算回路24が推定する画像信号は、1画素につきG信号、R信号、B信号の3個の色信号を有する信号(データ)である。   The arithmetic circuit 24 performs image estimation processing to be described later based on the positional relationship of the second to N-th captured images supplied from the motion detection circuits 23-1 to 23- (N-1) with respect to the first captured image. As a result, the image signal (G signal, R signal, B signal) of one clear output image corrected for camera shake is estimated and supplied to the D / A converter 9 or the codec 12. Each of the N captured images supplied from the A / D converter 6 to the signal processing circuit 7 is a signal in which one pixel has any one of a G signal, an R signal, and a B signal. The image signal estimated by the arithmetic circuit 24 is a signal (data) having three color signals of G signal, R signal, and B signal per pixel.

コントローラ25は、CPU15の制御に従い、信号処理回路7内のフレームメモリ22−1乃至22−N、動き検出回路23−1乃至23−(N−1)、演算回路24等の制御を行う。なお、CPU15(図1)が、コントローラ25に代わって、信号処理回路7内のフレームメモリ22−1乃至22−N、動き検出回路23−1乃至23−(N−1)、演算回路24等の制御を行うようにすることができ、この場合には、コントローラ25を省略することができる。   The controller 25 controls the frame memories 22-1 to 22-N, the motion detection circuits 23-1 to 23- (N-1), the arithmetic circuit 24, and the like in the signal processing circuit 7 according to the control of the CPU 15. Note that the CPU 15 (FIG. 1) replaces the controller 25 with the frame memories 22-1 to 22-N, the motion detection circuits 23-1 to 23- (N-1), the arithmetic circuit 24, etc. in the signal processing circuit 7. In this case, the controller 25 can be omitted.

なお、ベイヤー配列等を使った単板センサでは、G信号の画素数に対して、R信号やB信号の画素数が少なくなっている。そのため、信号処理回路7で得られる出力画像におけるR信号やB信号は、G信号に較べて誤差が大となる場合がある。そのような場合には、演算回路24の後段に、輝度信号はそのままで、色差信号に対してのみ高周波成分の帯域を制限するローパスフィルタを配置することにより、ノイズを除去することができる。   In a single-plate sensor using a Bayer array or the like, the number of R signal or B signal pixels is smaller than the number of G signal pixels. For this reason, the R signal or B signal in the output image obtained by the signal processing circuit 7 may have a larger error than the G signal. In such a case, it is possible to remove noise by disposing a low-pass filter that limits the band of the high frequency component only for the color difference signal in the subsequent stage of the arithmetic circuit 24 without changing the luminance signal.

また、演算回路24を、連続撮像している最中に、撮像画像を順次取り込みながら処理が可能なリアルタイム処理を行う高速演算回路とすることにより、フレームメモリ22−1乃至22−N、および動き検出回路23−1乃至23−(N−1)の数を少なく構成することができる。これにより、信号処理回路7の規模を小さくすることが可能となる。   In addition, by making the arithmetic circuit 24 a high-speed arithmetic circuit that performs real-time processing that can be processed while sequentially capturing captured images during continuous imaging, the frame memories 22-1 to 22-N and motion The number of the detection circuits 23-1 to 23- (N-1) can be reduced. Thereby, the scale of the signal processing circuit 7 can be reduced.

次に、上述した信号処理回路7における、画像推定処理の第1実施の形態について説明する。   Next, a first embodiment of the image estimation process in the signal processing circuit 7 described above will be described.

なお、例えば、撮像素子4の各画素(の受光部)の直上には、不図示のオンチップレンズが配置されているものとする。オンチップレンズは、そのオンチップレンズ内に入射した被写体の光すべてを1点に収束する。従って、オンチップレンズの直下にある画素は、オンチップレンズ内に入射した被写体の光すべてを積分値として受光することができる。これにより、各画素の検出感度が良くなるという効果が得られる。   For example, it is assumed that an on-chip lens (not shown) is disposed immediately above each pixel (light receiving portion) of the image sensor 4. The on-chip lens converges all the light of the subject incident on the on-chip lens into one point. Accordingly, the pixel immediately below the on-chip lens can receive all the light of the subject incident on the on-chip lens as an integral value. Thereby, the effect that the detection sensitivity of each pixel becomes good is acquired.

従って、撮像素子4の各画素で受光されるデータ(受光量)は、その画素の、ある1点に入射される被写体の光の値ではなく(即ち、ポイントサンプリングされたデータではなく)、ある有限の面積を持った面(受光面)に入射される被写体の光の積分値である。   Therefore, the data received by each pixel of the image sensor 4 (the amount of received light) is not the light value of the subject incident on a certain point of the pixel (that is, not point-sampled data). This is an integrated value of light of a subject incident on a surface (light receiving surface) having a finite area.

第1実施の形態では、このオンチップレンズの特性を正確に定式化することにより、画像推定処理として鮮明な画像(出力画像)を求める。なお、従来では、各画素のデータは、ポイントサンプリングされたデータとして考えることが一般的であった。しかしながら、本来は、上述したように、実際の撮像素子4の各画素の受光量は、ある面積を持った面に入射した光の値(積分値)となるため、正確な画像を推定(復元)しているとは言い難かった。   In the first embodiment, a clear image (output image) is obtained as an image estimation process by accurately formulating the characteristics of the on-chip lens. Conventionally, the data of each pixel is generally considered as point-sampled data. However, originally, as described above, the amount of light received by each pixel of the actual image sensor 4 is the value (integrated value) of light incident on a surface having a certain area, so an accurate image is estimated (restored). ) It was hard to say.

初めに、フレームメモリ22−1に記憶されている1枚目の画像について、各画素で得られる画素値とオンチップレンズにより入射される光との関係を定式化する。   First, for the first image stored in the frame memory 22-1, the relationship between the pixel value obtained at each pixel and the light incident by the on-chip lens is formulated.

例えば、図3の一番左上の「1番目,1番目の画素」である画素G00については、その画素値Gobs(1,1,1)と、真の緑色の光量Lg(x,y)との関係は、次式(4)のように表すことができる。   For example, for the pixel G00 that is the “first, first pixel” at the top left in FIG. 3, the pixel value Gobs (1, 1, 1) and the true green light quantity Lg (x, y) This relationship can be expressed as the following equation (4).

Figure 0004613510
・・・(4)
Figure 0004613510
... (4)

単板センサである受光素子4の一番左上の画素G00には、入射される光のうち、緑色の成分のみを透過するように、緑色のフィルタが装着されている。画素G00が受光する光は、オンチップレンズの効果のため、図3の座標系において(0,0),(0,1),(1,0),および(1,1)で囲まれる矩形領域に入射する光となる。即ち、(0,0),(0,1),(1,0),および(1,1)で囲まれる矩形領域に入射される被写体の光の全ては、「1番目、1番目の画素」であるG00で受光される。   A green filter is attached to the upper left pixel G00 of the light receiving element 4 which is a single plate sensor so as to transmit only the green component of the incident light. The light received by the pixel G00 is a rectangle surrounded by (0, 0), (0, 1), (1, 0), and (1, 1) in the coordinate system of FIG. 3 due to the effect of the on-chip lens. The light is incident on the region. That is, all of the light of the subject incident on the rectangular area surrounded by (0, 0), (0, 1), (1, 0), and (1, 1) is “the first and first pixels. Is received by G00.

式(4)の左辺は、1枚目の撮像画像の座標系の位置(x,y)における(入射する)真の緑色の光量Lg(x,y)を、(0,0),(0,1),(1,0),および(1,1)で囲まれる矩形領域、即ち、0≦x<1および0≦y<1で積分したものである。また、式(4)の右辺は、そのとき1枚目の「1番目、1番目の画素」で得られる(観測される)画素値Gobs(1,1,1)である。式(4)は、1枚目の撮像時における画素G00の受光面に入射する真の緑色の光量Lg(x,y)の、その受光面での積分値が、画素G00で観測される画素値Gobs(1,1,1)に等しいことを表している。   The left side of Expression (4) represents the true green light quantity Lg (x, y) (incident) at the position (x, y) in the coordinate system of the first captured image as (0, 0), (0 , 1), (1, 0), and (1, 1), that is, a rectangular region integrated, that is, integration with 0 ≦ x <1 and 0 ≦ y <1. The right side of the equation (4) is a pixel value Gobs (1, 1, 1) obtained (observed) at the first “first, first pixel” at that time. Equation (4) is a pixel in which the integrated value of the true green light quantity Lg (x, y) incident on the light receiving surface of the pixel G00 at the time of imaging of the first sheet is observed in the pixel G00. It represents that it is equal to the value Gobs (1, 1, 1).

なお、オンチップレンズの性能によっては、各画素の周辺部(いわゆる、「はじ」の部分)に入射される被写体の光を収束させることができない場合もある。その場合、式(4)の左辺で積分される範囲を、例えば、ひとまわり小さくして、例えば(0.1,0.1),(0.1,0.9),(0.9,0.1),および(0.9,0.9)で囲まれる矩形領域とすればよい。   Depending on the performance of the on-chip lens, there is a case where the light of the subject incident on the peripheral portion of each pixel (so-called “flip” portion) cannot be converged. In that case, for example, the range integrated on the left side of the equation (4) is reduced by a small amount, for example, (0.1, 0.1), (0.1, 0.9), (0.9, 0.1) and (0.9, 0.9).

また、デジタルカメラでは、単板センサの欠点である偽色を回避するために、オプティカルローパスフィルタを各画素の前に組み込んでいるものが多く、その場合、1画素の矩形領域よりも少し広範囲の光が画素に入力される。そのときには、式(4)の左辺で積分される範囲を、反対に、ひとまわり大きい矩形領域とすればよい。   In addition, in many digital cameras, an optical low-pass filter is incorporated in front of each pixel in order to avoid false color, which is a drawback of a single-plate sensor. In that case, a slightly wider range than a rectangular area of one pixel is used. Light is input to the pixel. In that case, the range integrated on the left side of the equation (4) may be set to a rectangular area that is slightly larger.

次に、図3において画素G00の右隣にある、「2番目,1番目の画素」である画素R01について考える。   Next, consider the pixel R01 which is the “second and first pixel” on the right side of the pixel G00 in FIG.

「2番目,1番目の画素」である画素R01については、その画素値Robs(1,2,1)と、真の緑色の光量Lg(x,y)との関係は、次式(5)のように表すことができる。   Regarding the pixel R01 which is the “second and first pixel”, the relationship between the pixel value Robs (1, 2, 1) and the true green light amount Lg (x, y) is expressed by the following equation (5). It can be expressed as

Figure 0004613510
・・・(5)
Figure 0004613510
... (5)

単板センサである受光素子4の一番左上の画素R01には、入射される光のうち、赤色の成分のみを透過するように、赤色のフィルタが装着されている。画素R01が受光する光は、オンチップレンズの効果のため、図3の座標系において(1,0),(1,1),(2,0),および(2,1)で囲まれる矩形領域に入射する光となる。即ち、(1,0),(1,1),(2,0),および(2,1)で囲まれる矩形領域に入射される被写体の光の全ては、「2番目、1番目の画素」であるR01で受光される。   A red filter is attached to the upper left pixel R01 of the light receiving element 4 which is a single plate sensor so as to transmit only the red component of the incident light. The light received by the pixel R01 is a rectangle surrounded by (1, 0), (1, 1), (2, 0), and (2, 1) in the coordinate system of FIG. 3 due to the effect of the on-chip lens. The light is incident on the region. That is, all of the light of the subject incident on the rectangular area surrounded by (1, 0), (1, 1), (2, 0), and (2, 1) is “the second and first pixels. Is received by R01.

式(5)の左辺は、1枚目の撮像画像の座標系の位置(x,y)における(入射する)真の赤色の光量Lr(x,y)を、(1,0),(1,1),(2,0),および(2,1)で囲まれる矩形領域、即ち、1≦x<2および0≦y<1で積分したものである。また、式(5)の右辺は、そのとき1枚目の「2番目、1番目の画素」で得られる(観測される)画素値Robs(1,2,1)である。式(5)は、1枚目の撮像時における画素R01の受光面に入射する真の赤色の光量Lr(x,y)の、その受光面での積分値が、画素R01で観測される画素値Robs(1,2,1)に等しいことを表している。   The left side of Expression (5) represents the true red light amount Lr (x, y) (incident) at the position (x, y) in the coordinate system of the first captured image as (1, 0), (1 , 1), (2, 0), and (2, 1), that is, a rectangular region that is integrated with 1 ≦ x <2 and 0 ≦ y <1. Further, the right side of Expression (5) is a pixel value Robs (1, 2, 1) obtained (observed) at the first “second, first pixel” at that time. Equation (5) is a pixel in which the integral value on the light receiving surface of the true red light quantity Lr (x, y) incident on the light receiving surface of the pixel R01 at the time of the first imaging is observed in the pixel R01. It represents that it is equal to the value Robs (1, 2, 1).

なお、オンチップレンズの性能によっては、各画素の周辺部(いわゆる、「はじ」の部分)に入射される被写体の光を収束させることができない場合もある。その場合、式(5)の左辺で積分される範囲を、例えば、ひとまわり小さくして、例えば(1.1,0.1),(1.1,0.9),(1.9,0.1),および(1.9,0.9)で囲まれる矩形領域とすればよい。   Depending on the performance of the on-chip lens, there is a case where the light of the subject incident on the peripheral portion of each pixel (so-called “flip” portion) cannot be converged. In that case, for example, the range to be integrated on the left side of the equation (5) is reduced by a little, for example, (1.1, 0.1), (1.1, 0.9), (1.9, 0.1) and (1.9, 0.9).

また、デジタルカメラでは、単板センサの欠点である偽色を回避するために、オプティカルローパスフィルタを各画素の前に組み込んでいるものが多く、その場合、1画素の矩形領域よりも少し広範囲の光が画素に入力される。そのときには、式(5)の左辺で積分される範囲を、反対に、ひとまわり大きい矩形領域とすればよい。   In addition, in many digital cameras, an optical low-pass filter is incorporated in front of each pixel in order to avoid false color, which is a drawback of a single-plate sensor. In that case, a slightly wider range than a rectangular area of one pixel is used. Light is input to the pixel. In that case, the range integrated on the left side of the equation (5) may be a rectangular region that is slightly larger.

1枚目の撮像画像のその他の画素についても同様に式をたてることができる。   A similar expression can be established for other pixels of the first captured image.

即ち、図3において「ig番目、jg番目の画素」である画素G(jg−1)(ig−1)については、その画素値Gobs(1,ig,jg)と、真の緑色の光量Lg(x,y)との関係は、式(6)のように表すことができる。   That is, for the pixel G (jg-1) (ig-1) which is the "igth, jgth pixel" in FIG. 3, the pixel value Gobs (1, ig, jg) and the true green light amount Lg The relationship with (x, y) can be expressed as in equation (6).

Figure 0004613510
・・・(6)
Figure 0004613510
... (6)

式(6)は、真の緑色の光量Lg(x,y)を、図3の座標系において(ig−1,jg−1),(ig−1,jg),(ig,jg−1),および(ig,jg)で囲まれる矩形領域、即ち、1枚目の撮像画像の座標系のig−1≦x<igおよびjg−1≦y<jgで積分したものが、画素値Gobs(1,ig,jg)であることを表している。   The expression (6) is used to calculate the true green light quantity Lg (x, y) in the coordinate system of FIG. 3 (ig-1, jg-1), (ig-1, jg), (ig, jg-1). , And (ig, jg), that is, a pixel area Gobs (, obtained by integrating ig−1 ≦ x <ig and jg−1 ≦ y <jg in the coordinate system of the first captured image. 1, ig, jg).

また、図3において「ir番目、jr番目の画素」であるR(jr−1)(ir−1)については、その画素値Robs(1,ir,jr)と、真の赤色の光量Lr(x,y)との関係は、式(7)のように表すことができる。   In addition, for R (jr−1) (ir−1), which is “irth and jrth pixels” in FIG. 3, the pixel value Robs (1, ir, jr) and the true red light amount Lr ( The relationship with x, y) can be expressed as in equation (7).

Figure 0004613510
・・・(7)
Figure 0004613510
... (7)

式(7)は、真の赤色の光量Lr(x,y)を、図3の座標系において(ir−1,jr−1),(ir−1,jr),(ir,jr−1),および(ir,jr)で囲まれる矩形領域、即ち、1枚目の撮像画像の座標系のir−1≦x<irおよびjr−1≦y<jrで積分したものが、画素値Robs(1,ir,jr)であることを表している。   Equation (7) indicates that the true red light amount Lr (x, y) is expressed as (ir-1, jr-1), (ir-1, jr), (ir, jr-1) in the coordinate system of FIG. , And (ir, jr), that is, a pixel region Robs () obtained by integrating ir-1 ≦ x <ir and jr-1 ≦ y <jr in the coordinate system of the first captured image. 1, ir, jr).

さらに、図3において「ib番目、jb番目の画素」である画素B(jb−1)(ib−1)については、その画素値Bobs(1,ib,jb)と、真の青色の光量Lb(x,y)との関係は、式(8)のように表すことができる。   Further, for the pixel B (jb-1) (ib-1) which is the “ibth and jbth pixel” in FIG. 3, the pixel value Bobs (1, ib, jb) and the true blue light quantity Lb The relationship with (x, y) can be expressed as in equation (8).

Figure 0004613510
・・・(8)
Figure 0004613510
... (8)

式(8)は、真の青色の光量Lb(x,y)を、図3の座標系において(ib−1,jb−1),(ib−1,jb),(ib,jb−1),および(ib,jb)で囲まれる矩形領域、即ち、1枚目の撮像画像の座標系のib−1≦x<ibおよびjb−1≦y<jbで積分したものが、画素値Bobs(1,ib,jb)であることを表している。   The expression (8) is obtained by converting the true blue light quantity Lb (x, y) into (ib-1, jb-1), (ib-1, jb), (ib, jb-1) in the coordinate system of FIG. , And (ib, jb), that is, the integrated value of ib-1 ≦ x <ib and jb-1 ≦ y <jb in the coordinate system of the first captured image is the pixel value Bobs ( 1, ib, jb).

なお、実際には、上述したように、画像信号(観測される画素値)には、ノイズ量Eも含まれており、さらに、そのノイズ量EはMk倍にゲインアップされている。そこで、(E×Mk)のノイズ成分を式(6),(7),(8)に考慮すると、それぞれ、式(9),(10),(11)で表される光量積分条件式が得られる。   Actually, as described above, the image signal (observed pixel value) includes the noise amount E, and the noise amount E is gained up to Mk times. Therefore, when the noise component of (E × Mk) is considered in the equations (6), (7), and (8), the light quantity integration conditional expressions represented by the equations (9), (10), and (11) are respectively obtained. can get.

Figure 0004613510
・・・(9)
Figure 0004613510
... (9)

Figure 0004613510
・・・(10)
Figure 0004613510
... (10)

Figure 0004613510
・・・(11)
Figure 0004613510
(11)

ここで、|x|は、xの絶対値を表す。   Here, | x | represents the absolute value of x.

式(9)は、光量Lg(x,y)の積分値と、観測される画素値Gobs(1,ig,jg)との差が、想定し得るノイズ量の最大値M1×E以下であることを表している。式(10)および式(11)も同様である。   In the equation (9), the difference between the integrated value of the light amount Lg (x, y) and the observed pixel value Gobs (1, ig, jg) is equal to or less than the maximum noise amount M1 × E that can be assumed. Represents that. The same applies to equations (10) and (11).

以下の説明では、k枚目の撮像画像のことをk枚目画像とも称することにする。   In the following description, the k-th captured image is also referred to as a k-th image.

次に、フレームメモリ22−2に記憶されている2枚目画像について、1枚目画像と同様に、各画素で得られる(観測される)画素値とオンチップレンズにより入射される光との関係を定式化する。   Next, with respect to the second image stored in the frame memory 22-2, the pixel value obtained (observed) in each pixel and the light incident by the on-chip lens, as in the first image. Formulate the relationship.

2枚目以降の撮像画像の座標系は、動き検出回路23により検出された変換パラメータ(θk,Tkx,Tky,Sk)(k=2乃至N)を用いて1枚目の撮像画像の座標系に変換される。   The coordinate system of the second and subsequent captured images is the coordinate system of the first captured image using the conversion parameters (θk, Tkx, Tky, Sk) (k = 2 to N) detected by the motion detection circuit 23. Is converted to

2枚目画像の「1番目,1番目の画素」である画素G00については、その画素値Gobs(2,1,1)と、緑色の光量Lg(x,y)との関係は、次式(12)のように表すことができる。   For the pixel G00 which is the “first and first pixels” of the second image, the relationship between the pixel value Gobs (2, 1, 1) and the green light quantity Lg (x, y) is It can be expressed as (12).

Figure 0004613510
・・・(12)
Figure 0004613510
(12)

受光素子4の一番左上の画素G00は、入射される光のうち、緑色の成分のみを吸収するように、緑色のフィルタが装着されている。画素G00が受光する光は、オンチップレンズの効果のため、2枚目画像の座標系において(0,0),(0,1),(1,0),および(1,1)で囲まれる矩形領域に入射する光となる。   The upper left pixel G00 of the light receiving element 4 is equipped with a green filter so as to absorb only the green component of the incident light. The light received by the pixel G00 is surrounded by (0, 0), (0, 1), (1, 0), and (1, 1) in the coordinate system of the second image due to the effect of the on-chip lens. The light is incident on the rectangular area.

その2枚目画像の座標系における位置(0,0),(0,1),(1,0),および(1,1)を、変換パラメータ(θ2,T2x,T2y,S2)を用いて1枚目画像の座標系に変換した位置が、(0(2),0(2)),(0(2),1(2)),(1(2),0(2)),および(1(2),1(2))である。従って、(0(2),0(2)),(0(2),1(2)),(1(2),0(2)),および(1(2),1(2))で囲まれる矩形領域に入射される被写体の光の全ては、2枚目の撮像時に「1番目、1番目の画素」である画素G00で受光される。なお、2枚目画像の位置(x,y)を1枚目の画像の座標に変換した位置をP(2,x,y)とも書くことにする。 Using the conversion parameters (θ2, T2x, T2y, S2), the positions (0, 0), (0, 1), (1, 0), and (1, 1) in the coordinate system of the second image are used. The position converted to the coordinate system of the first image is (0 (2) , 0 (2) ), (0 (2) , 1 (2) ), (1 (2) , 0 (2) ), and (1 (2) , 1 (2) ). Therefore, (0 (2) , 0 (2) ), (0 (2) , 1 (2) ), (1 (2) , 0 (2) ), and (1 (2) , 1 (2) ) All of the light of the subject incident on the rectangular region surrounded by is received by the pixel G00 which is the “first and first pixel” at the time of the second image pickup. The position obtained by converting the position (x, y) of the second image into the coordinates of the first image is also written as P (2, x, y).

式(12)の左辺は、真の緑色の光量Lg(x,y)を、P(2,0,0),P(2,0,1),P(2,1,0),およびP(2,1,1)で囲まれる矩形領域、即ち、1枚目座標系において、(0(2),0(2)),(0(2),1(2)),(1(2),0(2)),および(1(2),1(2))で囲まれる矩形領域で積分したものである。また、式(12)の右辺は、そのとき2枚目画像の「1番目、1番目の画素」で得られる画素値Gobs(2,1,1)である。式(12)は、2枚目の画素G00で観測される画素値Gobs(2,1,1)が、1枚目の撮像時における座標系において、(0(2),0(2)),(0(2),1(2)),(1(2),0(2)),および(1(2),1(2))で囲まれる矩形領域の範囲に入射する真の緑色の光量Lg(x,y)の積分値に等しいことを表す。式(12)において、∫∫dxdyは、(0(2),0(2)),(0(2),1(2)),(1(2),0(2)),および(1(2),1(2))で囲まれる矩形領域の積分を表すものとする。式(13)以降も同様である。 The left side of Equation (12) represents the true green light quantity Lg (x, y) as P (2, 0, 0), P (2, 0, 1), P (2, 1, 0), and P In the rectangular area surrounded by (2, 1, 1), that is, in the first frame coordinate system, (0 (2) , 0 (2) ), (0 (2) , 1 (2) ), (1 (2 ) , 0 (2) ), and (1 (2) , 1 (2) ). In addition, the right side of Expression (12) is a pixel value Gobs (2, 1, 1) obtained at the “first, first pixel” of the second image at that time. Expression (12) indicates that the pixel value Gobs (2, 1, 1) observed at the second pixel G00 is (0 (2) , 0 (2) ) in the coordinate system at the time of imaging of the first image. , (0 (2) , 1 (2) ), (1 (2) , 0 (2) ), and true green that is incident on the rectangular area bounded by (1 (2) , 1 (2) ) It represents that it is equal to the integral value of the light quantity Lg (x, y). In equation (12), ∫∫dxdy is (0 (2) , 0 (2) ), (0 (2) , 1 (2) ), (1 (2) , 0 (2) ), and (1 (2) , 1 (2) ) represents the integral of the rectangular region enclosed. The same applies to equation (13) and thereafter.

なお、オンチップレンズの性能によっては、各画素の周辺部(いわゆる、「はじ」の部分)に入射される被写体の光を収束させることができない場合もある。その場合、式(12)の左辺で積分される範囲を、上述した1枚目の画像の場合と同様に、ひとまわり小さい矩形領域とすればよい。   Depending on the performance of the on-chip lens, there is a case where the light of the subject incident on the peripheral portion of each pixel (so-called “flip” portion) cannot be converged. In this case, the range that is integrated on the left side of Expression (12) may be a rectangular area that is slightly smaller, as in the case of the first image described above.

また、デジタルカメラでは、単板センサの欠点である偽色を回避するために、オプティカルローパスフィルタを各画素の前に組み込んでいるものが多く、その場合、1画素の矩形領域よりも少し広範囲の光が画素に入力される。そのときには、式(12)の左辺で積分される範囲を、反対に、ひとまわり大きい矩形領域とすればよい。   In addition, in many digital cameras, an optical low-pass filter is incorporated in front of each pixel in order to avoid false color, which is a drawback of a single-plate sensor. In that case, a slightly wider range than a rectangular area of one pixel is used. Light is input to the pixel. In this case, the range integrated on the left side of the equation (12) may be a rectangular region that is slightly larger.

次に、2枚目画像の画素G00の右隣となる、「2番目,1番目の画素」である画素R01について考える。   Next, consider the pixel R01 that is the “second and first pixel” that is adjacent to the pixel G00 in the second image.

2枚目画像の「2番目,1番目の画素」である画素R01については、その画素値Robs(2,2,1)と、真の赤色の光量Lr(x,y)との関係は、次式(13)のように表すことができる。   For the pixel R01 which is the “second and first pixel” of the second image, the relationship between the pixel value Robs (2, 2, 1) and the true red light quantity Lr (x, y) is It can be expressed as the following formula (13).

Figure 0004613510
・・・(13)
Figure 0004613510
... (13)

受光素子4の一番左上の画素R01は、入射される光のうち、赤色の成分のみを吸収するように、赤色のフィルタが装着されている。画素R01が受光する部分は、オンチップレンズの効果のため、2枚目画像の座標系において(1,0),(1,1),(2,0),および(2,1)で囲まれる矩形領域に入射する光となる。   The upper left pixel R01 of the light receiving element 4 is equipped with a red filter so as to absorb only the red component of the incident light. The portion received by the pixel R01 is surrounded by (1, 0), (1, 1), (2, 0), and (2, 1) in the coordinate system of the second image for the effect of the on-chip lens. The light is incident on the rectangular area.

その2枚目画像の座標系における位置(1,0),(1,1),(2,0),および(2,1)を、変換パラメータ(θ2,T2x,T2y,S2)を用いて1枚目画像の座標系に変換した位置が、(1(2),0(2)),(1(2),1(2)),(2(2),0(2)),および(2(2),1(2))である。従って、(1(2),0(2)),(1(2),1(2)),(2(2),0(2)),および(2(2),1(2))で囲まれる矩形領域に入射される被写体の光の全ては、2枚目の撮像時に「2番目、1番目の画素」であるR01で受光される。 The positions (1, 0), (1, 1), (2, 0), and (2, 1) in the coordinate system of the second image are converted using the conversion parameters (θ2, T2x, T2y, S2). The position converted to the coordinate system of the first image is (1 (2) , 0 (2) ), (1 (2) , 1 (2) ), (2 (2) , 0 (2) ), and (2 (2) , 1 (2) ). Therefore, (1 (2) , 0 (2) ), (1 (2) , 1 (2) ), (2 (2) , 0 (2) ), and (2 (2) , 1 (2) ) All of the light of the subject incident on the rectangular area surrounded by is received by R01 which is the “second and first pixel” at the time of imaging the second image.

式(13)の左辺は、真の赤色の光量Lr(x,y)を、P(2,1,0),P(2,1,1),P(2,2,0),およびP(2,2,1)で囲まれる矩形領域、即ち、1枚目座標系において、(1(2),0(2)),(1(2),1(2)),(2(2),0(2)),および(2(2),1(2))で囲まれる矩形領域で積分したものである。また、式(13)の右辺は、そのとき2枚目の「2番目、1番目の画素」で得られる画素値Robs(2,2,1)である。式(13)は、2枚目の画素R01で観測される画素値Robs(2,2,1)が、1枚目の撮像時における座標系において、(1(2),0(2)),(1(2),1(2)),(2(2),0(2)),および(2(2),1(2))で囲まれる矩形領域の範囲に入射する真の赤色の光量Lr(x,y)の積分値に等しいことを表す。 The left side of equation (13) represents the true red light quantity Lr (x, y) as P (2,1,0), P (2,1,1), P (2,2,0), and P In the rectangular region surrounded by (2 , 2 , 1 ) , that is, in the first frame coordinate system, (1 (2) , 0 (2) ), (1 (2) , 1 (2) ), (2 (2 ) , 0 (2) ), and (2 (2) , 1 (2) ). Further, the right side of the equation (13) is a pixel value Robs (2, 2, 1) obtained at the second “second, first pixel” at that time. Expression (13) indicates that the pixel value Robs (2, 2, 1) observed at the second pixel R01 is (1 (2) , 0 (2) ) in the coordinate system at the time of imaging of the first image. , (1 (2) , 1 (2) ), (2 (2) , 0 (2) ), and true red that is incident on the rectangular area bounded by (2 (2) , 1 (2) ) It represents that it is equal to the integral value of the light quantity Lr (x, y) of the.

なお、オンチップレンズの性能によっては、各画素の周辺部(いわゆる、「はじ」の部分)に入射される被写体の光を収束させることができない場合もある。その場合、式(13)の左辺で積分される範囲を、例えば、ひとまわり小さい矩形領域とすればよい。   Depending on the performance of the on-chip lens, there is a case where the light of the subject incident on the peripheral portion of each pixel (so-called “flip” portion) cannot be converged. In this case, the range that is integrated on the left side of Equation (13) may be a rectangular region that is slightly smaller than the one.

また、デジタルカメラでは、単板センサの欠点である偽色を回避するために、オプティカルローパスフィルタを各画素の前に組み込んでいるものが多く、その場合、1画素の矩形領域よりも少し広範囲の光が画素に入力される。そのときには、式(13)の左辺で積分される範囲を、反対に、ひとまわり大きい矩形領域とすればよい。   In addition, in many digital cameras, an optical low-pass filter is incorporated in front of each pixel in order to avoid false color, which is a drawback of a single-plate sensor. In that case, a slightly wider range than a rectangular area of one pixel is used. Light is input to the pixel. In that case, the range integrated on the left side of the equation (13) may be a rectangular region that is slightly larger.

2枚目画像のその他の画素についても同様に式をたてることができる。   The same formula can be established for the other pixels of the second image.

即ち、2枚目画像の「ig番目、jg番目の画素」であるG(jg−1)(ig−1)については、その画素値Gobs(2,ig,jg)と、真の緑色の光量Lg(x,y)との関係は、式(14)のように表すことができる。   That is, for G (jg−1) (ig−1) which is the “igth and jgth pixels” of the second image, the pixel value Gobs (2, ig, jg) and the true green light amount The relationship with Lg (x, y) can be expressed as in equation (14).

Figure 0004613510
・・・(14)
Figure 0004613510
(14)

式(14)は、真の緑色の光量Lg(x,y)を、2枚目画像の座標系において(ig−1,jg−1),(ig−1,jg),(ig,jg−1),および(ig,jg)で囲まれる矩形領域、即ち、1枚目画像の座標系において、(ig−1(2),jg−1(2)),(ig−1(2),jg(2)),(ig(2),jg−1(2)),および(ig(2),jg(2))で囲まれる矩形領域で積分したものが、画素値Gobs(2,ig,jg)であることを表している。 Expression (14) is for calculating the true green light quantity Lg (x, y) in the coordinate system of the second image (ig-1, jg-1), (ig-1, jg), (ig, jg- 1) and a rectangular region surrounded by (ig, jg), that is, in the coordinate system of the first image, (ig-1 (2) , jg-1 (2) ), (ig-1 (2) , jg (2) ), (ig (2) , jg-1 (2) ), and integrated in a rectangular area surrounded by (ig (2) , jg (2) ) are pixel values Gobs (2, ig , Jg).

また、2枚目画像の「ir番目、jr番目の画素」であるR(jr−1)(ir−1)については、その画素値Robs(2,ir,jr)と、真の赤色の光量Lr(x,y)との関係は、式(15)のように表すことができる。   For R (jr-1) (ir-1), which is the "irth and jrth pixels" of the second image, the pixel value Robs (2, ir, jr) and the true red light quantity The relationship with Lr (x, y) can be expressed as in equation (15).

Figure 0004613510
・・・(15)
Figure 0004613510
... (15)

式(15)は、真の赤色の光量Lr(x,y)を、2枚目画像の座標系において(ir−1,jr−1),(ir−1,jr),(ir,jr−1),および(ir,jr)で囲まれる矩形領域、即ち、1枚目画像の座標系において、(ir−1(2),jr−1(2)),(ir−1(2),jr(2)),(ir(2),jr−1(2)),および(ir(2),jr(2))で囲まれる矩形領域で積分したものが、画素値Robs(2,ir,jr)であることを表している。 The expression (15) is used to calculate the true red light amount Lr (x, y) in the coordinate system of the second image (ir-1, jr-1), (ir-1, jr), (ir, jr- 1) and a rectangular region surrounded by (ir, jr), that is, in the coordinate system of the first image, (ir-1 (2) , jr-1 (2) ), (ir-1 (2) , jr (2) ), (ir (2) , jr-1 (2) ) and (ir (2) , jr (2) ) are integrated in the rectangular region surrounded by the pixel value Robs (2, ir , Jr).

さらに、2枚目画像の「ib番目、jb番目の画素」であるB(jb−1)(ib−1)については、その画素値Bobs(2,ib,jb)と、真の青色の光量Lb(x,y)との関係は、式(16)のように表すことができる。   Furthermore, for B (jb-1) (ib-1) which is the "ibth and jbth pixels" of the second image, the pixel value Bobs (2, ib, jb) and the true blue light quantity The relationship with Lb (x, y) can be expressed as in Expression (16).

Figure 0004613510
・・・(16)
Figure 0004613510
... (16)

式(16)は、真の青色の光量Lb(x,y)を、2枚目画像の座標系において(ib−1,jb−1),(ib−1,jb),(ib,jb−1),および(ib,jb)で囲まれる矩形領域、即ち、1枚目画像の座標系において、(ib−1(2),jb−1(2)),(ib−1(2),jb(2)),(ib(2),jb−1(2)),および(ib(2),jb(2))で囲まれる矩形領域で積分したものが、画素値Bobs(2,ib,jb)であることを表している。 Expression (16) expresses the true blue light quantity Lb (x, y) in the coordinate system of the second image (ib-1, jb-1), (ib-1, jb), (ib, jb- 1) and (ib, jb) in a rectangular area, that is, in the coordinate system of the first image, (ib-1 (2) , jb-1 (2) ), (ib-1 (2) , jb (2) ), (ib (2) , jb-1 (2) ), and (ib (2) , jb (2) ) are integrated in a rectangular region surrounded by the pixel value Bobs (2, ib , Jb).

なお、実際には、上述したように、画像信号(観測される画素値)には、ノイズ量Eも含まれており、さらに、そのノイズ量EはMk倍にゲインアップされている。(E×Mk)のノイズ成分を式(14),(15),(16)に考慮すると、それぞれ、式(17),(18),(19)で表される光量積分条件式が得られる。   Actually, as described above, the image signal (observed pixel value) includes the noise amount E, and the noise amount E is gained up to Mk times. When the noise component of (E × Mk) is considered in the equations (14), (15), and (16), the light quantity integration conditional expressions represented by the equations (17), (18), and (19) are obtained, respectively. .

Figure 0004613510
・・・(17)
Figure 0004613510
... (17)

Figure 0004613510
・・・(18)
Figure 0004613510
... (18)

Figure 0004613510
・・・(19)
Figure 0004613510
... (19)

ここで、|x|は、xの絶対値を表す。   Here, | x | represents the absolute value of x.

式(17)は、光量Lg(x,y)の積分値と、観測される画素値Gobs(2,ig,jg)との差が、想定し得るノイズ量の最大値M2×E以下であることを表している。式(18)および式(19)も同様である。   In Expression (17), the difference between the integrated value of the light amount Lg (x, y) and the observed pixel value Gobs (2, ig, jg) is equal to or less than the maximum noise amount M2 × E that can be assumed. Represents that. The same applies to equations (18) and (19).

図5を参照して、2枚目画像の位置(x,y)と、その位置(x,y)を1枚目画像の座標に変換した位置P(2,x,y)との関係について説明する。   Referring to FIG. 5, the relationship between the position (x, y) of the second image and the position P (2, x, y) obtained by converting the position (x, y) to the coordinates of the first image. explain.

図5左側は、2枚目画像の座標系における、所定の4点(i−1,j−1),(i−1,j),(i,j−1),および(i,j)で囲まれる矩形領域のある画素31を示している。   The left side of FIG. 5 shows predetermined four points (i-1, j-1), (i-1, j), (i, j-1), and (i, j) in the coordinate system of the second image. A pixel 31 having a rectangular region surrounded by is shown.

図5右側は、左側の画素31を1枚目画像の座標系に変換した後の画素31'を示している。従って、図5左側の画素31と図5右側の画素31'は、同じ被写体(の一部)が映っている(例えば、ある風景)。   The right side of FIG. 5 shows the pixel 31 ′ after the left side pixel 31 is converted into the coordinate system of the first image. Accordingly, the pixel 31 on the left side of FIG. 5 and the pixel 31 ′ on the right side of FIG. 5 show the same subject (a part thereof) (for example, a certain landscape).

ここでは、2枚目以降の撮像画像の各画素の画素値が、基準画像である1枚目の画像の撮像時の光(被写体からの光)の積分値として得られるとして、その積分値を得るときの積分範囲を、1枚目の座標系を基準として設定する。これにより、手ブレにより位置ズレが生じていた1乃至N枚目の撮像画像の、いわば位置合わせ(1枚目の撮像画像を基準とした位置合わせ)が行われる。   Here, it is assumed that the pixel value of each pixel of the second and subsequent captured images is obtained as an integrated value of light (light from the subject) at the time of capturing the first image that is the reference image. The integration range when obtaining is set with reference to the first coordinate system. As a result, the first to N-th captured images that have been misaligned due to camera shake are so-called aligned (alignment based on the first captured image).

2枚目画像の座標系における位置(i−1,j−1)は、変換パラメ−タ(θ2,T2x,T2y,S2)により変換することで、1枚目画像の座標系での位置P(2,i−1,j−1)とすることができる。また、2枚目画像の座標系における位置(i−1,j)は、変換パラメ−タ(θ2,T2x,T2y,S2)により変換することで、1枚目画像の座標系での位置P(2,i−1,j)とすることができる。同様に、2枚目画像の座標系における位置(i,j−1)と(i,j)も、変換パラメ−タ(θ2,T2x,T2y,S2)により変換することで、1枚目画像の座標系での位置P(2,i,j−1)とP(2,i,j)と、それぞれすることができる。なお、X座標軸またはY座標軸が、単にXまたはYと表されている場合には、1枚目画像の座標系におけるX座標軸またはY座標軸を表すものとする。   The position (i-1, j-1) in the coordinate system of the second image is converted by the conversion parameters (θ2, T2x, T2y, S2), so that the position P in the coordinate system of the first image is obtained. (2, i-1, j-1). Further, the position (i−1, j) in the coordinate system of the second image is converted by the conversion parameters (θ2, T2x, T2y, S2), thereby the position P in the coordinate system of the first image. (2, i-1, j). Similarly, the positions (i, j−1) and (i, j) in the coordinate system of the second image are also converted by the conversion parameters (θ2, T2x, T2y, S2), thereby the first image. The positions P (2, i, j−1) and P (2, i, j) in the coordinate system can be respectively set. When the X coordinate axis or the Y coordinate axis is simply expressed as X or Y, it represents the X coordinate axis or the Y coordinate axis in the coordinate system of the first image.

上述した2枚目画像と同様に、k枚目画像(k=3乃至N)の座標系における位置(i−1,j−1),(i−1,j),(i,j−1),および(i,j)も、変換パラメータ(θk,Tkx,Tky,Sk)により変換することで、1枚目画像の座標系での位置P(k,i−1,j−1),P(k,i−1,j),P(k,i,j−1),およびP(k,i,j)と、それぞれすることができる。   Similar to the second image described above, the positions (i−1, j−1), (i−1, j), (i, j−1) in the coordinate system of the kth image (k = 3 to N). ), And (i, j) are also converted by the conversion parameters (θk, Tkx, Tky, Sk), so that the position P (k, i−1, j−1) in the coordinate system of the first image is P (k, i-1, j), P (k, i, j-1), and P (k, i, j), respectively.

そして、k枚目画像(k=3乃至N)について、Mk倍にゲインアップされたノイズ量Eを考慮すると、式(17)乃至式(19)と同様の式(20)乃至(22)で表される光量積分条件式が得られる。   Then, for the k-th image (k = 3 to N), when considering the noise amount E gained up to Mk times, Expressions (20) to (22) similar to Expressions (17) to (19) are used. The expressed light quantity integration conditional expression is obtained.

Figure 0004613510
・・・(20)
Figure 0004613510
... (20)

式(20)は、真の緑色の光量Lg(x,y)を、P(k,ig−1,jg−1),P(k,ig−1,jg),P(k,ig,jg−1),およびP(k,ig,jg)で囲まれる矩形領域、即ち、1枚目座標系において、(ig−1(k),jg−1(k)),(ig−1(k),jg(k)),(ig(k),jg−1(k)),および(ig(k),jg(k))で囲まれる矩形領域で積分したものと、k枚目画像の「ig番目、jg番目の画素」で得られる画素値Gobs(k,ig,jg)とが、Mk倍にゲインアップされたノイズ量E(誤差)を考慮して等しいこと、即ち、真の緑色の光量Lg(x,y)の積分値と、観測される画素値Gobs(k,ig,jg)との差(絶対値)が、想定し得るノイズ量の最大値以下であることを表している。ここで、|x|は、xの絶対値を表す。 Expression (20) is for calculating the true green light quantity Lg (x, y) as P (k, ig-1, jg-1), P (k, ig-1, jg), P (k, ig, jg). -1) and P (k, ig, jg), that is, (ig-1 (k) , jg-1 (k) ), (ig-1 (k) ) , Jg (k) ), (ig (k) , jg-1 (k) ) and (ig (k) , jg (k) ) The pixel value Gobs (k, ig, jg) obtained at “ig-th and jg-th pixels” is equal in consideration of the noise amount E (error) gained up to Mk times, that is, true green The difference (absolute value) between the integrated value of the light quantity Lg (x, y) of the pixel and the observed pixel value Gobs (k, ig, jg) is equal to or less than the maximum noise amount that can be assumed. Yes. Here, | x | represents the absolute value of x.

Figure 0004613510
・・・(21)
Figure 0004613510
... (21)

式(21)は、真の赤色の光量Lr(x,y)を、P(k,ir−1,jr−1),P(k,ir−1,jr),P(k,ir,jr−1),およびP(k,ir,jr)で囲まれる矩形領域、即ち、1枚目座標系において、(ir−1(k),jr−1(k)),(ir−1(k),jr(k)),(ir(k),jr−1(k)),および(ir(k),jr(k))で囲まれる矩形領域で積分したものと、k枚目画像の「ir番目、jr番目の画素」で得られる画素値Robs(k,ir,jr)とが、Mk倍にゲインアップされたノイズ量E(誤差)を考慮して等しいこと、即ち、真の赤色の光量Lr(x,y)の積分値と、観測される画素値Robs(k,ir,jr)との差(絶対値)が、想定し得るノイズ量の最大値以下であることを表している。ここで、|x|は、xの絶対値を表す。 The expression (21) indicates that the true red light amount Lr (x, y) is expressed as P (k, ir-1, jr-1), P (k, ir-1, jr), P (k, ir, jr). -1) and P (k, ir, jr), ie, in the first coordinate system, (ir-1 (k) , jr-1 (k) ), (ir-1 (k ) , Jr (k) ), (ir (k) , jr-1 (k) ) and (ir (k) , jr (k) ) The pixel value Robs (k, ir, jr) obtained in “ir-th and jr-th pixels” is equal in consideration of the noise amount E (error) gained up by Mk times, that is, true red The difference (absolute value) between the integrated value of the light amount Lr (x, y) and the observed pixel value Robs (k, ir, jr) is equal to or less than the maximum noise amount that can be assumed. Yes. Here, | x | represents the absolute value of x.

Figure 0004613510
・・・(22)
Figure 0004613510
(22)

式(22)は、真の青色の光量Lb(x,y)を、P(k,ib−1,jb−1),P(k,ib−1,jb),P(k,ib,jb−1),およびP(k,ib,jb)で囲まれる矩形領域、即ち、1枚目座標系において、(ib−1(k),jb−1(k)),(ib−1(k),jb(k)),(ib(k),jb−1(k)),および(ib(k),jb(k))で囲まれる矩形領域で積分したものと、k枚目画像の「ib番目、jb番目の画素」で得られる画素値Bobs(k,ib,jb)とが、Mk倍にゲインアップされたノイズ量E(誤差)を考慮して等しいこと、即ち、真の青色の光量Lb(x,y)の積分値と、観測される画素値Bobs(k,ib,jb)との差(絶対値)が、想定し得るノイズ量の最大値以下であることを表している。ここで、|x|は、xの絶対値を表す。 Equation (22) is obtained by converting the true blue light quantity Lb (x, y) into P (k, ib-1, jb-1), P (k, ib-1, jb), P (k, ib, jb). -1) and P (k, ib, jb), that is, (ib-1 (k) , jb-1 (k) ), (ib-1 (k) ) , Jb (k) ), (ib (k) , jb-1 (k) ), and (ib (k) , jb (k) ) The pixel value Bobs (k, ib, jb) obtained at “ib-th and jb-th pixels” is equal in consideration of the noise amount E (error) gained up to Mk times, that is, true blue The difference (absolute value) between the integrated value of the light amount Lb (x, y) and the observed pixel value Bobs (k, ib, jb) is equal to or less than the maximum noise amount that can be assumed. Yes. Here, | x | represents the absolute value of x.

次に、図6のフローチャートを参照して、図2のステップS4における画像推定処理の第1実施の形態について説明する。   Next, a first embodiment of the image estimation process in step S4 in FIG. 2 will be described with reference to the flowchart in FIG.

初めに、ステップS11において、演算回路24は、1枚目画像の各画素の画素値Gobs(1,ig,jg)から、すべての(ig,jg)に対する式(9)で表される光量積分条件式を、Robs(1,ir,jr)から、すべての(ir,jr)に対する式(10)で表される光量積分条件式を、Bobs(1,ib,jb)から、すべての(ib,jb)に対する式(11)で表される光量積分条件式を生成し、ステップS12に進む。   First, in step S11, the arithmetic circuit 24 calculates the light intensity integration represented by the equation (9) for all (ig, jg) from the pixel values Gobs (1, ig, jg) of each pixel of the first image. The conditional expression is changed from Robs (1, ir, jr), and the light quantity integration conditional expression expressed by the expression (10) for all (ir, jr) is changed from Bobs (1, ib, jb) to all (ib , Jb), a light quantity integration conditional expression represented by the expression (11) is generated, and the process proceeds to step S12.

ステップS12において、演算回路24は、2枚目画像の各画素の画素値Gobs(2,ig,jg)から、すべての(ig,jg)に対する式(17)で表される光量積分条件式を、Robs(2,ir,jr)から、すべての(ir,jr)に対する式(18)で表される光量積分条件式を、Bobs(2,ib,jb)から、すべての(ib,jb)に対する式(19)で表される光量積分条件式を生成し、ステップS13に進む。ここで、演算回路24は、2枚目画像の位置を1枚目画像の位置に変換するため、動き検出回路23−1から供給される変換パラメータ(θ2,T2x,T2y,S2)を使用する。   In step S12, the arithmetic circuit 24 calculates the light quantity integration conditional expression expressed by the expression (17) for all (ig, jg) from the pixel values Gobs (2, ig, jg) of each pixel of the second image. , Robs (2, ir, jr), the light quantity integration conditional expression expressed by the equation (18) for all (ir, jr) from Bobs (2, ib, jb) to all (ib, jb) Is generated, and the process proceeds to step S13. Here, the arithmetic circuit 24 uses the conversion parameters (θ2, T2x, T2y, S2) supplied from the motion detection circuit 23-1 to convert the position of the second image into the position of the first image. .

ステップS13において、演算回路24は、k枚目画像(k=3乃至N)の各画素の画素値Gobs(k,ig,jg)から、すべての(ig,jg)に対する式(20)で表される光量積分条件式を、Robs(k,ir,jr)から、すべての(ir,jr)に対する式(21)で表される光量積分条件式を、Bobs(k,ib,jb)から、すべての(ib,jb)に対する式(22)で表される光量積分条件式を生成し、ステップS14に進む。ここで、演算回路24は、k枚目画像の位置を1枚目画像の位置に変換するため、動き検出回路23−(k−1)から供給される変換パラメータ(θk,Tkx,Tky,Sk)を使用する。   In step S13, the arithmetic circuit 24 expresses the expression (20) for all (ig, jg) from the pixel values Gobs (k, ig, jg) of each pixel of the k-th image (k = 3 to N). From Robs (k, ir, jr), the light quantity integration conditional expression expressed by the equation (21) for all (ir, jr) is expressed as Bobs (k, ib, jb). A light quantity integration conditional expression expressed by Expression (22) for all (ib, jb) is generated, and the process proceeds to Step S14. Here, in order to convert the position of the k-th image into the position of the first image, the arithmetic circuit 24 converts the conversion parameters (θk, Tkx, Tky, Sk) supplied from the motion detection circuit 23- (k-1). ).

ステップS14において、演算回路24は、ステップS11乃至S13で求めた式(9),(10),(11),(17),(18),(19),(20),(21),および(22)の光量積分条件式を満たす解を演算することにより、真の緑色の光量Lg(x,y)、真の赤色の光量Lr(x,y)、真の青色の光量Lb(x,y)を推定して処理を戻る。ここで得られる真の緑色の光量Lg(x,y)、真の赤色の光量Lr(x,y)、真の青色の光量Lb(x,y)(の推定値)が、求めるべき1枚の鮮明な画像の画像信号(G信号、R信号、B信号)として、D/Aコンバータ9またはコーデック12に供給される。   In step S14, the arithmetic circuit 24 calculates the equations (9), (10), (11), (17), (18), (19), (20), (21), and the values obtained in steps S11 to S13, and By calculating a solution that satisfies the light quantity integration conditional expression (22), the true green light quantity Lg (x, y), the true red light quantity Lr (x, y), and the true blue light quantity Lb (x, y) y) is estimated and the process returns. The true green light amount Lg (x, y), the true red light amount Lr (x, y), and the true blue light amount Lb (x, y) (estimated values) obtained here are one sheet to be obtained. Are supplied to the D / A converter 9 or the codec 12 as image signals (G signal, R signal, B signal).

なお、ステップS14における、全ての光量積分条件式を満たす解、即ち、真の緑色の光量Lg(x,y)、真の赤色の光量Lr(x,y)、真の青色の光量Lb(x,y)を求める解法としては、複数の条件を満たす画像データを求める解法を用いる。かかる解法としては、例えば、Projection Onto Convex Setsの解法(POCS法)などがある。POCS法は、凸射影の繰り返しによって拘束条件に合う最適解を推定する方法であり、例えば、論文「D. C. Youla and H. Webb, “Image Restoration by the Method of Convex Projections: part 1 theory”, IEEE Trans. Med. Image., vol. 1 No. 2, pp81-94, Oct. 1982」などに記載されているので、その説明を省略する。また、POCS法を使い複数枚の低解像度動画像から高解像度の静止画を作成する方法が特開平8-263639に記載されている。この従来技術の方法では、動きベクトルを使った一画素或いは半画素等の特定精度での動き補正が基本であり、各画素の値を推定する際に考慮される画素の数は、該特定精度によって定まる固定的なものが用いられているものと考えられる。これに対し、本実施の形態では、アナログ的な手法による動き補正を適用することができ、各画素の値を推定する際に考慮される画素の数は、ブレの状況によって任意に適応的に変化し得るように構成されている。   Note that the solution satisfying all the light quantity integration conditional expressions in step S14, that is, the true green light quantity Lg (x, y), the true red light quantity Lr (x, y), and the true blue light quantity Lb (x , Y), a solution for obtaining image data satisfying a plurality of conditions is used. As such a solution, for example, there is a solution of Projection Onto Convex Sets (POCS method). The POCS method is a method for estimating an optimal solution that meets the constraint conditions by repeating convex projection. For example, the paper “DC Youla and H. Webb,“ Image Restoration by the Method of Convex Projections: part 1 theory ”, IEEE Trans Med. Image., Vol. 1 No. 2, pp81-94, Oct. 1982, etc., and the description thereof is omitted. Japanese Patent Laid-Open No. 8-263639 describes a method for creating a high-resolution still image from a plurality of low-resolution moving images using the POCS method. In this prior art method, motion correction with a specific accuracy such as one pixel or half pixel using a motion vector is fundamental, and the number of pixels considered when estimating the value of each pixel is the specific accuracy. It is considered that a fixed one determined by is used. On the other hand, in the present embodiment, motion correction by an analog method can be applied, and the number of pixels considered when estimating the value of each pixel is arbitrarily adaptive depending on the blurring situation. It is configured to change.

図7のフローチャートを参照して、図2のステップS4における画像推定処理の第1実施の形態について再度説明する。   With reference to the flowchart of FIG. 7, the first embodiment of the image estimation process in step S4 of FIG. 2 will be described again.

初めに、ステップS21において、演算回路24は、内部に保持する画像の枚数をカウントする変数kを1にセットしてステップS22に進む。   First, in step S21, the arithmetic circuit 24 sets a variable k for counting the number of images held therein to 1 and proceeds to step S22.

ステップS22において、演算回路24は、k枚目画像の各画素の画素値Gobs(k,ig,jg)から、すべての(ig,jg)に対して式(20)で表される光量積分条件式を生成し、ステップS23に進む。   In step S22, the arithmetic circuit 24 calculates the light intensity integration condition represented by the equation (20) for all (ig, jg) from the pixel value Gobs (k, ig, jg) of each pixel of the k-th image. An expression is generated, and the process proceeds to step S23.

ステップS23において、演算回路24は、k枚目画像の各画素の画素値Robs(k,ir,jr)から、すべての(ir,jr)に対して式(21)で表される光量積分条件式を生成し、ステップS24に進む。   In step S23, the arithmetic circuit 24 calculates the light intensity integration condition represented by the equation (21) for all (ir, jr) from the pixel values Robs (k, ir, jr) of each pixel of the k-th image. An expression is generated, and the process proceeds to step S24.

ステップS24において、演算回路24は、k枚目画像の各画素の画素値Bobs(k,ib,jb)から、すべての(ib,jb)に対して式(22)で表される光量積分条件式を生成し、ステップS25に進む。   In step S24, the arithmetic circuit 24 calculates the light intensity integration condition represented by the expression (22) for all (ib, jb) from the pixel values Bobs (k, ib, jb) of each pixel of the k-th image. An expression is generated, and the process proceeds to step S25.

なお、ステップS22乃至S24において、光量積分条件式を生成するにあたっては、必要に応じて、動き検出回路23−1乃至23−(N−1)から供給される変換パラメータが用いられる。   In steps S22 to S24, when generating the light quantity integration conditional expression, conversion parameters supplied from the motion detection circuits 23-1 to 23- (N-1) are used as necessary.

ステップS25において、演算回路24は、内部の変数kがフレームメモリ22−1乃至22−Nから供給される画像の枚数Nと等しいか否かを判定する。変数kが画像の枚数Nと等しくないと判定された場合、演算回路24は、ステップS26に進み、変数kを1だけインクリメントした後、ステップS22に戻る。そして、ステップS22乃至S25の処理が繰り返される。   In step S25, the arithmetic circuit 24 determines whether or not the internal variable k is equal to the number N of images supplied from the frame memories 22-1 to 22-N. If it is determined that the variable k is not equal to the number N of images, the arithmetic circuit 24 proceeds to step S26, increments the variable k by 1, and then returns to step S22. Then, the processes of steps S22 to S25 are repeated.

一方、変数kが画像の枚数Nと等しいと判定された場合、ステップS27に進み、演算回路24は、ステップS22乃至S24で求めたk=1乃至Nの式(20),(21),および(22)の光量積分条件式を演算することにより、真の緑色の光量Lg(x,y)、真の赤色の光量Lr(x,y)、真の青色の光量Lb(x,y)を推定して処理を戻る。ここで得られる真の緑色の光量Lg(x,y)、真の赤色の光量Lr(x,y)、真の青色の光量Lb(x,y)が、求めるべき1枚の鮮明な画像の画像信号(G信号、R信号、B信号)として、D/Aコンバータ9またはコーデック12に供給される。   On the other hand, when it is determined that the variable k is equal to the number N of images, the process proceeds to step S27, and the arithmetic circuit 24 calculates the equations (20), (21), and k = 1 to N obtained in steps S22 to S24, and By calculating the light quantity integration conditional expression (22), the true green light quantity Lg (x, y), the true red light quantity Lr (x, y), and the true blue light quantity Lb (x, y) are obtained. Estimate and return. The true green light amount Lg (x, y), the true red light amount Lr (x, y), and the true blue light amount Lb (x, y) obtained here are the one clear image to be obtained. The image signal (G signal, R signal, B signal) is supplied to the D / A converter 9 or the codec 12.

なお、ここで得られる真の緑色の光量Lg(x,y)、真の赤色の光量Lr(x,y)、真の青色の光量Lb(x,y)の画像信号は、アナログ信号である。即ち、Lg(x,y),Lr(x,y),Lb(x,y)は、(x,y)の関数として求められるが、変数x,yは、上述したように整数ではなく、実数であり、小数部分も含んでいる。その小数部分の桁数は、演算する装置の精度にもよるが、一般的には、2進数表現で2桁から3桁程度と考えられる。従って、このように実数(x,y)を引数とする関数であるLg(x,y),Lr(x,y),Lb(x,y)については、必要に応じて、再度(x,y)として整数の位置のみサンプリングし直すリサンプリングを行い、デジタル画像信号に変換してD/Aコンバータ9またはコーデック12に供給するようにすることができる。   The true green light amount Lg (x, y), the true red light amount Lr (x, y), and the true blue light amount Lb (x, y) obtained here are analog signals. . That is, Lg (x, y), Lr (x, y), and Lb (x, y) are obtained as a function of (x, y), but the variables x and y are not integers as described above. Real number, including fractional part. Although the number of digits of the decimal part depends on the accuracy of the computing device, it is generally considered to be about 2 to 3 digits in binary representation. Therefore, Lg (x, y), Lr (x, y), and Lb (x, y), which are functions having real numbers (x, y) as arguments, are again (x, y) as necessary. It is possible to perform resampling by re-sampling only integer positions as y), convert it into a digital image signal, and supply it to the D / A converter 9 or the codec 12.

また、高速シャッタによるN枚の撮像時間の間に被写体が動いている場合、その動いている部分の、真の緑色の光量Lg(x,y)、真の赤色の光量Lr(x,y)、真の青色の光量Lb(x,y)は、時間とともに変化することとなるので、上述の方法では、正しい解を得ることが困難なことがあり得る。   Further, when the subject is moving during N imaging times by the high-speed shutter, the true green light amount Lg (x, y) and the true red light amount Lr (x, y) of the moving part. Since the true blue light amount Lb (x, y) changes with time, it may be difficult to obtain a correct solution by the above-described method.

そこで、被写体が動いている部分については、例外処理として、単純な重ね合わせで処理することができる。即ち、N枚の各画像は、ベイヤー配列のデータ(1画素につきR信号、G信号、B信号のうちのいずれか1個のみのデータ)であるが、このデータから1画素につきR信号、G信号、B信号の3つの信号を復元するデモザイキング処理を行う。さらに、デモザイキング処理後のN枚の画像を、回転、拡大または縮小、あるいは平行移動などを行って位置合わせを行い、平均化する。デモザイキング処理の手法としては、従来の方法を含む任意の方法を採用することができる。   Therefore, a portion where the subject is moving can be processed by simple superposition as exception processing. That is, each of the N images is Bayer array data (only one of the R signal, G signal, and B signal per pixel). From this data, the R signal, G per pixel Demosaicing processing is performed to restore the three signals, the signal and the B signal. Further, the N images after the demosaicing process are aligned by averaging by performing rotation, enlargement, reduction, or parallel movement. As a method of demosaicing processing, any method including a conventional method can be adopted.

以上のように、第1実施の形態では、各画素の直上にあるオンチップレンズの効果を加味した処理を行うことにより、カメラブレを補正した鮮明な画像を推定することができる。   As described above, in the first embodiment, it is possible to estimate a clear image in which camera shake is corrected by performing a process that takes into account the effect of the on-chip lens directly above each pixel.

(第2実施の形態)
次に、信号処理回路7における、画像推定処理の第2実施の形態について説明する。
(Second Embodiment)
Next, a second embodiment of the image estimation process in the signal processing circuit 7 will be described.

第2実施の形態は、第1実施の形態における、k=1乃至Nとする式(20)乃至式(22)で表される光量積分条件式の他に、R信号、G信号、B信号どうしの相関に関する色相関の条件を付加して、それらすべての条件式を満たす真の緑色の光量Lg(x,y)、真の赤色の光量Lr(x,y)、真の青色の光量Lb(x,y)を求めるものである。   In the second embodiment, an R signal, a G signal, and a B signal in addition to the light quantity integration conditional expressions represented by the equations (20) to (22) in which k = 1 to N in the first embodiment. Color correlation conditions relating to the correlation between each other are added, and the true green light amount Lg (x, y), the true red light amount Lr (x, y), and the true blue light amount Lb satisfying all the conditional expressions. (X, y) is obtained.

画像の局所的な部分に着目すれば、撮像素子4に入射される被写体の光と等価な真の緑色の光量Lg(x,y)、真の赤色の光量Lr(x,y)、真の青色の光量Lb(x,y)には、色どうしの相関(色相関)がある。従って、光量積分条件式である式(20)乃至式(22)に加えて、色相関の条件をさらに付加することにより、より正確な解、即ち、より本来の光に忠実で鮮明な画像を求める(推定する)ことができる。   Focusing on the local portion of the image, the true green light amount Lg (x, y) equivalent to the light of the subject incident on the image sensor 4, the true red light amount Lr (x, y), the true light amount. The blue light quantity Lb (x, y) has a correlation between colors (color correlation). Therefore, in addition to equations (20) to (22), which are light intensity integration conditional expressions, by adding a color correlation condition, a more accurate solution, that is, a clearer image that is more faithful to the original light can be obtained. Can be obtained (estimated).

図8と図9を参照して、具体的な色相関の条件を求める方法について説明する。図8と図9では、緑色と赤色の色相関の条件を考える。   A specific method for obtaining a color correlation condition will be described with reference to FIGS. In FIG. 8 and FIG. 9, the condition of the color correlation between green and red is considered.

図8左下側のk'枚目画像のig番目、jg番目の、ある緑色の画素G(jg−1)(ig−1)と、図8右下側のk”枚目画像のir番目、jr番目の、ある赤色の画素R(jr−1)(ir−1)に注目する。   The ig-th and jg-th green pixels G (jg-1) (ig-1) of the k'th image on the lower left side of FIG. 8 and the irth of the k "th image on the lower-right side of FIG. Note the jrth red pixel R (jr-1) (ir-1).

演算回路24は、k'枚目画像の緑色の画素G(jg−1)(ig−1)とk”枚目画像の赤色の画素R(jr−1)(ir−1)の位置を、第1実施の形態で説明したように、変換パラメータ(θk',Tk'x,Tk'y,Sk')と変換パラメータ(θk”,Tk”x,Tk”y,Sk”)によりそれぞれ変換することで、図8上側の1枚目画像の座標系における位置を求める。なお、k'やk”が1の場合も含み、その場合には、(θ1,T1x,T1y,S1)=(0,0,0,1)と考える。   The arithmetic circuit 24 determines the positions of the green pixel G (jg-1) (ig-1) of the k'th image and the red pixel R (jr-1) (ir-1) of the k "th image. As described in the first embodiment, conversion is performed using the conversion parameters (θk ′, Tk′x, Tk′y, Sk ′) and the conversion parameters (θk ″, Tk ″ x, Tk ″ y, Sk ″). Thus, the position in the coordinate system of the first image on the upper side of Fig. 8 is obtained.Including the case where k 'and k "are 1, in this case, (θ1, T1x, T1y, S1) = (0 , 0, 0, 1).

そして、演算回路24は、1枚目画像の座標系に変換されたk'枚目の緑色の画素G(jg−1)(ig−1)と1枚目画像の座標系に変換されたk”枚目の赤色の画素R(jr−1)(ir−1)との距離を計算する。さらに、演算回路24は、その距離が、同一の位置とみなす許容値(判定値)delta(例えば、0.25画素)以内であるかどうかを判定する。   The arithmetic circuit 24 then converts the k′-th green pixel G (jg−1) (ig−1) converted into the coordinate system of the first image and the k converted into the coordinate system of the first image. “Calculate the distance from the first red pixel R (jr−1) (ir−1). Further, the arithmetic circuit 24 allows an allowable value (determination value) delta (for example, the distance) to be regarded as the same position. , 0.25 pixel).

例えば、画素G(jg−1)(ig−1)と画素R(jr−1)(ir−1)の位置を、位置(ig,jg)と位置(ir,jr)で、それぞれ考えることとして、k'枚目画像の座標系における画素G(jg−1)(ig−1)の位置(ig,jg)を点Gcと、k”枚目画像の座標系における画素R(jg−1)(ig−1)の位置(ir,jr)を点Rcと、1枚目画像の座標系における画素G(jg−1)(ig−1)の位置(ig,jg)をGc(k')と、1枚目画像の座標系における画素R(jg−1)(ig−1)の位置(ir,jr)をRc(k”)と、それぞれ表すこととすると、点Gc(k')と点Rc(k”)との距離が許容値delta以内であるかを表す式(23)は、次のように書ける。 For example, consider the positions of the pixel G (jg-1) (ig-1) and the pixel R (jr-1) (ir-1) at the position (ig, jg) and the position (ir, jr), respectively. , the pixel G (jg-1) in the coordinate system of the k 'th image (ig-1) position of (ig, jg) and the point G c and the pixel in the coordinate system of the k "th image R (jg-1 ) (Ig-1) at the position (ir, jr) as the point R c and the position (ig, jg) at the pixel G (jg-1) (ig-1) in the coordinate system of the first image as G c ( k ′) and the position (ir, jr) of the pixel R (jg−1) (ig−1) in the coordinate system of the first image as R c (k ″) , respectively, the point G c Expression (23) indicating whether the distance between (k ′) and the point R c (k ″) is within the allowable value delta can be written as follows.

Figure 0004613510
・・・(23)
Figure 0004613510
(23)

式(23)を距離の条件式と称する。ここで、Dis[Gc(k'),Rc(k”)]は、点Gc(k')と点Rc(k”)との間の距離を表す。また、点Gc(k')と点Rc(k”)で表される位置は、位置(ig,jg)と位置(ir,jr)を、式(1)乃至(3)と同様に、変換パラメータ(θk',Tk'x,Tk'y,Sk')と(θk”,Tk”x,Tk”y,Sk”)でそれぞれアフィン変換したものである。 Expression (23) is referred to as a distance conditional expression. Here, Dis [G c (k ′) , R c (k ″) ] represents a distance between the point G c (k ′) and the point R c (k ″) . Further, the positions represented by the point G c (k ′) and the point R c (k ″) are the same as the expressions (1) to (3) in the position (ig, jg) and the position (ir, jr). , Affine transformation is performed with the conversion parameters (θk ′, Tk′x, Tk′y, Sk ′) and (θk ″, Tk ″ x, Tk ″ y, Sk ″), respectively.

演算回路24は、k'枚目の緑色の画素G(jg−1)(ig−1)とk”枚目の赤色の画素R(jr−1)(ir−1)とが、ある許容範囲deltaのマージンを考えたときに同一位置にあるとみなすことができる画素があるかどうかを、1枚目画像の座標系における、ある位置(x,y)を中心とする(x±dX,y±dY)の近傍領域、つまり、(x−dX,y−dY),(x−dX,y+dY),(x+dX,y−dY),および(x+dX,y+dY)で囲まれる領域について求める。ここで、dXとdYは、それぞれ、近傍領域を設定する所定の値で、例えば、2画素分のX方向とY方向の長さなどとすることができる。   The arithmetic circuit 24 has an allowable range in which the k'th green pixel G (jg-1) (ig-1) and the k "th red pixel R (jr-1) (ir-1) are within a certain allowable range. Whether or not there is a pixel that can be considered to be at the same position when considering the margin of delta is centered at a certain position (x, y) in the coordinate system of the first image (x ± dX, y A region near (± dY), that is, a region surrounded by (x−dX, y−dY), (x−dX, y + dY), (x + dX, y−dY), and (x + dX, y + dY) is obtained. , DX and dY are predetermined values for setting the neighborhood region, and can be, for example, the lengths in the X direction and Y direction for two pixels.

逆に言うと、演算回路24は、1枚目画像の座標系における、ある位置(x,y)を中心とする(x±dX,y±dY)の近傍領域、つまり、(x−dX,y−dY),(x−dX,y+dY),(x+dX,y−dY),および(x+dX,y+dY)で囲まれる領域において、上述の式(23)を満たす(k',ig,jg)と(k”,ir,jr)を求める。   In other words, the arithmetic circuit 24 is a region near (x ± dX, y ± dY) around the position (x, y) in the coordinate system of the first image, that is, (x−dX, y−dY), (x−dX, y + dY), (x + dX, y−dY), and (x + dX, y + dY) and (k ′, ig, jg) satisfying the above equation (23) (K ″, ir, jr) is obtained.

そして、演算回路24は、求められた(k',ig,jg)と(k”,ir,jr)とに対応する画素値Gobs(k',ig,jg)と画素値Robs(k”,ir,jr)とを得る。   Then, the arithmetic circuit 24 calculates the pixel value Gobs (k ′, ig, jg) and the pixel value Robs (k ″, kg) corresponding to the obtained (k ′, ig, jg) and (k ″, ir, jr). ir, jr).

演算回路24は、k',k”それぞれを1乃至Nとしたすべての組み合わせについて、上述の式(23)を満たす(k',ig,jg)と(k”,ir,jr)とを求める。   The arithmetic circuit 24 obtains (k ′, ig, jg) and (k ″, ir, jr) satisfying the above equation (23) for all combinations in which k ′ and k ″ are 1 to N, respectively. .

一般的には、複数の(k',ig,jg)と(k”,ir,jr)との組み合わせが検出されるので、演算回路24は、検出された(k',ig,jg)と(k”,ir,jr)とに対応する画素値Gobs(k',ig,jg)と画素値Robs(k”,ir,jr)とを、図9に示すように、横軸をG信号(Gobs(k',ig,jg))、縦軸をR信号(Robs(k”,ir,jr))とするGR空間にプロットする。   In general, a combination of a plurality of (k ′, ig, jg) and (k ″, ir, jr) is detected, so that the arithmetic circuit 24 detects the detected (k ′, ig, jg) and The pixel value Gobs (k ′, ig, jg) and the pixel value Robs (k ″, ir, jr) corresponding to (k ″, ir, jr) are shown in FIG. (Gobs (k ′, ig, jg)), and the vertical axis is plotted in the GR space with the R signal (Robs (k ″, ir, jr)).

図9は、GR空間にプロットされた、同一位置にあるとみなすことができる画素の画素値Gobs(k',ig,jg)と画素値Robs(k”,ir,jr)とを模式的に表した図である。   FIG. 9 schematically shows pixel values Gobs (k ′, ig, jg) and pixel values Robs (k ″, ir, jr) of pixels that can be regarded as being in the same position plotted in the GR space. FIG.

図9のバツ印が、演算回路24により検出された(k',ig,jg)と(k”,ir,jr)とに対応する画素値Gobs(k',ig,jg)と画素値Robs(k”,ir,jr)との組を表している。   The crosses in FIG. 9 indicate pixel values Gobs (k ′, ig, jg) and pixel values Robs corresponding to (k ′, ig, jg) and (k ″, ir, jr) detected by the arithmetic circuit 24. This represents a pair with (k ″, ir, jr).

従って、位置(x,y)の近傍領域においては、求めるべき真の緑色の光量Lg(x,y)、および真の赤色の光量Lr(x,y)には、図9に示したような相関があると考えられる。   Accordingly, in the vicinity region of the position (x, y), the true green light amount Lg (x, y) and the true red light amount Lr (x, y) to be obtained are as shown in FIG. There seems to be a correlation.

そこで、第2の実施の形態においては、第1実施の形態における式(20)乃至式(22)で表される光量積分条件式の他に、さらに、図9に示した緑色と赤色に相関があることを条件として付加する。   Therefore, in the second embodiment, in addition to the light quantity integration conditional expression expressed by the equations (20) to (22) in the first embodiment, the correlation between green and red shown in FIG. It is added as a condition that there is.

即ち、演算回路24は、演算回路24により式(23)の距離の条件式を満たす画素値Gobs(k',ig,jg)と画素値Robs(k”,ir,jr)との組で表される、図9のGR空間にプロットされた複数の点について、主成分分析を行う。   That is, the arithmetic circuit 24 is represented by a set of pixel values Gobs (k ′, ig, jg) and pixel values Robs (k ″, ir, jr) that satisfy the distance conditional expression of Expression (23) by the arithmetic circuit 24. The principal component analysis is performed on the plurality of points plotted in the GR space of FIG.

そして、演算回路24は、主成分分析の分析結果である主成分(第1主成分)の方向(図9の太線の矢印で示される方向)と直交する成分(例えば、第2主成分)についての分散を求める。さらに、演算回路24は、位置(x,y)については、GR空間において主成分の方向と直交する成分の分散の幅を持つ帯状の中に、真の緑色の光量Lg(x,y)、および真の赤色の光量Lr(x,y)で表される点が存在するという条件式を、色相関の条件として設定する。   The arithmetic circuit 24 then applies a component (for example, the second principal component) orthogonal to the direction of the principal component (first principal component) (the direction indicated by the thick arrow in FIG. 9), which is the analysis result of the principal component analysis. Find the variance of. Further, for the position (x, y), the arithmetic circuit 24 includes a true green light amount Lg (x, y), a band having a dispersion width of a component orthogonal to the direction of the main component in the GR space, A conditional expression that there is a point represented by the true red light amount Lr (x, y) is set as a condition for color correlation.

以上の色相関の条件を、緑色と青色についても考える。   The above color correlation conditions are also considered for green and blue.

演算回路24は、図8に示した緑色と赤色の画素の場合と同様に、k'枚目の緑色の画素G(jg−1)(ig−1)とk”'枚目の青色の画素B(jb−1)(ib−1)の位置を、第1実施の形態で説明したように、変換パラメータ(θk',Tk'x,Tk'y,Sk')と変換パラメータ(θk”',Tk”'x,Tk”'y,Sk”')とによりそれぞれ変換することで、1枚目画像の座標系における位置を求める。   As in the case of the green and red pixels shown in FIG. 8, the arithmetic circuit 24 performs the k′-th green pixel G (jg−1) (ig−1) and the k ″ ′-th blue pixel. As described in the first embodiment, the position of B (jb-1) (ib-1) is converted into the conversion parameter (θk ′, Tk′x, Tk′y, Sk ′) and the conversion parameter (θk ″ ′). , Tk ″ ′ x, Tk ″ ′ y, Sk ″ ′) to obtain the position of the first image in the coordinate system.

そして、演算回路24は、1枚目画像の座標系に変換されたk'枚目の緑色の画素G(jg−1)(ig−1)と1枚目画像の座標系に変換されたk”'枚目の青色の画素B(jb−1)(ib−1)との距離を計算する。さらに、演算回路24は、その距離が、同一の位置とみなす許容値(判定値)delta以内であるかどうかを、図8の場合と同様に判定する。   The arithmetic circuit 24 then converts the k′-th green pixel G (jg−1) (ig−1) converted into the coordinate system of the first image and the k converted into the coordinate system of the first image. The distance to the '' th blue pixel B (jb-1) (ib-1) is calculated. Further, the arithmetic circuit 24 is within an allowable value (determination value) delta that the distance is regarded as the same position. Is determined in the same manner as in FIG.

例えば、画素G(jg−1)(ig−1)と画素B(jb−1)(ib−1)の位置を、位置(ig,jg)と位置(ib,jb)で、それぞれ考えることとして、k'枚目画像の座標系における画素G(jg−1)(ig−1)の位置(ig,jg)を点Gcと、k”'枚目画像の座標系における画素B(jb−1)(ib−1)の位置(ib,jb)を点Bcと、1枚目画像の座標系における画素G(jg−1)(ig−1)の位置(ig,jg)をGc(k')と、1枚目画像の座標系における画素B(jb−1)(ib−1)の位置(ib,jb)をBc(k”')と、それぞれ表すこととすると、点Gc(k')と点Bc(k”')との距離が許容値delta以内であるかを表す式(24)は、次のように書ける。 For example, consider the positions of pixel G (jg-1) (ig-1) and pixel B (jb-1) (ib-1) at position (ig, jg) and position (ib, jb), respectively. , 'position of the pixel in the coordinate system of the piece of the image G (jg-1) (ig -1) (ig, jg) and the point G c a, k "' k pixels in the coordinate system of the piece of the image B (jb- 1) The position (ib, jb) of (ib-1) is the point B c, and the position (ig, jg) of the pixel G (jg-1) (ig-1) in the coordinate system of the first image is G c (k ′) and the position (ib, jb) of the pixel B (jb−1) (ib−1) in the coordinate system of the first image are respectively represented as B c (k ″ ′). Expression (24) representing whether the distance between G c (k ′) and the point B c (k ″ ′) is within the allowable value delta can be written as follows.

Figure 0004613510
・・・(24)
Figure 0004613510
... (24)

式(24)を距離の条件式と称する。ここで、Dis[Gc(k'),Bc(k”')]は、点Gc(k')と点Bc(k”')との間の距離を表す。また、点Gc(k')と点Bc(k”')で表される位置は、位置(ig,jg)と(ib,jb)を、式(1)乃至(3)と同様に、変換パラメータ(θk',Tk'x,Tk'y,Sk')と(θk”',Tk”'x,Tk”'y,Sk”')でそれぞれアフィン変換したものである。 Expression (24) is referred to as a distance conditional expression. Here, Dis [G c (k ′) , B c (k ′ ′) ] represents a distance between the point G c (k ′) and the point B c (k ′ ′) . Further, the positions represented by the point G c (k ′) and the point B c (k ″ ′) are the positions (ig, jg) and (ib, jb) as in the expressions (1) to (3). , Affine transformation is performed with the conversion parameters (θk ′, Tk′x, Tk′y, Sk ′) and (θk ″ ′, Tk ″ ′ x, Tk ″ ′ y, Sk ″ ′).

演算回路24は、k'枚目の緑色の画素G(jg−1)(ig−1)とk”'枚目の青色の画素B(jb−1)(ib−1)とが、ある許容範囲deltaのマージンを考えたときに同一位置にあるとみなすことができる画素があるかどうかを、1枚目画像の座標系における、ある位置(x,y)を中心とする(x±dX,y±dY)の近傍領域、つまり、(x−dX,y−dY),(x−dX,y+dY),(x+dX,y−dY),および(x+dX,y+dY)で囲まれる領域について求める。ここで、dX,dYは、それぞれ、近傍領域を設定する所定の値で、例えば、2画素分のX方向とY方向の長さなどとすることができる。   The arithmetic circuit 24 has a k'th green pixel G (jg-1) (ig-1) and a k''th blue pixel B (jb-1) (ib-1). Whether or not there is a pixel that can be regarded as being in the same position when considering the margin of the range delta is centered on a certain position (x, y) in the coordinate system of the first image (x ± dX, A region near y ± dY), that is, a region surrounded by (x−dX, y−dY), (x−dX, y + dY), (x + dX, y−dY), and (x + dX, y + dY) is obtained here. In this case, dX and dY are predetermined values for setting the neighborhood region, and can be, for example, the lengths in the X direction and Y direction for two pixels.

逆に言うと、演算回路24は、1枚目画像の座標系における、ある位置(x,y)を中心とする(x±dX,y±dY)の近傍領域、つまり、(x−dX,y−dY),(x−dX,y+dY),(x+dX,y−dY),および(x+dX,y+dY)で囲まれる領域において、上述の式(24)を満たす(k',ig,jg)と(k”',ib,jb)を求める。   In other words, the arithmetic circuit 24 is a region near (x ± dX, y ± dY) around the position (x, y) in the coordinate system of the first image, that is, (x−dX, y-dY), (x-dX, y + dY), (x + dX, y-dY), and (x + dX, y + dY) and (k ′, ig, jg) satisfying the above-described expression (24) (K ″ ′, ib, jb) is obtained.

そして、演算回路24は、求められた(k',ig,jg)と(k”',ib,jb)とに対応する画素値Gobs(k',ig,jg)と画素値Bobs(k”',ib,jb)とを得る。   Then, the arithmetic circuit 24 calculates the pixel value Gobs (k ′, ig, jg) and the pixel value Bobs (k ″ (k ″) corresponding to the obtained (k ′, ig, jg) and (k ″ ′, ib, jb). ', Ib, jb).

演算回路24は、k',k”'それぞれを1乃至Nとしたすべての組み合わせについて、上述の式(24)を満たす(k',ig,jg)と(k”,ib,jb)とを求める。   The arithmetic circuit 24 calculates (k ′, ig, jg) and (k ″, ib, jb) satisfying the above equation (24) for all combinations in which k ′ and k ″ ′ are 1 to N, respectively. Ask.

一般的には、複数の(k',ig,jg)と(k”',ib,jb)との組み合わせが検出されるので、演算回路24は、検出された(k',ig,jg)と(k”',ib,jb)とに対応する画素値Gobs(k',ig,jg)と画素値Bobs(k”',ib,jb)を、横軸をG信号(Gobs(k',ig,jg))、縦軸をB信号(Bobs(k”',ib,jb))とするようなGB空間にプロットする。   In general, since a combination of a plurality of (k ′, ig, jg) and (k ″ ′, ib, jb) is detected, the arithmetic circuit 24 detects (k ′, ig, jg). And the pixel value Gobs (k ′, ig, jg) and the pixel value Bobs (k ″ ′, ib, jb) corresponding to (k ″ ′, ib, jb) and the horizontal axis the G signal (Gobs (k ′ (k ′) , Ig, jg)), and the vertical axis is plotted in a GB space such that the B signal (Bobs (k ″ ′, ib, jb)) is used.

そこで、第2の実施の形態においては、第1実施の形態における式(20)乃至式(22)で表される光量積分条件式の他に、さらに、図9の緑色と赤色における場合と同様の色相関が、緑色と青色にもあることを条件として付加する。   Therefore, in the second embodiment, in addition to the light quantity integration conditional expression expressed by the equations (20) to (22) in the first embodiment, the same as in the case of green and red in FIG. Is added on condition that the color correlation is also in green and blue.

即ち、演算回路24は、GB空間にプロットされた複数の点である、演算回路24により検出された画素値Gobs(k',ig,jg)と画素値Bobs(k”',ib,jb)との各組について、主成分分析を行う。   That is, the arithmetic circuit 24 is a plurality of points plotted in the GB space, and the pixel value Gobs (k ′, ig, jg) and the pixel value Bobs (k ″ ′, ib, jb) detected by the arithmetic circuit 24. The principal component analysis is performed for each pair.

そして、演算回路24は、主成分分析の分析結果である主成分(第1主成分)の方向と直交する成分(例えば、第2主成分)についての分散を求める。さらに、演算回路24は、位置(x,y)については、GB空間において主成分の方向と直交する成分の分散の幅を持つ帯状の中に、真の緑色の光量Lg(x,y)、および真の青色の光量Lb(x,y)で表される点が存在するという条件式を、色相関の条件として設定する。   Then, the arithmetic circuit 24 obtains the variance for the component (for example, the second principal component) orthogonal to the direction of the principal component (first principal component), which is the analysis result of the principal component analysis. Further, for the position (x, y), the arithmetic circuit 24 includes a true green light amount Lg (x, y), a band having a dispersion width of a component orthogonal to the direction of the main component in the GB space, A conditional expression that there is a point represented by the true blue light quantity Lb (x, y) is set as a color correlation condition.

従って、演算回路24において、最終的に得られる真の緑色の光量Lg(x,y)、真の赤色の光量Lr(x,y)、および真の青色の光量Lb(x,y)は、位置(x,y)の真の緑色の光量Lg(x,y)、および真の赤色の光量Lr(x,y)で表される点が、GR空間において、主成分の方向と直交する成分の分散の幅を持つ帯状の中に存在し、かつ、位置(x,y)の真の緑色の光量Lg(x,y)、および真の青色の光量Lb(x,y)で表される点が、GB空間において、主成分の方向と直交する成分の分散の幅を持つ帯状の中に存在するものに制限(制約)される。   Therefore, the true green light amount Lg (x, y), the true red light amount Lr (x, y), and the true blue light amount Lb (x, y) that are finally obtained in the arithmetic circuit 24 are: A component in which the point represented by the true green light amount Lg (x, y) and the true red light amount Lr (x, y) at the position (x, y) is orthogonal to the direction of the main component in the GR space. And is represented by a true green light amount Lg (x, y) and a true blue light amount Lb (x, y) at a position (x, y). In the GB space, the points are limited (constrained) to exist in a band shape having a dispersion width of the component orthogonal to the direction of the main component.

なお、本実施の形態では、上述のGR、GB空間の2つの色相関の条件のみ付加することとするが、同様にして、R信号とB信号との(RB空間の)色相関の条件についても付加するようにしてもよい。   In the present embodiment, only the two color correlation conditions in the above-described GR and GB spaces are added. Similarly, the condition of the color correlation between the R signal and the B signal (in the RB space) is also described. May also be added.

光量積分条件式と色相関の条件式との両方を満たす真の緑色の光量Lg(x,y)、真の赤色の光量Lr(x,y)、真の青色の光量Lb(x,y)を求める方法としては、例えば、第1実施の形態と同様に、POCS法等を採用することができる。   True green light quantity Lg (x, y), true red light quantity Lr (x, y), and true blue light quantity Lb (x, y) satisfying both the light quantity integration conditional expression and the color correlation conditional expression For example, the POCS method or the like can be adopted as in the first embodiment.

色相関の条件を付加する位置(x,y)は、全ての位置(x,y)としてもよいし、例えば、x,yそれぞれが整数となる格子点の位置のみとしてもよい。   The position (x, y) to which the color correlation condition is added may be all positions (x, y), or may be only the position of a grid point where x and y are integers, for example.

図10のフローチャートを参照して、図2のステップS4における画像推定処理の第2実施の形態について説明する。   A second embodiment of the image estimation process in step S4 of FIG. 2 will be described with reference to the flowchart of FIG.

ステップS31乃至S33では、図6に示した第1実施の形態の画像推定処理のステップS11乃至S13とそれぞれ同様の処理が行われる。   In steps S31 to S33, processing similar to that in steps S11 to S13 of the image estimation processing of the first embodiment shown in FIG. 6 is performed.

即ち、ステップS31において、演算回路24は、1枚目画像の各画素の画素値Gobs(1,ig,jg)から、すべての(ig,jg)に対する式(9)で表される光量積分条件式を、Robs(1,ir,jr)から、すべての(ir,jr)に対する式(10)で表される光量積分条件式を、Bobs(1,ib,jb)から、すべての(ib,jb)に対する式(11)で表される光量積分条件式を生成し、ステップS32に進む。   That is, in step S31, the arithmetic circuit 24 calculates the light intensity integration condition represented by the equation (9) for all (ig, jg) from the pixel values Gobs (1, ig, jg) of each pixel of the first image. From Robs (1, ir, jr), the light quantity integration conditional expression expressed by Equation (10) for all (ir, jr) is changed from Bobs (1, ib, jb) to all (ib, The light quantity integration conditional expression represented by the expression (11) for jb) is generated, and the process proceeds to step S32.

ステップS32において、演算回路24は、2枚目画像の各画素の画素値Gobs(2,ig,jg)から、すべての(ig,jg)に対する式(17)で表される光量積分条件式を、Robs(2,ir,jr)から、すべての(ir,jr)に対する式(18)で表される光量積分条件式を、Bobs(2,ib,jb)から、すべての(ib,jb)に対する式(19)で表される光量積分条件式を生成し、ステップS33に進む。ここで、演算回路24は、2枚目画像の位置を1枚目画像の位置に変換するため、動き検出回路23−1から供給される変換パラメータ(θ2,T2x,T2y,S2)を使用する。   In step S <b> 32, the arithmetic circuit 24 calculates a light quantity integration conditional expression expressed by Expression (17) for all (ig, jg) from the pixel values Gobs (2, ig, jg) of each pixel of the second image. , Robs (2, ir, jr), the light quantity integration conditional expression expressed by the equation (18) for all (ir, jr) from Bobs (2, ib, jb) to all (ib, jb) Is generated, and the process proceeds to step S33. Here, the arithmetic circuit 24 uses the conversion parameters (θ2, T2x, T2y, S2) supplied from the motion detection circuit 23-1 to convert the position of the second image into the position of the first image. .

ステップS33において、演算回路24は、k枚目(k=3乃至N)の画像の各画素の画素値Gobs(k,ig,jg)から、すべての(ig,jg)に対する式(20)で表される光量積分条件式を、Robs(k,ir,jr)から、すべての(ir,jr)に対する式(21)で表される光量積分条件式を、Bobs(k,ib,jb)から、すべての(ib,jb)に対する式(22)で表される光量積分条件式を生成し、ステップS34に進む。ここで、演算回路24は、k枚目画像の位置を1枚目画像の位置に変換するため、動き検出回路23−(k−1)から供給される変換パラメータ(θk,Tkx,Tky,Sk)を使用する。   In step S <b> 33, the arithmetic circuit 24 uses the equation (20) for all (ig, jg) from the pixel values Gobs (k, ig, jg) of each pixel of the k-th (k = 3 to N) image. The light quantity integration conditional expression expressed from Robs (k, ir, jr) and the light quantity integration conditional expression expressed by Expression (21) for all (ir, jr) from Bobs (k, ib, jb). Then, the light quantity integration conditional expression represented by the expression (22) for all (ib, jb) is generated, and the process proceeds to step S34. Here, in order to convert the position of the k-th image into the position of the first image, the arithmetic circuit 24 converts the conversion parameters (θk, Tkx, Tky, Sk) supplied from the motion detection circuit 23- (k-1). ).

ステップS34において、演算回路24は、所定の位置(x,y)に対して、その位置(x,y)の近傍領域において、式(23)の距離の条件式を満たす(k',ig,jg)と(k”,ir,jr)との組を求めて、ステップS35に進む。   In step S34, the arithmetic circuit 24 satisfies the distance conditional expression (23) for the predetermined position (x, y) in the vicinity region of the position (x, y) (k ′, ig, jg) and (k ″, ir, jr) are obtained, and the process proceeds to step S35.

ステップS35において、演算回路24は、ステップS34で求めた(k',ig,jg)と(k”,ir,jr)それぞれの画素値Gobs(k',ig,jg)とRobs(k”,ir,jr)で表される点を、GR空間にプロットし、主成分分析を行う。そして、演算回路24は、主成分分析の分析結果である主成分の方向と直交する成分についての分散を求め、その分散の範囲内に、同一画素のG信号とR信号が存在するという色相関の条件式をたてて、ステップS35からステップS36に進む。   In step S35, the arithmetic circuit 24 calculates the pixel values Gobs (k ′, ig, jg) and Robs (k ″, k ”, (k ′, ig, jg) obtained in step S34. The points represented by ir, jr) are plotted in the GR space and the principal component analysis is performed. Then, the arithmetic circuit 24 obtains the variance for the component orthogonal to the direction of the principal component, which is the analysis result of the principal component analysis, and the color correlation that the G signal and the R signal of the same pixel exist within the variance range. The conditional expression is established, and the process proceeds from step S35 to step S36.

ステップS36において、演算回路24は、所定の位置(x,y)に対して、位置(x,y)の近傍領域において、式(24)の距離の条件式を満たす(k',ig,jg)と(k”',ib,jb)との組を求めて、ステップS37に進む。   In step S36, the arithmetic circuit 24 satisfies the conditional expression (k ′, ig, jg) for the distance of the expression (24) in the region near the position (x, y) with respect to the predetermined position (x, y). ) And (k ″ ′, ib, jb) are obtained, and the process proceeds to step S37.

ステップS37において、演算回路24は、ステップS36で求めた(k',ig,jg)と(k”',ib,jb)それぞれの画素値Gobs(k',ig,jg)とBobs(k”',ib,jb)で表される点を、GB空間にプロットし、主成分分析を行う。そして、演算回路24は、主成分分析の分析結果である主成分の方向と直交する成分についての分散を求め、その分散の範囲内に、同一画素のG信号とB信号が存在するという色相関の条件式をたてて、ステップS37からステップS38に進む。   In step S37, the arithmetic circuit 24 obtains the pixel values Gobs (k ′, ig, jg) and Bobs (k ″) of (k ′, ig, jg) and (k ″ ′, ib, jb) obtained in step S36. The points represented by ', ib, jb) are plotted in the GB space, and the principal component analysis is performed. Then, the arithmetic circuit 24 obtains the variance for the component orthogonal to the direction of the principal component, which is the analysis result of the principal component analysis, and the color correlation that the G signal and B signal of the same pixel exist within the variance range. The conditional expression is established, and the process proceeds from step S37 to step S38.

ステップS38において、演算回路24は、予め設定されたすべての位置(x,y)について、色相関の条件式を求めたか否かを判定する。ステップS38において、まだ、すべての位置(x,y)について色相関の条件式が求められていないと判定された場合、ステップS34に戻り、演算回路24は、色相関の条件式が求められていない位置(x,y)に注目(選択)し、ステップS34乃至S38の処理を繰り返す。   In step S38, the arithmetic circuit 24 determines whether or not a color correlation conditional expression has been obtained for all the preset positions (x, y). If it is determined in step S38 that the color correlation conditional expression has not yet been obtained for all positions (x, y), the process returns to step S34, and the arithmetic circuit 24 has obtained the color correlation conditional expression. Pay attention to (select) the position (x, y) that does not exist, and repeat the processing of steps S34 to S38.

一方、ステップS38において、すべての位置(x,y)について色相関の条件式が求められたと判定された場合、ステップS39に進み、演算回路24は、ステップS31乃至S33,S35,S37で求められたすべての条件式を満たす真の緑色の光量Lg(x,y)、真の赤色の光量Lr(x,y)、真の青色の光量Lb(x,y)を演算して、処理を戻る。即ち、演算回路24は、ステップS31乃至S33で求められた光量積分条件式と、ステップS35およびS37で求められた色相関の条件式とのすべてを満たす、真の緑色の光量Lg(x,y)、真の赤色の光量Lr(x,y)、真の青色の光量Lb(x,y)を演算する。   On the other hand, if it is determined in step S38 that conditional expressions for color correlation have been obtained for all positions (x, y), the process proceeds to step S39, and the arithmetic circuit 24 is obtained in steps S31 to S33, S35, and S37. The true green light amount Lg (x, y), the true red light amount Lr (x, y), and the true blue light amount Lb (x, y) satisfying all the conditional expressions are calculated, and the process returns. . That is, the arithmetic circuit 24 calculates the true green light quantity Lg (x, y) that satisfies all of the light quantity integration conditional expression obtained in steps S31 to S33 and the color correlation conditional expression obtained in steps S35 and S37. ), The true red light amount Lr (x, y) and the true blue light amount Lb (x, y) are calculated.

図11と図12のフローチャートを参照して、図2のステップS4における画像推定処理の第2実施の形態について再度説明する。   With reference to the flowcharts of FIG. 11 and FIG. 12, the second embodiment of the image estimation process in step S4 of FIG. 2 will be described again.

ステップS51乃至S56は、図7に示した第1実施の形態の画像推定処理のステップS21乃至S26とそれぞれ同様である。   Steps S51 to S56 are the same as steps S21 to S26 of the image estimation process of the first embodiment shown in FIG.

即ち、ステップS51において、演算回路24は、内部に保持する画像の枚数をカウントする変数kを1にセットしてステップS52に進む。   That is, in step S51, the arithmetic circuit 24 sets a variable k for counting the number of images held therein to 1 and proceeds to step S52.

ステップS52において、演算回路24は、k枚目画像の各画素の画素値Gobs(k,ig,jg)から、すべての(ig,jg)に対して式(20)で表される光量積分条件式を生成し、ステップS53に進む。   In step S52, the arithmetic circuit 24 calculates the light intensity integration condition represented by the equation (20) for all (ig, jg) from the pixel value Gobs (k, ig, jg) of each pixel of the k-th image. An expression is generated, and the process proceeds to step S53.

ステップS53において、演算回路24は、k枚目画像の各画素の画素値Robs(k,ir,jr)から、すべての(ir,jr)に対して式(21)で表される光量積分条件式を生成し、ステップS54に進む。   In step S53, the arithmetic circuit 24 calculates the light intensity integration condition represented by the equation (21) for all (ir, jr) from the pixel values Robs (k, ir, jr) of each pixel of the k-th image. An expression is generated, and the process proceeds to step S54.

ステップS54において、演算回路24は、k枚目画像の各画素の画素値Bobs(k,ib,jb)から、すべての(ib,jb)に対して式(22)で表される光量積分条件式を生成し、ステップS55に進む。   In step S54, the arithmetic circuit 24 calculates the light intensity integration condition represented by the equation (22) for all (ib, jb) from the pixel values Bobs (k, ib, jb) of each pixel of the k-th image. An expression is generated, and the process proceeds to step S55.

なお、ステップS52乃至S54において、光量積分条件式を生成するにあたっては、必要に応じて、動き検出回路23−1乃至23−(N−1)から供給される変換パラメータが用いられる。   In steps S52 to S54, when generating the light quantity integration conditional expression, conversion parameters supplied from the motion detection circuits 23-1 to 23- (N-1) are used as necessary.

ステップS55において、演算回路24は、内部の変数kがフレームメモリ22−1乃至22−Nから供給される画像の枚数Nと等しいか否かを判定する。変数kが画像の枚数Nと等しくないと判定された場合、演算回路24は、ステップS56に進み、変数kを1だけインクリメントした後、ステップS52に戻る。そして、ステップS52乃至S56の処理が繰り返される。   In step S55, the arithmetic circuit 24 determines whether or not the internal variable k is equal to the number N of images supplied from the frame memories 22-1 to 22-N. If it is determined that the variable k is not equal to the number N of images, the arithmetic circuit 24 proceeds to step S56, increments the variable k by 1, and then returns to step S52. Then, the processes in steps S52 to S56 are repeated.

一方、ステップS55において、変数kが画像の枚数Nと等しいと判定された場合、図12のステップS57に進む。   On the other hand, if it is determined in step S55 that the variable k is equal to the number N of images, the process proceeds to step S57 in FIG.

ステップS57乃至S62は、図10のステップS34乃至S39とそれぞれ同様である。   Steps S57 to S62 are the same as steps S34 to S39 in FIG.

即ち、ステップS57において、演算回路24は、所定の位置(x,y)に対して、その位置(x,y)の近傍領域において、式(23)の距離の条件式を満たす(k',ig,jg)と(k”,ir,jr)との組を求めて、ステップS58に進む。   That is, in step S57, the arithmetic circuit 24 satisfies the distance conditional expression (23) for the predetermined position (x, y) in the vicinity region of the position (x, y) (k ′, ig, jg) and (k ″, ir, jr) are obtained, and the process proceeds to step S58.

ステップS58において、演算回路24は、ステップS57で求めた(k',ig,jg)と(k”,ir,jr)それぞれの画素値Gobs(k',ig,jg)とRobs(k”,ir,jr)で表される点を、GR空間にプロットし、主成分分析を行う。そして、演算回路24は、主成分分析の分析結果である主成分の方向と直交する成分についての分散を求め、その分散の範囲内に、同一画素のG信号とR信号が存在するという色相関の条件式をたてて、ステップS58からステップS59に進む。   In step S58, the arithmetic circuit 24 calculates the pixel values Gobs (k ′, ig, jg) and Robs (k ″, k ”, (k ′, ig, jg) obtained in step S57. The points represented by ir, jr) are plotted in the GR space and the principal component analysis is performed. Then, the arithmetic circuit 24 obtains the variance for the component orthogonal to the direction of the principal component, which is the analysis result of the principal component analysis, and the color correlation that the G signal and the R signal of the same pixel exist within the variance range. After the conditional expression is established, the process proceeds from step S58 to step S59.

ステップS59において、演算回路24は、所定の位置(x,y)に対して、位置(x,y)の近傍領域において、式(24)の距離の条件式を満たす(k',ig,jg)と(k”',ib,jb)との組を求めて、ステップS60に進む。   In step S59, the arithmetic circuit 24 satisfies the conditional expression (k ′, ig, jg) for the distance of the expression (24) in the vicinity region of the position (x, y) with respect to the predetermined position (x, y). ) And (k ″ ′, ib, jb) are obtained, and the process proceeds to step S60.

ステップS60において、演算回路24は、ステップS59求めた(k',ig,jg)と(k”',ib,jb)それぞれの画素値Gobs(k',ig,jg)とBobs(k”',ib,jb)で表される点を、GB空間にプロットし、主成分分析を行う。そして、演算回路24は、主成分分析の分析結果である主成分の方向と直交する成分についての分散を求め、その分散の範囲内に、同一画素のG信号とB信号が存在するという色相関の条件式をたてて、ステップS60からステップS61に進む。   In step S60, the arithmetic circuit 24 calculates the pixel values Gobs (k ′, ig, jg) and Bobs (k ″ ′) of (k ′, ig, jg) and (k ″ ′, ib, jb) obtained in step S59. , Ib, jb) are plotted in the GB space and the principal component analysis is performed. Then, the arithmetic circuit 24 obtains the variance for the component orthogonal to the direction of the principal component, which is the analysis result of the principal component analysis, and the color correlation that the G signal and B signal of the same pixel exist within the variance range. Is established, and the process proceeds from step S60 to step S61.

ステップS61において、演算回路24は、予め設定されたすべての位置(x,y)について、色相関の条件式を求めたか否かを判定する。ステップS61において、まだ、すべての位置(x,y)について色相関の条件式が求められていないと判定された場合、ステップS57に戻り、演算回路24は、色相関の条件式が求められていない位置(x,y)に注目(選択)し、ステップS57乃至S61の処理を繰り返す。   In step S61, the arithmetic circuit 24 determines whether or not a color correlation conditional expression has been obtained for all preset positions (x, y). If it is determined in step S61 that the color correlation conditional expression has not yet been obtained for all positions (x, y), the process returns to step S57, and the arithmetic circuit 24 has obtained the color correlation conditional expression. Pay attention to (select) the position (x, y) that does not exist, and repeat the processing of steps S57 to S61.

一方、ステップS61において、すべての位置(x,y)について色相関の条件式が求められたと判定された場合、ステップS62に進み、演算回路24は、ステップS52乃至S54,S58,S60で求められたすべての条件式を満たす真の緑色の光量Lg(x,y)、真の赤色の光量Lr(x,y)、真の青色の光量Lb(x,y)を演算して、処理を戻る。即ち、演算回路24は、ステップS52乃至S54で求められた光量積分条件式と、ステップS58およびS60で求められた色相関の条件式とのすべてを満たす、真の緑色の光量Lg(x,y)、真の赤色の光量Lr(x,y)、真の青色の光量Lb(x,y)を演算する。   On the other hand, if it is determined in step S61 that the conditional expressions for color correlation have been obtained for all positions (x, y), the process proceeds to step S62, and the arithmetic circuit 24 is obtained in steps S52 to S54, S58, and S60. The true green light amount Lg (x, y), the true red light amount Lr (x, y), and the true blue light amount Lb (x, y) satisfying all the conditional expressions are calculated, and the process returns. . That is, the arithmetic circuit 24 calculates the true green light quantity Lg (x, y) that satisfies all of the light quantity integration conditional expressions obtained in steps S52 to S54 and the color correlation conditional expression obtained in steps S58 and S60. ), The true red light amount Lr (x, y) and the true blue light amount Lb (x, y) are calculated.

以上のように、第1実施の形態における、k=1乃至Nとする式(20),(21),(22)で表される光量積分条件式の他に、R信号とG信号とB信号との間の相関に関する色相関の条件を付加して、それらすべての条件式を満たす真の緑色の光量Lg(x,y)、真の赤色の光量Lr(x,y)、真の青色の光量Lb(x,y)を求めることにより、より本来の光に忠実で鮮明な画像を求めることができる。   As described above, the R signal, the G signal, and the B signal in addition to the light quantity integration conditional expressions expressed by the equations (20), (21), and (22) in which k = 1 to N in the first embodiment. A color correlation condition relating to the correlation with the signal is added, and the true green light amount Lg (x, y), the true red light amount Lr (x, y), and the true blue color satisfying all the conditional expressions. By obtaining the light amount Lb (x, y) of the light, it is possible to obtain a clear image that is more faithful to the original light.

なお、上述の場合には、2次元の色空間での色相関の条件式を用いたが、3次元の色空間での条件式を用いることも可能である。   In the above-described case, the conditional expression for color correlation in the two-dimensional color space is used. However, it is possible to use the conditional expression in the three-dimensional color space.

(第3実施の形態)
次に、信号処理回路7における、画像推定処理の第3実施の形態について説明する。
(Third embodiment)
Next, a third embodiment of image estimation processing in the signal processing circuit 7 will be described.

第1および第2実施の形態では、撮像素子4の各画素の直上にあるオンチップレンズの特性を正確に定式化(適用)して、真の緑色の光量Lg(x,y)、真の赤色の光量Lr(x,y)、真の青色の光量Lb(x,y)を推定し、鮮明な画像を求めた。   In the first and second embodiments, the characteristics of the on-chip lens immediately above each pixel of the image sensor 4 are accurately formulated (applied), and the true green light amount Lg (x, y), true A red light amount Lr (x, y) and a true blue light amount Lb (x, y) were estimated to obtain a clear image.

第3実施の形態では、オンチップレンズの効果を無視し、撮像素子4の各画素で受光されるデータ(受光量)は、その画素の、ある1点(例えば、画素の重心)に入射される被写体の光の値(ポイントサンプリングされたデータ)とする。   In the third embodiment, the effect of the on-chip lens is ignored, and the data (the amount of received light) received by each pixel of the image sensor 4 is incident on a certain point (for example, the center of gravity of the pixel) of the pixel. The light value of the subject (point-sampled data).

また、第3実施の形態では、後述するバネモデルを適用した方法を採用する。これにより、第1および第2の実施の形態で用いたPOCS法などと比較して、真の緑色の光量Lg(x,y)、真の赤色の光量Lr(x,y)、真の青色の光量Lb(x,y)を求める場合の計算量を軽減することができる。第3実施の形態においても、従来と較べて、より鮮明な画像を推定することができるという、第1および第2実施の形態と同様の効果を得ることができる。   In the third embodiment, a method using a spring model described later is adopted. Thereby, as compared with the POCS method used in the first and second embodiments, the true green light amount Lg (x, y), the true red light amount Lr (x, y), and the true blue light It is possible to reduce the amount of calculation when obtaining the amount of light Lb (x, y). Also in the third embodiment, the same effect as in the first and second embodiments can be obtained that a clearer image can be estimated as compared with the conventional case.

さて、第3実施の形態では、上述したように、各画素に受光されるデータをポイントサンプリングされたデータとして考えることとするので、図3の撮像素子4の各画素のうち、「i番目、j番目の画素」で受光されるデータは、例えば、「i番目、j番目の画素」の中央の位置(座標)(i−0.5,j−0.5)において受光されたものとする。   In the third embodiment, as described above, since the data received by each pixel is considered as point-sampled data, among the pixels of the image sensor 4 in FIG. The data received by the “jth pixel” is, for example, received at the center position (coordinates) (i−0.5, j−0.5) of the “ith, jth pixel”. .

従って、例えば、1枚目画像の「ig番目、jg番目の画素」で得られるデータとしての画素値Gobs(1,ig,jg)は、1枚目画像の座標系の位置(ig−0.5,jg−0.5)において受光される緑色の光量Lg(ig−0.5,jg−0.5)である。同様に、1枚目画像の「ir番目、jr番目の画素」で得られるデータとしての画素値Robs(1,ir,jr)は、1枚目画像の座標系の位置(ir−0.5,jr−0.5)において受光される赤色の光量Lr(ir−0.5,jr−0.5)であり、1枚目画像の「ib番目、jb番目の画素」で得られるデータとしての画素値Bobs(1,ib,jb)は、1枚目画像の座標系の位置(ib−0.5,jb−0.5)において受光される青色の光量Lb(ib−0.5,jb−0.5)である。   Therefore, for example, the pixel value Gobs (1, ig, jg) as data obtained from the “ig-th, jg-th pixel” of the first image is the position (ig-0. 5, jg-0.5) is the amount of green light Lg (ig-0.5, jg-0.5) received. Similarly, the pixel value Robs (1, ir, jr) as data obtained from the “ir-th and jr-th pixels” of the first image is the position (ir−0.5) of the coordinate system of the first image. , Jr-0.5) is the amount of red light Lr (ir-0.5, jr-0.5) received at the first image, and is obtained as “ib-th, jb-th pixel”. Pixel values Bobs (1, ib, jb) of the blue light quantity Lb (ib-0.5, jb-0.5) received at the position (ib-0.5, jb-0.5) of the coordinate system of the first image. jb-0.5).

図13は、フレームメモリ22−1に記憶されている1枚目画像を示している。   FIG. 13 shows the first image stored in the frame memory 22-1.

図13において、緑色の成分を受光する画素G(jg−1)(ig−1)については、黒丸で示される位置に、画素値Gobs(1,ig,jg)が観測される。赤色の成分を受光する画素R(jr−1)(ir−1)については、黒四角で示される位置に、画素値Robs(1,ir,jr)が観測される。青色の成分を受光する画素B(jb−1)(ib−1)については、黒三角で示される位置に、画素値Bobs(1,ib,jb)が観測される。以上のように、1枚目画像の画素値は、1枚目画像の座標系上の各画素の中央部(重心)、即ち、i番目、j番目の画素では(i−0.5,j−0.5)の位置において観測される。   In FIG. 13, for the pixel G (jg-1) (ig-1) that receives the green component, the pixel value Gobs (1, ig, jg) is observed at the position indicated by the black circle. For the pixel R (jr-1) (ir-1) that receives the red component, the pixel value Robs (1, ir, jr) is observed at the position indicated by the black square. For the pixel B (jb-1) (ib-1) that receives the blue component, the pixel value Bobs (1, ib, jb) is observed at the position indicated by the black triangle. As described above, the pixel value of the first image is the center (center of gravity) of each pixel on the coordinate system of the first image, that is, (i−0.5, j -0.5) is observed.

図14は、フレームメモリ22−2に記憶されている2枚目画像を示している。   FIG. 14 shows the second image stored in the frame memory 22-2.

図14において、緑色の成分を受光する画素G(jg−1)(ig−1)については、黒丸で示される位置に、画素値Gobs(2,ig,jg)が観測される。赤色の成分を受光する画素R(jr−1)(ir−1)については、黒四角で示される位置に、画素値Robs(2,ir,jr)が観測される。青色の成分を受光する画素B(jb−1)(ib−1)については、黒三角で示される位置に、画素値Bobs(2,ib,jb)が観測される。以上のように、2枚目画像の画素値は、2枚目画像の座標系上の各画素の中央部(重心)、即ち、i番目、j番目の画素では(i−0.5,j−0.5)の位置において観測される。   In FIG. 14, for the pixel G (jg-1) (ig-1) that receives the green component, the pixel value Gobs (2, ig, jg) is observed at the position indicated by the black circle. For the pixel R (jr-1) (ir-1) that receives the red component, the pixel value Robs (2, ir, jr) is observed at the position indicated by the black square. For the pixel B (jb-1) (ib-1) that receives the blue component, the pixel value Bobs (2, ib, jb) is observed at the position indicated by the black triangle. As described above, the pixel value of the second image is the central part (center of gravity) of each pixel on the coordinate system of the second image, that is, (i−0.5, j -0.5) is observed.

2枚目画像上の点を、第1および第2実施の形態と同様に、1枚目画像の座標系を基準として考える。2枚目画像上の点は、動き検出回路23−1により検出された変換パラメータ(θ2,T2x,T2y,S2)を用いて1枚目画像の座標系上の点に変換することができる。   A point on the second image is considered with reference to the coordinate system of the first image, as in the first and second embodiments. The points on the second image can be converted into points on the coordinate system of the first image using the conversion parameters (θ2, T2x, T2y, S2) detected by the motion detection circuit 23-1.

図14には、その1枚目画像の座標系に変換された2枚目画像上の点の画素値Gobs(2,ig,jg)、画素値Robs(2,ir,jr)、画素値Bobs(2,ib,jb)も示されている。   FIG. 14 shows the pixel value Gobs (2, ig, jg), the pixel value Robs (2, ir, jr), the pixel value Bobs of the point on the second image converted into the coordinate system of the first image. (2, ib, jb) is also shown.

即ち、2枚目画像の座標系の画素G(jg−1)(ig−1)の画素値Gobs(2,ig,jg)は、2枚目画像の座標系上の位置(ig−0.5,jg−0.5)を動き検出回路23−1により検出された変換パラメータ(θ2,T2x,T2y,S2)により変換した1枚目画像の座標系上の位置((ig−0.5)(2),(jg−0.5)(2))で観測される緑色の光量Lg(x,y)である。図14では、画素値Gobs(2,ig,jg)が観測される1枚目画像の座標系上の位置((ig−0.5)(2),(jg−0.5)(2))が、白丸で示されている。 That is, the pixel value Gobs (2, ig, jg) of the pixel G (jg-1) (ig-1) in the coordinate system of the second image is set to the position (ig-0. 5, jg-0.5) based on the conversion parameter (θ2, T2x, T2y, S2) detected by the motion detection circuit 23-1, the position ((ig-0.5 (2) , (jg−0.5) (2) ) is the green light quantity Lg (x, y) observed. In FIG. 14, the position ((ig−0.5) (2) , (jg−0.5) (2) on the coordinate system of the first image where the pixel value Gobs (2, ig, jg) is observed. ) Are indicated by white circles.

また、2枚目画像の座標系の画素R(jr−1)(ir−1)の画素値Robs(2,ir,jr)は、2枚目画像の座標系上の位置(ir−0.5,jr−0.5)を動き検出回路23−1により検出された変換パラメータ(θ2,T2x,T2y,S2)により変換した1枚目画像の座標系上の位置((ir−0.5)(2),(jr−0.5)(2))で観測される赤色の光量Lr(x,y)である。図14では、画素値Robs(2,ir,jr)が観測される1枚目画像の座標系上の位置((ir−0.5)(2),(jr−0.5)(2))が、白四角で示されている。 Also, the pixel value Robs (2, ir, jr) of the pixel R (jr-1) (ir-1) in the coordinate system of the second image is the position (ir-0. 5, jr-0.5) based on the conversion parameters (θ2, T2x, T2y, S2) detected by the motion detection circuit 23-1, the position ((ir-0.5) on the coordinate system of the first image. (2) , (jr−0.5) (2) ) is the red light quantity Lr (x, y) observed. In FIG. 14, the position ((ir−0.5) (2) , (jr−0.5) (2) on the coordinate system of the first image where the pixel value Robs (2, ir, jr) is observed. ) Is indicated by a white square.

さらに、2枚目画像の座標系の画素B(jb−1)(ib−1)の画素値Bobs(2,ib,jb)は、2枚目画像の座標系上の位置(ib−0.5,jb−0.5)を動き検出回路23−1により検出された変換パラメータ(θ2,T2x,T2y,S2)により変換した1枚目画像の座標系上の位置((ib−0.5)(2),(jb−0.5)(2))で観測される青色の光量Lb(x,y)である。図14では、画素値Bobs(2,ib,jb)が観測される1枚目画像の座標系上の位置((ib−0.5)(2),(jb−0.5)(2))が、白三角で示されている。 Further, the pixel value Bobs (2, ib, jb) of the pixel B (jb-1) (ib-1) in the coordinate system of the second image is the position (ib-0. 5, jb-0.5) based on the conversion parameter (θ2, T2x, T2y, S2) detected by the motion detection circuit 23-1, the position ((ib-0.5) on the coordinate system of the first image. (2) , (jb−0.5) (2) The blue light quantity Lb (x, y) observed. In FIG. 14, the position ((ib−0.5) (2) , (jb−0.5) (2) on the coordinate system of the first image where the pixel value Bobs (2, ib, jb) is observed. ) Is indicated by a white triangle.

図15は、フレームメモリ22−3に記憶されている3枚目画像を示している。   FIG. 15 shows the third image stored in the frame memory 22-3.

図15において、緑色の成分を受光する画素G(jg−1)(ig−1)については、黒丸で示される位置に、画素値Gobs(3,ig,jg)が観測される。赤色の成分を受光する画素R(jr−1)(ir−1)については、黒四角で示される位置に、画素値Robs(3,ir,jr)が観測される。青色の成分を受光する画素B(jb−1)(ib−1)については、黒三角で示される位置に、画素値Bobs(3,ib,jb)が観測される。以上のように、3枚目画像の画素値は、3枚目画像の座標系上の各画素の中央部(重心)、即ち、i番目、j番目の画素では(i−0.5,j−0.5)の位置において観測される。   In FIG. 15, for the pixel G (jg-1) (ig-1) that receives the green component, the pixel value Gobs (3, ig, jg) is observed at the position indicated by the black circle. For the pixel R (jr-1) (ir-1) that receives the red component, the pixel value Robs (3, ir, jr) is observed at the position indicated by the black square. For the pixel B (jb-1) (ib-1) that receives the blue component, the pixel value Bobs (3, ib, jb) is observed at the position indicated by the black triangle. As described above, the pixel value of the third image is the center (center of gravity) of each pixel on the coordinate system of the third image, i.e., (i−0.5, j -0.5) is observed.

3枚目画像上の点を、第1および第2実施の形態と同様に、1枚目画像の座標系を基準として考える。3枚目画像上の点は、動き検出回路23−2により検出された変換パラメータ(θ3,T3x,T3y,S3)を用いて1枚目画像の座標系上の点に変換することができる。   As in the first and second embodiments, points on the third image are considered with reference to the coordinate system of the first image. The point on the third image can be converted into a point on the coordinate system of the first image using the conversion parameters (θ3, T3x, T3y, S3) detected by the motion detection circuit 23-2.

図15には、その1枚目画像の座標系に変換された3枚目画像上の点の画素値Gobs(3,ig,jg)、画素値Robs(3,ir,jr)、画素値Bobs(3,ib,jb)も示されている。   FIG. 15 shows the pixel value Gobs (3, ig, jg), the pixel value Robs (3, ir, jr), the pixel value Bobs of the point on the third image converted into the coordinate system of the first image. (3, ib, jb) is also shown.

即ち、3枚目画像の座標系の画素G(jg−1)(ig−1)の画素値Gobs(3,ig,jg)は、3枚目画像の座標系上の位置(ig−0.5,jg−0.5)を動き検出回路23−2により検出された変換パラメータ(θ3,T3x,T3y,S3)により変換した1枚目画像の座標系上の位置((ig−0.5)(3),(jg−0.5)(3))で観測される緑色の光量Lg(x,y)である。図15では、画素値Gobs(3,ig,jg)が観測される1枚目画像の座標系上の位置((ig−0.5)(3),(jg−0.5)(3))が、白丸で示されている。 That is, the pixel value Gobs (3, ig, jg) of the pixel G (jg-1) (ig-1) in the coordinate system of the third image is set to the position (ig-0. 5, jg-0.5) by the conversion parameter (θ3, T3x, T3y, S3) detected by the motion detection circuit 23-2, the position ((ig-0.5) in the coordinate system of the first image. (3) , (jg−0.5) (3) ) is the green light quantity Lg (x, y) observed. In FIG. 15, the position ((ig−0.5) (3) , (jg−0.5) (3) on the coordinate system of the first image where the pixel value Gobs (3, ig, jg) is observed. ) Are indicated by white circles.

また、3枚目画像の座標系の画素R(jr−1)(ir−1)の画素値Robs(3,ir,jr)は、3枚目画像の座標系上の位置(ir−0.5,jr−0.5)を動き検出回路23−2により検出された変換パラメータ(θ3,T3x,T3y,S3)により変換した1枚目画像の座標系上の位置((ir−0.5)(3),(jr−0.5)(3))で観測される赤色の光量Lr(x,y)である。図15では、画素値Robs(3,ir,jr)が観測される1枚目画像の座標系上の位置((ir−0.5)(3),(jr−0.5)(3))が、白四角で示されている。 Also, the pixel value Robs (3, ir, jr) of the pixel R (jr-1) (ir-1) in the coordinate system of the third image is the position (ir-0. 5, jr-0.5) based on the conversion parameter (θ3, T3x, T3y, S3) detected by the motion detection circuit 23-2, the position ((ir-0.5) on the coordinate system of the first image. (3) , (jr−0.5) (3) ) is the red light quantity Lr (x, y) observed. In FIG. 15, the position ((ir−0.5) (3) , (jr−0.5) (3) on the coordinate system of the first image where the pixel value Robs (3, ir, jr) is observed. ) Is indicated by a white square.

さらに、3枚目画像の座標系の画素B(jb−1)(ib−1)の画素値Bobs(3,ib,jb)は、3枚目画像の座標系上の位置(ib−0.5,jb−0.5)を動き検出回路23−2により検出された変換パラメータ(θ3,T3x,T3y,S3)により変換した1枚目画像の座標系上の位置((ib−0.5)(3),(jb−0.5)(3))で観測される青色の光量Lb(x,y)である。図15では、画素値Bobs(3,ib,jb)が観測される1枚目画像の座標系上の位置((ib−0.5)(3),(jb−0.5)(3))が、白三角で示されている。 Further, the pixel value Bobs (3, ib, jb) of the pixel B (jb-1) (ib-1) in the coordinate system of the third image is the position (ib-0. 5, jb-0.5) based on the conversion parameter (θ3, T3x, T3y, S3) detected by the motion detection circuit 23-2, the position ((ib-0.5) on the coordinate system of the first image. (3) , (jb−0.5) (3) ) is the blue light quantity Lb (x, y) observed. In FIG. 15, the position ((ib−0.5) (3) , (jb−0.5) (3) on the coordinate system of the first image where the pixel value Bobs (3, ib, jb) is observed. ) Is indicated by a white triangle.

図16は、1乃至N枚目の撮像画像の画素のうちの緑色の成分を受光する所定の画素G(jg−1)(ig−1)の画素値Gobs(1,ig,jg)乃至Gobs(N,ig,jg)が観測される1枚目画像の座標系上の位置を示している。   FIG. 16 illustrates pixel values Gobs (1, ig, jg) to Gobs of predetermined pixels G (jg−1) (ig−1) that receive the green component among the pixels of the first to Nth captured images. (N, ig, jg) indicates the position on the coordinate system of the first image where the image is observed.

図16では、1枚目画像の座標系上のig番目、jg番目の画素G(jg−1)(ig−1)の中心位置(画素中心)において1枚目画像の画素値Gobs(1,ig,jg)が観測されている。また、画素G(jg−1)(ig−1)の画素中心の左上側に、位置が1枚目画像の座標系上に変換された2枚目画像の画素値Gobs(2,ig,jg)が観測されている。さらに、画素G(jg−1)(ig−1)の画素中心の左下側に、位置が1枚目画像の座標系上に変換された3枚目画像の画素値Gobs(3,ig,jg)が観測されている。また、画素G(jg−1)(ig−1)の画素中心の右上側に、位置が1枚目画像の座標系上に変換された4枚目画像の画素値Gobs(4,ig,jg)が観測されている。なお、5乃至N枚目画像の画素値Gobs(k,ig),jg)(k=5乃至N)の図示は、省略されている。 In FIG. 16, at the center position (pixel center) of the ig-th and jg-th pixels G (jg−1) (ig−1) on the coordinate system of the first image, the pixel value Gobs (1, ig, jg) has been observed. Further, the pixel value Gobs (2, ig, jg) of the second image whose position is converted on the coordinate system of the first image is located on the upper left side of the pixel center of the pixel G (jg-1) (ig-1). ) Has been observed. Further, on the lower left side of the pixel center of the pixel G (jg-1) (ig-1), the pixel value Gobs (3, ig, jg) of the third image whose position is converted on the coordinate system of the first image. ) Has been observed. In addition, on the upper right side of the pixel center of the pixel G (jg-1) (ig-1), the pixel value Gobs (4, ig, jg) of the fourth image whose position is converted on the coordinate system of the first image. ) Has been observed. The pixel values Gobs (k, ig ) , jg) (k = 5 to N) of the fifth to Nth images are not shown.

第3実施の形態では、演算回路24は、1乃至N枚目画像の画素値Gobs(k,ig,jg)(k=1乃至N)に基づいて、1枚目画像の座標系上の位置(−0.5,−0.5)の真の緑色の光量Lg(−0.5,−0.5)を求める。 In the third embodiment, the arithmetic circuit 24 determines the position of the first image on the coordinate system based on the pixel values Gobs (k, ig, jg) (k = 1 to N) of the first to Nth images. (i -0.5, j -0.5) true green light intensity Lg (i -0.5, j -0.5) in seeking.

ここで、基準画像である1枚目画像の座標系上において、i番目、j番目の画素の中心位置(i−0.5,j−0.5)を(I',J')と表すことにする。即ち、I'=i−0.5,J'=j−0.5とする。求めるべき真の緑色の光量Lg(I',J')は画素の中心位置(−0.5,−0.5)を用いたLg(−0.5,−0.5)で表すことができる。同様に、求めるべき真の赤色の光量Lr(I',J')は画素の中心位置(−0.5,−0.5)を用いたLr(−0.5,−0.5)で表すことができ、求めるべき真の青色の光量Lb(I',J')は画素の中心位置(−0.5,−0.5)を用いたLb(−0.5,−0.5)で表すことができる。 Here, the center position (i−0.5, j−0.5) of the i-th and j-th pixels on the coordinate system of the first image as the reference image is represented as (I ′, J ′). I will decide. That is, I ′ = i−0.5 and J ′ = j−0.5. True green light intensity Lg to be obtained (I ', J'), the center position of the pixel (i -0.5, j -0.5) with Lg (i -0.5, j -0.5 ). Similarly, the true red light amount Lr (I ′, J ′) to be obtained is Lr ( i− 0.5, j− ) using the center position ( i− 0.5, j− 0.5) of the pixel. 0.5), and the true blue light quantity Lb (I ′, J ′) to be obtained is represented by Lb ( i ) using the center position ( i −0.5, j −0.5) of the pixel. -0.5, j -0.5).

図17は、演算回路24が、鮮明な画像の画像信号として求めるべき真の赤色の光量Lr(I',J')、真の赤色の光量Lr(I',J')、真の青色の光量Lb(I',J')の位置を1枚目画像の座標系上に示したものである。   FIG. 17 shows the true red light amount Lr (I ′, J ′), the true red light amount Lr (I ′, J ′), and the true blue light to be obtained by the arithmetic circuit 24 as a clear image signal. The position of the light quantity Lb (I ′, J ′) is shown on the coordinate system of the first image.

即ち、図17では、1枚目画像の座標系上の撮像素子4の各画素の中心位置(I',J')が、真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、真の青色の光量Lb(I',J')を求めるべき位置として黒丸で示されている。   That is, in FIG. 17, the center position (I ′, J ′) of each pixel of the image sensor 4 on the coordinate system of the first image is a true green light amount Lg (I ′, J ′), a true red color. Are indicated by black circles as positions where the true light amount Lr (I ′, J ′) and the true blue light amount Lb (I ′, J ′) should be obtained.

図18乃至図23を参照し、緑色の成分を受光する画素に注目して、バネモデルについて説明する。図18以降においては、求めるべき真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、および真の青色の光量Lb(I',J')の1枚目画像の座標系上の位置(I',J')を黒丸で、画素値Gobs(k,ig,jg),Robs(k,ir,jr),Bobs(k,ib,jb)(k=1乃至N)が観測された1枚目画像の座標系上の位置を白丸で表すものとする。また、以下、適宜、基準画像である1枚目画像の座標系を基準座標系という。   With reference to FIGS. 18 to 23, the spring model will be described focusing on the pixels that receive the green component. In FIG. 18 and subsequent figures, the true green light amount Lg (I ′, J ′), the true red light amount Lr (I ′, J ′), and the true blue light amount Lb (I ′, J ′) to be obtained. The position (I ′, J ′) on the coordinate system of the first image is a black circle, and pixel values Gobs (k, ig, jg), Robs (k, ir, jr), Bobs (k, ib, jb) The position on the coordinate system of the first image where (k = 1 to N) is observed is represented by a white circle. In addition, hereinafter, the coordinate system of the first image, which is a reference image, is referred to as a reference coordinate system as appropriate.

図18の点Aの位置(x,y)は、k枚目画像のig番目、jg番目の画素の画素値Gobs(k,ig,jg)が観測された位置(ig−0.5,jg−0.5)を、動き検出回路23−(k−1)により検出された変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置((ig−0.5)(k),(jg−0.5)(k))を表している。k=1の場合は、(θk,Tkx,Tky,Sk)=(0,0,0,1)とみなすことができるので、(x,y)=(ig−0.5,jg−0.5)となる。なお、点A(x,y)の画素値は、Gobs(k,ig,jg)である。 The position (x, y) of the point A in FIG. 18 is a position (ig−0.5, jg) where the pixel value Gobs (k, ig, jg) of the ig-th and jg-th pixels of the k-th image is observed. -0.5) is converted by the conversion parameters (θk, Tkx, Tky, Sk) detected by the motion detection circuit 23- (k-1) on the reference coordinate system ((ig-0.5) ( k) , (jg−0.5) (k) ). When k = 1, it can be considered that (θk, Tkx, Tky, Sk) = (0, 0, 0, 1), so (x, y) = (ig−0.5, jg−0. 5). Note that the pixel value of the point A (x, y) is Gobs (k, ig, jg).

ここで、点A(x,y)に対して、I−0.5≦x<I+0.5,J−0.5≦y<J+0.5を満たす整数I,Jを考えることにする。このときの(I±0.5,J±0.5)で囲まれる領域の四隅の各位置、即ち、(I−0.5,J−0.5),(I−0.5,J+0.5),(I+0.5,J−0.5),(I+0.5,J+0.5)の位置は、真の緑色の光量Lg(I',J')を求める各位置(I',J')となる。   Here, for points A (x, y), integers I and J satisfying I−0.5 ≦ x <I + 0.5 and J−0.5 ≦ y <J + 0.5 are considered. Each position of the four corners of the region surrounded by (I ± 0.5, J ± 0.5) at this time, that is, (I−0.5, J−0.5), (I−0.5, J + 0) .5), (I + 0.5, J−0.5), and (I + 0.5, J + 0.5) are positions (I ′, J ′) for obtaining the true green light quantity Lg (I ′, J ′). J ′).

いま、点A(x,y)における画素値Gobs(k,ig,jg)は、点A(x,y)に近い(I−0.5,J−0.5),(I−0.5,J+0.5),(I+0.5,J−0.5),(I+0.5,J+0.5)の位置それぞれにおける真の緑色の光量Lg(I−0.5,J−0.5),Lg(I−0.5,J+0.5),Lg(I+0.5,J−0.5),Lg(I+0.5,J+0.5)それぞれとほぼ等しいとみなすことができる。即ち、真の緑色の光量Lg(I−0.5,J−0.5),Lg(I−0.5,J+0.5),Lg(I+0.5,J−0.5),Lg(I+0.5,J+0.5)は、点A(x,y)における画素値Gobs(k,ig,jg)で近似することができる。   Now, the pixel value Gobs (k, ig, jg) at the point A (x, y) is close to the point A (x, y) (I−0.5, J−0.5), (I−0. 5, J + 0.5), (I + 0.5, J-0.5), and (I + 0.5, J + 0.5), the true green light quantity Lg (I-0.5, J-0.5). ), Lg (I−0.5, J + 0.5), Lg (I + 0.5, J−0.5), and Lg (I + 0.5, J + 0.5). That is, the true green light quantity Lg (I−0.5, J−0.5), Lg (I−0.5, J + 0.5), Lg (I + 0.5, J−0.5), Lg ( I + 0.5, J + 0.5) can be approximated by the pixel value Gobs (k, ig, jg) at the point A (x, y).

ところで、点A(x,y)で観測された画素値Gobs(k,ig,jg)には、第1および第2実施の形態で説明したように、誤差(ノイズ量)Mk×Eが含まれる。さらに、ここでは、(I−0.5,J−0.5),(I−0.5,J+0.5),(I+0.5,J−0.5),(I+0.5,J+0.5)の位置それぞれにおける真の緑色の光量Lg(I−0.5,J−0.5),Lg(I−0.5,J+0.5),Lg(I+0.5,J−0.5),Lg(I+0.5,J+0.5)を、点A(x,y)における画素値Gobs(k,ig,jg)で近似したことによる誤差(以下、適宜、近似誤差と称する)が生ずる。   Incidentally, the pixel value Gobs (k, ig, jg) observed at the point A (x, y) includes an error (amount of noise) Mk × E as described in the first and second embodiments. It is. Further, here, (I−0.5, J−0.5), (I−0.5, J + 0.5), (I + 0.5, J−0.5), (I + 0.5, J + 0. 5) True green light quantity Lg (I-0.5, J-0.5), Lg (I-0.5, J + 0.5), Lg (I + 0.5, J-0.5) at each of the positions 5) ), Lg (I + 0.5, J + 0.5) is approximated by the pixel value Gobs (k, ig, jg) at the point A (x, y) (hereinafter referred to as an approximate error as appropriate). .

ここで、例えば、位置(I−0.5,J−0.5)における真の緑色の光量Lg(I−0.5,J−0.5)を点A(x,y)における画素値Gobs(k,ig,jg)で近似することは、バネを用いたモデルであるバネモデルに当てはめることができる。   Here, for example, the true green light quantity Lg (I-0.5, J-0.5) at the position (I-0.5, J-0.5) is the pixel value at the point A (x, y). The approximation by Gobs (k, ig, jg) can be applied to a spring model that is a model using a spring.

図19は、点A(x,y)における画素値Gobs(k,ig,jg)で位置(I−0.5,J−0.5)における真の緑色の光量Lg(I−0.5,J−0.5)を近似した状態を表すバネモデルの概念的な図である。   FIG. 19 shows the true green light quantity Lg (I-0.5) at the position (I-0.5, J-0.5) at the pixel value Gobs (k, ig, jg) at the point A (x, y). , J-0.5) is a conceptual diagram of a spring model representing a state approximated.

図19では、画素値Gobs(k,ig,jg)と真の緑色の光量Lg(I−0.5,J−0.5)とが、バネBA1の一端と他端とにそれぞれ接続され、画素値Gobs(k,ig,jg)側に、真の緑色の光量Lg(I−0.5,J−0.5)が引っ張られようとしている状態を示している。図19のバネモデルでは、真の緑色の光量Lg(I−0.5,J−0.5)が、点A(x,y)の画素値Gobs(k,ig,jg)であることが確からしいほど、真の緑色の光量Lg(I−0.5,J−0.5)が画素値Gobs(k,ig,jg)側に引き寄せられ、逆に、その確からしさの程度が低いほど、真の緑色の光量Lg(I−0.5,J−0.5)が、画素値Gobs(k,ig,jg)から遠ざかる。   In FIG. 19, the pixel value Gobs (k, ig, jg) and the true green light amount Lg (I-0.5, J-0.5) are connected to one end and the other end of the spring BA1, respectively. A state in which the true green light amount Lg (I-0.5, J-0.5) is about to be pulled toward the pixel value Gobs (k, ig, jg) is shown. In the spring model of FIG. 19, it is certain that the true green light quantity Lg (I-0.5, J-0.5) is the pixel value Gobs (k, ig, jg) at the point A (x, y). The true green light amount Lg (I-0.5, J-0.5) is drawn toward the pixel value Gobs (k, ig, jg) side, and conversely, the lower the degree of the probability, The true green light quantity Lg (I-0.5, J-0.5) is moved away from the pixel value Gobs (k, ig, jg).

ここで、画素値Gobs(k,ig,jg)で、真の緑色の光量Lg(I−0.5,J−0.5)を近似したことによる近似誤差は、点A(x,y)と位置(I−0.5,J−0.5)との間の距離が長くなるほど大きくなる。そこで、点(x1,y1)と点(x2,y2)との距離が大となると関数値が増加する増加関数F((x1,y1),(x2,y2))を導入する。関数F((x1,y1),(x2,y2))としては、例えば、
F((x1,y1),(x2,y2))=√{(x1−x2)2+(y1−y2)2
などを採用することができる。
Here, the approximation error caused by approximating the true green light quantity Lg (I−0.5, J−0.5) with the pixel value Gobs (k, ig, jg) is the point A (x, y). And the position (I-0.5, J-0.5) become larger as the distance between them becomes longer. Therefore, an increasing function F ((x1, y1), (x2, y2)) is introduced in which the function value increases as the distance between the point (x1, y1) and the point (x2, y2) increases. As the function F ((x1, y1), (x2, y2)), for example,
F ((x1, y1), (x2, y2)) = √ {(x1-x2) 2 + (y1-y2) 2 }
Etc. can be adopted.

また、上述したように、点A(x,y)で観測された画素値Gobs(k,ig,jg)には、誤差としてのノイズ量E×Mkが含まれる。   Further, as described above, the pixel value Gobs (k, ig, jg) observed at the point A (x, y) includes a noise amount E × Mk as an error.

画素値Gobs(k,ig,jg)と真の緑色の光量Lg(I−0.5,J−0.5)とが等価(同一)であることの確からしさ、即ち、真の緑色の光量Lg(I−0.5,J−0.5)を画素値Gobs(k,ig,jg)で近似したときの近似精度は、上述の近似誤差とノイズ量E×Mkの増加または減少に応じて、それぞれ減少または増加する。従って、近似精度(確からしさ)は、例えば、
Mk×E×F((x,y),(I−0.5,J−0.5))
の値に対して減少する(反比例する)。即ち、真の緑色の光量Lg(I−0.5,J−0.5)が、点A(x,y)の画素値Gobs(k,ig,jg)に等しいことの確からしさは、「Mk×E×F((x,y),(I−0.5,J−0.5))」の値が小さければ、大であり、また「Mk×E×F((x,y),(I−0.5,J−0.5))」の値が大きければ、小であるといえる。
The probability that the pixel value Gobs (k, ig, jg) and the true green light quantity Lg (I-0.5, J-0.5) are equivalent (identical), that is, the true green light quantity The approximation accuracy when Lg (I−0.5, J−0.5) is approximated by the pixel value Gobs (k, ig, jg) depends on the increase or decrease in the above-described approximation error and noise amount E × Mk. Decrease or increase respectively. Therefore, the approximation accuracy (probability) is, for example,
Mk × E × F ((x, y), (I−0.5, J−0.5))
Decreases (inversely proportional) to the value of. That is, the certainty that the true green light quantity Lg (I−0.5, J−0.5) is equal to the pixel value Gobs (k, ig, jg) at the point A (x, y) is “ If the value of “Mk × E × F ((x, y), (I−0.5, J−0.5))” is small, the value is large, and “Mk × E × F ((x, y)”. , (I−0.5, J−0.5)) ”is large, it can be said to be small.

いま、この画素値Gobs(k,ig,jg)と真の緑色の光量Lg(I−0.5,J−0.5)が等価であることの確からしさをバネBA1のバネ定数(バネの強さ)で表すことにすると、バネ定数は、例えば、式
{√2−F((x,y),(I−0.5,J−0.5))}/(Mk×E)
で表すことができる。ここで、分母の(Mk×E)は、ノイズ量EのMk倍であり、ノイズが大となるほどバネBA1は弱くなって、真の緑色の光量Lg(I−0.5,J−0.5)が、バネBA1によって点Aの画素値Gobs(k,ig,jg)側へ引っ張られる力は小さくなる。分子の{√2−F((x,y),(I−0.5,J−0.5))}は、図18の(I±0.5,J±0.5)で囲まれる領域内の任意の2点の距離の最大値である√(12+12)=√2から、点Aと(I−0.5,J−0.5)との距離F((x,y),(I−0.5,J−0.5))を引いた値(差分)であり、画素値Gobs(k,ig,jg)が観測された位置A(x,y)と真の緑色の光量Lg(I−0.5,J−0.5)を求める位置(I−0.5,J−0.5)との距離が大きくなるほど、√2−F((x,y),(I−0.5,J−0.5))は小さくなって、バネBA1は弱くなる。従って、真の緑色の光量Lg(I−0.5,J−0.5)が、バネBA1によって点Aの画素値Gobs(k,ig,jg)側へ引っ張られる力は小さくなる。なお、バネ定数において、分子の{√2−F((x,y),(I−0.5,J−0.5))}の代わりに、F((x,y),(I−0.5,J−0.5))の逆数などを用いることもできる。
Now, the probability that the pixel value Gobs (k, ig, jg) and the true green light quantity Lg (I-0.5, J-0.5) are equivalent is represented by the spring constant of the spring BA1 (spring For example, the spring constant is expressed by the formula {√2-F ((x, y), (I−0.5, J−0.5))} / (Mk × E).
Can be expressed as Here, the denominator (Mk × E) is Mk times the amount of noise E, and as the noise increases, the spring BA1 becomes weaker, and the true green light quantity Lg (I−0.5, J−0. 5), the force pulled toward the pixel value Gobs (k, ig, jg) of the point A by the spring BA1 becomes small. The {√2-F ((x, y), (I-0.5, J-0.5))} of the molecule is surrounded by (I ± 0.5, J ± 0.5) in FIG. From the maximum value of the distance between any two points in the region, √ (1 2 +1 2 ) = √2, the distance F between the point A and (I−0.5, J−0.5) ((x, y), (I−0.5, J−0.5)) minus the value (difference), and the true position A (x, y) where the pixel value Gobs (k, ig, jg) was observed. As the distance from the position (I-0.5, J-0.5) for obtaining the green light quantity Lg (I-0.5, J-0.5) increases, √2-F ((x, y ), (I-0.5, J-0.5)) becomes smaller and the spring BA1 becomes weaker. Accordingly, the force with which the true green light amount Lg (I-0.5, J-0.5) is pulled toward the pixel value Gobs (k, ig, jg) of the point A by the spring BA1 is reduced. In the spring constant, instead of {√2-F ((x, y), (I−0.5, J−0.5))} of the molecule, F ((x, y), (I− The reciprocal of 0.5, J-0.5)) can also be used.

バネモデルにおいて、バネBA1は、自然長(無負荷の状態でのバネBA1の長さ)が0のバネであるとする。この場合、バネBA1の長さ(伸び)は、光量(画素値)の軸方向を距離として、
|Gobs(k,ig,jg)−Lg(I−0.5,J−0.5)|
と表すことができ、真の緑色の光量Lg(I−0.5,J−0.5)が、バネBA1によって点A(x,y)の画素値Gobs(k,ig,jg)側に引っ張られる力は、バネ定数×バネの長さ={{√2−F((x,y),(I−0.5,J−0.5))}/(Mk×E)}×|Gobs(k,ig,jg)−Lg(I−0.5,J−0.5)|と表すことができる。
In the spring model, it is assumed that the spring BA1 is a spring whose natural length (the length of the spring BA1 in an unloaded state) is zero. In this case, the length (elongation) of the spring BA1 is the distance in the axial direction of the light quantity (pixel value).
| Gobs (k, ig, jg) -Lg (I-0.5, J-0.5) |
The true green light quantity Lg (I-0.5, J-0.5) is moved to the pixel value Gobs (k, ig, jg) side of the point A (x, y) by the spring BA1. The pulling force is: spring constant × spring length = {{√2−F ((x, y), (I−0.5, J−0.5))} / (Mk × E)} × | It can be expressed as Gobs (k, ig, jg) −Lg (I−0.5, J−0.5) |.

図20は、点A(x,y)における画素値Gobs(k,ig,jg)と、(I−0.5,J−0.5),(I−0.5,J+0.5),(I+0.5,J−0.5),(I+0.5,J+0.5)の位置における真の緑色の光量Lg(I−0.5,J−0.5),Lg(I−0.5,J+0.5),Lg(I+0.5,J−0.5),Lg(I+0.5,J+0.5)それぞれとの関係を表すバネモデルを概念的に表した図である。   FIG. 20 shows pixel values Gobs (k, ig, jg) at point A (x, y), (I−0.5, J−0.5), (I−0.5, J + 0.5), True green light amounts Lg (I-0.5, J-0.5), Lg (I-0...) At positions (I + 0.5, J-0.5) and (I + 0.5, J + 0.5). 5, J + 0.5), Lg (I + 0.5, J−0.5), and Lg (I + 0.5, J + 0.5).

図19で説明した点A(x,y)における画素値Gobs(k,ig,jg)と、真の緑色の光量Lg(I−0.5,J−0.5)との関係を表すバネモデルと同様に、真の緑色の光量Lg(I−0.5,J+0.5),Lg(I+0.5,J−0.5),Lg(I+0.5,J+0.5)それぞれについても、点A(x,y)における画素値Gobs(k,ig,jg)の関係を、バネモデルで表すことができる。   A spring model representing the relationship between the pixel value Gobs (k, ig, jg) at the point A (x, y) described in FIG. 19 and the true green light quantity Lg (I-0.5, J-0.5). In the same way as for the true green light quantity Lg (I-0.5, J + 0.5), Lg (I + 0.5, J-0.5), and Lg (I + 0.5, J + 0.5) The relationship between the pixel values Gobs (k, ig, jg) in A (x, y) can be represented by a spring model.

即ち、図20では、画素値Gobs(k,ig,jg)と真の緑色の光量Lg(I−0.5,J+0.5)とが、バネBA2の一端と他端とにそれぞれ接続され、画素値Gobs(k,ig,jg)側に、真の緑色の光量Lg(I−0.5,J+0.5)が引っ張られようとしている状態を示している。図20のバネモデルでは、真の緑色の光量Lg(I−0.5,J+0.5)が、点A(x,y)の画素値Gobs(k,ig,jg)であることが確からしいほど、真の緑色の光量Lg(I−0.5,J+0.5)が画素値Gobs(k,ig,jg)側に引き寄せられ、逆に、その確からしさの程度が低いほど、真の緑色の光量Lg(I−0.5,J+0.5)が、画素値Gobs(k,ig,jg)から遠ざかる。   That is, in FIG. 20, the pixel value Gobs (k, ig, jg) and the true green light quantity Lg (I−0.5, J + 0.5) are connected to one end and the other end of the spring BA2, respectively. A state in which the true green light amount Lg (I−0.5, J + 0.5) is about to be pulled toward the pixel value Gobs (k, ig, jg) is shown. In the spring model of FIG. 20, the true green light quantity Lg (I−0.5, J + 0.5) is likely to be the pixel value Gobs (k, ig, jg) at the point A (x, y). , The true green light amount Lg (I−0.5, J + 0.5) is drawn toward the pixel value Gobs (k, ig, jg), and conversely, the lower the degree of the probability, the more true green light The light amount Lg (I−0.5, J + 0.5) is moved away from the pixel value Gobs (k, ig, jg).

ここで、画素値Gobs(k,ig,jg)で、真の緑色の光量Lg(I−0.5,J+0.5)を近似したことによる近似誤差は、点A(x,y)と位置(I−0.5,J+0.5)との間の距離が長くなるほど大きくなる。そこで、点(x1,y1)と点(x2,y2)との距離が大となると関数値が増加する増加関数F((x1,y1),(x2,y2))を導入する。関数F((x1,y1),(x2,y2))としては、例えば、
F((x1,y1),(x2,y2))=√{(x1−x2)2+(y1−y2)2
などを採用することができる。
Here, the approximation error caused by approximating the true green light quantity Lg (I−0.5, J + 0.5) with the pixel value Gobs (k, ig, jg) is the point A (x, y) and the position. The distance between (I−0.5, J + 0.5) increases as the distance increases. Therefore, an increasing function F ((x1, y1), (x2, y2)) is introduced in which the function value increases as the distance between the point (x1, y1) and the point (x2, y2) increases. As the function F ((x1, y1), (x2, y2)), for example,
F ((x1, y1), (x2, y2)) = √ {(x1-x2) 2 + (y1-y2) 2 }
Etc. can be adopted.

また、上述したように、点A(x,y)で観測された画素値Gobs(k,ig,jg)には、誤差としてのノイズ量E×Mkが含まれる。   Further, as described above, the pixel value Gobs (k, ig, jg) observed at the point A (x, y) includes a noise amount E × Mk as an error.

画素値Gobs(k,ig,jg)と真の緑色の光量Lg(I−0.5,J+0.5)とが等価(同一)であることの確からしさ、即ち、真の緑色の光量Lg(I−0.5,J+0.5)を画素値Gobs(k,ig,jg)で近似したときの近似精度は、上述の近似誤差とノイズ量E×Mkの増加または減少に応じて、それぞれ減少または増加する。従って、近似精度(確からしさ)は、例えば、
Mk×E×F((x,y),(I−0.5,J+0.5))
の値に対して減少する(反比例する)。即ち、真の緑色の光量Lg(I−0.5,J+0.5)が、点A(x,y)の画素値Gobs(k,ig,jg)に等しいことの確からしさは、「Mk×E×F((x,y),(I−0.5,J+0.5))」の値が小さければ、大であり、また「Mk×E×F((x,y),(I−0.5,J+0.5))」の値が大きければ、小であるといえる。
The probability that the pixel value Gobs (k, ig, jg) and the true green light amount Lg (I−0.5, J + 0.5) are equivalent (identical), that is, the true green light amount Lg ( The approximation accuracy when I−0.5, J + 0.5) is approximated by the pixel value Gobs (k, ig, jg) decreases in accordance with the increase or decrease in the approximation error and the noise amount E × Mk. Or increase. Therefore, the approximation accuracy (probability) is, for example,
Mk × E × F ((x, y), (I−0.5, J + 0.5))
Decreases (inversely proportional) to the value of. That is, the probability that the true green light amount Lg (I−0.5, J + 0.5) is equal to the pixel value Gobs (k, ig, jg) at the point A (x, y) is “Mk × If the value of E × F ((x, y), (I−0.5, J + 0.5)) ”is small, the value is large, and“ Mk × E × F ((x, y), (I− If the value of 0.5, J + 0.5)) ”is large, it can be said that the value is small.

いま、この画素値Gobs(k,ig,jg)と真の緑色の光量Lg(I−0.5,J+0.5)が等価であることの確からしさをバネBA2のバネ定数(バネの強さ)で表すことにすると、バネ定数は、例えば、式
{√2−F((x,y),(I−0.5,J+0.5))}/(Mk×E)
で表すことができる。ここで、分母の(Mk×E)は、ノイズ量EのMk倍であり、ノイズが大となるほどバネBA2は弱くなって、真の緑色の光量Lg(I−0.5,J+0.5)が、バネBA2によって点Aの画素値Gobs(k,ig,jg)側へ引っ張られる力は小さくなる。分子の{√2−F((x,y),(I−0.5,J+0.5))}は、図18の(I±0.5,J±0.5)で囲まれる領域内の任意の2点の距離の最大値である√(12+12)=√2から、点Aと(I−0.5,J+0.5)との距離F((x,y),(I−0.5,J+0.5))を引いた値(差分)であり、画素値Gobs(k,ig,jg)が観測された位置A(x,y)と真の緑色の光量Lg(I−0.5,J+0.5)を求める位置(I−0.5,J+0.5)との距離が大きくなるほど、√2−F((x,y),(I−0.5,J+0.5))は小さくなって、バネBA2は弱くなる。従って、真の緑色の光量Lg(I−0.5,J+0.5)が、バネBA2によって点Aの画素値Gobs(k,ig,jg)側へ引っ張られる力は小さくなる。なお、バネ定数において、分子の{√2−F((x,y),(I−0.5,J+0.5))}の代わりに、F((x,y),(I−0.5,J+0.5))の逆数などを用いることもできる。
Now, the probability that the pixel value Gobs (k, ig, jg) and the true green light quantity Lg (I-0.5, J + 0.5) are equivalent is the spring constant of the spring BA2 (spring strength). ), The spring constant is, for example, the formula {√2-F ((x, y), (I−0.5, J + 0.5))} / (Mk × E)
Can be expressed as Here, the denominator (Mk × E) is Mk times the amount of noise E, and the larger the noise, the weaker the spring BA2, and the true green light quantity Lg (I−0.5, J + 0.5). However, the force pulled by the spring BA2 toward the pixel value Gobs (k, ig, jg) of the point A becomes small. The {√2-F ((x, y), (I−0.5, J + 0.5))} of the molecule is within the region surrounded by (I ± 0.5, J ± 0.5) in FIG. √ the maximum value of the distance between any two points from (1 2 +1 2) = √2 , points a and (I-0.5, J + 0.5 ) distance between F ((x, y), ( I−0.5, J + 0.5)) is a value (difference), and the position A (x, y) where the pixel value Gobs (k, ig, jg) is observed and the true green light quantity Lg ( The larger the distance from the position (I-0.5, J + 0.5) for which I-0.5, J + 0.5) is found, the more the value of √2−F ((x, y), (I−0.5, J + 0) .5)) becomes smaller and the spring BA2 becomes weaker. Therefore, the force with which the true green light amount Lg (I−0.5, J + 0.5) is pulled toward the pixel value Gobs (k, ig, jg) of the point A by the spring BA2 is reduced. In the spring constant, F ((x, y), (I-0...) Instead of {√2-F ((x, y), (I−0.5, J + 0.5))} of the molecule. 5, the reciprocal number of J + 0.5)) can also be used.

バネモデルにおいて、バネBA2は、自然長(無負荷の状態でのバネBA2の長さ)が0のバネであるとする。この場合、バネBA2の長さ(伸び)は、光量(画素値)の軸方向を距離として、
|Gobs(k,ig,jg)−Lg(I−0.5,J+0.5)|
と表すことができ、真の緑色の光量Lg(I−0.5,J+0.5)が、バネBA2によって点A(x,y)の画素値Gobs(k,ig,jg)側に引っ張られる力は、バネ定数×バネの長さ={{√2−F((x,y),(I−0.5,J+0.5))}/(Mk×E)}×|Gobs(k,ig,jg)−Lg(I−0.5,J+0.5)|と表すことができる。
In the spring model, the spring BA2 is a spring whose natural length (the length of the spring BA2 in an unloaded state) is zero. In this case, the length (elongation) of the spring BA2 is the distance in the axial direction of the light quantity (pixel value).
| Gobs (k, ig, jg) -Lg (I-0.5, J + 0.5) |
The true green light quantity Lg (I−0.5, J + 0.5) is pulled toward the pixel value Gobs (k, ig, jg) of the point A (x, y) by the spring BA2. The force is: spring constant × spring length = {{√2−F ((x, y), (I−0.5, J + 0.5))} / (Mk × E)} × | Gobs (k, ig, jg) −Lg (I−0.5, J + 0.5) |.

また、図20では、画素値Gobs(k,ig,jg)と真の緑色の光量Lg(I+0.5,J−0.5)とが、バネBA3の一端と他端とにそれぞれ接続され、画素値Gobs(k,ig,jg)側に、真の緑色の光量Lg(I+0.5,J−0.5)が引っ張られようとしている状態を示している。図20のバネモデルでは、真の緑色の光量Lg(I+0.5,J−0.5)が、点A(x,y)の画素値Gobs(k,ig,jg)であることが確からしいほど、真の緑色の光量Lg(I+0.5,J−0.5)が画素値Gobs(k,ig,jg)側に引き寄せられ、逆に、その確からしさの程度が低いほど、真の緑色の光量Lg(I+0.5,J−0.5)が、画素値Gobs(k,ig,jg)から遠ざかる。   In FIG. 20, the pixel value Gobs (k, ig, jg) and the true green light amount Lg (I + 0.5, J-0.5) are connected to one end and the other end of the spring BA3, respectively. A state in which the true green light amount Lg (I + 0.5, J−0.5) is about to be pulled toward the pixel value Gobs (k, ig, jg) is shown. In the spring model of FIG. 20, the true green light quantity Lg (I + 0.5, J−0.5) is likely to be the pixel value Gobs (k, ig, jg) at the point A (x, y). , The true green light amount Lg (I + 0.5, J-0.5) is drawn toward the pixel value Gobs (k, ig, jg), and conversely, the lower the degree of certainty, the more true green light The light amount Lg (I + 0.5, J−0.5) is moved away from the pixel value Gobs (k, ig, jg).

ここで、画素値Gobs(k,ig,jg)で、真の緑色の光量Lg(I+0.5,J−0.5)を近似したことによる近似誤差は、点A(x,y)と位置(I+0.5,J−0.5)との間の距離が長くなるほど大きくなる。そこで、点(x1,y1)と点(x2,y2)との距離が大となると関数値が増加する増加関数F((x1,y1),(x2,y2))を導入する。関数F((x1,y1),(x2,y2))としては、例えば、
F((x1,y1),(x2,y2))=√{(x1−x2)2+(y1−y2)2
などを採用することができる。
Here, the approximation error caused by approximating the true green light amount Lg (I + 0.5, J−0.5) with the pixel value Gobs (k, ig, jg) is the point A (x, y) and the position. The distance between (I + 0.5, J−0.5) increases as the distance increases. Therefore, an increasing function F ((x1, y1), (x2, y2)) is introduced in which the function value increases as the distance between the point (x1, y1) and the point (x2, y2) increases. As the function F ((x1, y1), (x2, y2)), for example,
F ((x1, y1), (x2, y2)) = √ {(x1-x2) 2 + (y1-y2) 2 }
Etc. can be adopted.

また、上述したように、点A(x,y)で観測された画素値Gobs(k,ig,jg)には、誤差としてのノイズ量E×Mkが含まれる。   Further, as described above, the pixel value Gobs (k, ig, jg) observed at the point A (x, y) includes a noise amount E × Mk as an error.

画素値Gobs(k,ig,jg)と真の緑色の光量Lg(I+0.5,J−0.5)とが等価(同一)であることの確からしさ、即ち、真の緑色の光量Lg(I+0.5,J−0.5)を画素値Gobs(k,ig,jg)で近似したときの近似精度は、上述の近似誤差とノイズ量E×Mkの増加または減少に応じて、それぞれ減少または増加する。従って、近似精度(確からしさ)は、例えば、
Mk×E×F((x,y),(I+0.5,J−0.5))
の値に対して減少する(反比例する)。即ち、真の緑色の光量Lg(I+0.5,J−0.5)が、点A(x,y)の画素値Gobs(k,ig,jg)に等しいことの確からしさは、「Mk×E×F((x,y),(I+0.5,J−0.5))」の値が小さければ、大であり、また「Mk×E×F((x,y),(I+0.5,J−0.5))」の値が大きければ、小であるといえる。
The probability that the pixel value Gobs (k, ig, jg) and the true green light quantity Lg (I + 0.5, J-0.5) are equivalent (identical), that is, the true green light quantity Lg ( The approximation accuracy when I + 0.5, J−0.5) is approximated by the pixel value Gobs (k, ig, jg) decreases as the approximation error and the noise amount E × Mk increase or decrease, respectively. Or increase. Therefore, the approximation accuracy (probability) is, for example,
Mk × E × F ((x, y), (I + 0.5, J−0.5))
Decreases (inversely proportional) to the value of. That is, the probability that the true green light amount Lg (I + 0.5, J−0.5) is equal to the pixel value Gobs (k, ig, jg) at the point A (x, y) is “Mk × If the value of “E × F ((x, y), (I + 0.5, J−0.5))” is small, the value is large, and “Mk × E × F ((x, y), (I + 0. 5, J−0.5)) ”is large, it can be said to be small.

いま、この画素値Gobs(k,ig,jg)と真の緑色の光量Lg(I+0.5,J−0.5)が等価であることの確からしさをバネBA3のバネ定数(バネの強さ)で表すことにすると、バネ定数は、例えば、式
{√2−F((x,y),(I+0.5,J−0.5))}/(Mk×E)
で表すことができる。ここで、分母の(Mk×E)は、ノイズ量EのMk倍であり、ノイズが大となるほどバネBA3は弱くなって、真の緑色の光量Lg(I+0.5,J−0.5)が、バネBA3によって点Aの画素値Gobs(k,ig,jg)側へ引っ張られる力は小さくなる。分子の{√2−F((x,y),(I+0.5,J−0.5))}は、図18の(I±0.5,J±0.5)で囲まれる領域内の任意の2点の距離の最大値である√(12+12)=√2から、点Aと(I+0.5,J−0.5)との距離F((x,y),(I+0.5,J−0.5))を引いた値(差分)であり、画素値Gobs(k,ig,jg)が観測された位置A(x,y)と真の緑色の光量Lg(I+0.5,J−0.5)を求める位置(I+0.5,J−0.5)との距離が大きくなるほど、√2−F((x,y),(I+0.5,J−0.5))は小さくなって、バネBA3は弱くなる。従って、真の緑色の光量Lg(I+0.5,J−0.5)が、バネBA3によって点Aの画素値Gobs(k,ig,jg)側へ引っ張られる力は小さくなる。なお、バネ定数において、分子の{√2−F((x,y),(I+0.5,J−0.5))}の代わりに、F((x,y),(I+0.5,J−0.5))の逆数などを用いることもできる。
Now, the probability that the pixel value Gobs (k, ig, jg) and the true green light quantity Lg (I + 0.5, J-0.5) are equivalent is the spring constant of the spring BA3 (spring strength). ), The spring constant is, for example, the formula {√2−F ((x, y), (I + 0.5, J−0.5))} / (Mk × E).
Can be expressed as Here, the denominator (Mk × E) is Mk times the noise amount E, and the greater the noise, the weaker the spring BA3 becomes, and the true green light quantity Lg (I + 0.5, J−0.5). However, the force pulled by the spring BA3 toward the pixel value Gobs (k, ig, jg) of the point A becomes small. The {√2-F ((x, y), (I + 0.5, J-0.5))} of the molecule is in the region surrounded by (I ± 0.5, J ± 0.5) in FIG. The distance F between the point A and (I + 0.5, J−0.5) F ((x, y), () from the maximum value of the distance between any two points √ (1 2 +1 2 ) = √2. I + 0.5, J−0.5)) is a value (difference), and the position A (x, y) where the pixel value Gobs (k, ig, jg) is observed and the true green light quantity Lg ( The larger the distance from the position (I + 0.5, J-0.5) for which I + 0.5, J-0.5) is found, the more it becomes √2−F ((x, y), (I + 0.5, J−0). .5)) becomes smaller and the spring BA3 becomes weaker. Therefore, the force by which the true green light amount Lg (I + 0.5, J−0.5) is pulled toward the pixel value Gobs (k, ig, jg) of the point A by the spring BA3 is reduced. In the spring constant, instead of {√2-F ((x, y), (I + 0.5, J-0.5))} of the molecule, F ((x, y), (I + 0.5, The reciprocal of J-0.5)) can also be used.

バネモデルにおいて、バネBA3は、自然長(無負荷の状態でのバネBA3の長さ)が0のバネであるとする。この場合、バネBA3の長さ(伸び)は、光量(画素値)の軸方向を距離として、
|Gobs(k,ig,jg)−Lg(I+0.5,J−0.5)|
と表すことができ、真の緑色の光量Lg(I+0.5,J−0.5)が、バネBA3によって点A(x,y)の画素値Gobs(k,ig,jg)側に引っ張られる力は、バネ定数×バネの長さ={{√2−F((x,y),(I+0.5,J−0.5))}/(Mk×E)}×|Gobs(k,ig,jg)−Lg(I+0.5,J−0.5)|と表すことができる。
In the spring model, it is assumed that the spring BA3 is a spring whose natural length (the length of the spring BA3 in an unloaded state) is zero. In this case, the length (elongation) of the spring BA3 is the distance in the axial direction of the light quantity (pixel value).
| Gobs (k, ig, jg) -Lg (I + 0.5, J-0.5) |
The true green light amount Lg (I + 0.5, J−0.5) is pulled toward the pixel value Gobs (k, ig, jg) of the point A (x, y) by the spring BA3. The force is: spring constant × spring length = {{√2−F ((x, y), (I + 0.5, J−0.5))} / (Mk × E)} × | Gobs (k, ig, jg) -Lg (I + 0.5, J-0.5) |.

さらに、図20では、画素値Gobs(k,ig,jg)と真の緑色の光量Lg(I+0.5,J+0.5)とが、バネBA4の一端と他端とにそれぞれ接続され、画素値Gobs(k,ig,jg)側に、真の緑色の光量Lg(I+0.5,J+0.5)が引っ張られようとしている状態を示している。図20のバネモデルでは、真の緑色の光量Lg(I+0.5,J+0.5)が、点A(x,y)の画素値Gobs(k,ig,jg)であることが確からしいほど、真の緑色の光量Lg(I+0.5,J+0.5)が画素値Gobs(k,ig,jg)側に引き寄せられ、逆に、その確からしさの程度が低いほど、真の緑色の光量Lg(I+0.5,J+0.5)が、画素値Gobs(k,ig,jg)から遠ざかる。   Further, in FIG. 20, the pixel value Gobs (k, ig, jg) and the true green light amount Lg (I + 0.5, J + 0.5) are connected to one end and the other end of the spring BA4, respectively, and the pixel value A state where the true green light amount Lg (I + 0.5, J + 0.5) is about to be pulled toward the Gobs (k, ig, jg) side is shown. In the spring model of FIG. 20, the true green light quantity Lg (I + 0.5, J + 0.5) is true so that it is certain that the pixel value Gobs (k, ig, jg) at the point A (x, y). The green light amount Lg (I + 0.5, J + 0.5) is drawn toward the pixel value Gobs (k, ig, jg), and conversely, the lower the probability, the more true green light amount Lg (I + 0) .5, J + 0.5) move away from the pixel value Gobs (k, ig, jg).

ここで、画素値Gobs(k,ig,jg)で、真の緑色の光量Lg(I+0.5,J+0.5)を近似したことによる近似誤差は、点A(x,y)と位置(I+0.5,J+0.5)との間の距離が長くなるほど大きくなる。そこで、点(x1,y1)と点(x2,y2)との距離が大となると関数値が増加する増加関数F((x1,y1),(x2,y2))を導入する。関数F((x1,y1),(x2,y2))としては、例えば、
F((x1,y1),(x2,y2))=√{(x1−x2)2+(y1−y2)2
などを採用することができる。
Here, the approximation error caused by approximating the true green light quantity Lg (I + 0.5, J + 0.5) with the pixel value Gobs (k, ig, jg) is the point A (x, y) and the position (I + 0). .5, J + 0.5) increases with increasing distance. Therefore, an increasing function F ((x1, y1), (x2, y2)) is introduced in which the function value increases as the distance between the point (x1, y1) and the point (x2, y2) increases. As the function F ((x1, y1), (x2, y2)), for example,
F ((x1, y1), (x2, y2)) = √ {(x1-x2) 2 + (y1-y2) 2 }
Etc. can be adopted.

また、上述したように、点A(x,y)で観測された画素値Gobs(k,ig,jg)には、誤差としてのノイズ量E×Mkが含まれる。   Further, as described above, the pixel value Gobs (k, ig, jg) observed at the point A (x, y) includes a noise amount E × Mk as an error.

画素値Gobs(k,ig,jg)と真の緑色の光量Lg(I+0.5,J+0.5)とが等価(同一)であることの確からしさ、即ち、真の緑色の光量Lg(I+0.5,J+0.5)を画素値Gobs(k,ig,jg)で近似したときの近似精度は、上述の近似誤差とノイズ量E×Mkの増加または減少に応じて、それぞれ減少または増加する。従って、近似精度(確からしさ)は、例えば、
Mk×E×F((x,y),(I+0.5,J+0.5))
の値に対して減少する(反比例する)。即ち、真の緑色の光量Lg(I+0.5,J+0.5)が、点A(x,y)の画素値Gobs(k,ig,jg)に等しいことの確からしさは、「Mk×E×F((x,y),(I+0.5,J+0.5))」の値が小さければ、大であり、また「Mk×E×F((x,y),(I+0.5,J+0.5))」の値が大きければ、小であるといえる。
The probability that the pixel value Gobs (k, ig, jg) and the true green light quantity Lg (I + 0.5, J + 0.5) are equivalent (identical), that is, the true green light quantity Lg (I + 0. 5, J + 0.5) is approximated by the pixel value Gobs (k, ig, jg), and the approximation accuracy decreases or increases in accordance with the increase or decrease of the approximation error and the noise amount E × Mk, respectively. Therefore, the approximation accuracy (probability) is, for example,
Mk × E × F ((x, y), (I + 0.5, J + 0.5))
Decreases (inversely proportional) to the value of. That is, the probability that the true green light amount Lg (I + 0.5, J + 0.5) is equal to the pixel value Gobs (k, ig, jg) at the point A (x, y) is “Mk × E × If the value of F ((x, y), (I + 0.5, J + 0.5)) ”is small, the value is large, and“ Mk × E × F ((x, y), (I + 0.5, J + 0. If the value of 5)) ”is large, it can be said that the value is small.

いま、この画素値Gobs(k,ig,jg)と真の緑色の光量Lg(I+0.5,J+0.5)が等価であることの確からしさをバネBA4のバネ定数(バネの強さ)で表すことにすると、バネ定数は、例えば、式
{√2−F((x,y),(I+0.5,J+0.5))}/(Mk×E)
で表すことができる。ここで、分母の(Mk×E)は、ノイズ量EのMk倍であり、ノイズが大となるほどバネBA4は弱くなって、真の緑色の光量Lg(I+0.5,J+0.5)が、バネBA4によって点Aの画素値Gobs(k,ig,jg)側へ引っ張られる力は小さくなる。分子の{√2−F((x,y),(I+0.5,J+0.5))}は、図18の(I±0.5,J±0.5)で囲まれる領域内の任意の2点の距離の最大値である√(12+12)=√2から、点Aと(I+0.5,J+0.5)との距離F((x,y),(I+0.5,J+0.5))を引いた値(差分)であり、画素値Gobs(k,ig,jg)が観測された位置A(x,y)と真の緑色の光量Lg(I+0.5,J+0.5)を求める位置(I+0.5,J+0.5)との距離が大きくなるほど、√2−F((x,y),(I+0.5,J+0.5))は小さくなって、バネBA4は弱くなる。従って、真の緑色の光量Lg(I+0.5,J+0.5)が、バネBA4によって点Aの画素値Gobs(k,ig,jg)側へ引っ張られる力は小さくなる。なお、バネ定数において、分子の{√2−F((x,y),(I+0.5,J+0.5))}の代わりに、F((x,y),(I+0.5,J+0.5))の逆数などを用いることもできる。
Now, the probability that this pixel value Gobs (k, ig, jg) and the true green light quantity Lg (I + 0.5, J + 0.5) are equivalent is the spring constant (spring strength) of the spring BA4. When expressed, the spring constant is, for example, the formula {√2-F ((x, y), (I + 0.5, J + 0.5))} / (Mk × E).
Can be expressed as Here, the denominator (Mk × E) is Mk times the amount of noise E, and the greater the noise, the weaker the spring BA4, and the true green light quantity Lg (I + 0.5, J + 0.5) The force pulled by the spring BA4 toward the pixel value Gobs (k, ig, jg) of the point A becomes small. The {√2-F ((x, y), (I + 0.5, J + 0.5))} of the molecule is an arbitrary value within the region surrounded by (I ± 0.5, J ± 0.5) in FIG. from the maximum value of the distance between two points √ (1 2 +1 2) = √2, points a and (I + 0.5, J + 0.5 ) distance between F ((x, y), (I + 0.5, J + 0.5)), the position A (x, y) where the pixel value Gobs (k, ig, jg) was observed and the true green light quantity Lg (I + 0.5, J + 0. 5) As the distance from the position (I + 0.5, J + 0.5) to be obtained becomes larger, √2−F ((x, y), (I + 0.5, J + 0.5)) becomes smaller, and the spring BA4 becomes become weak. Therefore, the force by which the true green light amount Lg (I + 0.5, J + 0.5) is pulled toward the pixel value Gobs (k, ig, jg) of the point A by the spring BA4 is reduced. In the spring constant, instead of {√2-F ((x, y), (I + 0.5, J + 0.5))} of the molecule, F ((x, y), (I + 0.5, J + 0. The inverse of 5)) can also be used.

バネモデルにおいて、バネBA4は、自然長(無負荷の状態でのバネBA4の長さ)が0のバネであるとする。この場合、バネBA4の長さ(伸び)は、光量(画素値)の軸方向を距離として、
|Gobs(k,ig,jg)−Lg(I+0.5,J+0.5)|
と表すことができ、真の緑色の光量Lg(I+0.5,J+0.5)が、バネBA4によって点A(x,y)の画素値Gobs(k,ig,jg)側に引っ張られる力は、バネ定数×バネの長さ={{√2−F((x,y),(I+0.5,J+0.5))}/(Mk×E)}×|Gobs(k,ig,jg)−Lg(I+0.5,J+0.5)|と表すことができる。
In the spring model, the spring BA4 is a spring whose natural length (the length of the spring BA4 in an unloaded state) is zero. In this case, the length (elongation) of the spring BA4 is the distance in the axial direction of the light amount (pixel value).
| Gobs (k, ig, jg) -Lg (I + 0.5, J + 0.5) |
The force by which the true green light amount Lg (I + 0.5, J + 0.5) is pulled toward the pixel value Gobs (k, ig, jg) of the point A (x, y) by the spring BA4 is , Spring constant × spring length = {{√2−F ((x, y), (I + 0.5, J + 0.5))} / (Mk × E)} × | Gobs (k, ig, jg) -Lg (I + 0.5, J + 0.5) |

以上では、基準座標系上の任意の位置A(x,y)における画素値Gobs(k,ig,jg)に注目して、その位置A(x,y)の周辺、即ち、式I−0.5≦x<I+0.5と式J−0.5≦y<J+0.5を満たす整数I,Jで表される任意の真の緑色の光量Lg(I−0.5,J−0.5),Lg(I−0.5,J+0.5),Lg(I+0.5,J−0.5),Lg(I+0.5,J+0.5)との関係を、バネモデルで表したが、今度は、基準座標系上の画素中心となる位置(I',J')に注目して、その位置(I',J')の真の緑色の光量Lg(I',J')と、その周辺で観測される画素値Gobs(k,ig,jg)との関係をバネモデルで表すことにする。   In the above, paying attention to the pixel value Gobs (k, ig, jg) at an arbitrary position A (x, y) on the reference coordinate system, the periphery of the position A (x, y), that is, the expression I-0 0.5 ≦ x <I + 0.5 and an arbitrary true green light quantity Lg (I−0.5, J−0. 5) The relationship between Lg (I-0.5, J + 0.5), Lg (I + 0.5, J-0.5), and Lg (I + 0.5, J + 0.5) is represented by a spring model. Now, paying attention to the position (I ′, J ′) that is the pixel center on the reference coordinate system, the true green light quantity Lg (I ′, J ′) at the position (I ′, J ′), The relationship with the pixel values Gobs (k, ig, jg) observed in the vicinity is represented by a spring model.

位置(I',J')は、そのI',J'の小数点以下が0.5である各画素の中心位置であるから、例えば、図20において黒丸で示される(I−0.5,J−0.5)等が、位置(I',J')となる。   Since the position (I ′, J ′) is the center position of each pixel whose decimal point of I ′, J ′ is 0.5, for example, it is indicated by a black circle in FIG. 20 (I−0.5, J-0.5) is the position (I ′, J ′).

図20に示したように、点A(x,y)については、その周辺の4つの真の緑色の光量Lg(I−0.5,J−0.5),Lg(I−0.5,J+0.5),Lg(I+0.5,J−0.5),Lg(I+0.5,J+0.5)との間に、バネモデルを定義することができる。さらに、点A(x,y)以外の1乃至N枚目の撮像画像の各画素値Gobs(k,ig,jg)が観測される点についても、それぞれ同様に、4つのバネモデルを定義することができる。従って、位置(I',J')に注目すると、図21に示すように、位置(I',J')の真の緑色の光量Lg(I',J')に対して、その周辺にある、例えば、点A乃至点Eそれぞれで観測される画素値Gobs(k,ig,jg)とのバネモデルが定義されることになる。   As shown in FIG. 20, with respect to the point A (x, y), four true green light amounts Lg (I-0.5, J-0.5), Lg (I-0.5) around the point A (x, y). , J + 0.5), Lg (I + 0.5, J−0.5), and Lg (I + 0.5, J + 0.5) can be defined. Furthermore, four spring models are similarly defined for points at which the pixel values Gobs (k, ig, jg) of the first to Nth captured images other than the point A (x, y) are observed. Can do. Therefore, when attention is paid to the position (I ′, J ′), as shown in FIG. 21, the true green light quantity Lg (I ′, J ′) at the position (I ′, J ′) For example, a spring model with pixel values Gobs (k, ig, jg) observed at each of the points A to E is defined.

即ち、ある位置(I',J')に対して、位置(ig−0.5,jg−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす整数k,ig,jgの組をすべて求める。例えば、いま、図21に示すように、位置(I',J')に対して、点A乃至点Eで観測された5つの画素値Gobs(k,ig,jg)を特定する(k,ig,jg)の組が得られたとする。   That is, the position on the reference coordinate system obtained by converting the position (ig−0.5, jg−0.5) with the conversion parameters (θk, Tkx, Tky, Sk) with respect to a certain position (I ′, J ′). All sets of integers k, ig, and jg satisfying (x, y) satisfying I′−1 ≦ x <I ′ + 1 and J′−1 ≦ y <J ′ + 1 are obtained. For example, as shown in FIG. 21, for the position (I ′, J ′), five pixel values Gobs (k, ig, jg) observed at points A to E are specified (k, ig, jg) is obtained.

この場合、図22に示すように、点A乃至点Eで観測された5つの画素値Gobs(k,ig,jg)それぞれと、位置(I',J')の真の緑色の光量Lg(I',J')との関係を表すバネモデルを定義することができる。即ち、真の緑色の光量Lg(I',J')を求めるべき位置(I',J')について、その真の緑色の光量Lg(I',J')と、観測された画素値Gobs(k,ig,jg)との関係を、バネモデルで表すことができる。   In this case, as shown in FIG. 22, each of the five pixel values Gobs (k, ig, jg) observed at points A to E and the true green light quantity Lg (at position (I ′, J ′)) A spring model representing the relationship with I ′, J ′) can be defined. That is, for the position (I ′, J ′) where the true green light amount Lg (I ′, J ′) is to be obtained, the true green light amount Lg (I ′, J ′) and the observed pixel value Gobs. The relationship with (k, ig, jg) can be expressed by a spring model.

図23は、位置(I',J')に注目したバネモデルによって、その位置(I',J')の真の緑色の光量Lg(I',J')を推定する推定方法を説明する図である。なお、図23における軸は、緑色の光量(G信号)を表す。   FIG. 23 is a diagram for explaining an estimation method for estimating the true green light quantity Lg (I ′, J ′) at the position (I ′, J ′) using a spring model focused on the position (I ′, J ′). It is. Note that the axis in FIG. 23 represents the amount of green light (G signal).

図23では、質量が0の物体Vが、5つのバネそれぞれの一端に繋がっており、5つのバネの他端は、点A乃至点Eの5つの画素値Gobs(k,ig,jg)それぞれに接続されている。即ち、点A乃至点Eの5つの画素値Gobs(k,ig,jg)は、図22のある位置(I',J')に対して、位置(ig−0.5,jg−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ig,jg)の組に対応する画素値Gobs(k,ig,jg)である。   In FIG. 23, an object V having a mass of 0 is connected to one end of each of the five springs, and the other end of each of the five springs has five pixel values Gobs (k, ig, jg) at points A to E, respectively. It is connected to the. That is, the five pixel values Gobs (k, ig, jg) of the points A to E are at positions (ig−0.5, jg−0. The position (x, y) on the reference coordinate system obtained by converting 5) with the conversion parameters (θk, Tkx, Tky, Sk) is I′−1 ≦ x <I ′ + 1, J′−1 ≦ y <J ′. The pixel value Gobs (k, ig, jg) corresponding to the set of (k, ig, jg) that satisfies +1.

また、この5つのバネの自然長は0で、点(x,y)で観測される画素値Gobs(k,ig,jg)に他端が接続されているバネのバネ定数は、上述したように、
{√2−F((x,y),(I',J'))}/(Mk×E)である。
The natural length of these five springs is 0, and the spring constant of the spring whose other end is connected to the pixel value Gobs (k, ig, jg) observed at the point (x, y) is as described above. In addition,
{√2-F ((x, y), (I ′, J ′))} / (Mk × E).

上述の5つのバネそれぞれは、そのバネ定数に比例する力で、5つの画素値Gobs(k,ig,jg)側に物体Vを引っ張り合っており、ある位置でつり合うこととなる。その位置を表す光量が、位置(I',J')の真の緑色の光量Lg(I',J')として推定される。このバネのつり合いは、物体Vにかかる力の総和が0であることを表す次式によって表すことができる。   Each of the above five springs pulls the object V toward the five pixel values Gobs (k, ig, jg) with a force proportional to the spring constant, and balances at a certain position. The light amount representing the position is estimated as the true green light amount Lg (I ′, J ′) at the position (I ′, J ′). The balance of the spring can be expressed by the following expression indicating that the sum of the forces applied to the object V is zero.

Figure 0004613510
・・・(25)
Figure 0004613510
... (25)

以下において、式(25)を緑色の光量のバネ関係式と称する。ここで、式(25)におけるΣは、ある位置(I',J')に対して、位置(ig−0.5,jg−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ig,jg)の組の個数分の和を表す。例えば、図23の例では、点A乃至点Eの5個の(k,ig,jg)の組についての和となる。   Hereinafter, Expression (25) is referred to as a spring relational expression of the green light quantity. Here, Σ in Expression (25) is a position (ig−0.5, jg−0.5) with respect to a certain position (I ′, J ′), and conversion parameters (θk, Tkx, Tky, Sk). The number of pairs of (k, ig, jg) in which the position (x, y) on the reference coordinate system converted in step 1 satisfies I′−1 ≦ x <I ′ + 1, J′−1 ≦ y <J ′ + 1. Represents the sum of minutes. For example, in the example of FIG. 23, the sum is obtained for a set of five (k, ig, jg) of points A to E.

式(25)は、Lg(I',J')を未知数とする一次方程式であり、式(25)を解くことにより、位置(I',J')における真の緑色の光量Lg(I',J')を求めることができる。   Expression (25) is a linear equation with Lg (I ′, J ′) as an unknown, and by solving Expression (25), the true green light quantity Lg (I ′) at position (I ′, J ′). , J ′).

位置(I',J')における、真の赤色の光量Lr(I',J')と、真の青色の光量Lb(I',J')についても、図18乃至図23で説明した緑色の成分を受光する画素の場合と同様に、式(25)と同様の式(26)と式(27)の一次方程式をたてることができる。   The true red light amount Lr (I ′, J ′) and the true blue light amount Lb (I ′, J ′) at the position (I ′, J ′) are also described in FIGS. As in the case of the pixel that receives the component of (1), the linear equations (26) and (27) similar to the equation (25) can be established.

Figure 0004613510
・・・(26)
Figure 0004613510
... (26)

以下において、式(26)を赤色の光量のバネ関係式と称する。ここで、式(26)におけるΣは、ある位置(I',J')に対して、位置(ir−0.5,jr−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ir,jr)の組の個数分の和を表す。   Hereinafter, the expression (26) is referred to as a spring relational expression for the amount of red light. Here, Σ in equation (26) is a position (ir−0.5, jr−0.5) with respect to a certain position (I ′, J ′), and conversion parameters (θk, Tkx, Tky, Sk). The number of pairs of (k, ir, jr) in which the position (x, y) on the reference coordinate system converted in step 1 satisfies I′−1 ≦ x <I ′ + 1, J′−1 ≦ y <J ′ + 1. Represents the sum of minutes.

Figure 0004613510
・・・(27)
Figure 0004613510
... (27)

以下において、式(27)を青色の光量のバネ関係式と称する。ここで、式(27)におけるΣは、ある位置(I',J')に対して、位置(ib−0.5,jb−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ib,jb)の組の個数分の和を表す。   Hereinafter, the expression (27) is referred to as a blue light quantity spring relational expression. Here, Σ in Expression (27) is a position (ib−0.5, jb−0.5) with respect to a certain position (I ′, J ′), and conversion parameters (θk, Tkx, Tky, Sk). The number of pairs (k, ib, jb) in which the position (x, y) on the reference coordinate system converted in step 1 satisfies I′−1 ≦ x <I ′ + 1, J′−1 ≦ y <J ′ + 1. Represents the sum of minutes.

従って、第3実施の形態では、ある位置(I',J')に対して、位置(i−0.5,j−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(補正位置)(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ib,jb)の組の画素値に基づいて、真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、真の青色の光量Lb(I',J')が求められる。   Therefore, in the third embodiment, for a certain position (I ′, J ′), the position (i−0.5, j−0.5) is converted with the conversion parameters (θk, Tkx, Tky, Sk). (K, ib, jb) sets in which the position (correction position) (x, y) on the reference coordinate system satisfies I′−1 ≦ x <I ′ + 1, J′−1 ≦ y <J ′ + 1. The true green light amount Lg (I ′, J ′), the true red light amount Lr (I ′, J ′), and the true blue light amount Lb (I ′, J ′) are obtained based on the pixel values of It is done.

次に、図24のフローチャートを参照して、図2のステップS4における画像推定処理の第3実施の形態について説明する。   Next, a third embodiment of the image estimation process in step S4 of FIG. 2 will be described with reference to the flowchart of FIG.

初めに、ステップS71において、演算回路24は、基準座標系上のある位置(I',J')に注目する(以下、注目位置(I',J')と称する)。ここで、注目位置(I',J')は、基準画像である1枚目の撮像画像の「i番目、j番目の画素」の画素中心(i−0.5,j−0.5)を表している。   First, in step S71, the arithmetic circuit 24 pays attention to a certain position (I ′, J ′) on the reference coordinate system (hereinafter referred to as attention position (I ′, J ′)). Here, the target position (I ′, J ′) is the pixel center (i−0.5, j−0.5) of the “i-th and j-th pixels” of the first captured image that is the reference image. Represents.

そして、ステップS71からS72に進み、演算回路24は、注目位置(I',J')に対して、k枚目画像の緑色の成分を受光する画素の中心位置(ig−0.5,jg−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ig,jg)の組を、1乃至N枚目画像についてすべて求め、ステップS73に進む。   Then, the process proceeds from step S71 to S72, and the arithmetic circuit 24 determines the center position (ig−0.5, jg) of the pixel that receives the green component of the k-th image with respect to the target position (I ′, J ′). −0.5) is converted to the position (x, y) on the reference coordinate system obtained by converting the conversion parameters (θk, Tkx, Tky, Sk) by I′−1 ≦ x <I ′ + 1, J′−1 ≦ y. <A set of (k, ig, jg) that satisfies J ′ + 1 is obtained for all the first to Nth images, and the process proceeds to step S73.

ステップS73において、演算回路24は、ステップS72で求めたすべての(k,ig,jg)の組を用いて、式(25)で表される緑色の光量のバネ関係式を生成して、ステップS74に進む。   In step S73, the arithmetic circuit 24 generates a spring relational expression of the green light quantity represented by the expression (25) using all the pairs (k, ig, jg) obtained in step S72, Proceed to S74.

ステップS74において、演算回路24は、注目位置(I',J')に対して、k枚目画像の赤色の成分を受光する画素の中心位置(ir−0.5,jr−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ir,jr)の組を、1乃至N枚目画像についてすべて求め、ステップS75に進む。   In step S74, the arithmetic circuit 24 receives the center position (ir−0.5, jr−0.5) of the pixel that receives the red component of the kth image with respect to the target position (I ′, J ′). The position (x, y) on the reference coordinate system obtained by converting the data with the conversion parameters (θk, Tkx, Tky, Sk) satisfies I′−1 ≦ x <I ′ + 1, J′−1 ≦ y <J ′ + 1. All sets (k, ir, jr) that satisfy (k, ir, jr) are obtained for the first to Nth images, and the process proceeds to step S75.

ステップS75において、演算回路24は、ステップS74で求めたすべての(k,ir,jr)の組を用いて、式(26)で表される赤色の光量のバネ関係式を生成して、ステップS76に進む。   In step S75, the arithmetic circuit 24 generates a spring relational expression of the red light quantity represented by the equation (26) using all the pairs (k, ir, jr) obtained in step S74, and the step Proceed to S76.

ステップS76において、演算回路24は、注目位置(I',J')に対して、k枚目画像の青色の成分を受光する画素の中心位置(ib−0.5,jb−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ib,jb)の組を、1乃至N枚目画像についてすべて求め、ステップS77に進む。   In step S76, the arithmetic circuit 24 receives the center position (ib−0.5, jb−0.5) of the pixel that receives the blue component of the k-th image with respect to the target position (I ′, J ′). The position (x, y) on the reference coordinate system obtained by converting the data with the conversion parameters (θk, Tkx, Tky, Sk) satisfies I′−1 ≦ x <I ′ + 1, J′−1 ≦ y <J ′ + 1. All the sets of (k, ib, jb) that satisfy (k, ib, jb) are obtained for the first to Nth images, and the process proceeds to step S77.

ステップS77において、演算回路24は、ステップS76で求めたすべての(k,ib,jb)の組を用いて、式(27)で表される青色の光量のバネ関係式を生成して、ステップS78に進む。   In step S77, the arithmetic circuit 24 generates a spring relational expression of the blue light quantity represented by the equation (27) using all the pairs (k, ib, jb) obtained in step S76, and the step Proceed to S78.

ステップS78において、演算回路24は、ステップS73で求めた式(25)で表される緑色の光量のバネ関係式、ステップS75で求めた式(26)で表される赤色の光量のバネ関係式、ステップS77で求めた式(27)で表される青色の光量のバネ関係式を、一次方程式として解くことにより、注目位置(I',J')における真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、および真の青色の光量Lb(I',J')をそれぞれ求め、ステップS79に進む。   In step S78, the arithmetic circuit 24 calculates the green light amount spring relational expression represented by the expression (25) obtained in step S73 and the red light quantity spring relational expression represented by the expression (26) obtained in step S75. Then, the true green light quantity Lg (I ′, J ′) at the target position (I ′, J ′) is obtained by solving the spring relational expression of the blue light quantity represented by the expression (27) obtained in step S77 as a linear equation. J ′), the true red light amount Lr (I ′, J ′), and the true blue light amount Lb (I ′, J ′) are obtained, and the process proceeds to step S79.

ステップS79において、演算回路24は、すべての位置(I',J')を注目位置としたか、即ち、1枚目の撮像画像の画素の中心位置のすべてを注目位置(I',J')として、真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、および真の青色の光量Lb(I',J')を求めたか否かを判定する。   In step S79, the arithmetic circuit 24 sets all positions (I ′, J ′) as the target positions, that is, determines all the center positions of the pixels of the first captured image as the target positions (I ′, J ′). ) As to whether the true green light amount Lg (I ′, J ′), the true red light amount Lr (I ′, J ′), and the true blue light amount Lb (I ′, J ′) are obtained. Determine.

ステップS79で、すべての位置(I',J')をまだ注目位置として求めていないと判定された場合、ステップS71に戻り、ステップS71乃至S79の処理が繰り返される。即ち、演算回路24は、まだ注目していない位置(I',J')を次の注目位置(I',J')として、注目位置(I',J')における真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、および真の青色の光量Lb(I',J')をそれぞれ求める。   If it is determined in step S79 that all positions (I ′, J ′) have not yet been obtained as attention positions, the process returns to step S71, and the processes in steps S71 to S79 are repeated. That is, the arithmetic circuit 24 sets the position (I ′, J ′) that has not been noticed as the next attention position (I ′, J ′), and the true green light amount Lg at the attention position (I ′, J ′). (I ′, J ′), true red light quantity Lr (I ′, J ′), and true blue light quantity Lb (I ′, J ′) are obtained.

一方、ステップS79で、すべての位置(I',J')を注目位置としたと判定された場合、ステップS80に進み、演算回路24は、ステップS78で求めた真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、真の青色の光量Lb(I',J')から、画像(信号)を推定し、D/Aコンバータ9またはコーデック12に出力画像として供給し、処理を戻る。例えば、「i番目、j番目の画素」においては、演算回路24は、緑色の値(G信号)としてステップS78で求めた真の緑色の光量Lg(i−0.5,j−0.5)と、赤色の値(R信号)としてステップS78で求めた真の赤色の光量Lr(i−0.5,j−0.5)と、青色の値(B信号)としてステップS78で求めた真の青色の光量Lb(i−0.5,j−0.5)とから、「i番目、j番目の画素」の画像信号を推定する(得る)。そして、演算回路24は、その推定を位置(I',J')を中心位置とする画素すべてについて行うことにより、出力画像を推定する。   On the other hand, if it is determined in step S79 that all positions (I ′, J ′) are the target positions, the process proceeds to step S80, and the arithmetic circuit 24 calculates the true green light amount Lg (I) obtained in step S78. ', J'), a true red light quantity Lr (I ', J'), and a true blue light quantity Lb (I ', J'), an image (signal) is estimated, and the D / A converter 9 or codec 12 is supplied as an output image, and the process returns. For example, in the “i-th and j-th pixels”, the arithmetic circuit 24 calculates the true green light quantity Lg (i−0.5, j−0.5) obtained in step S78 as a green value (G signal). ), The true red light quantity Lr (i-0.5, j-0.5) obtained in step S78 as the red value (R signal), and the blue value (B signal) obtained in step S78. From the true blue light quantity Lb (i−0.5, j−0.5), an image signal of “i th and j th pixels” is estimated (obtained). Then, the arithmetic circuit 24 estimates the output image by performing the estimation for all the pixels having the position (I ′, J ′) as the center position.

以上のように、第3実施の形態では、撮像素子4の各画素で受光されるデータをポイントサンプリングされたデータとして捉え、各画素中心で観測された画素値とカメラブレのない鮮明な画像としての画像信号との関係をバネモデルで表すことにより、より本来の光に忠実で鮮明な画像を求めることができる。   As described above, in the third embodiment, data received by each pixel of the image sensor 4 is regarded as point-sampled data, and the pixel value observed at the center of each pixel and a clear image without camera shake are obtained. By expressing the relationship with the image signal by a spring model, it is possible to obtain a clear image more faithful to the original light.

(第4実施の形態)
次に、画像推定処理の第4実施の形態について説明する。第4実施の形態は、図24で説明した第3実施の形態の一部を改良したものである。
(Fourth embodiment)
Next, a fourth embodiment of the image estimation process will be described. In the fourth embodiment, a part of the third embodiment described with reference to FIG. 24 is improved.

即ち、図24の第3実施の形態においては、ステップS72において、演算回路24は、注目位置(I',J')に対して、k枚目画像の緑色の成分を受光する画素の中心位置(ig−0.5,jg−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ig,jg)の組を、1乃至N枚目画像についてすべて求める。そして、ステップS73において、演算回路24は、ステップS72で求めたすべての(k,ig,jg)の組を用いて、式(25)で表される緑色の光量のバネ関係式を生成する。また、赤色や青色の成分を受光する画素についても、同様に、注目位置(I',J')に対して、(k,ig,jg)の組を求め、その求めたすべての(k,ig,jg)の組を用いて式(26)や式(27)で表されるバネ関係式を生成する。   That is, in the third embodiment of FIG. 24, in step S72, the arithmetic circuit 24 determines the center position of the pixel that receives the green component of the k-th image with respect to the target position (I ′, J ′). The position (x, y) on the reference coordinate system obtained by converting (ig−0.5, jg−0.5) with the conversion parameters (θk, Tkx, Tky, Sk) is I′−1 ≦ x <I ′. All sets (k, ig, jg) satisfying +1, J′−1 ≦ y <J ′ + 1 are obtained for the first to Nth images. In step S73, the arithmetic circuit 24 generates a spring relational expression of the green light quantity represented by the expression (25) using all the pairs (k, ig, jg) obtained in step S72. Similarly, for pixels that receive red and blue components, a set of (k, ig, jg) is obtained for the target position (I ′, J ′), and all the obtained (k, A spring relational expression represented by the formula (26) or the formula (27) is generated using a set of (ig, jg).

ところで、1乃至N枚の画像のうちの特定の画像の、特定の画素のデータが、例えば、撮影ミスなどにより、信頼性のないデータとなってしまう場合がある。図1のデジタルカメラ1では、N枚の画像が撮像され、フレームメモリ22に記憶されている。従って、信頼性のないデータを採用しないようにしたとしても、十分なデータを確保することができる。   By the way, the data of a specific pixel of a specific image among 1 to N images may become unreliable data due to, for example, a shooting mistake. In the digital camera 1 of FIG. 1, N images are taken and stored in the frame memory 22. Accordingly, sufficient data can be secured even if unreliable data is not adopted.

そこで、第4実施の形態は、信頼性のあるデータのみを採用し(信頼性のないデータを破棄し)、より鮮明な画像を推定するようにするものである。そのため、第4実施の形態では、注目位置(I',J')に対して、求めたすべての(k,ig,jg)の組の中から、信頼性のあるデータとして、予め設定されたL個の(k,ig,jg)の組を採用するものとする。ここで、Lは、例えば、8個などの固定の値とすることもできるし、ユーザの操作に応じて設定される可変の値とすることもできる。演算回路24は、求めたすべての(k,ig,jg)の組の画素値Gobs(k,ig,jg)の平均値を求め、(k,ig,jg)の組を、その画素値Gobs(k,ig,jg)の平均値に近い順にL個(L=8)だけ選択し、位置(I',J')の真の緑色の光量Lg(I',J')を求めるのに採用する。   Therefore, the fourth embodiment adopts only reliable data (discards unreliable data) and estimates a clearer image. Therefore, in the fourth embodiment, the target position (I ′, J ′) is preset as reliable data from among all the obtained (k, ig, jg) pairs. It is assumed that a set of L (k, ig, jg) is adopted. Here, for example, L can be a fixed value such as 8 or can be a variable value set in accordance with a user operation. The arithmetic circuit 24 obtains an average value of the pixel values Gobs (k, ig, jg) of all the obtained (k, ig, jg) pairs, and obtains the set of (k, ig, jg) as the pixel value Gobs. Only L pieces (L = 8) are selected in order from the average value of (k, ig, jg), and the true green light quantity Lg (I ', J') at the position (I ', J') is obtained. adopt.

従って、第3実施の形態において、式(25),式(26),および式(27)で表される緑色、赤色、および青色の光量のバネ関係式は、第4実施の形態では、それぞれ式(28),式(29),および式(30)のように表すことができる。   Therefore, in the third embodiment, the spring relational expressions for the amounts of green, red, and blue light expressed by the equations (25), (26), and (27) are the same as those in the fourth embodiment. Expressions (28), (29), and (30) can be expressed.

Figure 0004613510
・・・(28)
Figure 0004613510
... (28)

ここで、式(28)におけるΣは、注目位置(I',J')に対して、求めたすべての(k,ig,jg)の組の画素値Gobs(k,ig,jg)の平均値を求め、画素値Gobs(k,ig,jg)が平均値に近い順のL個の(k,ig,jg)の組の和を表す。   Here, Σ in Equation (28) is the average of all the obtained pixel values Gobs (k, ig, jg) for the target position (I ′, J ′). A value is obtained, and the sum of L (k, ig, jg) pairs in the order in which the pixel value Gobs (k, ig, jg) is close to the average value is represented.

Figure 0004613510
・・・(29)
Figure 0004613510
... (29)

ここで、式(29)におけるΣは、注目位置(I',J')に対して、求めたすべての(k,ir,jr)の組の画素値Robs(k,ir,jr)の平均値を求め、画素値Robs(k,ir,jr)が平均値に近い順のL個の(k,ir,jr)の組の和を表す。   Here, Σ in Expression (29) is the average of all the obtained pixel values Robs (k, ir, jr) of the set (k, ir, jr) with respect to the target position (I ′, J ′). A value is obtained and the sum of L (k, ir, jr) pairs in the order in which the pixel values Robs (k, ir, jr) are close to the average value is represented.

Figure 0004613510
・・・(30)
Figure 0004613510
... (30)

ここで、式(30)におけるΣは、注目位置(I',J')に対して、求めたすべての(k,ib,jb)の組の画素値Bobs(k,ib,jb)の平均値を求め、画素値Bobs(k,ib,jb)が平均値に近い順のL個の(k,ib,jb)の組の和を表す。   Here, Σ in equation (30) is the average of all the obtained pixel values Bobs (k, ib, jb) of the set (k, ib, jb) with respect to the target position (I ′, J ′). A value is obtained, and the sum of L (k, ib, jb) sets in the order in which the pixel value Bobs (k, ib, jb) is close to the average value is represented.

図25のフローチャートを参照して、図2のステップS4における画像推定処理の第4実施の形態について説明する。   A fourth embodiment of the image estimation process in step S4 of FIG. 2 will be described with reference to the flowchart of FIG.

初めに、ステップS91において、演算回路24は、基準座標系上のある位置(I',J')に注目する(以下、注目位置(I',J')と称する)。ここで、注目位置(I',J')は、基準画像である1枚目の撮像画像の「i番目、j番目の画素」の画素中心(i−0.5,j−0.5)を表している。   First, in step S91, the arithmetic circuit 24 pays attention to a certain position (I ′, J ′) on the reference coordinate system (hereinafter referred to as attention position (I ′, J ′)). Here, the target position (I ′, J ′) is the pixel center (i−0.5, j−0.5) of the “i-th and j-th pixels” of the first captured image that is the reference image. Represents.

そして、ステップS91からS92に進み、演算回路24は、注目位置(I',J')に対して、k枚目画像の緑色の成分を受光する画素の中心位置(ig−0.5,jg−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ig,jg)の組を、1乃至N枚目画像についてすべて求め、ステップS93に進む。   Then, the process proceeds from step S91 to S92, and the arithmetic circuit 24 determines the center position (ig−0.5, jg) of the pixel that receives the green component of the k-th image with respect to the target position (I ′, J ′). −0.5) is converted to the position (x, y) on the reference coordinate system obtained by converting the conversion parameters (θk, Tkx, Tky, Sk) by I′−1 ≦ x <I ′ + 1, J′−1 ≦ y. <A set of (k, ig, jg) that satisfies J ′ + 1 is obtained for all the first to Nth images, and the process proceeds to step S93.

ステップS93において、演算回路24は、ステップS92で求めたすべての(k,ig,jg)の組における画素値Gobs(k,ig,jg)の平均値を求め、画素値Gobs(k,ig,jg)が平均値に近い順のL個の(k,ig,jg)の組を選択し、ステップS94に進む。即ち、ステップS93では、ステップS92で求めたすべての(k,ig,jg)の組における画素値Gobs(k,ig,jg)の平均値から遠いものが、信頼性のないデータとして破棄される。なお、ステップS92で求めたすべての(k,ig,jg)の組が、もともとL個に達していない場合には、それらすべての(k,ig,jg)の組が選択される(破棄されない)。   In step S93, the arithmetic circuit 24 obtains an average value of the pixel values Gobs (k, ig, jg) in all the sets (k, ig, jg) obtained in step S92, and obtains the pixel values Gobs (k, ig, Select L (k, ig, jg) pairs in the order in which jg) is close to the average value, and proceed to Step S94. That is, in step S93, data far from the average value of the pixel values Gobs (k, ig, jg) in all (k, ig, jg) pairs obtained in step S92 is discarded as unreliable data. . If all the (k, ig, jg) pairs obtained in step S92 have not reached L originally, all the (k, ig, jg) pairs are selected (not discarded). ).

ステップS94において、演算回路24は、ステップS93で選択したL個の(k,ig,jg)の組を用いて、式(28)で表される緑色の光量のバネ関係式を生成して、ステップS95に進む。   In step S94, the arithmetic circuit 24 uses the L (k, ig, jg) pairs selected in step S93 to generate a spring relational expression of the green light quantity expressed by the equation (28). Proceed to step S95.

ステップS95において、演算回路24は、注目位置(I',J')に対して、k枚目画像の赤色の成分を受光する画素の中心位置(ir−0.5,jr−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ir,jr)の組を、1乃至N枚目画像についてすべて求め、ステップS96に進む。   In step S95, the arithmetic circuit 24 determines the center position (ir−0.5, jr−0.5) of the pixel that receives the red component of the kth image with respect to the target position (I ′, J ′). The position (x, y) on the reference coordinate system obtained by converting the data with the conversion parameters (θk, Tkx, Tky, Sk) satisfies I′−1 ≦ x <I ′ + 1, J′−1 ≦ y <J ′ + 1. All sets (k, ir, jr) that satisfy (k, ir, jr) are obtained for the first to Nth images, and the process proceeds to step S96.

ステップS96において、演算回路24は、ステップS96で求めたすべての(k,ir,jr)の組における画素値Robs(k,ir,jr)の平均値を求め、画素値Robs(k,ir,jr)が平均値に近い順のL個の(k,ir,jr)の組を選択し、ステップS97に進む。即ち、ステップS96では、ステップS95で求めたすべての(k,ir,jr)の組における画素値Robs(k,ir,jr)の平均値から遠いものが、信頼性のないデータとして破棄される。なお、ステップS95で求めたすべての(k,ir,jr)の組が、もともとL個に達していない場合には、それらすべての(k,ir,jr)の組が選択される(破棄されない)。   In step S96, the arithmetic circuit 24 obtains an average value of the pixel values Robs (k, ir, jr) in all the sets (k, ir, jr) obtained in step S96, and obtains the pixel values Robs (k, ir, jr). Select a set of L (k, ir, jr) in the order in which jr) is close to the average value, and proceed to step S97. That is, in step S96, data far from the average value of the pixel values Robs (k, ir, jr) in all the (k, ir, jr) pairs obtained in step S95 is discarded as unreliable data. . If all (k, ir, jr) pairs obtained in step S95 have not reached L, all (k, ir, jr) pairs are selected (not discarded). ).

ステップS97において、演算回路24は、ステップS96で選択したL個の(k,ir,jr)の組を用いて、式(29)で表される赤色の光量のバネ関係式を生成して、ステップS98に進む。   In step S97, the arithmetic circuit 24 generates a spring relational expression of the red light quantity represented by the equation (29) using the L (k, ir, jr) sets selected in step S96. Proceed to step S98.

ステップS98において、演算回路24は、注目位置(I',J')に対して、k枚目画像の青色の成分を受光する画素の中心位置(ib−0.5,jb−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ib,jb)の組を、1乃至N枚目画像についてすべて求め、ステップS99に進む。   In step S98, the arithmetic circuit 24 determines the center position (ib−0.5, jb−0.5) of the pixel that receives the blue component of the kth image with respect to the target position (I ′, J ′). The position (x, y) on the reference coordinate system obtained by converting the data with the conversion parameters (θk, Tkx, Tky, Sk) satisfies I′−1 ≦ x <I ′ + 1, J′−1 ≦ y <J ′ + 1. All the sets of (k, ib, jb) that satisfy (k, ib, jb) are obtained for the first to Nth images, and the process proceeds to step S99.

ステップS99において、演算回路24は、ステップS98で求めたすべての(k,ib,jb)の組における画素値Bobs(k,ib,jb)の平均値を求め、画素値Bobs(k,ib,jb)が平均値に近い順のL個の(k,ib,jb)の組を選択し、ステップS100に進む。即ち、ステップS99では、ステップS98で求めたすべての(k,ib,jb)の組における画素値Bobs(k,ib,jb)の平均値から遠いものが、信頼性のないデータとして破棄される。なお、ステップS98で求めたすべての(k,ib,jb)の組が、もともとL個に達していない場合には、それらすべての(k,ib,jb)の組が選択される(破棄されない)。   In step S99, the arithmetic circuit 24 obtains an average value of the pixel values Bobs (k, ib, jb) in all the sets (k, ib, jb) obtained in step S98, and obtains the pixel values Bobs (k, ib, Select L (k, ib, jb) pairs in the order in which jb) is close to the average value, and proceed to Step S100. That is, in step S99, data far from the average value of the pixel values Bobs (k, ib, jb) in all the sets (k, ib, jb) obtained in step S98 is discarded as unreliable data. . If all (k, ib, jb) pairs obtained in step S98 have not reached L originally, all (k, ib, jb) pairs are selected (not discarded). ).

ステップS100において、演算回路24は、ステップS99で選択したL個の(k,ib,jb)の組を用いて、式(30)で表される青色の光量のバネ関係式を生成して、ステップS101に進む。   In step S100, the arithmetic circuit 24 generates a spring relational expression of the blue light quantity represented by the equation (30) using the L (k, ib, jb) pairs selected in step S99, and Proceed to step S101.

ステップS101において、演算回路24は、ステップS94で求めた式(28)で表される緑色の光量のバネ関係式、ステップS97で求めた式(29)で表される赤色の光量のバネ関係式、ステップS100で求めた式(30)で表される青色の光量のバネ関係式を、一次方程式として解くことにより、注目位置(I',J')における真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、および真の青色の光量Lb(I',J')をそれぞれ求め、ステップS102に進む。   In step S101, the arithmetic circuit 24 calculates the green light amount spring relational expression represented by the expression (28) obtained in step S94 and the red light quantity spring relational expression represented by the expression (29) obtained in step S97. By solving the spring relational expression of the blue light quantity represented by the expression (30) obtained in step S100 as a linear equation, the true green light quantity Lg (I ′, J ′) at the target position (I ′, J ′) is obtained. J ′), the true red light amount Lr (I ′, J ′), and the true blue light amount Lb (I ′, J ′) are obtained, and the process proceeds to step S102.

ステップS102において、演算回路24は、すべての位置(I',J')を注目位置としたか、即ち、1枚目の撮像画像の画素の中心位置のすべてを注目位置(I',J')として、真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、および真の青色の光量Lb(I',J')を求めたか否かを判定する。   In step S102, the arithmetic circuit 24 sets all the positions (I ′, J ′) as the target positions, that is, sets all the center positions of the pixels of the first captured image as the target positions (I ′, J ′). ) As to whether the true green light amount Lg (I ′, J ′), the true red light amount Lr (I ′, J ′), and the true blue light amount Lb (I ′, J ′) are obtained. Determine.

ステップS102で、すべての位置(I',J')を、まだ注目位置としていないと判定された場合、ステップS91に戻り、ステップS91乃至S102の処理が繰り返される。即ち、演算回路24は、まだ注目していない位置(I',J')を次の注目位置(I',J')として、注目位置(I',J')における真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、および真の青色の光量Lb(I',J')をそれぞれ求める。   If it is determined in step S102 that all positions (I ′, J ′) have not yet been set as the target positions, the process returns to step S91, and the processes in steps S91 to S102 are repeated. That is, the arithmetic circuit 24 sets the position (I ′, J ′) that has not been noticed as the next attention position (I ′, J ′), and the true green light amount Lg at the attention position (I ′, J ′). (I ′, J ′), true red light quantity Lr (I ′, J ′), and true blue light quantity Lb (I ′, J ′) are obtained.

一方、ステップS102で、すべての位置(I',J')を注目位置としたと判定された場合、ステップS103に進み、演算回路24は、ステップS101で求めた真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、真の青色の光量Lb(I',J')から、画像(信号)を推定し、D/Aコンバータ9またはコーデック12に出力画像として供給し、処理を戻る。例えば、「i番目、j番目の画素」においては、演算回路24は、緑色の値(G信号)としてステップS101で求めた真の緑色の光量Lg(i−0.5,j−0.5)と、赤色の値(R信号)としてステップS101で求めた真の赤色の光量Lr(i−0.5,j−0.5)と、青色の値(B信号)としてステップS101で求めた真の青色の光量Lb(i−0.5,j−0.5)とから、「i番目、j番目の画素」の画像信号を推定する。そして、演算回路24は、その推定を位置(I',J')を中心位置とする画素すべてについて行うことにより、出力画像を推定する。   On the other hand, if it is determined in step S102 that all positions (I ′, J ′) are the target positions, the process proceeds to step S103, and the arithmetic circuit 24 calculates the true green light quantity Lg (I) obtained in step S101. ', J'), a true red light quantity Lr (I ', J'), and a true blue light quantity Lb (I ', J'), an image (signal) is estimated, and the D / A converter 9 or codec 12 is supplied as an output image, and the process returns. For example, in the “i-th and j-th pixels”, the arithmetic circuit 24 calculates the true green light amount Lg (i−0.5, j−0.5) obtained in step S101 as a green value (G signal). ), The true red light quantity Lr (i−0.5, j−0.5) obtained in step S101 as the red value (R signal), and the blue value (B signal) obtained in step S101. From the true blue light quantity Lb (i−0.5, j−0.5), the image signal of the “i th and j th pixels” is estimated. Then, the arithmetic circuit 24 estimates the output image by performing the estimation for all the pixels having the position (I ′, J ′) as the center position.

以上のように、第4実施の形態では、平均値に近い画素値を信頼性の高いデータとして、その信頼性の高いデータにのみ、バネモデルを適用するようにしたので、第3実施の形態より本来の光に忠実で鮮明な画像を求めることが可能となる。   As described above, in the fourth embodiment, the pixel value close to the average value is regarded as highly reliable data, and the spring model is applied only to highly reliable data. It becomes possible to obtain a clear image faithful to the original light.

(第5実施の形態)
次に、画像推定処理の第5実施の形態について説明する。第5実施の形態は、第4実施の形態と同様に、注目位置(I',J')に対して、求めたすべての(k,ig,jg)の組の中から、信頼性のあるデータとして、予め設定されたL個の(k,ig,jg)の組を採用し、L個で構成された緑色、赤色、および青色の光量のバネ関係式を解くことにより、真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、および真の青色の光量Lb(I',J')を求めるものである。
(Fifth embodiment)
Next, a fifth embodiment of the image estimation process will be described. As in the fourth embodiment, the fifth embodiment is reliable from all the (k, ig, jg) pairs obtained for the target position (I ′, J ′). As a data, a set of L (k, ig, jg) set in advance is adopted, and a true green color is obtained by solving a spring relational expression of L, green, red, and blue light amounts. The light amount Lg (I ′, J ′), the true red light amount Lr (I ′, J ′), and the true blue light amount Lb (I ′, J ′) are obtained.

但し、第4実施の形態では、演算回路24において、例えば、緑色の成分を受光する画素については、求めたすべての(k,ig,jg)の組の画素値Gobs(k,ig,jg)の平均値を求め、画素値Gobs(k,ig,jg)が平均値に近い順のL個の(k,ig,jg)の組を選択するようにした。   However, in the fourth embodiment, in the arithmetic circuit 24, for example, for the pixel that receives the green component, all the obtained pixel values Gobs (k, ig, jg) of (k, ig, jg) are obtained. The average value is obtained, and a set of L (k, ig, jg) in the order in which the pixel values Gobs (k, ig, jg) are close to the average value is selected.

一方、第5実施の形態では、演算回路24は、注目位置(I',J')に対して、k枚目画像の緑色の成分を受光する画素の中心位置(ig−0.5,jg−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)と注目位置(I',J')との距離が短いものから順番にL個だけ(k,ig,jg)の組を、信頼性の高いデータとして選択する。なぜなら、図19で説明したように、注目位置(I',J')の真の緑色の光量Lg(I',J')を、位置(x,y)で観測された画素値Gobs(k,ig,jg)で近似したことによる近似誤差は、位置(x,y)と注目位置(I',J')との距離が長くなるほど大きくなる。従って、注目位置(I',J')からの距離が遠い位置(x,y)で観測された画素値Gobs(k,ig,jg)ほど信頼性が少なくなる。なお、2点(x1,y1)と(x2,y2)との間の距離を求める関数は、例えば、図19で説明した関数F((x1,y1),(x2,y2))を採用することができる。   On the other hand, in the fifth embodiment, the arithmetic circuit 24 determines the center position (ig−0.5, jg) of the pixel that receives the green component of the k-th image with respect to the target position (I ′, J ′). -0.5) with the conversion parameters (θk, Tkx, Tky, Sk) converted in order from the shortest distance between the position (x, y) on the reference coordinate system and the target position (I ′, J ′). Only L sets (k, ig, jg) are selected as highly reliable data. This is because, as described in FIG. 19, the true green light quantity Lg (I ′, J ′) at the target position (I ′, J ′) is changed to the pixel value Gobs (k) (k, k) observed at the position (x, y). , Ig, jg), the approximation error due to the approximation increases as the distance between the position (x, y) and the target position (I ′, J ′) increases. Therefore, the pixel value Gobs (k, ig, jg) observed at the position (x, y) far from the target position (I ′, J ′) is less reliable. For example, the function F ((x1, y1), (x2, y2)) described with reference to FIG. 19 is used as the function for obtaining the distance between the two points (x1, y1) and (x2, y2). be able to.

第5実施の形態では、第3実施の形態における式(25),式(26),および式(27)に代えて、式(31)、式(32)、および式(33)で表される緑色、赤色、および青色の光量のバネ関係式が用いられる。   In the fifth embodiment, instead of the equations (25), (26), and (27) in the third embodiment, the equations (31), (32), and (33) are used. A spring relational expression of green, red, and blue light amounts is used.

Figure 0004613510
・・・(31)
Figure 0004613510
... (31)

ここで、式(31)におけるΣは、注目位置(I',J')に対して、k枚目画像の緑色の成分を受光する画素の中心位置(ig−0.5,jg−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)と注目位置(I',J')との距離が短いものから順番に選択したL個の(k,ig,jg)の組の和を表す。   Here, Σ in the equation (31) is the center position (ig−0.5, jg−0...) Of the pixel that receives the green component of the kth image with respect to the target position (I ′, J ′). 5) L selected in order from the shortest distance between the position (x, y) on the reference coordinate system obtained by converting the conversion parameters (θk, Tkx, Tky, Sk) on the reference coordinate system and the target position (I ′, J ′). This represents the sum of a set of (k, ig, jg).

Figure 0004613510
・・・(32)
Figure 0004613510
... (32)

ここで、式(32)におけるΣは、注目位置(I',J')に対して、k枚目画像の赤色の成分を受光する画素の中心位置(ir−0.5,jr−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)と注目位置(I',J')との距離が短いものから順番に選択したL個の(k,ir,jr)の組の和を表す。   Here, Σ in the equation (32) is the center position (ir−0.5, jr−0...) Of the pixel that receives the red component of the kth image with respect to the target position (I ′, J ′). 5) L selected in order from the shortest distance between the position (x, y) on the reference coordinate system obtained by converting the conversion parameters (θk, Tkx, Tky, Sk) on the reference coordinate system and the target position (I ′, J ′). This represents the sum of a set of (k, ir, jr).

Figure 0004613510
・・・(33)
Figure 0004613510
... (33)

ここで、式(33)におけるΣは、注目位置(I',J')に対して、k枚目画像の青色の成分を受光する画素の中心位置(ib−0.5,jb−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)と注目位置(I',J')との距離が短いものから順番に選択したL個の(k,ib,jb)の組の和を表す。   Here, Σ in equation (33) is the center position (ib−0.5, jb−0...) Of the pixel that receives the blue component of the kth image with respect to the target position (I ′, J ′). 5) L selected in order from the shortest distance between the position (x, y) on the reference coordinate system obtained by converting the conversion parameters (θk, Tkx, Tky, Sk) on the reference coordinate system and the target position (I ′, J ′). This represents the sum of a set of (k, ib, jb).

図26のフローチャートを参照して、図2のステップS4における画像推定処理の第5実施の形態について説明する。   A fifth embodiment of the image estimation process in step S4 of FIG. 2 will be described with reference to the flowchart of FIG.

初めに、ステップS121において、演算回路24は、基準座標系上のある位置(I',J')に注目する(以下、注目位置(I',J')と称する)。ここで、注目位置(I',J')は、基準画像である1枚目の撮像画像の「i番目、j番目の画素」の画素中心(i−0.5,j−0.5)を表している。   First, in step S121, the arithmetic circuit 24 pays attention to a certain position (I ′, J ′) on the reference coordinate system (hereinafter referred to as attention position (I ′, J ′)). Here, the target position (I ′, J ′) is the pixel center (i−0.5, j−0.5) of the “i-th and j-th pixels” of the first captured image that is the reference image. Represents.

ステップS121からS122に進み、演算回路24は、注目位置(I',J')に対して、k枚目画像の緑色の成分を受光する画素の中心位置(ig−0.5,jg−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ig,jg)の組を、1乃至N枚目画像についてすべて求め、ステップS123に進む。   Proceeding from step S121 to S122, the arithmetic circuit 24 determines the center position (ig−0.5, jg−0) of the pixel that receives the green component of the kth image with respect to the target position (I ′, J ′). .5) with the transformation parameters (θk, Tkx, Tky, Sk), the position (x, y) on the reference coordinate system is I′−1 ≦ x <I ′ + 1, J′−1 ≦ y <J. All sets of (k, ig, jg) satisfying '+1 are obtained for the first to Nth images, and the process proceeds to step S123.

ステップS123において、演算回路24は、ステップS122で求めたすべての(k,ig,jg)の組の中から、注目位置(I',J')に対して、k枚目画像の緑色の成分を受光する画素の中心位置(ig−0.5,jg−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)と注目位置(I',J')との距離が短い順にL個だけ(k,ig,jg)の組を選択し、ステップS124に進む。即ち、ステップS123では、ステップS122で求めたすべての(k,ig,jg)の組のうち、位置(x,y)と注目位置(I',J')との距離が長いものが、信頼性のないデータとして破棄される。なお、ステップS122で求めたすべての(k,ig,jg)の組が、もともとL個に達していない場合には、それらすべての(k,ig,jg)の組が選択される(破棄されない)。   In step S123, the arithmetic circuit 24 selects the green component of the kth image from the set of all (k, ig, jg) obtained in step S122 with respect to the target position (I ′, J ′). The position (x, y) on the reference coordinate system obtained by converting the center position (ig−0.5, jg−0.5) of the pixel that receives light with the conversion parameters (θk, Tkx, Tky, Sk) and the target position ( Only L sets (k, ig, jg) are selected in order of increasing distance from I ′, J ′), and the process proceeds to step S124. In other words, in step S123, among all the (k, ig, jg) pairs obtained in step S122, those having a long distance between the position (x, y) and the target position (I ′, J ′) are reliable. Discarded as irrelevant data. If all (k, ig, jg) pairs obtained in step S122 have not reached L from the beginning, all (k, ig, jg) pairs are selected (not discarded). ).

ステップS124において、演算回路24は、ステップS123で選択したL個の(k,ig,jg)の組を用いて、式(31)で表される緑色の光量のバネ関係式を生成して、ステップS125に進む。   In step S124, the arithmetic circuit 24 uses the L (k, ig, jg) pairs selected in step S123 to generate a green light amount spring relational expression represented by the equation (31), and Proceed to step S125.

ステップS125において、演算回路24は、注目位置(I',J')に対して、k枚目画像の赤色の成分を受光する画素の中心位置(ir−0.5,jr−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ir,jr)の組を、1乃至N枚目画像についてすべて求め、ステップS126に進む。   In step S125, the arithmetic circuit 24 receives the center position (ir−0.5, jr−0.5) of the pixel that receives the red component of the k-th image with respect to the target position (I ′, J ′). The position (x, y) on the reference coordinate system obtained by converting the data with the conversion parameters (θk, Tkx, Tky, Sk) satisfies I′−1 ≦ x <I ′ + 1, J′−1 ≦ y <J ′ + 1. All sets (k, ir, jr) that satisfy (k, ir, jr) are obtained for the first to Nth images, and the process proceeds to step S126.

ステップS126において、演算回路24は、ステップS125で求めたすべての(k,ir,jr)の組の中から、注目位置(I',J')に対して、k枚目画像の赤色の成分を受光する画素の中心位置(ir−0.5,jr−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)と注目位置(I',J')との距離が短い順にL個だけ(k,ir,jr)の組を選択し、ステップS127に進む。即ち、ステップS126では、ステップS125で求めたすべての(k,ir,jr)の組のうち、位置(x,y)と注目位置(I',J')との距離が長いものが、信頼性のないデータとして破棄される。なお、ステップS125で求めたすべての(k,ir,jr)の組が、もともとL個に達していない場合には、それらすべての(k,ir,jr)の組が選択される(破棄されない)。   In step S126, the arithmetic circuit 24 selects the red component of the kth image from the set of all (k, ir, jr) obtained in step S125 with respect to the target position (I ′, J ′). The position (x, y) on the reference coordinate system obtained by converting the center position (ir−0.5, jr−0.5) of the pixel that receives light with the conversion parameters (θk, Tkx, Tky, Sk) and the target position ( Only L (k, ir, jr) pairs are selected in ascending order of distance from I ′, J ′), and the process proceeds to step S127. In other words, in step S126, among all the (k, ir, jr) pairs obtained in step S125, the longest distance between the position (x, y) and the target position (I ′, J ′) Discarded as irrelevant data. If all (k, ir, jr) pairs obtained in step S125 have not reached L originally, all (k, ir, jr) pairs are selected (not discarded). ).

ステップS127において、演算回路24は、ステップS126で選択したL個の(k,ir,jr)の組を用いて、式(32)で表される赤色の光量のバネ関係式を生成して、ステップS128に進む。   In step S127, the arithmetic circuit 24 generates a spring relational expression of the red light quantity represented by the equation (32) using the L (k, ir, jr) pairs selected in step S126. Proceed to step S128.

ステップS128において、演算回路24は、注目位置(I',J')に対して、k枚目画像の青色の成分を受光する画素の中心位置(ib−0.5,jb−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ib,jb)の組を、1乃至N枚目画像についてすべて求め、ステップS129に進む。   In step S128, the arithmetic circuit 24 determines the center position (ib−0.5, jb−0.5) of the pixel that receives the blue component of the kth image with respect to the target position (I ′, J ′). The position (x, y) on the reference coordinate system obtained by converting the data with the conversion parameters (θk, Tkx, Tky, Sk) satisfies I′−1 ≦ x <I ′ + 1, J′−1 ≦ y <J ′ + 1. The set of satisfying (k, ib, jb) is obtained for all the 1st to N-th images, and the process proceeds to step S129.

ステップS129において、演算回路24は、ステップS128で求めたすべての(k,ib,jb)の組の中から、注目位置(I',J')に対して、k枚目画像の青色の成分を受光する画素の中心位置(ib−0.5,jb−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)と注目位置(I',J')との距離が短い順にL個だけ(k,ib,jb)の組を選択し、ステップS130に進む。即ち、ステップS129では、ステップS128で求めたすべての(k,ib,jb)の組のうち、位置(x,y)と注目位置(I',J')との距離が長いものが、信頼性のないデータとして破棄される。なお、ステップS128で求めたすべての(k,ib,jb)の組が、もともとL個に達していない場合には、それらすべての(k,ib,jb)の組が選択される(破棄されない)。   In step S129, the arithmetic circuit 24 selects the blue component of the kth image from the set of all (k, ib, jb) obtained in step S128 with respect to the target position (I ′, J ′). The position (x, y) on the reference coordinate system obtained by converting the center position (ib−0.5, jb−0.5) of the pixel that receives light with the conversion parameters (θk, Tkx, Tky, Sk) and the target position ( Only L sets (k, ib, jb) are selected in order of increasing distance from I ′, J ′), and the process proceeds to step S130. In other words, in step S129, among all the (k, ib, jb) pairs obtained in step S128, the longest distance between the position (x, y) and the target position (I ′, J ′) Discarded as irrelevant data. If all (k, ib, jb) pairs obtained in step S128 have not reached L originally, all (k, ib, jb) pairs are selected (not discarded). ).

ステップS130において、演算回路24は、ステップS129で選択したL個の(k,ib,jb)の組を用いて、式(33)で表される青色の光量のバネ関係式を生成して、ステップS131に進む。   In step S130, the arithmetic circuit 24 generates a spring relational expression of the blue light quantity represented by the equation (33) using the L (k, ib, jb) pairs selected in step S129. Proceed to step S131.

ステップS131において、演算回路24は、ステップS124で求めた式(31)で表される緑色の光量のバネ関係式、ステップS127で求めた式(32)で表される赤色の光量のバネ関係式、ステップS130で求めた式(33)で表される青色の光量のバネ関係式を、一次方程式として解くことにより、注目位置(I',J')における真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、および真の青色の光量Lb(I',J')をそれぞれ求め、ステップS132に進む。   In step S131, the arithmetic circuit 24 calculates the green light quantity spring relation represented by the expression (31) obtained in step S124 and the red light quantity spring relation represented by the expression (32) obtained in step S127. By solving the spring relational expression of the blue light quantity represented by the equation (33) obtained in step S130 as a linear equation, the true green light quantity Lg (I ′, J ′) at the target position (I ′, J ′) is obtained. J ′), the true red light amount Lr (I ′, J ′), and the true blue light amount Lb (I ′, J ′) are obtained, and the process proceeds to step S132.

ステップS132において、演算回路24は、すべての位置(I',J')を注目位置としたか、即ち、1枚目の撮像画像の画素の中心位置のすべてを注目位置(I',J')として、真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、および真の青色の光量Lb(I',J')を求めたか否かを判定する。   In step S132, the arithmetic circuit 24 sets all the positions (I ′, J ′) as the attention positions, that is, determines all the center positions of the pixels of the first captured image as the attention positions (I ′, J ′). ) As to whether the true green light amount Lg (I ′, J ′), the true red light amount Lr (I ′, J ′), and the true blue light amount Lb (I ′, J ′) are obtained. Determine.

ステップS132で、すべての位置(I',J')を、まだ注目位置としていないと判定された場合、ステップS121に戻り、ステップS121乃至S132の処理が繰り返される。即ち、演算回路24は、まだ注目していない位置(I',J')を次の注目位置(I',J')として、注目位置(I',J')における真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、および真の青色の光量Lb(I',J')をそれぞれ求める。   If it is determined in step S132 that all positions (I ′, J ′) have not yet been set as the target positions, the process returns to step S121, and the processes in steps S121 to S132 are repeated. That is, the arithmetic circuit 24 sets the position (I ′, J ′) that has not been noticed as the next attention position (I ′, J ′), and the true green light amount Lg at the attention position (I ′, J ′). (I ′, J ′), true red light quantity Lr (I ′, J ′), and true blue light quantity Lb (I ′, J ′) are obtained.

一方、ステップS132で、すべての位置(I',J')を注目位置としたと判定された場合、ステップS133に進み、演算回路24は、ステップS131で求めた真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、真の青色の光量Lb(I',J')から、画像(信号)を生成し、D/Aコンバータ9またはコーデック12に出力画像として供給し、処理を戻る。例えば、「i番目、j番目の画素」においては、演算回路24は、緑色の値(G信号)としてステップS131で求めた真の緑色の光量Lg(i−0.5,j−0.5)と、赤色の値(R信号)としてステップS131で求めた真の赤色の光量Lr(i−0.5,j−0.5)と、青色の値(B信号)としてステップS131で求めた真の青色の光量Lb(i−0.5,j−0.5)とから、「i番目、j番目の画素」の画像信号を推定する。そして、演算回路24は、その推定を位置(I',J')を中心位置とする画素すべてについて行うことにより、出力画像を推定する。   On the other hand, if it is determined in step S132 that all positions (I ′, J ′) are the target positions, the process proceeds to step S133, and the arithmetic circuit 24 calculates the true green light quantity Lg (I) obtained in step S131. ', J'), a true red light amount Lr (I ', J'), and a true blue light amount Lb (I ', J') to generate an image (signal), and the D / A converter 9 or codec 12 is supplied as an output image, and the process returns. For example, in the “i-th and j-th pixels”, the arithmetic circuit 24 calculates the true green light amount Lg (i−0.5, j−0.5) obtained in step S131 as a green value (G signal). ), The true red light quantity Lr (i−0.5, j−0.5) obtained in step S131 as a red value (R signal), and the blue value (B signal) obtained in step S131. From the true blue light quantity Lb (i−0.5, j−0.5), the image signal of the “i th and j th pixels” is estimated. Then, the arithmetic circuit 24 estimates the output image by performing the estimation for all the pixels having the position (I ′, J ′) as the center position.

以上のように、第5実施の形態では、注目位置(I',J')に近い位置で観測された画素値を信頼性の高いデータとして、その信頼性の高いデータにのみ、バネモデルを適用するようにしたので、第3実施の形態より本来の光に忠実で鮮明な画像を求めることが可能となる。   As described above, in the fifth embodiment, the pixel value observed at a position close to the target position (I ′, J ′) is used as highly reliable data, and the spring model is applied only to the highly reliable data. As a result, a clearer image that is faithful to the original light than the third embodiment can be obtained.

(第6実施の形態)
次に、画像推定処理の第6実施の形態について説明する。
(Sixth embodiment)
Next, a sixth embodiment of the image estimation process will be described.

第6実施の形態も、上述した第3実施の形態の一部を改良したものである。即ち、第6実施の形態では、画像のエッジ部分を検出し、検出したエッジ部分にある画素値に対して、第3実施の形態における式(25),式(26),および式(27)で表される緑色、赤色、および青色の光量のバネ関係式を改良する。   The sixth embodiment is also an improvement of a part of the third embodiment described above. That is, in the sixth embodiment, the edge portion of the image is detected, and the expressions (25), (26), and (27) in the third embodiment are applied to the pixel values in the detected edge portion. The spring relational expression of the green, red, and blue light quantities represented by

図27は、緑色、赤色、および青色のうちの、例えば、緑色の成分(G信号)に注目した基準座標系を示している。   FIG. 27 illustrates a reference coordinate system in which attention is paid to, for example, a green component (G signal) among green, red, and blue.

図27では、境界(エッジ)51を境に、右側に明るい緑色としての画素値が観測されており、左側に暗い緑色としての画素値が観測されている。なお、ここでは、緑色の画素値が、例えば、8ビットで表されるものとして、明るい緑色の画素値を、例えば、240程度とするとともに、暗い緑色の画素値を、例えば、16程度とする。   In FIG. 27, a pixel value as bright green is observed on the right side with a boundary (edge) 51 as a boundary, and a pixel value as dark green is observed on the left side. Here, assuming that the green pixel value is represented by 8 bits, for example, the bright green pixel value is about 240, and the dark green pixel value is about 16, for example. .

図27において、白丸52−1乃至52−10、白丸53−1乃至53−9、および白丸54は、あるk枚目画像の「ig番目、jg番目の画素」の中心位置(ig−0.5,jg−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置を表し、その位置で緑色の画素値Gobs(k,ig,jg)が観測されている。ここで、(k,ig,jg)の組は、白丸52−1乃至52−10、白丸53−1乃至53−9、および白丸54それぞれにおいて異なるものである。   In FIG. 27, white circles 52-1 to 52-10, white circles 53-1 to 53-9, and white circle 54 are center positions (ig-0.jg) of “ig-th, jg-th” pixels of a certain k-th image. 5, jg−0.5) represents a position on the reference coordinate system obtained by converting the conversion parameters (θk, Tkx, Tky, Sk), and a green pixel value Gobs (k, ig, jg) is observed at the position. ing. Here, the set of (k, ig, jg) is different in each of the white circles 52-1 to 52-10, the white circles 53-1 to 53-9, and the white circle 54.

図27中の点線で示される格子状の交点に配置される黒丸のそれぞれは、演算回路24が真の緑色の光量Lg(I',J')を求めるべき位置(I',J')を表している。ここで、位置(I',J')は、上述したように、基準画像である1枚目画像における「i番目、j番目の画素」の画素中心(i−0.5,j−0.5)を表している。また、X方向とY方向のLg(I',J')どうしの間隔は、ともに1であり、従って、画素のX方向とY方向の大きさも、ともに1である。   Each black circle arranged at a grid-like intersection indicated by a dotted line in FIG. 27 indicates a position (I ′, J ′) at which the arithmetic circuit 24 should obtain the true green light quantity Lg (I ′, J ′). Represents. Here, as described above, the position (I ′, J ′) is the pixel center (i−0.5, j−0...) Of the “i-th and j-th pixels” in the first image as the reference image. 5). Further, the interval between Lg (I ′, J ′) in the X direction and the Y direction is both 1, and therefore the size of the pixel in the X direction and the Y direction is also 1.

さて、図27の領域61に含まれる白丸52−1乃至52−8で表される位置では、240程度の明るい緑色の画素値Gobs(k,ig,jg)が観測される。   Now, at the positions represented by white circles 52-1 to 52-8 included in the region 61 of FIG. 27, about 240 bright green pixel values Gobs (k, ig, jg) are observed.

また、図27の領域62に含まれる白丸53−1乃至53−7で表される位置では、16程度の暗い緑色の画素値Gobs(k,ig,jg)が観測される。   Further, dark green pixel values Gobs (k, ig, jg) of about 16 are observed at positions represented by white circles 53-1 to 53-7 included in the region 62 of FIG.

さらに、図27の白丸54で表される位置は、境界51上の位置であり、この位置では、オンチップレンズの効果により、画素値240の明るい緑色の光と、画素値16の暗い緑色の光とを同一光量だけ受光した画素値が観測される。従って、白丸54の位置の画素値Gobs(k,ig,jg)としては、240と16の平均となる128(=(240+16)/2)が観測される。   Further, the position represented by the white circle 54 in FIG. 27 is a position on the boundary 51. At this position, the bright green light having the pixel value 240 and the dark green light having the pixel value 16 are caused by the effect of the on-chip lens. A pixel value that receives the same amount of light as the light is observed. Accordingly, 128 (= (240 + 16) / 2), which is the average of 240 and 16, is observed as the pixel value Gobs (k, ig, jg) at the position of the white circle 54.

なお、上述の白丸52−1乃至52−8、白丸53−1乃至53−7、白丸54で観測される画素値Gobs(k,ig,jg)には、通常、誤差成分が含まれるため、正確には、約240、約16、約128と表現すべきであるが、ここでは、そのような誤差成分を無視して、240、16、128と記載することとする。   Since the pixel values Gobs (k, ig, jg) observed at the white circles 52-1 to 52-8, the white circles 53-1 to 53-7, and the white circle 54 described above usually include an error component, To be precise, it should be expressed as about 240, about 16, and about 128, but here, such an error component is ignored and described as 240, 16, and 128.

ここで、例えば、図27の黒丸71の位置を注目位置(I',J')とし、上述の第3の実施の形態の方法により、黒丸71で表される注目位置(I',J')の真の緑色の光量Lg(I',J')を求める場合について考える。   Here, for example, the position of the black circle 71 in FIG. 27 is set as the position of interest (I ′, J ′), and the position of interest (I ′, J ′) represented by the black circle 71 by the method of the third embodiment described above. Consider the case of obtaining the true green light quantity Lg (I ′, J ′).

即ち、黒丸71の位置を注目位置(I',J')とすると、その周辺の、白丸52−3、52−6、52−10、54などの位置で観測される画素値Gobs(k,ig,jg)が、式(25)中のGobs(k,ig,jg)として採用される。この場合、式(25)を解くことにより得られる解である真の緑色の光量Lg(I',J')は、白丸54の位置で観測される画素値である128に引っ張られ(影響され)、240より小さな値となる。しかしながら、本来であれば、黒丸71の位置は、画素値240の明るい緑色の画素値が観測される、境界51の右側の位置であるので、式(25)を解くことにより得られる解である真の緑色の光量Lg(I',J')は、240となるのが望ましい。   That is, assuming that the position of the black circle 71 is the target position (I ′, J ′), the pixel values Gobs (k, k) observed at the positions of the surrounding white circles 52-3, 52-6, 52-10, 54, etc. ig, jg) is adopted as Gobs (k, ig, jg) in the equation (25). In this case, the true green light amount Lg (I ′, J ′), which is a solution obtained by solving the equation (25), is pulled (affected) by the pixel value 128 observed at the position of the white circle 54. ), A value smaller than 240. However, since the position of the black circle 71 is originally the position on the right side of the boundary 51 where the bright green pixel value of the pixel value 240 is observed, it is a solution obtained by solving Equation (25). The true green light quantity Lg (I ′, J ′) is preferably 240.

また、黒丸72の位置を注目位置(I',J')とすると、その周辺の、白丸53−2、53−3、53−5、53−9、54などの位置で観測される画素値Gobs(k,ig,jg)が、式(25)中のGobs(k,ig,jg)として採用される。この場合、式(25)を解くことにより得られる解である真の緑色の光量Lg(I',J')は、白丸54の位置で観測される画素値である128に引っ張られ(影響され)、16より大きな値となる。しかしながら、本来であれば、黒丸72の位置は、画素値16の暗い緑色の画素値が観測される、境界51の左側の位置であるので、式(25)を解くことにより得られる解である真の緑色の光量Lg(I',J')は、16となるのが望ましい。   Also, assuming that the position of the black circle 72 is the target position (I ′, J ′), the pixel values observed at the positions of the white circles 53-2, 53-3, 53-5, 53-9, 54, etc. Gobs (k, ig, jg) is adopted as Gobs (k, ig, jg) in equation (25). In this case, the true green light amount Lg (I ′, J ′), which is a solution obtained by solving the equation (25), is pulled (affected) by the pixel value 128 observed at the position of the white circle 54. ), A value greater than 16. However, since the position of the black circle 72 is originally the position on the left side of the boundary 51 where the dark green pixel value of the pixel value 16 is observed, it is a solution obtained by solving the equation (25). The true green light quantity Lg (I ′, J ′) is preferably 16.

以上のことが、黒丸73、黒丸74の位置についても同様に言える。つまり、第3実施の形態の画像推定処理により推定された画像は、図27の境界51が存在するエッジ部分では、エッジがなだらかになり(隣接する画素の画素値の差が小さくなり)ボケた画像となってしまうことがあり得る。   The same can be said for the positions of the black circle 73 and the black circle 74. That is, the image estimated by the image estimation processing of the third embodiment is blurred at the edge portion where the boundary 51 in FIG. 27 exists (the difference between the pixel values of adjacent pixels becomes small). It can be an image.

そこで、第6実施の形態では、図27の境界51が存在するエッジ部分を検出し、そのエッジ部分にある画素値Gobs(k,ig,jg)に対して特別な処理を行う、即ち、式(25)で表される緑色の光量のバネ関係式に代入する画素値Gobs(k,ig,jg)を変更する。   Therefore, in the sixth embodiment, an edge portion where the boundary 51 in FIG. 27 exists is detected, and special processing is performed on the pixel value Gobs (k, ig, jg) at the edge portion, that is, the expression The pixel value Gobs (k, ig, jg) to be substituted into the spring relational expression of the green light quantity represented by (25) is changed.

第6実施の形態の具体的な方法について、図27と同様に、緑色の成分(G信号)に注目して説明する。   A specific method of the sixth embodiment will be described by paying attention to the green component (G signal) as in FIG.

最初に、演算回路24は、基準座標系上に変換された位置すべての画素値Gobs(k,ig,jg)を用いてエッジ部分の検出を行う。即ち、演算回路24は、「縦方向のエッジ」、「横方向のエッジ」、「左上から右下方向のエッジ」、「右から左下方向のエッジ」の4つの方向のエッジそれぞれの有無を判定する。 First, the arithmetic circuit 24 detects the edge portion using the pixel values Gobs (k, ig, jg) of all positions converted on the reference coordinate system. That is, the arithmetic circuit 24, "vertical edge", "lateral edge", "edge of the lower right direction from the upper left", the four directional edge respectively of the presence or absence of "edge lower left direction from the right" judge.

図28を参照して、縦方向のエッジがあるかどうか判定する判定方法について説明する。   A determination method for determining whether or not there is a vertical edge will be described with reference to FIG.

図28は、基準座標系を示している。そして、図28において、白丸81−1乃至81−10、白丸82−1乃至82−9、および白丸83で表される位置は、あるk枚目画像の「ig番目、jg番目の画素」の中心位置(ig−0.5,jg−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置を表し、その位置で画素値Gobs(k,ig,jg)が観測されている。ここで、(k,ig,jg)の組は、白丸81−1乃至81−10、白丸82−1乃至82−9、および白丸83それぞれにおいて異なるものである。   FIG. 28 shows a reference coordinate system. In FIG. 28, the positions represented by white circles 81-1 to 81-10, white circles 82-1 to 82-9, and white circle 83 are the positions of the “ig-th and jg-th pixels” of a certain k-th image. The position on the reference coordinate system obtained by converting the center position (ig−0.5, jg−0.5) with the conversion parameters (θk, Tkx, Tky, Sk) is represented, and the pixel value Gobs (k, ig, jg) is observed. Here, the set of (k, ig, jg) is different in each of the white circles 81-1 to 81-10, the white circles 82-1 to 82-9, and the white circle 83.

図28中の点線で示される格子状の交点に配置される黒丸のそれぞれは、演算回路24が真の緑色の光量Lg(I',J')を求めるべき位置(I',J')を表している。ここで、位置(I',J')は、上述したように、基準画像である1枚目画像における「i番目、j番目の画素」の画素中心(i−0.5,j−0.5)を表している。また、X方向とY方向のLg(I',J')どうしの間隔は、図27と同様に1であり、従って、画素のX方向とY方向の大きさも、ともに1である。   Each black circle arranged at a grid-like intersection indicated by a dotted line in FIG. 28 indicates a position (I ′, J ′) at which the arithmetic circuit 24 should obtain the true green light quantity Lg (I ′, J ′). Represents. Here, as described above, the position (I ′, J ′) is the pixel center (i−0.5, j−0...) Of the “i-th and j-th pixels” in the first image as the reference image. 5). Further, the interval between Lg (I ′, J ′) in the X direction and the Y direction is 1, as in FIG. 27, and therefore the size of the pixel in the X direction and the Y direction is both 1.

演算回路24は、図28中の白丸83の位置などに注目し、例えば、図28に示されるエッジ94のような、縦方向のエッジがあるかどうかを判定する。白丸83の位置(x,y)は、式I−0.5≦x<I+0.5,J−0.5≦y<J+0.5を満たすもものとする。図28では、白丸83の位置(x,y)は、位置(I+0.5,J−0.5)を表す黒丸84、位置(I−0.5,J−0.5)を表す黒丸85、位置(I+0.5,J+0.5)を表す黒丸86、位置(I−0.5,J+0.5)を表す黒丸87で囲まれる領域A11内の位置である。ここで、I,Jは、これまでと同様に整数である。   The arithmetic circuit 24 pays attention to the position of the white circle 83 in FIG. 28 and determines, for example, whether there is a vertical edge such as the edge 94 shown in FIG. The position (x, y) of the white circle 83 satisfies the formulas I−0.5 ≦ x <I + 0.5 and J−0.5 ≦ y <J + 0.5. In FIG. 28, the position (x, y) of the white circle 83 is a black circle 84 representing the position (I + 0.5, J−0.5), and a black circle 85 representing the position (I−0.5, J−0.5). , A position in an area A11 surrounded by a black circle 86 representing the position (I + 0.5, J + 0.5) and a black circle 87 representing the position (I−0.5, J + 0.5). Here, I and J are integers as before.

演算回路24は、注目している白丸83の位置を含む領域A11を中心とする、画素の大きさと同じ1ごとの、9つの領域を定義する。即ち、9つの領域は、I−1.5≦x<I−0.5,J−1.5≦y<J−0.5の領域A00、I−1.5≦x<I−0.5,J−0.5≦y<J+0.5の領域A01、I−1.5≦x<I−0.5,J+0.5≦y<J+1.5の領域A02、I−0.5≦x<I+0.5,J−1.5≦y<J−0.5の領域A10、I−0.5≦x<I+0.5,J−0.5≦y<J+0.5の領域A11、I−0.5≦x<I+0.5,J+0.5≦y<J+1.5の領域A12、I+0.5≦x<I+1.5,J−1.5≦y<J−0.5の領域A20、I+0.5≦x<I+1.5,J−0.5≦y<J+0.5の領域A21、I+0.5≦x<I+1.5,J+0.5≦y<J+1.5の領域A22、である。いま注目している白丸83の位置は、領域A11に含まれている。   The arithmetic circuit 24 defines nine areas each having the same size as the pixel, with the area A11 including the position of the white circle 83 of interest as the center. In other words, the nine regions include regions A00, I-1.5 ≦ x <I-0.I-1.5 ≦ x <I-0.5, J-1.5 ≦ y <J-0.5. 5, J−0.5 ≦ y <J + 0.5 region A01, I−1.5 ≦ x <I−0.5, J + 0.5 ≦ y <J + 1.5 region A02, I−0.5 ≦ Region A10 where x <I + 0.5, J−1.5 ≦ y <J−0.5, Region A11 where I−0.5 ≦ x <I + 0.5, J−0.5 ≦ y <J + 0.5, Region A12 of I−0.5 ≦ x <I + 0.5, J + 0.5 ≦ y <J + 1.5, Region of I + 0.5 ≦ x <I + 1.5, J−1.5 ≦ y <J−0.5 A20, I + 0.5 ≦ x <I + 1.5, J−0.5 ≦ y <J + 0.5 region A21, I + 0.5 ≦ x <I + 1.5, J + 0.5 ≦ y <J + 1.5 region A22, It is. The position of the white circle 83 of interest is now included in the area A11.

ここで、以上のように、注目している白丸83の位置に対して定義される9つの領域A00乃至A22の全体を、以下、適宜、エッジ判定領域と称する。   Here, as described above, the entire nine regions A00 to A22 defined with respect to the position of the white circle 83 of interest are hereinafter referred to as an edge determination region as appropriate.

縦方向のエッジ94があるかどうか判定するため、演算回路24は、領域A00、領域A01、領域A02の1列で構成される、エッジ判定領域の左側の領域91(以下、左側領域91と称する)、領域A10、領域A11、領域A12の1列で構成される、エッジ判定領域の中央の領域92(以下、中央領域92と称する)、領域A20、領域A21、領域A22の1列で構成される、エッジ判定領域の右側の領域93(以下、右側領域93と称する)内それぞれに含まれる白丸の位置の画素値Gobs(k,ig,jg)の平均値と分散を求める。   In order to determine whether or not there is an edge 94 in the vertical direction, the arithmetic circuit 24 has a region 91 on the left side of the edge determination region (hereinafter, referred to as the left region 91), which is composed of one row of region A00, region A01, and region A02. ), A region A 10, a region A 11, and a region A 12, and a center region 92 of the edge determination region (hereinafter referred to as the center region 92), a region A 20, a region A 21, and a region A 22. The average value and the variance of the pixel values Gobs (k, ig, jg) at the positions of the white circles included in the right region 93 (hereinafter referred to as the right region 93) of the edge determination region are obtained.

即ち、演算回路24は、左側領域91内の白丸82−1乃至82−7の位置の画素値Gobs(k,ig,jg)の平均値EG0と分散SG0を求める。また、演算回路24は、中央領域92内の白丸81−9、81−10、82−8乃至82−9、および83の位置の画素値Gobs(k,ig,jg)の平均値EG0”を求める。さらに、演算回路24は、右側領域93内の白丸81−1乃至81−8の位置の画素値Gobs(k,ig,jg)平均値EG0'と分散SG0'を求める。   That is, the arithmetic circuit 24 obtains the average value EG0 and the variance SG0 of the pixel values Gobs (k, ig, jg) at the positions of the white circles 82-1 to 82-7 in the left region 91. Further, the arithmetic circuit 24 calculates the average value EG0 ″ of the pixel values Gobs (k, ig, jg) at the positions of the white circles 81-9, 81-10, 82-8 to 82-9, and 83 in the central region 92. Further, the arithmetic circuit 24 obtains the pixel value Gobs (k, ig, jg) average value EG0 ′ and the variance SG0 ′ at the positions of the white circles 81-1 to 81-8 in the right region 93.

仮に、注目している白丸83の位置付近に、縦方向のエッジ94がある場合、左側領域91の平均値EG0、中央領域92の平均値EG0”、および右側領域93の平均値EG0'には、次式(a)の関係が成り立つ。そこで、演算回路24は、式(a)が成立するときに、縦方向のエッジがあると判定する。   If there is a vertical edge 94 near the position of the white circle 83 of interest, the average value EG0 of the left region 91, the average value EG0 ″ of the central region 92, and the average value EG0 ′ of the right region 93 are Therefore, the relationship of the following equation (a) is established, and the arithmetic circuit 24 determines that there is an edge in the vertical direction when the equation (a) is established.

EG0<EG0”<EG0'またはEG0'<EG0”<EG0
・・・(a)
EG0 <EG0 "<EG0 'or EG0'<EG0"<EG0
... (a)

なお、実際には、エッジ94以外の部分でも、例えば、被写体の細かな模様などによるデータのばらつきにより、上述の式(a)を満たす場合があり得るため、演算回路24は、分散SG0,SG0'を付加した次式が成り立つかどうか判定することにより、さらに確実に縦方向のエッジ94があるかどうかを判定する。即ち、演算回路24は、式(b)が成立するときに、縦方向のエッジがあると判定する。   Note that in practice, the arithmetic circuit 24 may also use the variances SG0 and SG0 because the above equation (a) may be satisfied even in a portion other than the edge 94 due to, for example, variation in data due to a fine pattern of the subject. By determining whether or not the following expression with 'added holds, it is determined more reliably whether or not there is an edge 94 in the vertical direction. That is, the arithmetic circuit 24 determines that there is an edge in the vertical direction when the formula (b) is established.

EG0+SG0<EG0”<EG0'−SG0'
またはEG0'+SG0'<EG0”<EG0−SG0
・・・(b)
EG0 + SG0 <EG0 "<EG0'-SG0 '
Or EG0 ′ + SG0 ′ <EG0 ”<EG0−SG0
... (b)

式(b)によれば、模様部分のように画素値にばらつきがあり、分散SG0,SG0'が大となる部分については、エッジがあると判定され難くなり、誤判定を防止することができる。   According to the formula (b), it is difficult to determine that there is an edge in a portion where the pixel values vary as in the pattern portion and the variances SG0 and SG0 ′ are large, and erroneous determination can be prevented. .

図29を参照して、横方向のエッジがあるかどうか判定する判定方法について説明する。なお、図28と対応する部分については、同一の符号を付してあり、以下では、その説明は省略する。   A determination method for determining whether or not there is a horizontal edge will be described with reference to FIG. Note that portions corresponding to those in FIG. 28 are denoted by the same reference numerals, and description thereof will be omitted below.

横方向のエッジ104があるかどうか判定するため、演算回路24は、領域A00、領域A10、領域A20の1列で構成される、エッジ判定領域の上側の領域101(以下、上側領域101と称する)、領域A01、領域A11、領域A21の1列で構成されるエッジ判定領域の中央の領域102(以下、中央領域102と称する)、領域A02、領域A12、領域A22の1列で構成される、エッジ判定領域の下側の領域103(以下、下側領域103と称する)内それぞれに含まれる白丸の位置の画素値Gobs(k,ig,jg)の平均値と分散を求める。   In order to determine whether or not there is a horizontal edge 104, the arithmetic circuit 24 is an area 101 on the upper side of the edge determination area (hereinafter referred to as the upper area 101) composed of one row of the area A00, the area A10, and the area A20. ), An area 102 (hereinafter referred to as the central area 102), an area A02, an area A12, and an area A22. The average value and variance of the pixel values Gobs (k, ig, jg) at the positions of the white circles included in the lower region 103 (hereinafter referred to as the lower region 103) of the edge determination region are obtained.

即ち、演算回路24は、上側領域101内の白丸81−1乃至81−3、81−10、82−1、82−2、82−9の位置の画素値Gobs(k,ig,jg)の平均値EG1と分散SG1を求める。また、演算回路24は、中央領域102内の白丸81−4乃至81−6、82−3乃至82−5、および83の位置の画素値Gobs(k,ig,jg)の平均値EG1”を求める。さらに、演算回路24は、下側領域103内の白丸81−7乃至81−9、82−6乃至82−8の位置の画素値Gobs(k,ig,jg)平均値EG1'と分散SG1'を求める。   That is, the arithmetic circuit 24 calculates the pixel values Gobs (k, ig, jg) at the positions of white circles 81-1 to 81-3, 81-10, 82-1, 82-2, 82-9 in the upper region 101. An average value EG1 and a variance SG1 are obtained. The arithmetic circuit 24 calculates the average value EG1 ″ of the pixel values Gobs (k, ig, jg) at the positions of the white circles 81-4 to 81-6, 82-3 to 82-5, and 83 in the central region 102. Further, the arithmetic circuit 24 distributes the pixel values Gobs (k, ig, jg) average values EG1 ′ at the positions of the white circles 81-7 to 81-9 and 82-6 to 82-8 in the lower region 103 and the variance. SG1 ′ is obtained.

仮に、注目している白丸83の位置付近に、横方向のエッジ104がある場合、上側領域101の平均値EG1、中央領域102の平均値EG1”、および下側領域103の平均値EG1'の関係として、被写体の細かな模様などによるデータのばらつきも考慮した次式(c)をたてる。そして、演算回路24は、式(c)が成立するときに、横方向のエッジがあると判定する。   If there is a lateral edge 104 near the position of the white circle 83 of interest, the average value EG1 of the upper region 101, the average value EG1 ″ of the central region 102, and the average value EG1 ′ of the lower region 103 As a relationship, the following equation (c) is taken into account, taking into account the variation in data due to the fine pattern of the subject, etc. Then, the arithmetic circuit 24 determines that there is a lateral edge when equation (c) holds. To do.

EG1+SG1<EG1”<EG1'−SG1'
またはEG1'+SG1'<EG1”<EG1−SG1
・・・(c)
EG1 + SG1 <EG1 "<EG1'-SG1 '
Or EG1 '+ SG1'<EG1"<EG1-SG1
... (c)

式(c)によれば、模様部分のように画素値にばらつきがあり、分散SG1,SG1'が大となる部分については、エッジがあると判定され難くなり、誤判定を防止することができる。なお、上述の式(a)における場合と同様に、分散を考慮せずに、平均値のみで、横方向のエッジの有無を判定することも可能である。   According to the equation (c), it is difficult to determine that there is an edge in a portion where the pixel values vary as in the pattern portion and the variances SG1 and SG1 ′ are large, and erroneous determination can be prevented. . As in the case of the above-described formula (a), it is also possible to determine the presence / absence of an edge in the horizontal direction based on only the average value without considering dispersion.

図30を参照して、左上から右下方向のエッジがあるかどうか判定する判定方法について説明する。なお、図28と対応する部分については、同一の符号を付してあり、以下では、その説明は省略する。   A determination method for determining whether there is an edge from the upper left to the lower right will be described with reference to FIG. Note that portions corresponding to those in FIG. 28 are denoted by the same reference numerals, and description thereof will be omitted below.

左上から右下方向のエッジ114があるかどうか判定するため、演算回路24は、領域A01、領域A02、領域A12の1列で構成される、エッジ判定領域の左下側の領域111(以下、左下側領域111と称する)、領域A00、領域A11、領域A22の1列で構成される、エッジ判定領域の中央の領域112(以下、中央領域112と称する)、領域A10、領域A20、領域A21の1列で構成される、エッジ判定領域の左上側の領域113(以下、左上側領域113と称する)内それぞれに含まれる白丸の位置の画素値Gobs(k,ig,jg)の平均値と分散を求める。   In order to determine whether there is an edge 114 in the direction from the upper left to the lower right, the arithmetic circuit 24 has a lower left side region 111 (hereinafter, lower left) of the edge determination region, which is composed of one row of the region A01, the region A02, and the region A12. Side region 111), region A 00, region A 11, region A 22, and center region 112 of the edge determination region (hereinafter referred to as center region 112), region A 10, region A 20, and region A 21. The average value and variance of the pixel values Gobs (k, ig, jg) at the positions of the white circles included in the upper left region 113 (hereinafter referred to as the upper left region 113) of the edge determination region, which is composed of one column. Ask for.

即ち、演算回路24は、左下側領域111内の白丸81−9、82−3乃至82−8の位置の画素値Gobs(k,ig,jg)の平均値EG2と分散SG2を求める。また、演算回路24は、中央領域112内の白丸81−7、81−8、82−1、82−2、および83の位置の画素値Gobs(k,ig,jg)の平均値EG2”を求める。さらに、演算回路24は、右上側領域113内の白丸81−1乃至81−6、81−10、および82−9の位置の画素値Gobs(k,ig,jg)平均値EG2'と分散SG2'を求める。   That is, the arithmetic circuit 24 obtains the average value EG2 and the variance SG2 of the pixel values Gobs (k, ig, jg) at the positions of the white circles 81-9, 82-3 to 82-8 in the lower left region 111. The arithmetic circuit 24 calculates the average value EG2 ″ of the pixel values Gobs (k, ig, jg) at the positions of the white circles 81-7, 81-8, 82-1, 82-2, and 83 in the central region 112. Further, the arithmetic circuit 24 calculates the pixel values Gobs (k, ig, jg) average value EG2 ′ at the positions of the white circles 81-1 to 81-6, 81-10, and 82-9 in the upper right region 113. The variance SG2 ′ is obtained.

仮に、注目している白丸83の位置付近に、左上から右下方向のエッジ114がある場合、左下側領域111の平均値EG2、中央領域112の平均値EG2”、および右上側領域113の平均値EG2' の関係として、被写体の細かな模様などによるデータのばらつきも考慮した次式(d)をたてる。そして、演算回路24は、式(d)が成立するときに、左上から右下方向のエッジがあると判定する。   If there is an edge 114 from the upper left to the lower right near the position of the white circle 83 of interest, the average value EG2 of the lower left region 111, the average value EG2 "of the central region 112, and the average of the upper right region 113 As the relationship of the value EG2 ′, the following equation (d) is taken into account, taking into account the data variation due to the fine pattern of the subject, etc. Then, the arithmetic circuit 24 calculates the equation (d) from the upper left to the lower right. It is determined that there is an edge in the direction.

EG2+SG2<EG2”<EG2'−SG2'
またはEG2'+SG2'<EG2”<EG2−SG2
・・・(d)
EG2 + SG2 <EG2 "<EG2'-SG2 '
Or EG2 '+ SG2'<EG2"<EG2-SG2
... (d)

式(d)によれば、模様部分のように画素値にばらつきがあり、分散SG2,SG2'が大となる部分については、エッジがあると判定され難くなり、誤判定を防止することができる。なお、上述の式(a)における場合と同様に、分散を考慮せずに、平均値のみで、左上から右下方向のエッジの有無を判定することも可能である。   According to the equation (d), it is difficult to determine that there is an edge in a portion where the pixel value varies as in the pattern portion and the variance SG2, SG2 ′ is large, and erroneous determination can be prevented. . As in the case of the above-described formula (a), it is also possible to determine the presence or absence of an edge from the upper left to the lower right by using only the average value without considering the variance.

図31を参照して、右上から左下方向のエッジがあるかどうか判定する判定方法について説明する。なお、図28と対応する部分については、同一の符号を付してあり、以下では、その説明は省略する。   A determination method for determining whether there is an edge from the upper right to the lower left will be described with reference to FIG. Note that portions corresponding to those in FIG. 28 are denoted by the same reference numerals, and description thereof will be omitted below.

右上から左下方向のエッジ124があるかどうか判定するため、演算回路24は、領域A00、領域A01、領域A10の1列で構成される、エッジ判定領域の左上側の領域121(以下、左上側領域121と称する)、領域A02、領域A11、領域A20の1列で構成される、エッジ判定領域の中央の領域122(以下、中央領域122と称する)、領域A12、領域A21、領域A22の1列で構成される、エッジ判定領域の右下側の領域123(以下、右下側領域123と称する)内それぞれに含まれる白丸の位置の画素値Gobs(k,ig,jg)の平均値と分散を求める。   In order to determine whether there is an edge 124 in the direction from the upper right to the lower left, the arithmetic circuit 24 includes an upper left area 121 (hereinafter, upper left) of the edge determination area, which is composed of one row of the area A00, the area A01, and the area A10. (Referred to as a region 121), a region A02, a region A11, and a region A20, and a central region 122 of the edge determination region (hereinafter referred to as a central region 122), a region A12, a region A21, and a region A22. An average value of pixel values Gobs (k, ig, jg) at positions of white circles included in each of the lower right region 123 (hereinafter referred to as the lower right region 123) of the edge determination region, which is composed of columns Find the variance.

即ち、演算回路24は、左上側領域121内の白丸81−10、82−1乃至82−5、82−9の位置の画素値Gobs(k,ig,jg)の平均値EG3と分散SG3を求める。また、演算回路24は、中央領域122内の白丸81−1乃至81−3、82−6、82−7、および83の位置の画素値Gobs(k,ig,jg)の平均値EG3”を求める。さらに、演算回路24は、右下側領域123内の白丸81−4乃至81−9、82−8の位置の画素値Gobs(k,ig,jg)平均値EG3'と分散SG3'を求める。   That is, the arithmetic circuit 24 calculates the average value EG3 and the variance SG3 of the pixel values Gobs (k, ig, jg) at the positions of the white circles 81-10, 82-1 to 82-5, 82-9 in the upper left region 121. Ask. Further, the arithmetic circuit 24 calculates the average value EG3 ″ of the pixel values Gobs (k, ig, jg) at the positions of the white circles 81-1 to 81-3, 82-6, 82-7, and 83 in the central region 122. Further, the arithmetic circuit 24 calculates pixel values Gobs (k, ig, jg) average values EG3 ′ and variance SG3 ′ at positions of white circles 81-4 to 81-9 and 82-8 in the lower right region 123. Ask.

仮に、注目している白丸83の位置付近に、右上から左下方向のエッジ124がある場合、左上側領域121の平均値EG3、中央領域122の平均値EG3”、および右下側領域123の平均値EG3' の関係として、被写体の細かな模様などによるデータのばらつきも考慮した次式(e)をたてる。そして、演算回路24は、式(e)が成立するときに、右上から左下方向のエッジがあると判定する。   If there is an edge 124 from the upper right to the lower left near the position of the white circle 83 of interest, the average value EG3 of the upper left region 121, the average value EG3 ″ of the central region 122, and the average of the lower right region 123 As the relationship of the value EG3 ′, the following equation (e) is taken into consideration, which also considers data variation due to a fine pattern of the subject, etc. Then, the arithmetic circuit 24 moves from the upper right to the lower left when the equation (e) is satisfied. It is determined that there is an edge.

EG3+SG3<EG3”<EG3'−SG3'
またはEG3'+SG3'<EG3”<EG3−SG3
・・・(e)
EG3 + SG3 <EG3 "<EG3'-SG3 '
Or EG3 '+ SG3'<EG3"<EG3-SG3
... (e)

式(e)によれば、模様部分のように画素値にばらつきがあり、分散SG1,SG1'が大となる部分については、エッジがあると判定され難くなり、誤判定を防止することができる。なお、上述の式(a)における場合と同様に、分散を考慮せずに、平均値のみで、右下から左下方向のエッジの有無を判定することも可能である。   According to the equation (e), it is difficult to determine that there is an edge in a portion where the pixel values vary as in the pattern portion and the variances SG1 and SG1 ′ are large, and erroneous determination can be prevented. . As in the case of the above-described formula (a), it is also possible to determine the presence / absence of an edge from the lower right to the lower left by using only the average value without considering the variance.

図28乃至図31で説明したように、演算回路24は、「縦方向」、「横方向」、「左上から右下方向」、「右下から左下方向」の4つの方向について、エッジがあるかどうか、即ち、上述の式が成り立つかどうかを判定する。なお、演算回路24は、緑色のみならず、他の赤色と青色それぞれについても同様に、エッジの有無を判定する。   As described with reference to FIGS. 28 to 31, the arithmetic circuit 24 has edges in four directions of “vertical direction”, “horizontal direction”, “upper left to lower right direction”, and “lower right to lower left direction”. It is determined whether or not the above equation holds. Note that the arithmetic circuit 24 determines the presence or absence of an edge not only for green but also for other red and blue colors.

ここで、4つの方向のエッジのうち、複数の方向のエッジについて、上述の式が成り立つことも考えられる。しかしながら、実際のエッジは1つであるので、その場合、一番顕著な方向のエッジのみを採用し、その他の方向のエッジはないものとする。   Here, it is also conceivable that the above-described equation holds for the edges in a plurality of directions among the edges in the four directions. However, since there is only one actual edge, in that case, only the edge in the most prominent direction is adopted and there is no edge in the other direction.

具体的には、例えば、演算回路24は、エッジが検出された複数の方向について、
|(EGm'−EGm)÷(SGm'+SGm)|
(m=0乃至3のいずれか)
を演算し、その演算結果が一番大となるmを決定する。そして、そのmが、0であれば「縦方向のエッジ」を、1であれば「横方向のエッジ」を、2であれば「左上から右下方向のエッジ」を、3であれば「右下から左下方向のエッジ」を、それぞれ、一番顕著な方向のエッジとして採用する。ここで、|x|は、xの絶対値を表す。
Specifically, for example, the arithmetic circuit 24 has a plurality of directions in which edges are detected.
| (EGm′−EGm) ÷ (SGm ′ + SGm) |
(M = 0 to 3)
And m that maximizes the result of the calculation is determined. If m is 0, “vertical edge” is 1, “horizontal edge” is 1, 2 is “edge from upper left to lower right”, 3 is “ The edge from the lower right to the lower left direction is adopted as the edge in the most prominent direction. Here, | x | represents the absolute value of x.

次に、注目した位置について検出されたエッジの方向に応じて、そのエッジ部分にある、注目した位置で観測された画素値Gobs(k,ig,jg)に対して演算回路24が行う特別な処理について説明する。   Next, according to the direction of the edge detected for the position of interest, the arithmetic circuit 24 performs a special operation on the pixel value Gobs (k, ig, jg) observed at the position of interest at the edge portion. Processing will be described.

特別な処理とは、式(25)で表される緑色の光量のバネ関係式に画素値Gobs(k,ig,jg)を代入する場合に、エッジ部分と判定された位置で観測された画素値Gobs(k,ig,jg)については、代入する画素値Gobs(k,ig,jg)を変更する処理である。   The special processing means that the pixel observed at the position determined to be the edge portion when the pixel value Gobs (k, ig, jg) is substituted into the spring relational expression of the green light quantity expressed by Expression (25). The value Gobs (k, ig, jg) is a process of changing the pixel value Gobs (k, ig, jg) to be substituted.

代入する画素値Gobs(k,ig,jg)を変更する処理としては、例えば、以下の第1の処理や第2の処理を採用することができる。   As a process for changing the pixel value Gobs (k, ig, jg) to be substituted, for example, the following first process or second process can be employed.

例えば、第1の処理では、注目している、例えば、図28乃至図31の白丸83の位置にエッジが検出された場合、その位置の画素値Gobs(k,ig,jg)を破棄する。即ち、式(25)で表される緑色の光量のバネ関係式に、エッジが検出された位置の画素値Gobs(k,ig,jg)を含ませない。この場合、図22(図23)で説明したバネモデルにおいては、間違った方向(光量)に引っ張るバネがなくなることになる。従って、より正確な(鮮明な)Lg(I',J')を求めることができる。   For example, in the first process, when an edge is detected, for example, at the position of the white circle 83 in FIGS. 28 to 31, the pixel value Gobs (k, ig, jg) at that position is discarded. In other words, the pixel value Gobs (k, ig, jg) at the position where the edge is detected is not included in the spring relational expression of the green light quantity expressed by Expression (25). In this case, in the spring model described in FIG. 22 (FIG. 23), there is no spring that pulls in the wrong direction (light quantity). Therefore, more accurate (clear) Lg (I ′, J ′) can be obtained.

第2の処理では、注目している、例えば、図28乃至図31の白丸83の位置の画素値Gobs(k,ig,jg)を、上述したエッジの検出において、注目している位置について定義したエッジ判定領域を構成する9つの領域A00乃至A22で観測されている画素値Gobs(k,ig,jg)を用いて他の値に置き換え、式(25)で表される緑色の光量のバネ関係式に代入する。   In the second processing, for example, the pixel value Gobs (k, ig, jg) at the position of the white circle 83 in FIGS. 28 to 31 is defined for the position to which attention is paid in the above-described edge detection. The pixel value Gobs (k, ig, jg) observed in the nine regions A00 to A22 constituting the edge determination region is replaced with another value, and the green light amount spring represented by the equation (25) Substitute into the relational expression.

以下に、第2の処理を具体的に説明する。   The second process will be specifically described below.

図32は、図28で示した、「縦方向のエッジ」が検出された場合の、注目している白丸83の位置を含む領域A11を示している。図中の、1軸は基準座標系におけるX方向を、X方向と垂直な軸が基準座標系におけるY方向を、X方向およびY方向と垂直な軸が画素値を、それぞれ表している。   FIG. 32 shows a region A11 including the position of the white circle 83 of interest when the “vertical edge” shown in FIG. 28 is detected. In the figure, one axis represents the X direction in the reference coordinate system, the axis perpendicular to the X direction represents the Y direction in the reference coordinate system, and the axis perpendicular to the X direction and the Y direction represents the pixel value.

図32では、エッジ判定領域について求められた平均値EG0,EG0',EG0”と分散SG0,SG0'が、式「EG0'+SG0'<EG0”<EG0−SG0」を満たし、従って、「縦方向のエッジ」が存在している。   In FIG. 32, the average values EG0, EG0 ′, EG0 ″ obtained for the edge determination region and the variances SG0, SG0 ′ satisfy the expression “EG0 ′ + SG0 ′ <EG0” <EG0−SG0 ”. The edge of "exists.

この場合、黒丸85の位置(I−0.5,J−0.5)における真の緑色の光量Lg(I−0.5,J−0.5)と、黒丸87の位置(I−0.5,J+0.5)における真の緑色の光量Lg(I−0.5,J+0.5)とは、注目している白丸83の位置(x,y)で観測される画素値Gobs(k,ig,jg)よりも大きいと考えられる。また、黒丸85の位置(I−0.5,J−0.5)における真の緑色の光量Lg(I−0.5,J−0.5)、または黒丸87の位置(I−0.5,J+0.5)における真の緑色の光量Lg(I−0.5,J+0.5)それぞれと、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)との光量(画素値)の差は、平均値EG0とEG0'との差(EG0−EG0')に依存する。   In this case, the true green light quantity Lg (I-0.5, J-0.5) at the position (I-0.5, J-0.5) of the black circle 85 and the position (I-0 of the black circle 87). .5, J + 0.5) is the true green light quantity Lg (I−0.5, J + 0.5) is the pixel value Gobs (k) observed at the position (x, y) of the white circle 83 of interest. , Ig, jg). Further, the true green light amount Lg (I-0.5, J-0.5) at the position (I-0.5, J-0.5) of the black circle 85 or the position (I-0. 5, J + 0.5) and the light quantity of the true green light quantity Lg (I−0.5, J + 0.5) and the pixel value Gobs (k, ig, jg) at the position (x, y) of the white circle 83. The difference in (pixel value) depends on the difference (EG0−EG0 ′) between the average values EG0 and EG0 ′.

また、黒丸84の位置(I+0.5,J−0.5)における真の緑色の光量Lg(I+0.5,J−0.5)と、黒丸86の位置(I+0.5,J+0.5)における真の緑色の光量Lg(I+0.5,J+0.5)とは、注目している白丸83の位置(x,y)で観測される画素値Gobs(k,ig,jg)よりも小さいと考えられる。また、黒丸84の位置(I+0.5,J−0.5)における真の緑色の光量Lg(I+0.5,J−0.5)、または黒丸86の位置(I+0.5,J+0.5)における真の緑色の光量Lg(I+0.5,J+0.5)それぞれと、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)との光量(画素値)の差は、平均値EG0とEG0'との差(EG0−EG0')に依存する。   In addition, the true green light amount Lg (I + 0.5, J-0.5) at the position (I + 0.5, J-0.5) of the black circle 84 and the position (I + 0.5, J + 0.5) of the black circle 86. The true green light amount Lg (I + 0.5, J + 0.5) at is smaller than the pixel value Gobs (k, ig, jg) observed at the position (x, y) of the white circle 83 of interest. Conceivable. Further, the true green light amount Lg (I + 0.5, J-0.5) at the position of the black circle 84 (I + 0.5, J-0.5) or the position of the black circle 86 (I + 0.5, J + 0.5). The difference in light amount (pixel value) between each true green light amount Lg (I + 0.5, J + 0.5) and the pixel value Gobs (k, ig, jg) at the position (x, y) of the white circle 83 is It depends on the difference (EG0−EG0 ′) between the average values EG0 and EG0 ′.

そこで、演算回路24は、注目している白丸83の位置(x,y)の画素値Gobs(k,ig,jg)を通り、X方向に傾きpの平面Q1を求める。ここで、p=(EG0−EG0')÷2である。つまり、傾きpは、図28の左側領域91の画素値の平均値EG0と右側領域93の画素値の平均値EG0'との差を、左側領域91と右側領域92とのx方向の中心位置どうしの距離である2で除算して求められる。傾きpは、縦方向のエッジ部分における、そのエッジと垂直な方向の光量(画素値)の変化の度合い、つまり、エッジの傾きを表す。   Therefore, the arithmetic circuit 24 obtains a plane Q1 that passes through the pixel value Gobs (k, ig, jg) at the position (x, y) of the white circle 83 of interest and has an inclination p in the X direction. Here, p = (EG0−EG0 ′) / 2. That is, the slope p is the difference between the average value EG0 of the pixel values in the left region 91 and the average value EG0 ′ of the pixel values in the right region 93 in FIG. 28, and the center position in the x direction between the left region 91 and the right region 92. It is obtained by dividing by 2 which is the distance between each other. The inclination p represents the degree of change in the amount of light (pixel value) in the direction perpendicular to the edge in the vertical edge portion, that is, the inclination of the edge.

そして、演算回路24は、黒丸85の位置(I−0.5,J−0.5)における平面Q1上の値(画素値)を求め、その値を画素値Gobs0(k,ig,jg)とする。また、演算回路24は、黒丸87の位置(I−0.5,J+0.5)における平面Q1上の値(画素値)を求め、その値を画素値Gobs1(k,ig,jg)とする。同様に、演算回路24は、黒丸84の位置(I+0.5,J−0.5)における平面Q1上の値(画素値)と、および黒丸86の位置(I+0.5,J+0.5)における平面Q1上の値(画素値)を求め、それぞれの値を画素値Gobs2(k,ig,jg)と、画素値Gobs3(k,ig,jg)とする。   Then, the arithmetic circuit 24 obtains a value (pixel value) on the plane Q1 at the position (I-0.5, J-0.5) of the black circle 85, and obtains the value as a pixel value Gobs0 (k, ig, jg). And Further, the arithmetic circuit 24 obtains a value (pixel value) on the plane Q1 at the position (I−0.5, J + 0.5) of the black circle 87, and sets the value as the pixel value Gobs1 (k, ig, jg). . Similarly, the arithmetic circuit 24 calculates the value (pixel value) on the plane Q1 at the position (I + 0.5, J−0.5) of the black circle 84 and the position (I + 0.5, J + 0.5) of the black circle 86. The values (pixel values) on the plane Q1 are obtained, and the respective values are set as a pixel value Gobs2 (k, ig, jg) and a pixel value Gobs3 (k, ig, jg).

ここで、平面Q1は、X方向についてのみ傾きpを有しているので、画素値Gobs0(k,ig,jg)と画素値Gobs1(k,ig,jg)とは等しく、また、画素値Gobs2(k,ig,jg)と画素値Gobs3(k,ig,jg)とは等しい。   Here, since the plane Q1 has an inclination p only in the X direction, the pixel value Gobs0 (k, ig, jg) and the pixel value Gobs1 (k, ig, jg) are equal, and the pixel value Gobs2 (K, ig, jg) and the pixel value Gobs3 (k, ig, jg) are equal.

さて、第3実施の形態では、図22に示したように、ある位置(I',J')における真の緑色の光量Lg(I',J')が、その周辺の位置で観測された画素値Gobs(k,ig,jg)とつりあっている状態を表すバネモデルを考えることにより、式(25)をたてる。位置(I',J')の周辺の位置で観測された画素値Gobs(k,ig,jg)とは、k枚目画像の座標系における位置(ig−0.5,jg−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ig,jg)の組の画素値Gobs(k,ig,jg)である。   In the third embodiment, as shown in FIG. 22, the true green light quantity Lg (I ′, J ′) at a certain position (I ′, J ′) is observed at the peripheral positions. Formula (25) is established by considering a spring model representing a state in which the pixel value Gobs (k, ig, jg) is balanced. The pixel values Gobs (k, ig, jg) observed at positions around the position (I ′, J ′) are the positions (ig−0.5, jg−0.5) in the coordinate system of the k-th image. ) With the conversion parameters (θk, Tkx, Tky, Sk), the position (x, y) on the reference coordinate system is I′−1 ≦ x <I ′ + 1, J′−1 ≦ y <J ′ + 1. A set of pixel values Gobs (k, ig, jg) satisfying (k, ig, jg).

図32において、例えば、黒丸84の位置(I+0.5,J−0.5)を、位置(I',J')として注目した場合、黒丸84の位置の周辺の位置で観測される画素値Gobs(k,ig,jg)として、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)が含まれる。従って、第3実施の形態では、式(25)に、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)が代入される。   In FIG. 32, for example, when the position (I + 0.5, J−0.5) of the black circle 84 is noted as the position (I ′, J ′), the pixel values observed at positions around the position of the black circle 84 The pixel value Gobs (k, ig, jg) at the position (x, y) of the white circle 83 is included as Gobs (k, ig, jg). Therefore, in the third embodiment, the pixel value Gobs (k, ig, jg) at the position (x, y) of the white circle 83 is substituted into Expression (25).

これに対して、第6実施の形態では、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)の代わりに、注目している黒丸84の位置(I+0.5,J−0.5)における平面Q1上の値(画素値)である画素値Gobs2(k,ig,jg)が、式(25)に代入される。   On the other hand, in the sixth embodiment, instead of the pixel value Gobs (k, ig, jg) at the position (x, y) of the white circle 83, the position (I + 0.5, J) of the black circle 84 of interest. The pixel value Gobs2 (k, ig, jg) which is a value (pixel value) on the plane Q1 in -0.5) is substituted into the equation (25).

また、黒丸85の位置(I−0.5,J−0.5)を、位置(I',J')として注目した場合、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)の代わりに、注目している黒丸85の位置(I−0.5,J−0.5)における平面Q1上の値(画素値)である画素値Gobs0(k,ig,jg)が、式(25)に代入される。   When attention is paid to the position (I−0.5, J−0.5) of the black circle 85 as the position (I ′, J ′), the pixel value Gobs (k, k) of the position (x, y) of the white circle 83 is obtained. In place of (ig, jg), a pixel value Gobs0 (k, ig, jg) which is a value (pixel value) on the plane Q1 at the position (I-0.5, J-0.5) of the black circle 85 of interest. ) Is substituted into equation (25).

さらに、黒丸86の位置(I+0.5,J+0.5)を、位置(I',J')として注目した場合、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)の代わりに、注目している黒丸86の位置(I+0.5,J+0.5)における平面Q1上の値(画素値)である画素値Gobs3(k,ig,jg)が、式(25)に代入される。   Further, when attention is paid to the position (I + 0.5, J + 0.5) of the black circle 86 as the position (I ′, J ′), the pixel value Gobs (k, ig, jg) of the position (x, y) of the white circle 83 is obtained. Instead of the pixel value Gobs3 (k, ig, jg), which is the value (pixel value) on the plane Q1 at the position (I + 0.5, J + 0.5) of the black circle 86 of interest, in the equation (25) Assigned.

また、黒丸87の位置(I−0.5,J+0.5)を、位置(I',J')として注目した場合、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)の代わりに、注目している黒丸87の位置(I−0.5,J+0.5)における平面Q1上の値(画素値)である画素値Gobs1(k,ig,jg)が、式(25)に代入される。   When attention is paid to the position (I−0.5, J + 0.5) of the black circle 87 as the position (I ′, J ′), the pixel value Gobs (k, ig, In place of jg), a pixel value Gobs1 (k, ig, jg) which is a value (pixel value) on the plane Q1 at the position (I−0.5, J + 0.5) of the black circle 87 of interest Substituted in (25).

以上のように、縦方向のエッジ(緑色の光量の急峻な変化)がある位置で観測された画素値Gobs(k,ig,jg)(図32の白丸83の位置の画素値)を、そのエッジの傾き(急峻度合い)pに応じた画素値(Gobs0(k,ig,jg),Gobs1(k,ig,jg),Gobs2(k,ig,jg)、またはGobs3(k,ig,jg))に変更(補正)し、その変更した画素値を式(25)に代入することにより、バネモデルにおいて、図23における物体VとしてのLg(I',J')が適切な位置に引っ張られ、より正確な(鮮明な)真の緑色の光量Lg(I',J')を求めることができる。   As described above, the pixel value Gobs (k, ig, jg) (pixel value at the position of the white circle 83 in FIG. 32) observed at a position where there is a vertical edge (abrupt change in the amount of green light) Pixel values (Gobs0 (k, ig, jg), Gobs1 (k, ig, jg), Gobs2 (k, ig, jg), or Gobs3 (k, ig, jg) corresponding to the inclination (steepness) p of the edge ) And substituting the changed pixel value into equation (25), Lg (I ′, J ′) as the object V in FIG. 23 is pulled to an appropriate position in the spring model, A more accurate (clear) true green light amount Lg (I ′, J ′) can be obtained.

図33は、図29で示した、「横方向のエッジ」が検出された場合の、注目している白丸83の位置を含む領域A11を示している。図中の、1軸は基準座標系におけるX方向を、X方向と垂直な軸が基準座標系におけるY方向を、X方向およびY方向と垂直な軸が画素値を、それぞれ表している。   FIG. 33 shows a region A11 including the position of the white circle 83 of interest when the “lateral edge” shown in FIG. 29 is detected. In the figure, one axis represents the X direction in the reference coordinate system, the axis perpendicular to the X direction represents the Y direction in the reference coordinate system, and the axis perpendicular to the X direction and the Y direction represents the pixel value.

図33では、エッジ判定領域について求められた平均値EG1,EG1',EG1”と分散SG1,SG1'が、式「EG1'+SG1'<EG1”<EG1−SG1」を満たし、従って、「横方向のエッジ」が存在している。   In FIG. 33, the average values EG1, EG1 ′, EG1 ″ obtained for the edge determination region and the variances SG1, SG1 ′ satisfy the expression “EG1 ′ + SG1 ′ <EG1” <EG1-SG1 ”. The edge of "exists.

この場合、黒丸84の位置(I+0.5,J−0.5)における真の緑色の光量Lg(I+0.5,J−0.5)と、黒丸85の位置(I−0.5,J−0.5)における真の緑色の光量Lg(I−0.5,J−0.5)とは、注目している白丸83の位置(x,y)で観測される画素値Gobs(k,ig,jg)よりも大きいと考えられる。また、黒丸84の位置(I+0.5,J−0.5)における真の緑色の光量Lg(I+0.5,J−0.5)、または黒丸85の位置(I−0.5,J−0.5)における真の緑色の光量Lg(I−0.5,J−0.5)と、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)との光量(画素値)の差は、平均値EG1とEG1'との差(EG1−EG1')に依存する。   In this case, the true green light quantity Lg (I + 0.5, J-0.5) at the position (I + 0.5, J-0.5) of the black circle 84 and the position (I-0.5, J of the black circle 85). −0.5) is the true green light quantity Lg (I−0.5, J−0.5), which is the pixel value Gobs (k) observed at the position (x, y) of the white circle 83 of interest. , Ig, jg). Further, the true green light amount Lg (I + 0.5, J-0.5) at the position of the black circle 84 (I + 0.5, J-0.5) or the position of the black circle 85 (I-0.5, J-0.5). 0.5) the true green light quantity Lg (I-0.5, J-0.5) and the light quantity (pixels Gobs (k, ig, jg) at the position (x, y) of the white circle 83 ( The difference in pixel value) depends on the difference (EG1−EG1 ′) between the average values EG1 and EG1 ′.

また、黒丸86の位置(I+0.5,J+0.5)における真の緑色の光量Lg(I+0.5,J+0.5)と、黒丸87の位置(I−0.5,J+0.5)における真の緑色の光量Lg(I−0.5,J+0.5)とは、注目している白丸83の位置(x,y)で観測される画素値Gobs(k,ig,jg)よりも小さいと考えられる。また、黒丸86の位置(I+0.5,J+0.5)における真の緑色の光量Lg(I+0.5,J+0.5)、または黒丸87の位置(I−0.5,J+0.5)における真の緑色の光量Lg(I−0.5,J+0.5)それぞれと、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)との光量(画素値)の差は、平均値EG1とEG1'との差(EG1−EG1')に依存する。   Further, the true green light quantity Lg (I + 0.5, J + 0.5) at the position (I + 0.5, J + 0.5) of the black circle 86 and the true light at the position (I−0.5, J + 0.5) of the black circle 87. Is less than the pixel value Gobs (k, ig, jg) observed at the position (x, y) of the white circle 83 of interest. Conceivable. Further, the true green light quantity Lg (I + 0.5, J + 0.5) at the position (I + 0.5, J + 0.5) of the black circle 86 or the true light at the position (I−0.5, J + 0.5) of the black circle 87. The difference in light amount (pixel value) between each of the green light amounts Lg (I−0.5, J + 0.5) and the pixel value Gobs (k, ig, jg) at the position (x, y) of the white circle 83 is It depends on the difference (EG1−EG1 ′) between the average values EG1 and EG1 ′.

そこで、演算回路24は、注目している白丸83の位置(x,y)の画素値Gobs(k,ig,jg)を通り、Y方向に傾きpの平面Q2を求める。ここで、p=(EG1−EG1')÷2である。つまり、傾きpは、図29の上側領域101の画素値の平均値EG1と下側領域103の画素値の平均値EG1'との差を、上側領域101と下側領域103のy方向の中心位置どうしの距離である2で除算して求められる。傾きpは、横方向のエッジ部分における、そのエッジと垂直な方向の光量(画素値)の変化の度合い、つまり、エッジの傾きを表す。   Therefore, the arithmetic circuit 24 obtains a plane Q2 that passes through the pixel value Gobs (k, ig, jg) at the position (x, y) of the white circle 83 of interest and has a slope p in the Y direction. Here, p = (EG1-EG1 ′) / 2. That is, the slope p is the difference between the average value EG1 of the pixel values in the upper region 101 and the average value EG1 ′ of the pixel values in the lower region 103 in FIG. It is obtained by dividing by 2 which is the distance between positions. The inclination p represents the degree of change in the amount of light (pixel value) in the direction perpendicular to the edge at the edge portion in the horizontal direction, that is, the inclination of the edge.

そして、演算回路24は、黒丸85の位置(I−0.5,J−0.5)における平面Q2上の値(画素値)を求め、その値を画素値Gobs0(k,ig,jg)とする。また、演算回路24は、黒丸87の位置(I−0.5,J+0.5)における平面Q2上の値(画素値)を求め、その値を画素値Gobs1(k,ig,jg)とする。同様に、演算回路24は、黒丸84の位置(I+0.5,J−0.5)における平面Q2上の値(画素値)と、および黒丸86の位置(I+0.5,J+0.5)における平面Q2上の値(画素値)を求め、それぞれの値をそれぞれ画素値Gobs2(k,ig,jg)、画素値Gobs3(k,ig,jg)とする。   Then, the arithmetic circuit 24 obtains a value (pixel value) on the plane Q2 at the position (I-0.5, J-0.5) of the black circle 85, and obtains the value as a pixel value Gobs0 (k, ig, jg). And Further, the arithmetic circuit 24 obtains a value (pixel value) on the plane Q2 at the position (I−0.5, J + 0.5) of the black circle 87, and sets the value as the pixel value Gobs1 (k, ig, jg). . Similarly, the arithmetic circuit 24 calculates the value (pixel value) on the plane Q2 at the position (I + 0.5, J−0.5) of the black circle 84 and the position (I + 0.5, J + 0.5) of the black circle 86. Values (pixel values) on the plane Q2 are obtained, and the respective values are set as a pixel value Gobs2 (k, ig, jg) and a pixel value Gobs3 (k, ig, jg), respectively.

ここで、平面Q2は、Y方向についてのみ傾きpを有しているので、画素値Gobs0(k,ig,jg)と画素値Gobs2(k,ig,jg)とは等しく、また、画素値Gobs1(k,ig,jg)と画素値Gobs3(k,ig,jg)とは等しい。   Here, since the plane Q2 has an inclination p only in the Y direction, the pixel value Gobs0 (k, ig, jg) is equal to the pixel value Gobs2 (k, ig, jg), and the pixel value Gobs1. (K, ig, jg) and the pixel value Gobs3 (k, ig, jg) are equal.

「横方向のエッジ」においても、図32の「縦方向のエッジ」の場合と同様に、黒丸84の位置(I+0.5,J−0.5)を、位置(I',J')として注目した場合、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)の代わりに、注目している黒丸84の位置(I+0.5,J−0.5)における平面Q2上の値(画素値)である画素値Gobs2(k,ig,jg)が、式(25)に代入される。   Also in the “lateral edge”, as in the case of the “vertical edge” in FIG. 32, the position (I + 0.5, J−0.5) of the black circle 84 is set as the position (I ′, J ′). When attention is paid, instead of the pixel value Gobs (k, ig, jg) at the position (x, y) of the white circle 83, the plane Q2 at the position (I + 0.5, J-0.5) of the black circle 84 of interest. The pixel value Gobs2 (k, ig, jg), which is the upper value (pixel value), is substituted into Expression (25).

また、黒丸85の位置(I−0.5,J−0.5)を、位置(I',J')として注目した場合、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)の代わりに、注目している黒丸85の位置(I−0.5,J−0.5)における平面Q2上の値(画素値)である画素値Gobs0(k,ig,jg)が、式(25)に代入される。   When attention is paid to the position (I−0.5, J−0.5) of the black circle 85 as the position (I ′, J ′), the pixel value Gobs (k, k) of the position (x, y) of the white circle 83 is obtained. In place of (ig, jg), a pixel value Gobs0 (k, ig, jg) which is a value (pixel value) on the plane Q2 at the position (I-0.5, J-0.5) of the black circle 85 of interest. ) Is substituted into equation (25).

さらに、黒丸86の位置(I+0.5,J+0.5)を、位置(I',J')として注目した場合、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)の代わりに、注目している黒丸86の位置(I+0.5,J+0.5)における平面Q2上の値(画素値)である画素値Gobs3(k,ig,jg)が、式(25)に代入される。   Further, when attention is paid to the position (I + 0.5, J + 0.5) of the black circle 86 as the position (I ′, J ′), the pixel value Gobs (k, ig, jg) of the position (x, y) of the white circle 83 is obtained. Instead of the pixel value Gobs3 (k, ig, jg), which is the value (pixel value) on the plane Q2 at the position (I + 0.5, J + 0.5) of the black circle 86 of interest, in the equation (25) Assigned.

また、黒丸87の位置(I−0.5,J+0.5)を、画素値(I',J')として注目した場合、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)の代わりに、位置(x,y)の黒丸87位置(x,y)のにおける平面Q2上の値(画素値)である画素値Gobs1(k,ig,jg)が、式(25)に代入される。   Further, when attention is paid to the position (I−0.5, J + 0.5) of the black circle 87 as the pixel value (I ′, J ′), the pixel value Gobs (k, ig) at the position (x, y) of the white circle 83. , Jg), the pixel value Gobs1 (k, ig, jg), which is the value (pixel value) on the plane Q2 at the position (x, y) of the black circle 87 at the position (x, y), is expressed by the equation (25). ).

以上のように、横方向のエッジ(緑色の光量の急峻な変化)がある位置で観測された画素値Gobs(k,ig,jg)(図33の白丸83の位置の画素値)を、そのエッジの傾き(急峻度合い)pに応じた画素値(Gobs0(k,ig,jg),Gobs1(k,ig,jg),Gobs2(k,ig,jg)、またはGobs3(k,ig,jg))に変更(補正)し、その変更した画素値を式(25)に代入することにより、バネモデルにおいて、図23における物体VとしてのLg(I',J')が適切な位置に引っ張られ、より正確な(鮮明な)真の緑色の光量Lg(I',J')を求めることができる。   As described above, the pixel value Gobs (k, ig, jg) (pixel value at the position of the white circle 83 in FIG. 33) observed at a position where there is a horizontal edge (abrupt change in the amount of green light) Pixel values (Gobs0 (k, ig, jg), Gobs1 (k, ig, jg), Gobs2 (k, ig, jg), or Gobs3 (k, ig, jg) corresponding to the inclination (steepness) p of the edge ) And substituting the changed pixel value into equation (25), Lg (I ′, J ′) as the object V in FIG. 23 is pulled to an appropriate position in the spring model, A more accurate (clear) true green light amount Lg (I ′, J ′) can be obtained.

図34は、図30で示した、「左上から右下方向のエッジ」が検出された場合の、注目している白丸83の位置を含む領域A11を示している。図中の、1軸は基準座標系におけるX方向を、X方向と垂直な軸が基準座標系におけるY方向を、X方向およびY方向と垂直な軸が画素値を、それぞれ表している。   FIG. 34 shows a region A11 including the position of the white circle 83 of interest when “the edge from the upper left to the lower right” shown in FIG. 30 is detected. In the figure, one axis represents the X direction in the reference coordinate system, the axis perpendicular to the X direction represents the Y direction in the reference coordinate system, and the axis perpendicular to the X direction and the Y direction represents the pixel value.

図34では、エッジ判定領域について求められた平均値EG2,EG2',EG2”と分散SG2,SG2'が、式「EG2+SG2<EG2”<EG2'−SG2'」を満たし、従って、「左上から右下方向のエッジ」が存在している。   In FIG. 34, the average values EG2, EG2 ′, EG2 ″ obtained for the edge determination region and the variances SG2, SG2 ′ satisfy the expression “EG2 + SG2 <EG2” <EG2′−SG2 ′ ”. There is a “downward edge”.

この場合、黒丸84の位置(I+0.5,J−0.5)における真の緑色の光量Lg(I+0.5,J−0.5)は、注目している白丸83の位置(x,y)で観測される画素値Gobs(k,ig,jg)よりも大きいと考えられる。また、黒丸84の位置(I+0.5,J−0.5)における真の緑色の光量Lg(I+0.5,J−0.5)と、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)との光量(画素値)の差は、平均値EG2'とEG2との差(EG2'−EG2)に依存する。   In this case, the true green light quantity Lg (I + 0.5, J−0.5) at the position (I + 0.5, J−0.5) of the black circle 84 is the position (x, y) of the white circle 83 of interest. ) Is considered to be larger than the pixel value Gobs (k, ig, jg). Further, the true green light amount Lg (I + 0.5, J−0.5) at the position (I + 0.5, J−0.5) of the black circle 84 and the pixel value Gobs at the position (x, y) of the white circle 83. The difference in the light amount (pixel value) from (k, ig, jg) depends on the difference (EG2′−EG2) between the average values EG2 ′ and EG2.

また、黒丸87の位置(I−0.5,J+0.5)における真の緑色の光量Lg(I−0.5,J+0.5)は、注目している白丸83の位置(x,y)で観測される画素値Gobs(k,ig,jg)よりも小さいと考えられる。また、黒丸87の位置(I−0.5,J+0.5)における真の緑色の光量Lg(I−0.5,J+0.5)と、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)との光量(画素値)の差は、平均値EG2'とEG2との差(EG2'−EG2)に依存する。   The true green light quantity Lg (I-0.5, J + 0.5) at the position (I-0.5, J + 0.5) of the black circle 87 is the position (x, y) of the white circle 83 of interest. Is considered to be smaller than the pixel value Gobs (k, ig, jg) observed in FIG. Further, the true green light amount Lg (I-0.5, J + 0.5) at the position (I−0.5, J + 0.5) of the black circle 87 and the pixel value Gobs at the position (x, y) of the white circle 83. The difference in the light amount (pixel value) from (k, ig, jg) depends on the difference (EG2′−EG2) between the average values EG2 ′ and EG2.

そこで、演算回路24は、注目している白丸83の位置(x,y)の画素値Gobs(k,ig,jg)を通り、黒丸84の位置(I+0.5,J−0.5)と黒丸87の位置(I−0.5,J+0.5)を結ぶ領域A11の対角方向に傾きpの平面Q3を求める。ここで、p=(EG2'−EG2)÷2√2である。つまり、傾きpは、図30の右上側領域113の画素値の平均値EG2'と左下側領域111の画素値の平均値EG2との差を、黒丸84の位置(I+0.5,J−0.5)と黒丸87の位置(I−0.5,J+0.5)を結ぶ領域A11の対角方向の、右上側領域113の領域A20と左下側領域111の領域A02との中心位置どうしの距離である2√2で除算して求められる。傾きpは、左上から右下方向のエッジ部分における、そのエッジと垂直な方向の光量(画素値)の変化の度合い、つまり、エッジの傾きを表す。   Therefore, the arithmetic circuit 24 passes through the pixel value Gobs (k, ig, jg) at the position (x, y) of the white circle 83 of interest, and the position (I + 0.5, J−0.5) of the black circle 84. A plane Q3 having a slope p in the diagonal direction of the area A11 connecting the positions (I−0.5, J + 0.5) of the black circle 87 is obtained. Here, p = (EG2′−EG2) ÷ 2√2. That is, the slope p is the difference between the average value EG2 ′ of the pixel values in the upper right region 113 and the average value EG2 of the pixel values in the lower left region 111 in FIG. 30, and the position of the black circle 84 (I + 0.5, J−0). .5) and the center position of the region A20 of the upper right region 113 and the region A02 of the lower left region 111 in the diagonal direction of the region A11 connecting the position (I−0.5, J + 0.5) of the black circle 87. It is obtained by dividing by the distance 2√2. The inclination p represents the degree of change in the amount of light (pixel value) in the direction perpendicular to the edge at the edge portion from the upper left to the lower right, that is, the inclination of the edge.

そして、演算回路24は、黒丸85の位置(I−0.5,J−0.5)における平面Q3上の値(画素値)を求め、その値を画素値Gobs0(k,ig,jg)とする。また、演算回路24は、黒丸87の位置(I−0.5,J+0.5)における平面Q3上の値(画素値)を求め、その値を画素値Gobs1(k,ig,jg)とする。同様に、演算回路24は、黒丸84の位置(I+0.5,J−0.5)における平面Q3上の値(画素値)と、および黒丸86の位置(I+0.5,J+0.5)における平面Q3上の値(画素値)を求め、それらの値をそれぞれ画素値Gobs2(k,ig,jg)と、画素値Gobs3(k,ig,jg)とする。   Then, the arithmetic circuit 24 obtains a value (pixel value) on the plane Q3 at the position (I-0.5, J-0.5) of the black circle 85, and obtains the value as a pixel value Gobs0 (k, ig, jg). And Further, the arithmetic circuit 24 obtains a value (pixel value) on the plane Q3 at the position (I−0.5, J + 0.5) of the black circle 87, and sets the value as the pixel value Gobs1 (k, ig, jg). . Similarly, the arithmetic circuit 24 calculates the value (pixel value) on the plane Q3 at the position (I + 0.5, J−0.5) of the black circle 84 and the position (I + 0.5, J + 0.5) of the black circle 86. Values (pixel values) on the plane Q3 are obtained, and these values are set as a pixel value Gobs2 (k, ig, jg) and a pixel value Gobs3 (k, ig, jg), respectively.

ここで、平面Q3は、黒丸84の位置(I+0.5,J−0.5)と黒丸87の位置(I−0.5,J+0.5)を結ぶ領域A11の対角方向についてのみ傾きpを有しているので、画素値Gobs0(k,ig,jg)と画素値Gobs3(k,ig,jg)とは等しい。   Here, the plane Q3 is inclined only in the diagonal direction of the region A11 connecting the position of the black circle 84 (I + 0.5, J-0.5) and the position of the black circle 87 (I-0.5, J + 0.5). Therefore, the pixel value Gobs0 (k, ig, jg) is equal to the pixel value Gobs3 (k, ig, jg).

「左上から右下方向のエッジ」においても、図32の「縦方向のエッジ」の場合と同様に、黒丸84の位置(I+0.5,J−0.5)を、位置(I',J')として注目した場合、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)の代わりに、注目している黒丸84の位置(I+0.5,J−0.5)における平面Q3上の値(画素値)である画素値Gobs2(k,ig,jg)が、式(25)に代入される。   Also in the “edge from the upper left to the lower right”, the position (I + 0.5, J−0.5) of the black circle 84 is changed to the position (I ′, J) as in the case of the “vertical edge” in FIG. When attention is paid to '), instead of the pixel value Gobs (k, ig, jg) at the position (x, y) of the white circle 83, the position of the black circle 84 of interest (I + 0.5, J-0.5) A pixel value Gobs2 (k, ig, jg), which is a value (pixel value) on the plane Q3, is substituted into Expression (25).

また、黒丸85の位置(I−0.5,J−0.5)を、位置(I',J')として注目した場合、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)の代わりに、注目している黒丸85の位置(I−0.5,J−0.5)における平面Q3上の値(画素値)である画素値Gobs0(k,ig,jg)が、式(25)に代入される。   When attention is paid to the position (I−0.5, J−0.5) of the black circle 85 as the position (I ′, J ′), the pixel value Gobs (k, k) of the position (x, y) of the white circle 83 is obtained. In place of (ig, jg), a pixel value Gobs0 (k, ig, jg) which is a value (pixel value) on the plane Q3 at the position (I-0.5, J-0.5) of the black circle 85 of interest. ) Is substituted into equation (25).

さらに、黒丸86の位置(I+0.5,J+0.5)を、位置(I',J')として注目した場合、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)の代わりに、注目している黒丸86の位置(I+0.5,J+0.5)における平面Q3上の値(画素値)である画素値Gobs3(k,ig,jg)が、式(25)に代入される。   Further, when attention is paid to the position (I + 0.5, J + 0.5) of the black circle 86 as the position (I ′, J ′), the pixel value Gobs (k, ig, jg) of the position (x, y) of the white circle 83 is obtained. Instead of the pixel value Gobs3 (k, ig, jg) which is the value (pixel value) on the plane Q3 at the position (I + 0.5, J + 0.5) of the black circle 86 of interest. Assigned.

また、黒丸87の位置(I−0.5,J+0.5)を、位置(I',J')として注目した場合、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)の代わりに、注目している黒丸87の位置(I−0.5,J+0.5)における平面Q3上の値(画素値)である画素値Gobs1(k,ig,jg)が、式(25)に代入される。   When attention is paid to the position (I−0.5, J + 0.5) of the black circle 87 as the position (I ′, J ′), the pixel value Gobs (k, ig, In place of jg), a pixel value Gobs1 (k, ig, jg) which is a value (pixel value) on the plane Q3 at the position (I−0.5, J + 0.5) of the black circle 87 of interest Substituted in (25).

以上のように、左上から右下方向のエッジ(緑色の光量の急峻な変化)がある位置で観測された画素値Gobs(k,ig,jg)(図34の白丸83の位置の画素値)を、そのエッジの傾き(急峻度合い)pに応じた画素値(Gobs0(k,ig,jg),Gobs1(k,ig,jg),Gobs2(k,ig,jg)、またはGobs3(k,ig,jg))に変更(補正)し、その変更した画素値を式(25)に代入することにより、バネモデルにおいて、図23における物体VとしてのLg(I',J')が適切な位置に引っ張られ、より正確な(鮮明な)真の緑色の光量Lg(I',J')を求めることができる。   As described above, the pixel value Gobs (k, ig, jg) (pixel value at the position of the white circle 83 in FIG. 34) observed at a position where there is an edge from the upper left to the lower right (a steep change in the amount of green light). Is a pixel value (Gobs0 (k, ig, jg), Gobs1 (k, ig, jg), Gobs2 (k, ig, jg), or Gobs3 (k, ig) corresponding to the inclination (steepness) p of the edge. , Jg)), and by substituting the changed pixel value into equation (25), Lg (I ′, J ′) as the object V in FIG. It is possible to obtain a more accurate (clear) true green light amount Lg (I ′, J ′) by being pulled.

図35は、図31で示した、「右上から左下方向のエッジ」が検出された場合の、注目している白丸83の位置を含む領域A11を示している。図中の、1軸は基準座標系におけるX方向を、X方向と垂直な軸が基準座標系におけるY方向を、X方向およびY方向と垂直な軸が画素値を、それぞれ表している。   FIG. 35 illustrates a region A11 including the position of the white circle 83 of interest when the “edge from the upper right to the lower left direction” illustrated in FIG. 31 is detected. In the figure, one axis represents the X direction in the reference coordinate system, the axis perpendicular to the X direction represents the Y direction in the reference coordinate system, and the axis perpendicular to the X direction and the Y direction represents the pixel value.

図35では、エッジ判定領域について求められた平均値EG3,EG3',EG3”と分散SG3,SG3'が、式「EG3'+SG3'<EG3”<EG3−SG3」を満たし、従って、「右上から左下方向のエッジ」が存在している。   In FIG. 35, the average values EG3, EG3 ′, EG3 ″ determined for the edge determination region and the variances SG3, SG3 ′ satisfy the expression “EG3 ′ + SG3 ′ <EG3” <EG3-SG3 ”. There is an “lower left edge”.

この場合、黒丸85の位置(I−0.5,J−0.5)における真の緑色の光量Lg(I−0.5,J−0.5)は、注目している白丸83の位置(x,y)で観測される画素値Gobs(k,ig,jg)よりも大きいと考えられる。また、黒丸85の位置(I−0.5,J−0.5)における真の緑色の光量Lg(I−0.5,J−0.5)と、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)との光量(画素値)の差は、平均値EG3とEG3'との差(EG3−EG3')に依存する。   In this case, the true green light quantity Lg (I-0.5, J-0.5) at the position (I-0.5, J-0.5) of the black circle 85 is the position of the white circle 83 of interest. It is considered that the pixel value Gobs (k, ig, jg) observed at (x, y) is larger. Further, the true green light quantity Lg (I-0.5, J-0.5) at the position (I-0.5, J-0.5) of the black circle 85 and the position (x, y) of the white circle 83. The difference in the light amount (pixel value) from the pixel value Gobs (k, ig, jg) depends on the difference between the average values EG3 and EG3 ′ (EG3−EG3 ′).

また、黒丸86の位置(I+0.5,J+0.5)における真の緑色の光量Lg(I+0.5,J+0.5)は、注目している白丸83の位置(x,y)で観測される画素値Gobs(k,ig,jg)よりも小さいと考えられる。また、黒丸86の位置(I+0.5,J+0.5)における真の緑色の光量Lg(I+0.5,J+0.5)と、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)との光量(画素値)の差は、平均値EG3とEG3'との差(EG3−EG3')に依存する。   Further, the true green light amount Lg (I + 0.5, J + 0.5) at the position (I + 0.5, J + 0.5) of the black circle 86 is observed at the position (x, y) of the white circle 83 of interest. It is considered to be smaller than the pixel value Gobs (k, ig, jg). Further, the true green light amount Lg (I + 0.5, J + 0.5) at the position (I + 0.5, J + 0.5) of the black circle 86 and the pixel value Gobs (k, ig) at the position (x, y) of the white circle 83. , Jg) depends on the difference (EG3−EG3 ′) between the average values EG3 and EG3 ′.

そこで、演算回路24は、注目している白丸83の位置(x,y)の画素値Gobs(k,ig,jg)を通り、黒丸85の位置(I−0.5,J−0.5)と黒丸86の位置(I+0.5,J+0.5)を結ぶ領域A11の対角方向に傾きpの平面Q4を求める。ここで、p=(EG3−EG3')÷2√2である。つまり、傾きpは、図31の左上側領域121の画素値の平均値EG3と右下側領域123の画素値の平均値EG3'との差を、黒丸85の位置(I−0.5,J−0.5)と黒丸86の位置(I+0.5,J+0.5)を結ぶ領域A11の対角方向の、左上側領域121の領域A00と右下側領域123の領域A22との中心位置どうしの距離である2√2で除算して求められる。傾きpは、右上から左下方向のエッジ部分における、そのエッジと垂直な方向の光量(画素値)の変化の度合い、つまり、エッジの傾きを表す。   Therefore, the arithmetic circuit 24 passes through the pixel value Gobs (k, ig, jg) at the position (x, y) of the white circle 83 of interest and passes through the position (I-0.5, J-0.5) of the black circle 85. ) And the position (I + 0.5, J + 0.5) of the black circle 86, a plane Q4 having a slope p in the diagonal direction of the area A11 is obtained. Here, p = (EG3−EG3 ′) ÷ 2√2. In other words, the slope p is the difference between the average value EG3 of the pixel values in the upper left region 121 and the average value EG3 ′ of the pixel values in the lower right region 123 in FIG. J-0.5) and the center position of the region A00 of the upper left region 121 and the region A22 of the lower right region 123 in the diagonal direction of the region A11 connecting the positions (I + 0.5, J + 0.5) of the black circle 86 It is obtained by dividing by the distance of 2√2. The inclination p represents the degree of change in the amount of light (pixel value) in the direction perpendicular to the edge at the edge portion from the upper right to the lower left, that is, the inclination of the edge.

そして、演算回路24は、黒丸85の位置(I−0.5,J−0.5)における平面Q4上の値(画素値)を求め、その値を画素値Gobs0(k,ig,jg)とする。また、演算回路24は、黒丸87の位置(I−0.5,J+0.5)における平面Q4上の値(画素値)を求め、その値を画素値Gobs1(k,ig,jg)とする。同様に、演算回路24は、黒丸84の位置(I+0.5,J−0.5)における平面Q4上の値(画素値)と、および黒丸86の位置(I+0.5,J+0.5)における平面Q4上の値(画素値)を求め、それらの値をそれぞれ画素値Gobs2(k,ig,jg)と、画素値Gobs3(k,ig,jg)とする。   Then, the arithmetic circuit 24 obtains a value (pixel value) on the plane Q4 at the position (I-0.5, J-0.5) of the black circle 85, and obtains the value as a pixel value Gobs0 (k, ig, jg). And Further, the arithmetic circuit 24 obtains a value (pixel value) on the plane Q4 at the position (I−0.5, J + 0.5) of the black circle 87, and sets the value as the pixel value Gobs1 (k, ig, jg). . Similarly, the arithmetic circuit 24 calculates the value (pixel value) on the plane Q4 at the position (I + 0.5, J−0.5) of the black circle 84 and the position (I + 0.5, J + 0.5) of the black circle 86. Values (pixel values) on the plane Q4 are obtained, and these values are set as a pixel value Gobs2 (k, ig, jg) and a pixel value Gobs3 (k, ig, jg), respectively.

ここで、平面Q4は、黒丸85の位置(I−0.5,J−0.5)と黒丸86の位置(I+0.5,J+0.5)を結ぶ領域A11の対角方向についてのみ傾きpを有しているので、Gobs1(k,ig,jg)とGobs2(k,ig,jg)とは等しい。   Here, the plane Q4 is inclined only in the diagonal direction of the region A11 connecting the position of the black circle 85 (I−0.5, J−0.5) and the position of the black circle 86 (I + 0.5, J + 0.5). Therefore, Gobs1 (k, ig, jg) and Gobs2 (k, ig, jg) are equal.

「右上から左下方向のエッジ」においても、図32の「縦方向のエッジ」の場合と同様に、黒丸84の位置(I+0.5,J−0.5)を、位置(I',J')として注目した場合、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)の代わりに、注目している黒丸84の位置(I+0.5,J−0.5)における平面Q4上の値(画素値)である画素値Gobs2(k,ig,jg)が、式(25)に代入される。   Also in “the edge from the upper right to the lower left direction”, the position (I + 0.5, J−0.5) of the black circle 84 is changed to the position (I ′, J ′) as in the case of the “vertical edge” in FIG. ), Instead of the pixel value Gobs (k, ig, jg) at the position (x, y) of the white circle 83, the position at the position (I + 0.5, J-0.5) of the black circle 84 of interest. A pixel value Gobs2 (k, ig, jg), which is a value (pixel value) on the plane Q4, is substituted into Expression (25).

また、黒丸85の位置(I−0.5,J−0.5)を、位置(I',J')として注目した場合、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)の代わりに、注目している黒丸85の位置(I−0.5,J−0.5)における平面Q4上の値(画素値)である画素値Gobs0(k,ig,jg)が、式(25)に代入される。   When attention is paid to the position (I−0.5, J−0.5) of the black circle 85 as the position (I ′, J ′), the pixel value Gobs (k, k) of the position (x, y) of the white circle 83 is obtained. In place of (ig, jg), a pixel value Gobs0 (k, ig, jg) which is a value (pixel value) on the plane Q4 at the position (I-0.5, J-0.5) of the black circle 85 of interest. ) Is substituted into equation (25).

さらに、黒丸86の位置(I+0.5,J+0.5)を、位置(I',J')として注目した場合、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)の代わりに、注目している黒丸86の位置(I+0.5,J+0.5)における平面Q4上の値(画素値)である画素値Gobs3(k,ig,jg)が、式(25)に代入される。   Further, when attention is paid to the position (I + 0.5, J + 0.5) of the black circle 86 as the position (I ′, J ′), the pixel value Gobs (k, ig, jg) of the position (x, y) of the white circle 83 is obtained. Instead of the pixel value Gobs3 (k, ig, jg), which is the value (pixel value) on the plane Q4 at the position (I + 0.5, J + 0.5) of the black circle 86 of interest, in the equation (25). Assigned.

また、黒丸87の位置(I−0.5,J+0.5)を、位置(I',J')として注目した場合、白丸83の位置(x,y)の画素値Gobs(k,ig,jg)の代わりに、注目している黒丸87の位置(I−0.5,J+0.5)における平面Q4上の値(画素値)である画素値Gobs1(k,ig,jg)が、式(25)に代入される。   When attention is paid to the position (I−0.5, J + 0.5) of the black circle 87 as the position (I ′, J ′), the pixel value Gobs (k, ig, Instead of jg), the pixel value Gobs1 (k, ig, jg), which is the value (pixel value) on the plane Q4 at the position (I−0.5, J + 0.5) of the black circle 87 of interest, is expressed by the equation Substituted in (25).

以上のように、右上から左下方向のエッジ(緑色の光量の急峻な変化)がある位置で観測された画素値Gobs(k,ig,jg)(図35の白丸83の位置の画素値)を、そのエッジの傾き(急峻度合い)pに応じた画素値(Gobs0(k,ig,jg),Gobs1(k,ig,jg),Gobs2(k,ig,jg)、またはGobs3(k,ig,jg))に変更(補正)し、その変更した画素値を式(25)に代入することにより、バネモデルにおいて、図23における物体VとしてのLg(I',J')が適切な位置に引っ張られ、より正確な(鮮明な)真の緑色の光量Lg(I',J')を求めることができる。   As described above, the pixel value Gobs (k, ig, jg) (pixel value at the position of the white circle 83 in FIG. 35) observed at a position where there is an edge from the upper right to the lower left direction (a sharp change in the amount of green light). , Pixel values (Gobs0 (k, ig, jg), Gobs1 (k, ig, jg), Gobs2 (k, ig, jg), or Gobs3 (k, ig, jg)), and by substituting the changed pixel value into equation (25), Lg (I ′, J ′) as the object V in FIG. 23 is pulled to an appropriate position in the spring model. Thus, a more accurate (clear) true green light amount Lg (I ′, J ′) can be obtained.

以上のことから、第3実施の形態の式(25)に対応する、第6実施の形態の緑色の光量のバネ関係式は、次のように表すことができる。   From the above, the spring relational expression of the green light quantity in the sixth embodiment corresponding to the expression (25) in the third embodiment can be expressed as follows.

なお、緑色以外の真の赤色の光量Lr(I',J')と真の青色の光量Lb(I',J')も、真の緑色の光量Lg(I',J')と同様にして求めることができる。   The true red light quantity Lr (I ′, J ′) and the true blue light quantity Lb (I ′, J ′) other than green are also set in the same manner as the true green light quantity Lg (I ′, J ′). Can be obtained.

Figure 0004613510
・・・(34)
Figure 0004613510
... (34)

ここで、式(34)におけるΣは、ある位置(I',J')に対して、k枚目の撮像画像上の位置(ig−0.5,jg−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ig,jg)の組の個数分の和を表す。   Here, Σ in equation (34) is the position (ig−0.5, jg−0.5) on the k-th captured image with respect to a certain position (I ′, J ′). The position (x, y) on the reference coordinates converted by θk, Tkx, Tky, Sk) satisfies I′−1 ≦ x <I ′ + 1, J′−1 ≦ y <J ′ + 1 (k, ig). , Jg) represents the sum of the number of sets.

但し、式(34)を構成する(k,ig,jg)の組の、ある(k,ig,jg)の画素値Gobs(k,ig,jg)の位置に、「縦方向のエッジ」、「横方向のエッジ」、「左上から右下方向のエッジ」、「右下から左下方向のエッジ」のうちのいずれかが検出された場合、式(34)のGobs'(k,ig,jg)には、その(k,ig,jg)の画素値Gobs(k,ig,jg)の代わりに、エッジの傾きpを有し、画素値Gobs(k,ig,jg)を通る平面の、位置(I',J')上の値(画素値)が用いられる。また、式(34)を構成する(k,ig,jg)の組の、ある(k,ig,jg)の画素値Gobs(k,ig,jg)の位置に、「縦方向のエッジ」、「横方向のエッジ」、「左上から右下方向のエッジ」、「右下から左下方向のエッジ」のいずれも検出されなかった場合、式(34)のGobs'(k,ig,jg)には、そのまま(k,ig,jg)の画素値Gobs(k,ig,jg)が用いられる。   However, at the position of a certain (k, ig, jg) pixel value Gobs (k, ig, jg) in the set of (k, ig, jg) constituting the expression (34), When any one of “lateral edge”, “upper left to lower right edge”, and “lower right to lower left edge” is detected, Gobs ′ (k, ig, jg) in Expression (34) ), Instead of the pixel value Gobs (k, ig, jg) of the (k, ig, jg), the plane having the edge inclination p and passing through the pixel value Gobs (k, ig, jg) A value (pixel value) on the position (I ′, J ′) is used. In addition, at the position of a certain (k, ig, jg) pixel value Gobs (k, ig, jg) in the set of (k, ig, jg) constituting the expression (34), “vertical edge”, When none of “lateral edge”, “upper left to lower right edge”, and “lower right to lower left edge” is detected, Gobs ′ (k, ig, jg) in Expression (34) The pixel value Gobs (k, ig, jg) of (k, ig, jg) is used as is.

第3実施の形態の式(26),(27)に対応する、第6実施の形態の赤色、青色の光量のバネ関係式も、同様に、式(35),(36)のように、それぞれ表すことができる。   Similarly, the spring relational expressions of the red and blue light amounts of the sixth embodiment corresponding to the expressions (26) and (27) of the third embodiment are similarly expressed by the expressions (35) and (36) as follows: Each can be represented.

Figure 0004613510
・・・(35)
Figure 0004613510
... (35)

ここで、式(35)におけるΣは、ある位置(I',J')に対して、k枚目の撮像画像上の位置(ir−0.5,jr−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ir,jr)の組の個数分の和を表す。   Here, Σ in equation (35) is the position (ir−0.5, jr−0.5) on the k-th captured image with respect to a certain position (I ′, J ′). The position (x, y) on the reference coordinates converted by θk, Tkx, Tky, Sk) satisfies I′−1 ≦ x <I ′ + 1, J′−1 ≦ y <J ′ + 1 (k, ir , Jr) represents the sum of the number of sets.

但し、式(35)を構成する(k,ir,jr)の組の、ある(k,ir,jr)の画素値Robs(k,ir,jr)の位置に、「縦方向のエッジ」、「横方向のエッジ」、「左上から右下方向のエッジ」、「右下から左下方向のエッジ」のうちのいずれかが検出された場合、式(35)のRobs'(k,ir,jr)には、その(k,ir,jr)の画素値Robs(k,ir,jr)の代わりに、エッジの傾きpを有し、画素値Robs(k,ir,jr)を通る平面の、位置(I',J')上の値(画素値)が用いられる。また、式(35)を構成する(k,ig,jg)の組の、ある(k,ig,jg)の画素値Gobs(k,ig,jg)の位置に、「縦方向のエッジ」、「横方向のエッジ」、「左上から右下方向のエッジ」、「右下から左下方向のエッジ」のいずれも検出されなかった場合、式(35)のRobs'(k,ir,jr)には、そのまま(k,ir,jr)の画素値Robs(k,ir,jr)が用いられる。   However, at the position of a certain (k, ir, jr) pixel value Robs (k, ir, jr) in the set of (k, ir, jr) constituting the expression (35), the “longitudinal edge”, When any one of “lateral edge”, “upper left to lower right edge”, and “lower right to lower left edge” is detected, Robs ′ (k, ir, jr) in Expression (35) ), Instead of the pixel value Robs (k, ir, jr) of the (k, ir, jr), the plane having the slope p of the edge and passing through the pixel value Robs (k, ir, jr) A value (pixel value) on the position (I ′, J ′) is used. Further, in the position of a certain (k, ig, jg) pixel value Gobs (k, ig, jg) in the set of (k, ig, jg) constituting the expression (35), the “vertical edge”, When none of “lateral edge”, “upper left to lower right edge”, and “lower right to lower left edge” is detected, Robs ′ (k, ir, jr) in Expression (35) The pixel value Robs (k, ir, jr) of (k, ir, jr) is used as it is.

Figure 0004613510
・・・(36)
Figure 0004613510
... (36)

ここで、式(36)におけるΣは、ある位置(I',J')に対して、k枚目の撮像画像上の位置(ib−0.5,jb−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ib,jb)の組の個数分の和を表す。   Here, Σ in Expression (36) is a position (ib−0.5, jb−0.5) on the k-th captured image with respect to a certain position (I ′, J ′). The position (x, y) on the reference coordinates converted by θk, Tkx, Tky, Sk) satisfies I′−1 ≦ x <I ′ + 1, J′−1 ≦ y <J ′ + 1 (k, ib , Jb) represents the sum of the number of sets.

但し、式(36)を構成する(k,ib,jb)の組の、ある(k,ib,jb)の画素値Bobs(k,ib,jb)の位置に、「縦方向のエッジ」、「横方向のエッジ」、「左上から右下方向のエッジ」、「右下から左下方向のエッジ」のうちのいずれかが検出された場合、式(36)のBobs'(k,ib,jb)には、その(k,ib,jb)の画素値Bobs(k,ib,jb)の代わりに、エッジの傾きpを有し、画素値Bobs(k,ib,jb)を通る平面の、位置(I',J')上の値(画素値)が用いられる。また、式(36)を構成する(k,ig,jg)の組の、ある(k,ig,jg)の画素値Gobs(k,ig,jg)の位置に、「縦方向のエッジ」、「横方向のエッジ」、「左上から右下方向のエッジ」、「右下から左下方向のエッジ」のいずれも検出されなかった場合、式(36)のBobs'(k,ib,jb)には、そのまま(k,ib,jb)の画素値Bobs(k,ib,jb)が用いられる。   However, at the position of a certain (k, ib, jb) pixel value Bobs (k, ib, jb) in the set of (k, ib, jb) constituting the expression (36), “vertical edge”, When any one of “lateral edge”, “upper left to lower right edge”, and “lower right to lower left edge” is detected, Bobs ′ (k, ib, jb) in Expression (36) ), Instead of the pixel value Bobs (k, ib, jb) of the (k, ib, jb), the plane having the slope p of the edge and passing through the pixel value Bobs (k, ib, jb) A value (pixel value) on the position (I ′, J ′) is used. In addition, at the position of a certain (k, ig, jg) pixel value Gobs (k, ig, jg) in the set of (k, ig, jg) constituting the expression (36), “vertical edge”, When none of the “lateral edge”, “upper left to lower right edge”, and “lower right to lower left edge” is detected, Bobs ′ (k, ib, jb) in Expression (36) The pixel value Bobs (k, ib, jb) of (k, ib, jb) is used as it is.

図36のフローチャートを参照して、図2のステップS4における画像推定処理の第6実施の形態について説明する。   A sixth embodiment of the image estimation process in step S4 of FIG. 2 will be described with reference to the flowchart of FIG.

初めに、ステップS141において、演算回路24は、基準座標系上のある位置(I',J')に注目する(以下、注目位置(I',J')と称する)。ここで、注目位置(I',J')は、基準画像である1枚目の撮像画像の「i番目、j番目の画素」の画素中心(i−0.5,j−0.5)を表している。   First, in step S141, the arithmetic circuit 24 pays attention to a certain position (I ′, J ′) on the reference coordinate system (hereinafter referred to as attention position (I ′, J ′)). Here, the target position (I ′, J ′) is the pixel center (i−0.5, j−0.5) of the “i-th and j-th pixels” of the first captured image that is the reference image. Represents.

そして、ステップS141からS142に進み、演算回路24は、注目位置(I',J')に対して、k枚目画像の緑色の成分を受光する画素の中心位置(ig−0.5,jg−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ig,jg)の組を、1乃至N枚目画像についてすべて求め、ステップS143に進む。   Then, the process proceeds from step S141 to S142, and the arithmetic circuit 24 determines the center position (ig−0.5, jg) of the pixel that receives the green component of the k-th image with respect to the target position (I ′, J ′). −0.5) is converted to the position (x, y) on the reference coordinate system obtained by converting the conversion parameters (θk, Tkx, Tky, Sk) by I′−1 ≦ x <I ′ + 1, J′−1 ≦ y. <A set of (k, ig, jg) that satisfies J ′ + 1 is obtained for all the first to Nth images, and the process proceeds to step S143.

ステップS143において、演算回路24は、ステップS142で求めた(k,ig,jg)の組それぞれに対応する基準座標系上の位置について、「縦方向のエッジ」、「横方向のエッジ」、「左上から右下方向のエッジ」、「右下から左下方向のエッジ」のうちのいずれかがあるかどうかを判定する。ステップS143で、上述の4つの方向のいずれかのエッジがあると判定された場合、ステップS144に進み、演算回路24は、エッジがある位置に対応する(k,ig,jg)の組それぞれについて、その画素値Gobs(k,ig,jg)を通り、エッジの傾きpを有する平面を作成する(求める)。また、演算回路24は、注目位置(I',J')における平面上の値(画素値)を演算し、ステップS144からS145に進む。   In step S143, the arithmetic circuit 24 “vertical edge”, “lateral edge”, “horizontal edge”, “position in the reference coordinate system corresponding to each (k, ig, jg) pair obtained in step S142”. It is determined whether there is any of “edge from upper left to lower right direction” and “edge from lower right to lower left direction”. If it is determined in step S143 that there is an edge in any one of the four directions described above, the process proceeds to step S144, and the arithmetic circuit 24 determines each pair of (k, ig, jg) corresponding to the position where the edge exists. Then, a plane passing through the pixel value Gobs (k, ig, jg) and having an edge inclination p is created (obtained). The arithmetic circuit 24 calculates a value (pixel value) on the plane at the target position (I ′, J ′), and proceeds from step S144 to S145.

また、ステップS143で上述の4つの方向のいずれのエッジもないと判定された場合、または、ステップS144の処理の後、ステップS145において、演算回路24は、ステップS142で求めたすべての(k,ig,jg)の組を用いて、式(34)で表される緑色の光量のバネ関係式を生成して、ステップS146に進む。ここで、ステップS143において、ある(k,ig,jg)に対応する基準座標系上の位置に、上述の4つの方向のいずれかのエッジがあると判定された画素値Gobs(k,ig,jg)については、演算回路24は、ステップS144で求められた注目位置(I',J')における平面上の値(画素値)を、その(k,ig,jg)の画素値Gobs(k,ig,jg)として、式(34)のGobs'(k,ig,jg)に代入する。また、ステップS143において、ある(k,ig,jg)に対応する基準座標系上の位置に、上述の4つの方向のいずれのエッジもないと判定された画素値Gobs(k,ig,jg)については、演算回路24は、その(k,ig,jg)の画素値Gobs(k,ig,jg)を、そのまま式(34)のGobs'(k,ig,jg)に代入する。   When it is determined in step S143 that there is no edge in any of the above four directions, or after the processing in step S144, in step S145, the arithmetic circuit 24 determines all the (k, ig, jg) is used to generate a spring relational expression of the green light quantity represented by Expression (34), and the process proceeds to step S146. Here, in step S143, the pixel value Gobs (k, ig, jg) determined that there is an edge in any of the above four directions at a position on the reference coordinate system corresponding to a certain (k, ig, jg). For jg), the arithmetic circuit 24 calculates the value (pixel value) on the plane at the position of interest (I ′, J ′) obtained in step S144 as the pixel value Gobs (k) of (k, ig, jg). , Ig, jg) is substituted into Gobs ′ (k, ig, jg) in equation (34). In step S143, the pixel value Gobs (k, ig, jg) determined to have no edge in any of the above four directions at the position on the reference coordinate system corresponding to a certain (k, ig, jg). , The arithmetic circuit 24 substitutes the pixel value Gobs (k, ig, jg) of the (k, ig, jg) into Gobs ′ (k, ig, jg) in the equation (34) as it is.

ステップS146において、演算回路24は、注目位置(I',J')に対して、k枚目画像の赤色の成分を受光する画素の中心位置(ir−0.5,jr−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ir,jr)の組を、1乃至N枚目画像についてすべて求め、ステップS147に進む。   In step S146, the arithmetic circuit 24 receives the center position (ir−0.5, jr−0.5) of the pixel that receives the red component of the kth image with respect to the target position (I ′, J ′). The position (x, y) on the reference coordinate system obtained by converting the data with the conversion parameters (θk, Tkx, Tky, Sk) satisfies I′−1 ≦ x <I ′ + 1, J′−1 ≦ y <J ′ + 1. All sets (k, ir, jr) that satisfy (k, ir, jr) are obtained for the first to Nth images, and the process proceeds to step S147.

ステップS147において、演算回路24は、ステップS146で求めた(k,ir,jr)の組それぞれに対応する基準座標系上の位置について、「縦方向のエッジ」、「横方向のエッジ」、「左上から右下方向のエッジ」、「右下から左下方向のエッジ」のうちのいずれかがあるかどうかを判定する。ステップS147で、上述の4つの方向のいずれかのエッジがあると判定された場合、ステップS148に進み、演算回路24は、エッジがある位置に対応する(k,ir,jr)の組それぞれについて、その画素値Robs(k,ir,jr)を通り、エッジの傾きpを有する平面を作成する(求める)。また、演算回路24は、注目位置(I',J')における平面上の値(画素値)を演算し、ステップS148からS149に進む。   In step S147, the arithmetic circuit 24 “vertical edge”, “lateral edge”, “horizontal edge”, “position in the reference coordinate system corresponding to each (k, ir, jr) pair obtained in step S146”. It is determined whether there is any of “edge from upper left to lower right direction” and “edge from lower right to lower left direction”. If it is determined in step S147 that there is an edge in one of the four directions described above, the process proceeds to step S148, and the arithmetic circuit 24 determines each of the (k, ir, jr) pairs corresponding to the position where the edge exists. Then, a plane passing through the pixel value Robs (k, ir, jr) and having an edge inclination p is created (obtained). Further, the arithmetic circuit 24 calculates a value (pixel value) on the plane at the position of interest (I ′, J ′), and proceeds from step S148 to S149.

また、ステップS147で上述の4つの方向のいずれのエッジもないと判定された場合、および、ステップS148の処理の後、ステップS149において、演算回路24は、ステップS146で求めたすべての(k,ir,jr)の組を用いて、式(35)で表される赤色の光量のバネ関係式を生成して、ステップS150に進む。ここで、ステップS147において、ある(k,ir,jr)に対応する基準座標系上の位置に、上述の4つの方向のいずれかのエッジがあると判定された画素値Robs(k,ir,jr)については、演算回路24は、ステップS148で求められた注目位置(I',J')における平面上の値(画素値)を、その(k,ir,jr)の画素値Robs(k,ir,jr)として、式(35)のRobs'(k,ir,jr)に代入する。また、ステップS147において、ある(k,ir,jr)に対応する基準座標系上の位置に、上述の4つの方向のいずれのエッジもないと判定された画素値Robs(k,ir,jr)については、演算回路24は、その(k,ir,jr)の画素値Robs(k,ir,jr)を、そのまま式(35)のRobs'(k,ir,jr)に代入する。   When it is determined in step S147 that there is no edge in any of the four directions described above, and after the processing in step S148, in step S149, the arithmetic circuit 24 determines all the (k, Using the set of ir, jr), the spring relational expression of the red light quantity represented by the expression (35) is generated, and the process proceeds to step S150. Here, in step S147, it is determined that the pixel value Robs (k, ir, jr) is determined to have an edge in any of the above four directions at a position on the reference coordinate system corresponding to a certain (k, ir, jr). For jr), the arithmetic circuit 24 calculates the value (pixel value) on the plane at the position of interest (I ′, J ′) obtained in step S148 as the pixel value Robs (k) of (k, ir, jr). , Ir, jr) is substituted into Robs ′ (k, ir, jr) in equation (35). In step S147, the pixel value Robs (k, ir, jr) determined to have no edge in any of the above four directions at the position on the reference coordinate system corresponding to a certain (k, ir, jr). , The arithmetic circuit 24 substitutes the pixel value Robs (k, ir, jr) of the (k, ir, jr) into Robs ′ (k, ir, jr) in the equation (35) as it is.

ステップS150において、演算回路24は、注目位置(I',J')に対して、k枚目画像の青色の成分を受光する画素の中心位置(ib−0.5,jb−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ib,jb)の組を、1乃至N枚目画像についてすべて求め、ステップS151に進む。   In step S150, the arithmetic circuit 24 receives the center position (ib−0.5, jb−0.5) of the pixel that receives the blue component of the kth image with respect to the target position (I ′, J ′). The position (x, y) on the reference coordinate system obtained by converting the data with the conversion parameters (θk, Tkx, Tky, Sk) satisfies I′−1 ≦ x <I ′ + 1, J′−1 ≦ y <J ′ + 1. All the sets of (k, ib, jb) that satisfy (k, ib, jb) are obtained for the first to Nth images, and the process proceeds to step S151.

ステップS151において、演算回路24は、ステップS152で求めた(k,ib,jb)の組それぞれに対応する基準座標系上の位置について、「縦方向のエッジ」、「横方向のエッジ」、「左上から右下方向のエッジ」、「右下から左下方向のエッジ」のうちのいずれかがあるかどうかを判定する。ステップS151で、上述の4つの方向のいずれかのエッジがあると判定された場合、ステップS152に進み、演算回路24は、エッジがある位置に対応する(k,ib,jb)の組それぞれについて、その画素値Bobs(k,ib,jb)を通り、エッジの傾きpを有する平面を作成する(求める)。また、演算回路24は、注目位置(I',J')における平面上の値(画素値)を演算し、ステップS152からS153に進む。   In step S151, the arithmetic circuit 24 “vertical edge”, “horizontal edge”, “horizontal edge”, “position in the reference coordinate system corresponding to each (k, ib, jb) pair obtained in step S152”. It is determined whether there is any of “edge from upper left to lower right direction” and “edge from lower right to lower left direction”. If it is determined in step S151 that there is an edge in any one of the four directions described above, the operation proceeds to step S152, and the arithmetic circuit 24 determines each pair of (k, ib, jb) corresponding to the position where the edge exists. Then, a plane passing through the pixel value Bobs (k, ib, jb) and having an edge inclination p is created (obtained). In addition, the arithmetic circuit 24 calculates a value (pixel value) on the plane at the position of interest (I ′, J ′), and proceeds from step S152 to S153.

また、ステップS151で上述の4つの方向のいずれのエッジもないと判定された場合、および、ステップS152の処理の後、ステップS153において、演算回路24は、ステップS150で求めたすべての(k,ib,jb)の組を用いて、式(36)で表される青色の光量のバネ関係式を生成して、ステップS154に進む。ここで、ステップS151において、ある(k,ib,jb)に対応する基準座標系上の位置に、上述の4つの方向のいずれかのエッジがあると判定された画素値Bobs(k,ib,jb)については、演算回路24は、ステップS152で求められた注目位置(I',J')における平面上の値(画素値)を、その(k,ib,jb)の画素値Bobs(k,ib,jb)として、式(36)のBobs'(k,ib,jb)に代入する。また、ステップS151において、ある(k,ib,jb)に対応する基準座標系上の位置に、上述の4つの方向のいずれのエッジもないと判定された画素値Bobs(k,ib,jb)については、演算回路24は、その(k,ib,jb)の組の画素値Bobs(k,ib,jb)を、そのまま式(36)のBobs'(k,ib,jb)に代入する。   Further, when it is determined in step S151 that there is no edge in any of the above four directions, and after the processing in step S152, in step S153, the arithmetic circuit 24 determines all the (k, Using the set of ib, jb), a spring relational expression of the blue light quantity represented by Expression (36) is generated, and the process proceeds to Step S154. Here, in step S151, it is determined that the pixel value Bobs (k, ib, jb) is determined to have an edge in any one of the above four directions at a position on the reference coordinate system corresponding to a certain (k, ib, jb). For jb), the arithmetic circuit 24 calculates the value (pixel value) on the plane at the target position (I ′, J ′) obtained in step S152 as the pixel value Bobs (k) of the (k, ib, jb). , Ib, jb) is substituted into Bobs ′ (k, ib, jb) in the equation (36). In step S151, the pixel value Bobs (k, ib, jb) determined that there is no edge in any of the above four directions at the position on the reference coordinate system corresponding to a certain (k, ib, jb). , The arithmetic circuit 24 substitutes the pixel value Bobs (k, ib, jb) of the set of (k, ib, jb) into Bobs ′ (k, ib, jb) in the equation (36) as it is.

ステップS154において、演算回路24は、ステップS145で求めた式(34)で表される緑色の光量のバネ関係式、ステップS149で求めた式(35)で表される赤色の光量のバネ関係式、ステップS153で求めた式(36)で表される青色の光量のバネ関係式を、一次方程式として解くことにより、注目位置(I',J')における真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、および真の青色の光量Lb(I',J')をそれぞれ求め、ステップS155に進む。   In step S154, the arithmetic circuit 24 calculates the green light amount spring relational expression represented by the expression (34) obtained in step S145 and the red light quantity spring relational expression represented by the expression (35) obtained in step S149. By solving the spring relational expression of the blue light quantity represented by the expression (36) obtained in step S153 as a linear equation, the true green light quantity Lg (I ′, J ′) at the target position (I ′, J ′) is obtained. J ′), the true red light amount Lr (I ′, J ′), and the true blue light amount Lb (I ′, J ′) are obtained, and the process proceeds to step S155.

ステップS155において、演算回路24は、すべての位置(I',J')を注目位置としたか、即ち、1枚目の撮像画像の画素の中心位置のすべてを注目位置(I',J')として、真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、および真の青色の光量Lb(I',J')を求めたか否かを判定する。   In step S155, the arithmetic circuit 24 sets all the positions (I ′, J ′) as the target positions, that is, sets all the center positions of the pixels of the first captured image as the target positions (I ′, J ′). ) As to whether the true green light amount Lg (I ′, J ′), the true red light amount Lr (I ′, J ′), and the true blue light amount Lb (I ′, J ′) are obtained. Determine.

ステップS155で、すべての位置(I',J')を、まだ注目位置として求めていないと判定された場合、ステップS141に戻り、ステップS141乃至S155の処理が繰り返される。即ち、演算回路24は、まだ注目していない位置(I',J')を次の注目位置(I',J')として、注目位置(I',J')における真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、および真の青色の光量Lb(I',J')をそれぞれ求める。   If it is determined in step S155 that all positions (I ′, J ′) have not yet been obtained as attention positions, the process returns to step S141, and the processes in steps S141 to S155 are repeated. That is, the arithmetic circuit 24 sets the position (I ′, J ′) that has not been noticed as the next attention position (I ′, J ′), and the true green light amount Lg at the attention position (I ′, J ′). (I ′, J ′), true red light quantity Lr (I ′, J ′), and true blue light quantity Lb (I ′, J ′) are obtained.

一方、ステップS155で、すべての位置(I',J')を注目位置としたと判定された場合、ステップS156に進み、演算回路24は、ステップS154で求めた真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、真の青色の光量Lb(I',J')から、画像(信号)を推定し、D/Aコンバータ9またはコーデック12に出力画像として供給し、処理を戻る。例えば、「i番目、j番目の画素」においては、演算回路24は、緑色の値(G信号)としてステップS154で求めた真の緑色の光量Lg(i−0.5,j−0.5)と、赤色の値(R信号)としてステップS154で求めた真の赤色の光量Lr(i−0.5,j−0.5)と、青色の値(B信号)としてステップS154で求めた真の青色の光量Lb(i−0.5,j−0.5)とから、「i番目、j番目の画素」の画像信号を推定する。そして、演算回路24は、その推定を位置(I',J')を中心位置とする画素すべてについて行うことにより、出力画像を推定する。   On the other hand, if it is determined in step S155 that all positions (I ′, J ′) are the target positions, the process proceeds to step S156, and the arithmetic circuit 24 calculates the true green light quantity Lg (I) obtained in step S154. ', J'), a true red light quantity Lr (I ', J'), and a true blue light quantity Lb (I ', J'), an image (signal) is estimated, and the D / A converter 9 or codec 12 is supplied as an output image and the process returns. For example, in the “i-th and j-th pixels”, the arithmetic circuit 24 calculates the true green light amount Lg (i−0.5, j−0.5) obtained in step S154 as a green value (G signal). ), The true red light quantity Lr (i−0.5, j−0.5) obtained in step S154 as the red value (R signal), and the blue value (B signal) obtained in step S154. From the true blue light quantity Lb (i−0.5, j−0.5), the image signal of the “i th and j th pixels” is estimated. Then, the arithmetic circuit 24 estimates the output image by performing the estimation for all the pixels having the position (I ′, J ′) as the center position.

以上のように、第6実施の形態では、エッジ部分の位置で観測された画素値については、そのエッジの傾き(急峻度合い)に応じて、バネ関係式に代入する画素値を変更することにより、より正確な(鮮明な)画像を求めることができる。   As described above, in the sixth embodiment, the pixel value observed at the position of the edge portion is changed by changing the pixel value to be substituted into the spring relational expression according to the inclination (steepness degree) of the edge. A more accurate (clear) image can be obtained.

なお、上述した例では、エッジ部分にある画素値をエッジの傾き(急峻度合い)に応じた注目位置(I',J')上の画素値に変更したが、その他、例えば、エッジ部分にある画素値をそのまま採用するが、注目位置(I',J')までの距離に応じて重みを付け(変更し)、バネ関係式でのエッジ部分にある画素値の影響を少なくするようにすることもできる。   In the above-described example, the pixel value at the edge portion is changed to the pixel value on the target position (I ′, J ′) according to the slope (steepness) of the edge. The pixel values are used as they are, but weights are changed (changed) according to the distance to the target position (I ′, J ′) so as to reduce the influence of the pixel values at the edge portion in the spring relational expression. You can also

また、上述の例では、作成される平面Q1乃至Q4の傾きを、基準座標系上のある位置(x,y)を中心とする9の領域(3×3画素幅の領域)内の位置で観測される画素値を用いて求めることとしたが、例えば、16の領域(4×4画素幅の領域)など、その他の領域の位置で観測される画素値により求めるようにしてもよい。   In the above example, the slopes of the planes Q1 to Q4 to be created are positions in nine regions (3 × 3 pixel width region) centered on a certain position (x, y) on the reference coordinate system. Although it is determined using the observed pixel value, it may be determined based on the pixel value observed at the position of another region such as 16 regions (4 × 4 pixel width region).

(第7実施の形態)
次に、信号処理回路7における、画像推定処理の第7実施の形態について説明する。第7実施の形態は、図24で説明した第3実施の形態を応用したものである。
(Seventh embodiment)
Next, a seventh embodiment of image estimation processing in the signal processing circuit 7 will be described. The seventh embodiment is an application of the third embodiment described in FIG.

即ち、第7実施の形態は、第3実施の形態において、式(25),(26),(27)で表されるバネ関係式の他に、R信号とG信号とB信号どうしの相関に関する色相関の条件を付加して、それらすべての条件式を満たす真の緑色の光量Lg(x,y)、真の赤色の光量Lr(x,y)、真の青色の光量Lb(x,y)を求めるものである。   That is, in the seventh embodiment, in the third embodiment, in addition to the spring relational expressions expressed by the equations (25), (26), and (27), the correlation between the R signal, the G signal, and the B signal. And the true green light quantity Lg (x, y), the true red light quantity Lr (x, y), and the true blue light quantity Lb (x, y) satisfying all the conditional expressions. y).

画像の局所的な部分に着目すれば、撮像素子4に入射される被写体の光と等価な真の緑色の光量Lg(x,y)、真の赤色の光量Lr(x,y)、真の青色の光量Lb(x,y)には、色どうしの相関がある。従って、画像推定処理により推定される画像についても色相関があるとして、その色相関の条件をさらに付加することにより、ノイズ等による誤差を軽減した、より正確な解、即ち、より本来の光に忠実で鮮明な画像を求めることができる。   Focusing on the local portion of the image, the true green light amount Lg (x, y) equivalent to the light of the subject incident on the image sensor 4, the true red light amount Lr (x, y), the true light amount. The blue light quantity Lb (x, y) has a correlation between colors. Therefore, assuming that the image estimated by the image estimation process also has color correlation, by adding the condition of the color correlation further, an error due to noise or the like is reduced, and a more accurate solution, that is, more original light. A faithful and clear image can be obtained.

図37と図38を参照して、具体的な色相関の条件を求める方法について説明する。図37と図38では、緑色(G信号)と赤色(R信号)の色相関の条件を考える。   A method for obtaining a specific color correlation condition will be described with reference to FIGS. 37 and 38. FIG. In FIGS. 37 and 38, the condition of the color correlation between green (G signal) and red (R signal) is considered.

図37左下側のk'枚目画像のig番目、jg番目の、ある緑色の画素G(jg−1)(ig−1)と、図37右下側のk”枚目画像のir番目、jr番目の、ある赤色の画素R(jr−1)(ir−1)に注目する。   37, the ig-th and jg-th green pixels G (jg−1) (ig−1) of the k′-th image on the lower left side of FIG. 37 and the ir-th number of the k ″ -th image on the lower-right side of FIG. Note the jrth red pixel R (jr-1) (ir-1).

演算回路24は、k'枚目画像の緑色の画素G(jg−1)(ig−1)とk”枚目画像の赤色の画素R(jr−1)(ir−1)の位置を、第3実施の形態で説明したように、変換パラメータ(θk',Tk'x,Tk'y,Sk')と変換パラメータ(θk”,Tk”x,Tk”y,Sk”)によりそれぞれ変換することで、図37上側の1枚目画像の座標系における位置を求める。   The arithmetic circuit 24 determines the positions of the green pixel G (jg-1) (ig-1) of the k'th image and the red pixel R (jr-1) (ir-1) of the k "th image. As described in the third embodiment, conversion is performed using the conversion parameters (θk ′, Tk′x, Tk′y, Sk ′) and the conversion parameters (θk ″, Tk ″ x, Tk ″ y, Sk ″). Thus, the position of the first image on the upper side of FIG.

そして、演算回路24は、1枚目画像の座標系に変換されたk'枚目の緑色の画素G(jg−1)(ig−1)と1枚目画像の座標系に変換されたk”枚目の赤色の画素R(jr−1)(ir−1)との距離を計算する。さらに、演算回路24は、その距離が、同一の位置とみなす許容値(判定値)delta(例えば、0.25画素)以内であるかどうかを判定する。   The arithmetic circuit 24 then converts the k′-th green pixel G (jg−1) (ig−1) converted into the coordinate system of the first image and the k converted into the coordinate system of the first image. “Calculate the distance from the first red pixel R (jr−1) (ir−1). Further, the arithmetic circuit 24 allows an allowable value (determination value) delta (for example, the distance) to be regarded as the same position. , 0.25 pixel).

例えば、画素G(jg−1)(ig−1)と画素R(jr−1)(ir−1)の位置を、位置(ig,jg)と位置(ir,jr)で、それぞれ考えることとして、k'枚目画像の座標系における画素G(jg−1)(ig−1)の位置(ig,jg)を点Gcと、k”枚目画像の座標系における画素R(jg−1)(ig−1)の位置(ir,jr)を点Rcと、1枚目画像の座標系における画素G(jg−1)(ig−1)の位置(ig,jg)をGc(k')と、1枚目画像の座標系における画素R(jg−1)(ig−1)の位置(ir,jr)をRc(k”)と、それぞれ表すこととすると、点Gc(k')と点Rc(k”)との距離が許容値delta以内であるかを表す式(37)は、次のように書ける。 For example, consider the positions of the pixel G (jg-1) (ig-1) and the pixel R (jr-1) (ir-1) at the position (ig, jg) and the position (ir, jr), respectively. , the pixel G (jg-1) in the coordinate system of the k 'th image (ig-1) position of (ig, jg) and the point G c and the pixel in the coordinate system of the k "th image R (jg-1 ) (Ig-1) at the position (ir, jr) as the point R c and the position (ig, jg) at the pixel G (jg-1) (ig-1) in the coordinate system of the first image as G c ( k ′) and the position (ir, jr) of the pixel R (jg−1) (ig−1) in the coordinate system of the first image as R c (k ″) , respectively, the point G c Expression (37) representing whether the distance between (k ′) and the point R c (k ″) is within the allowable value delta can be written as follows.

Figure 0004613510
・・・(37)
Figure 0004613510
... (37)

式(37)を距離の条件式と称する。ここで、Dis[Gc(k'),Rc(k”)]は、点Gc(k')と点Rc(k”)との間の距離を表す。また、点Gc(k')と点Rc(k”)で表される位置は、位置(ig,jg)と位置(ir,jr)を、変換パラメータ(θk',Tk'x,Tk'y,Sk')と(θk”,Tk”x,Tk”y,Sk”)でそれぞれアフィン変換したものである。 Expression (37) is referred to as a distance conditional expression. Here, Dis [G c (k ′) , R c (k ″) ] represents a distance between the point G c (k ′) and the point R c (k ″) . The position represented by the point G c (k ′) and the point R c (k ″) is obtained by converting the position (ig, jg) and the position (ir, jr) into the conversion parameters (θk ′, Tk′x, Tk). 'y, Sk') and (θk ", Tk" x, Tk "y, Sk"), respectively.

演算回路24は、k'枚目の緑色の画素G(jg−1)(ig−1)とk”枚目の赤色の画素R(jr−1)(ir−1)とが、ある許容範囲deltaのマージンを考えたときに同一位置にあるとみなすことができる画素があるかどうかを、1枚目画像の座標系における、ある位置(I',J')を中心とする(I'±dX,J'±dY)の近傍領域、つまり、(I'−dX,J'−dY),(I'−dX,J'+dY),(I'+dX,J'−dY),および(I'+dX,J'+dY)で囲まれる領域について求める。ここで、dXとdYは、それぞれ、近傍領域を設定する所定の値で、例えば、2画素分のX方向とY方向の長さなどとすることができる。   The arithmetic circuit 24 has an allowable range in which the k'th green pixel G (jg-1) (ig-1) and the k "th red pixel R (jr-1) (ir-1) are within a certain allowable range. Whether or not there is a pixel that can be regarded as being at the same position when considering the margin of delta is centered on a certain position (I ′, J ′) in the coordinate system of the first image (I ′ ± dX, J ′ ± dY), ie, (I′−dX, J′−dY), (I′−dX, J ′ + dY), (I ′ + dX, J′−dY), and (I The area surrounded by '+ dX, J' + dY) where dX and dY are predetermined values for setting neighboring areas, for example, the lengths in the X direction and Y direction for two pixels, etc. can do.

逆に言うと、演算回路24は、1枚目画像の座標系における、注目位置(I',J')を中心とする(I'±dX,J'±dY)の近傍領域、つまり、(I'−dX,J'−dY),(I'−dX,J'+dY),(I'+dX,J'−dY),および(I'+dX,J'+dY)で囲まれる領域において、上述の式(37)を満たす(k',ig,jg)と(k”,ir,jr)を求める。   In other words, the arithmetic circuit 24 is a region near (I ′ ± dX, J ′ ± dY) around the target position (I ′, J ′) in the coordinate system of the first image, that is, ( I′−dX, J′−dY), (I′−dX, J ′ + dY), (I ′ + dX, J′−dY), and (I ′ + dX, J ′ + dY) (K ′, ig, jg) and (k ″, ir, jr) satisfying the expression (37) are obtained.

そして、演算回路24は、求められた(k',ig,jg)と(k”,ir,jr)とに対応する画素値Gobs(k',ig,jg)と画素値Robs(k”,ir,jr)とを得る。   Then, the arithmetic circuit 24 calculates the pixel value Gobs (k ′, ig, jg) and the pixel value Robs (k ″, kg) corresponding to the obtained (k ′, ig, jg) and (k ″, ir, jr). ir, jr).

演算回路24は、k',k”それぞれを1乃至Nとしたすべての組み合わせについて、上述の式(37)を満たす(k',ig,jg)と(k”,ir,jr)を求める。   The arithmetic circuit 24 obtains (k ′, ig, jg) and (k ″, ir, jr) satisfying the above equation (37) for all combinations in which k ′ and k ″ are 1 to N, respectively.

一般的には、複数の(k',ig,jg)と(k”,ir,jr)との組み合わせが検出されるので、演算回路24は、検出された(k',ig,jg)と(k”,ir,jr)とに対応する画素値Gobs(k',ig,jg)と画素値Robs(k”,ir,jr)との組を、図38に示すように、横軸をG信号(Gobs(k',ig,jg))、縦軸をR信号(Robs(k”,ir,jr))とするGR空間にプロットする。   In general, a combination of a plurality of (k ′, ig, jg) and (k ″, ir, jr) is detected, so that the arithmetic circuit 24 detects the detected (k ′, ig, jg) and A set of pixel values Gobs (k ′, ig, jg) and pixel values Robs (k ″, ir, jr) corresponding to (k ″, ir, jr) is shown in FIG. The G signal (Gobs (k ′, ig, jg)) and the vertical axis are plotted in the GR space with the R signal (Robs (k ″, ir, jr)).

図38は、式(37)を満たす画素値Gobs(k',ig,jg)と画素値Robs(k”,ir,jr)とのセットで表される点をプロットしたGR空間を示している。   FIG. 38 shows a GR space in which points represented by sets of pixel values Gobs (k ′, ig, jg) and pixel values Robs (k ″, ir, jr) satisfying Expression (37) are plotted. .

図38のバツ印が、演算回路24により検出された(k',ig,jg)と(k”,ir,jr)とに対応する画素値Gobs(k',ig,jg)と画素値Robs(k”,ir,jr)との組、即ち、式(37)を満たす画素値Gobs(k',ig,jg)と画素値Robs(k”,ir,jr)との組を表している。   The cross marks in FIG. 38 indicate pixel values Gobs (k ′, ig, jg) and pixel values Robs corresponding to (k ′, ig, jg) and (k ″, ir, jr) detected by the arithmetic circuit 24. Represents a set of (k ″, ir, jr), that is, a set of pixel value Gobs (k ′, ig, jg) and pixel value Robs (k ″, ir, jr) satisfying Expression (37). .

注目位置(I',J')の近傍領域においては、求めるべき真の緑色の光量Lg(I',J')、および真の赤色の光量Lr(I',J')には、図38に示したような相関があると考えられる。   In the region near the target position (I ′, J ′), the true green light amount Lg (I ′, J ′) to be obtained and the true red light amount Lr (I ′, J ′) are shown in FIG. It seems that there is a correlation as shown in.

そこで、第7の実施の形態においては、第3実施の形態における式(25)乃至式(27)で表されるバネ関係式の他に、さらに、図38に示した緑色と赤色に相関があることを条件として付加する。   Therefore, in the seventh embodiment, in addition to the spring relational expressions represented by the expressions (25) to (27) in the third embodiment, there is a correlation between green and red shown in FIG. It is added as a condition.

即ち、演算回路24は、演算回路24により式(37)の距離の条件式を満たす画素値Gobs(k',ig,jg)と画素値Robs(k”,ir,jr)との組で表される、図38のGR空間にプロットされた複数の点について、主成分分析を行う。   That is, the arithmetic circuit 24 is represented by a set of pixel values Gobs (k ′, ig, jg) and pixel values Robs (k ″, ir, jr) that satisfy the distance conditional expression of Expression (37) by the arithmetic circuit 24. The principal component analysis is performed on the plurality of points plotted in the GR space of FIG.

そして、演算回路24は、主成分分析の分析結果である主成分の方向を求め、その方向(軸)を表す直線Qg×G+Qr×R=Qcを求める。ここで、Qg、Qr、Qcは、GR空間上の直線を表す定数であり、GとRは、GR空間上のG信号とR信号を表す変数である。また、演算回路24は、主成分の方向と直交する成分についての分散を求める。   Then, the arithmetic circuit 24 obtains the direction of the principal component, which is the analysis result of the principal component analysis, and obtains a straight line Qg × G + Qr × R = Qc representing the direction (axis). Here, Qg, Qr, and Qc are constants representing straight lines in the GR space, and G and R are variables representing the G signal and the R signal in the GR space. Further, the arithmetic circuit 24 obtains a variance for a component orthogonal to the direction of the main component.

ここで、自然長が0で、バネ定数(バネの強さ)がHのバネを導入する。バネ定数Hは、GR空間上で求められた主成分の方向と直交する成分についての分散に対して、単調減少する任意の関数とすることができ、例えば、H=(1÷分散)などを採用することができる。つまり、分散が小さいほどバネが強く(バネ定数が大きく)なる。   Here, a spring having a natural length of 0 and a spring constant (spring strength) of H is introduced. The spring constant H can be an arbitrary function that monotonously decreases with respect to the variance of the component orthogonal to the direction of the principal component obtained in the GR space. For example, H = (1 ÷ dispersion) or the like. Can be adopted. That is, the smaller the variance, the stronger the spring (the larger the spring constant).

このバネ定数Hのバネの両端の一端は、GR空間上での点(Lg(I',J'),Lr(I',J'))に接続され、バネの他端は、主成分の方向の直線Qg×G+Qr×R=Qc上の任意の点に移動可能なように接続される。これにより、点(Lg(I',J'),Lr(I',J'))は、その点(Lg(I',J'),Lr(I',J'))から直線Qg×G+Qr×R=Qcに垂らした垂線の方向へ引っ張られる。つまり、点(Lg(I',J'),Lr(I',J'))は、色相関の一致性(G信号とR信号の色相関の関係)が満たされるように引っ張られる。   One end of both ends of the spring having the spring constant H is connected to a point (Lg (I ′, J ′), Lr (I ′, J ′)) in the GR space, and the other end of the spring is the main component. It is movably connected to an arbitrary point on the direction straight line Qg × G + Qr × R = Qc. Thereby, the point (Lg (I ′, J ′), Lr (I ′, J ′)) is a straight line Qg × from the point (Lg (I ′, J ′), Lr (I ′, J ′)). It is pulled in the direction of a perpendicular line hanging down to G + Qr × R = Qc. That is, the points (Lg (I ′, J ′), Lr (I ′, J ′)) are pulled so that the color correlation coincidence (the relationship between the color correlation between the G signal and the R signal) is satisfied.

ここで、点(Lg(I',J'),Lr(I',J'))と主成分の方向の直線Qg×G+Qr×R=Qcとの距離をuと表すと、バネ定数Hのバネが、点(Lg(I',J'),Lr(I',J'))を引っ張る力は、H×u(以下、適宜、GRバネ力という)で表される。このGR空間におけるGRバネ力H×uを、G信号成分とR信号成分に分解し、式(25)と式(26)それぞれの左辺に加算対象として付加することにより、色相関が考慮されることになる。   Here, when the distance between the point (Lg (I ′, J ′), Lr (I ′, J ′)) and the straight line Qg × G + Qr × R = Qc in the direction of the principal component is represented by u, the spring constant H The force with which the spring pulls the point (Lg (I ′, J ′), Lr (I ′, J ′)) is represented by H × u (hereinafter referred to as GR spring force as appropriate). The GR spring force H × u in the GR space is decomposed into a G signal component and an R signal component, and added to the left side of each of the equations (25) and (26) as an addition target, so that color correlation is considered. It will be.

以上の色相関の条件を、緑色(G信号)と青色(B信号)についても考える。   The above color correlation conditions are also considered for green (G signal) and blue (B signal).

図37に示した緑色と赤色の画素の場合と同様に、演算回路24は、k'枚目の緑色の画素G(jg−1)(ig−1)とk”'枚目の青色の画素B(jb−1)(ib−1)の位置を、変換パラメータ(θk',Tk'x,Tk'y,Sk')と変換パラメータ(θk”',Tk”'x,Tk”'y,Sk”')によりそれぞれ変換することで、1枚目画像の座標系における位置を求める。   As in the case of the green and red pixels shown in FIG. 37, the arithmetic circuit 24 calculates the k′th green pixel G (jg−1) (ig−1) and the k′′th blue pixel. The position of B (jb-1) (ib-1) is converted into a conversion parameter (θk ′, Tk′x, Tk′y, Sk ′) and a conversion parameter (θk ″ ′, Tk ″ ′ x, Tk ″ ′ y, The position in the coordinate system of the first image is obtained by performing conversion by Sk ″ ′).

そして、演算回路24は、1枚目画像の座標系に変換されたk'枚目の緑色の画素G(jg−1)(ig−1)と1枚目画像の座標系に変換されたk”'枚目の青色の画素B(jb−1)(ib−1)との距離を計算する。さらに、演算回路24は、その距離が、同一の位置にいるとみなす許容値(判定値)delta以内であるかどうかを判定する。   The arithmetic circuit 24 then converts the k′-th green pixel G (jg−1) (ig−1) converted into the coordinate system of the first image and the k converted into the coordinate system of the first image. The distance from the '' th blue pixel B (jb-1) (ib-1) is calculated. Further, the arithmetic circuit 24 considers that the distance is in the same position (determination value). Determine if it is within delta.

例えば、画素G(jg−1)(ig−1)と画素B(jb−1)(ib−1)の位置を、位置(ig,jg)と位置(ib,jb)で、それぞれ考えることとして、k'枚目画像の座標系における画素G(jg−1)(ig−1)の位置(ig,jg)を点Gcと、k”'枚目画像の座標系における画素B(jb−1)(ib−1)の位置(ib,jb)を点Bcと、1枚目画像の座標系における画素G(jg−1)(ig−1)の位置(ig,jg)をGc(k')と、1枚目画像の座標系における画素B(jb−1)(ib−1)の位置(ib,jb)をBc(k”')と、それぞれ表すこととすると、点Gc(k')と点Bc(k”')との距離が許容値delta以内であるかを表す式(38)は、次のように書ける。 For example, consider the positions of pixel G (jg-1) (ig-1) and pixel B (jb-1) (ib-1) at position (ig, jg) and position (ib, jb), respectively. , 'position of the pixel in the coordinate system of the piece of the image G (jg-1) (ig -1) (ig, jg) and the point G c a, k "' k pixels in the coordinate system of the piece of the image B (jb- 1) The position (ib, jb) of (ib-1) is the point B c, and the position (ig, jg) of the pixel G (jg-1) (ig-1) in the coordinate system of the first image is G c (k ′) and the position (ib, jb) of the pixel B (jb−1) (ib−1) in the coordinate system of the first image are respectively represented as B c (k ″ ′). Expression (38) indicating whether the distance between G c (k ′) and the point B c (k ″ ′) is within the allowable value delta can be written as follows.

Figure 0004613510
・・・(38)
Figure 0004613510
... (38)

式(38)を距離の条件式と称する。ここで、Dis[Gc(k'),Bc(k”')]は、点Gc(k')と点Bc(k”')との間の距離を表す。また、点Gc(k')と点Bc(k”')で表される位置は、位置(ig,jg)と位置(ib,jb)を、変換パラメータ(θk',Tk'x,Tk'y,Sk')と(θk”',Tk”'x,Tk”'y,Sk”')でそれぞれアフィン変換したものである。 Expression (38) is referred to as a distance conditional expression. Here, Dis [G c (k ′) , B c (k ′ ′) ] represents a distance between the point G c (k ′) and the point B c (k ′ ′) . The positions represented by the point G c (k ′) and the point B c (k ″ ′) are obtained by converting the position (ig, jg) and the position (ib, jb) into the conversion parameters (θk ′, Tk′x, Tk′y, Sk ′) and (θk ″ ′, Tk ″ ′ x, Tk ″ ′ y, Sk ″ ′) are affine transformed.

演算回路24は、k'枚目の緑色の画素G(jg−1)(ig−1)とk”'枚目の青色の画素B(jb−1)(ib−1)とが、ある許容範囲deltaのマージンを考えたときに同一位置にあるとみなすことができる画素があるかどうかを、1枚目画像の座標系における、ある位置(I',J')を中心とする(I'±dX,J'±dY)の近傍領域、つまり、(I'−dX,J'−dY),(I'−dX,J'+dY),(I'+dX,J'−dY),および(I'+dX,J'+dY)で囲まれる領域について求める。ここで、dX,dYは、それぞれ、近傍領域を設定する所定の値で、例えば、2画素分のX方向とY方向の長さなどとすることができる。   The arithmetic circuit 24 has a k'th green pixel G (jg-1) (ig-1) and a k''th blue pixel B (jb-1) (ib-1). Whether or not there is a pixel that can be considered to be at the same position when considering the margin of the range delta is centered on a certain position (I ′, J ′) in the coordinate system of the first image (I ′ ± dX, J ′ ± dY), ie, (I′−dX, J′−dY), (I′−dX, J ′ + dY), (I ′ + dX, J′−dY), and ( I ′ + dX, J ′ + dY) where dX, dY are predetermined values for setting neighboring regions, for example, the lengths in the X and Y directions for two pixels, etc. It can be.

逆に言うと、演算回路24は、1枚目画像の座標系における、注目位置(I',J')を中心とする(I'±dX,J'±dY)の近傍領域、つまり、(I'−dX,J'−dY),(I'−dX,J'+dY),(I'+dX,J'−dY),および(I'+dX,J'+dY)で囲まれる領域において、上述の式(38)を満たす(k',ig,jg)と(k”',ib,jb)を求める。   In other words, the arithmetic circuit 24 is a region near (I ′ ± dX, J ′ ± dY) around the target position (I ′, J ′) in the coordinate system of the first image, that is, ( I′−dX, J′−dY), (I′−dX, J ′ + dY), (I ′ + dX, J′−dY), and (I ′ + dX, J ′ + dY) (K ′, ig, jg) and (k ″ ′, ib, jb) satisfying equation (38) are obtained.

そして、演算回路24は、求められた(k',ig,jg)と(k”',ib,jb)とに対応する画素値Gobs(k',ig,jg)と画素値Bobs(k”',ib,jb)とを得る。   Then, the arithmetic circuit 24 calculates the pixel value Gobs (k ′, ig, jg) and the pixel value Bobs (k ″ (k ″) corresponding to the obtained (k ′, ig, jg) and (k ″ ′, ib, jb). ', Ib, jb).

演算回路24は、k',k”'それぞれを1乃至Nとしたすべての組み合わせについて、上述の式(38)を満たす(k',ig,jg)と(k”',ib,jb)を求める。   The arithmetic circuit 24 calculates (k ′, ig, jg) and (k ″ ′, ib, jb) satisfying the above equation (38) for all combinations in which k ′ and k ″ ′ are 1 to N, respectively. Ask.

一般的には、複数の(k',ig,jg)と(k”',ib,jb)との組み合わせが検出されるので、演算回路24は、検出された(k',ig,jg)と(k”',ib,jb)とに対応する画素値Gobs(k',ig,jg)と画素値Bobs(k”',ib,jb)との組を、横軸をG信号(Gobs(k',ig,jg))、縦軸をB信号(Bobs(k”',ib,jb))とするGB空間にプロットする。   In general, since a combination of a plurality of (k ′, ig, jg) and (k ″ ′, ib, jb) is detected, the arithmetic circuit 24 detects (k ′, ig, jg). And a set of pixel values Gobs (k ′, ig, jg) and pixel values Bobs (k ″ ′, ib, jb) corresponding to (k ″ ′, ib, jb), and the horizontal axis represents a G signal (Gobs). (k ′, ig, jg)), and the vertical axis is plotted in the GB space with the B signal (Bobs (k ″ ′, ib, jb)).

そこで、第7の実施の形態においては、第3実施の形態における式(25)乃至式(27)で表されるバネ関係式の他に、さらに、緑色と青色に相関があることを条件として付加する。   Therefore, in the seventh embodiment, in addition to the spring relational expressions expressed by the equations (25) to (27) in the third embodiment, it is further provided that there is a correlation between green and blue. Append.

即ち、演算回路24は、演算回路24により式(38)の距離の条件式を満たす画素値Gobs(k',ig,jg)と画素値Bobs(k”',ib,jb)との組で表される、GB空間にプロットされた複数の点について、主成分分析を行う。   That is, the arithmetic circuit 24 is a set of a pixel value Gobs (k ′, ig, jg) and a pixel value Bobs (k ″ ′, ib, jb) that satisfy the distance conditional expression of the expression (38) by the arithmetic circuit 24. A principal component analysis is performed on a plurality of points plotted in the GB space.

そして、演算回路24は、主成分分析の分析結果である主成分の方向を求め、その方向(軸)を表す直線Qg'×G+Qb'×B=Qc'を求める。ここで、Qg'、Qb'、Qc'は、GB空間上の直線を表す定数であり、GとBは、GB空間上のG信号とB信号を表す変数である。また、演算回路24は、主成分の方向と直交する成分についての分散を求める。   Then, the arithmetic circuit 24 obtains the direction of the principal component, which is the analysis result of the principal component analysis, and obtains a straight line Qg ′ × G + Qb ′ × B = Qc ′ representing the direction (axis). Here, Qg ′, Qb ′, and Qc ′ are constants representing straight lines in the GB space, and G and B are variables representing the G signal and the B signal in the GB space. Further, the arithmetic circuit 24 obtains a variance for a component orthogonal to the direction of the main component.

ここで、自然長が0で、バネ定数(バネの強さ)がHのバネを導入する。バネ定数Hは、GB空間上で求められた主成分の方向と直交する成分についての分散に対して、単調減少する任意の関数とすることができ、例えば、H=(1÷分散)などを採用することができる。つまり、分散が小さいほどバネが強く(バネ定数が大きく)なる。   Here, a spring having a natural length of 0 and a spring constant (spring strength) of H is introduced. The spring constant H can be an arbitrary function that monotonously decreases with respect to the variance of the component orthogonal to the direction of the principal component obtained in the GB space. For example, H = (1 ÷ dispersion) or the like. Can be adopted. That is, the smaller the variance, the stronger the spring (the larger the spring constant).

このバネ定数Hのバネの両端の一端は、GB空間上での点(Lg(I',J'),Lb(I',J'))に接続され、バネの他端は、主成分の方向の直線Qg'×G+Qb'×B=Qc'上の任意の点に移動可能なように接続される。これにより、点(Lg(I',J'),Lb(I',J'))は、その点(Lg(I',J'),Lb(I',J'))から直線Qg'×G+Qb'×B=Qc'に垂らした垂線の方向へ引っ張られる。つまり、点(Lg(I',J'),Lb(I',J'))は、色相関の一致性(G信号とB信号の色相関の関係)が満たされるように引っ張られる。   One end of both ends of the spring having the spring constant H is connected to a point (Lg (I ′, J ′), Lb (I ′, J ′)) on the GB space, and the other end of the spring is the main component. It is connected so as to be movable to an arbitrary point on the direction straight line Qg ′ × G + Qb ′ × B = Qc ′. Thus, the point (Lg (I ′, J ′), Lb (I ′, J ′)) is changed from the point (Lg (I ′, J ′), Lb (I ′, J ′)) to the straight line Qg ′. It is pulled in the direction of the perpendicular hanging down to × G + Qb ′ × B = Qc ′. That is, the points (Lg (I ′, J ′), Lb (I ′, J ′)) are pulled so that the color correlation coincidence (the relationship between the color correlation between the G signal and the B signal) is satisfied.

ここで、点(Lg(I',J'),Lb(I',J'))と主成分の方向の直線Qg'×G+Qb'×B=Qc'との距離をuと表すと、バネ定数Hのバネが、点(Lg(I',J'),Lb(I',J'))を引っ張る力は、H×u(以下、適宜、GBバネ力という)で表される。このGB空間におけるGBバネ力H×uを、G信号成分とB信号成分に分解し、式(25)と式(27)それぞれの左辺に加算対象として付加することにより、色相関が考慮されることになる。   Here, when the distance between the point (Lg (I ′, J ′), Lb (I ′, J ′)) and the straight line Qg ′ × G + Qb ′ × B = Qc ′ in the direction of the principal component is represented by u, the spring The force with which the spring with a constant H pulls the point (Lg (I ′, J ′), Lb (I ′, J ′)) is represented by H × u (hereinafter referred to as GB spring force as appropriate). The GB spring force H × u in the GB space is decomposed into a G signal component and a B signal component, and added to the left side of each of the equations (25) and (27) as an addition target, so that the color correlation is considered. It will be.

なお、本実施の形態では、上述のGR、GB空間の2つの色相関の条件のみ付加することとするが、同様にして、R信号とB信号との(RB空間の)色相関の条件についても付加するようにしてもよい。   In the present embodiment, only the two color correlation conditions in the above-described GR and GB spaces are added. Similarly, the condition of the color correlation between the R signal and the B signal (in the RB space) is also described. May also be added.

図39のフローチャートを参照して、図2のステップS4における画像推定処理の第7実施の形態について説明する。   A seventh embodiment of the image estimation process in step S4 of FIG. 2 will be described with reference to the flowchart of FIG.

ステップS171乃至S177は、図24に示した第3実施の形態の画像推定処理のステップS71乃至S77と同様である。   Steps S171 to S177 are the same as steps S71 to S77 of the image estimation processing of the third embodiment shown in FIG.

即ち、ステップS171において、演算回路24は、基準座標系上のある位置(I',J')に注目する(以下、注目位置(I',J')と称する)。ここで、注目位置(I',J')は、基準画像である1枚目の撮像画像の「i番目、j番目の画素」の画素中心(i−0.5,j−0.5)を表している。   That is, in step S171, the arithmetic circuit 24 pays attention to a certain position (I ′, J ′) on the reference coordinate system (hereinafter referred to as attention position (I ′, J ′)). Here, the target position (I ′, J ′) is the pixel center (i−0.5, j−0.5) of the “i-th and j-th pixels” of the first captured image that is the reference image. Represents.

そして、ステップS171からS172に進み、演算回路24は、注目位置(I',J')に対して、k枚目画像の緑色の成分を受光する画素の中心位置(ig−0.5,jg−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ig,jg)の組を、1乃至N枚目画像についてすべて求め、ステップS173に進む。   Then, the process proceeds from step S171 to S172, and the arithmetic circuit 24 determines the center position (ig−0.5, jg) of the pixel that receives the green component of the k-th image with respect to the target position (I ′, J ′). −0.5) is converted to the position (x, y) on the reference coordinate system obtained by converting the conversion parameters (θk, Tkx, Tky, Sk) by I′−1 ≦ x <I ′ + 1, J′−1 ≦ y. <A set of (k, ig, jg) that satisfies J ′ + 1 is obtained for all of the first to Nth images, and the process proceeds to step S173.

ステップS173において、演算回路24は、ステップS172で求めたすべての(k,ig,jg)の組を用いて、式(25)で表される緑色の光量のバネ関係式を生成して、ステップS174に進む。   In step S173, the arithmetic circuit 24 generates a spring relational expression of the green light quantity represented by the equation (25) using all the (k, ig, jg) pairs obtained in step S172, The process proceeds to S174.

ステップS174において、演算回路24は、注目位置(I',J')に対して、k枚目画像の赤色の成分を受光する画素の中心位置(ir−0.5,jr−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ir,jr)の組を、1乃至N枚目画像についてすべて求め、ステップS175に進む。   In step S174, the arithmetic circuit 24 receives the center position (ir−0.5, jr−0.5) of the pixel that receives the red component of the k-th image with respect to the target position (I ′, J ′). The position (x, y) on the reference coordinate system obtained by converting the data with the conversion parameters (θk, Tkx, Tky, Sk) satisfies I′−1 ≦ x <I ′ + 1, J′−1 ≦ y <J ′ + 1. The set of satisfying (k, ir, jr) is obtained for all the first to Nth images, and the process proceeds to step S175.

ステップS175において、演算回路24は、ステップS174で求めたすべての(k,ir,jr)の組を用いて、式(26)で表される赤色の光量のバネ関係式を生成して、ステップS176に進む。   In step S175, the arithmetic circuit 24 generates a spring relational expression of the red light quantity represented by the equation (26) using all the (k, ir, jr) pairs obtained in step S174, The process proceeds to S176.

ステップS176において、演算回路24は、注目位置(I',J')に対して、k枚目画像の青色の成分を受光する画素の中心位置(ib−0.5,jb−0.5)を変換パラメータ(θk,Tkx,Tky,Sk)で変換した基準座標系上の位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす(k,ib,jb)の組を、1乃至N枚目画像についてすべて求め、ステップS177に進む。   In step S176, the arithmetic circuit 24 determines the center position (ib−0.5, jb−0.5) of the pixel that receives the blue component of the kth image with respect to the target position (I ′, J ′). The position (x, y) on the reference coordinate system obtained by converting the data with the conversion parameters (θk, Tkx, Tky, Sk) satisfies I′−1 ≦ x <I ′ + 1, J′−1 ≦ y <J ′ + 1. All the sets of (k, ib, jb) that satisfy (k, ib, jb) are obtained for the first to Nth images, and the process proceeds to step S177.

ステップS177において、演算回路24は、ステップS176で求めたすべての(k,ib,jb)の組を用いて、式(27)で表される青色の光量のバネ関係式を生成して、ステップS178に進む。   In step S177, the arithmetic circuit 24 generates a spring relational expression of the blue light quantity represented by the equation (27) using all the pairs (k, ib, jb) obtained in step S176, The process proceeds to S178.

ステップS178において、演算回路24は、注目位置(I',J')を中心とする(I'±dX,J'±dY)で規定される領域において、式(37)を満たす(k',ig,jg)と(k”,ir,jr)との組をすべて求める。さらに、演算回路24は、その求めた(k',ig,jg)と(k”,ir,jr)との組で特定されるGR空間上の点(Gobs(k',ig,jg),Robs(k”,ir,jr))をプロットし、主成分分析を行う。また、演算回路24は、その主成分方向と直交する成分の分散を求め、その分散の逆数をバネ定数Hとして求める。そして、演算回路24は、主成分方向を表す直線Qg×G+Qr×R=Qcを求め、GR空間上での点(Lg(I',J'),Lr(I',J'))と、直線Qg×G+Qr×R=Qcとの距離uを用いて表される未知数としてのGRバネ力H×uを得る。さらに、演算回路24は、GRバネ力H×uのG信号成分を式(25)の左辺の加算対象に加えるとともに、GRバネ力H×uのR信号成分を式(26)の左辺に加算対象として加える。そして、ステップS178からS179に進む。   In step S178, the arithmetic circuit 24 satisfies Expression (37) in a region defined by (I ′ ± dX, J ′ ± dY) centered on the target position (I ′, J ′) (k ′, ig, jg) and (k ″, ir, jr) are all obtained. Further, the arithmetic circuit 24 sets the obtained (k ′, ig, jg) and (k ″, ir, jr). The points on the GR space (Gobs (k ′, ig, jg), Robs (k ″, ir, jr)) specified by the above are plotted and the principal component analysis is performed. The variance of the component orthogonal to the direction is obtained, and the reciprocal of the variance is obtained as the spring constant H. Then, the arithmetic circuit 24 obtains a straight line Qg × G + Qr × R = Qc representing the principal component direction, and points on the GR space. The distance u between (Lg (I ′, J ′), Lr (I ′, J ′)) and the straight line Qg × G + Qr × R = Qc Furthermore, the arithmetic circuit 24 adds the G signal component of the GR spring force H × u to the addition target on the left side of the equation (25), and obtains the GR spring force as an unknown. The H × u R signal component is added as an addition target to the left side of Expression (26), and the process proceeds from step S178 to S179.

ステップS179において、演算回路24は、注目位置(I',J')を中心とする(I'±dX,J'±dY)で規定される領域において、式(38)を満たす(k',ig,jg)と(k”',ib,jb)との組をすべて求める。さらに、演算回路24は、その求めた(k',ig,jg)と(k”',ib,jb)との組で特定されるGB空間上の点(Gobs(k',ig,jg),Bobs(k”',ib,jb))をプロットし、主成分分析を行う。また、演算回路24は、その主成分方向と直交する成分の分散を求め、その分散の逆数をバネ定数Hとして求める。そして、演算回路24は、主成分方向を表す直線Qg'×G+Qb'×B=Qc'を求め、GB空間上での点(Lg(I',J'),Lb(I',J'))と、直線Qg'×G+Qb'×B=Qc'との距離uを用いて表される未知数としてのGBバネ力H×uを得る。さらに、演算回路24は、GBバネ力H×uのG信号成分を式(25)の左辺の加算対象に加えるとともに、GBバネ力H×uのB信号成分を式(27)の左辺に加算対象として加える。そして、ステップS179からS180に進む。   In step S179, the arithmetic circuit 24 satisfies Expression (38) in a region defined by (I ′ ± dX, J ′ ± dY) centered on the target position (I ′, J ′) (k ′, ig, jg) and (k ″ ′, ib, jb) are all obtained. Further, the arithmetic circuit 24 obtains the obtained (k ′, ig, jg) and (k ″ ′, ib, jb) and The points in the GB space (Gobs (k ′, ig, jg), Bobs (k ″ ′, ib, jb)) specified by the set of are plotted and the principal component analysis is performed. The variance of the component orthogonal to the principal component direction is obtained, and the reciprocal of the variance is obtained as the spring constant H. Then, the arithmetic circuit 24 obtains a straight line Qg ′ × G + Qb ′ × B = Qc ′ representing the principal component direction, The distance between the point (Lg (I ′, J ′), Lb (I ′, J ′)) on the GB space and the straight line Qg ′ × G + Qb ′ × B = Qc ′ The GB spring force H × u as an unknown represented by u is obtained, and the arithmetic circuit 24 adds the G signal component of the GB spring force H × u to the addition target on the left side of Expression (25), and The B signal component of the GB spring force H × u is added as an addition target to the left side of Expression (27), and the process proceeds from step S179 to S180.

ステップS180において、演算回路24は、GRおよびGB空間における色相関の条件が付加された緑色の光量のバネ関係式、GR空間における色相関の条件が付加された赤色の光量のバネ関係式、GB空間における色相関の条件が付加された青色の光量のバネ関係式を、例えば、一次方程式として解くことにより、注目位置(I',J')における真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、および真の青色の光量Lb(I',J')をそれぞれ求め、ステップS181に進む。   In step S180, the arithmetic circuit 24 calculates the spring relational expression of the green light quantity to which the color correlation condition in the GR and GB spaces is added, the spring relational expression of red light quantity to which the condition of the color correlation in the GR space is added, GB The true green light quantity Lg (I ′, J ′) at the target position (I ′, J ′) is obtained by solving the spring relational expression of the blue light quantity to which the color correlation condition in the space is added, for example, as a linear equation. ), The true red light amount Lr (I ′, J ′) and the true blue light amount Lb (I ′, J ′) are obtained, respectively, and the process proceeds to step S181.

ステップS181において、演算回路24は、すべての位置(I',J')を注目位置としたか、即ち、1枚目の撮像画像の画素の中心位置のすべてを注目位置(I',J')として、真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、および真の青色の光量Lb(I',J')を求めたか否かを判定する。   In step S181, the arithmetic circuit 24 sets all the positions (I ′, J ′) as the target positions, that is, sets all the center positions of the pixels of the first captured image as the target positions (I ′, J ′). ) As to whether the true green light amount Lg (I ′, J ′), the true red light amount Lr (I ′, J ′), and the true blue light amount Lb (I ′, J ′) are obtained. Determine.

ステップS181で、すべての位置(I',J')をまだ注目位置として求めていないと判定された場合、ステップS171に戻り、ステップS171乃至S181の処理が繰り返される。即ち、演算回路24は、まだ注目していない位置(I',J')を次の注目位置(I',J')として、注目位置(I',J')における真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、および真の青色の光量Lb(I',J')をそれぞれ求める。   If it is determined in step S181 that all positions (I ′, J ′) have not yet been obtained as attention positions, the process returns to step S171, and the processes in steps S171 to S181 are repeated. That is, the arithmetic circuit 24 sets the position (I ′, J ′) that has not been noticed as the next attention position (I ′, J ′), and the true green light amount Lg at the attention position (I ′, J ′). (I ′, J ′), true red light quantity Lr (I ′, J ′), and true blue light quantity Lb (I ′, J ′) are obtained.

一方、ステップS181で、すべての位置(I',J')を注目位置としたと判定された場合、ステップS182に進み、演算回路24は、ステップS180で求めた真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、真の青色の光量Lb(I',J')から、画像(信号)を推定し、D/Aコンバータ9またはコーデック12に出力画像として供給し、処理を戻る。例えば、「i番目、j番目の画素」においては、演算回路24は、緑色の値(G信号)としてステップS180で求めた真の緑色の光量Lg(i−0.5,j−0.5)と、赤色の値(R信号)としてステップS180で求めた真の赤色の光量Lr(i−0.5,j−0.5)と、青色の値(B信号)としてステップS180で求めた真の青色の光量Lb(i−0.5,j−0.5)とから、「i番目、j番目の画素」の画像信号を推定する。そして、演算回路24は、その推定を位置(I',J')を中心位置とする画素すべてに行うことにより、出力画像を推定する。   On the other hand, if it is determined in step S181 that all positions (I ′, J ′) are the target positions, the process proceeds to step S182, and the arithmetic circuit 24 calculates the true green light amount Lg (I) obtained in step S180. ', J'), a true red light quantity Lr (I ', J'), and a true blue light quantity Lb (I ', J'), an image (signal) is estimated, and the D / A converter 9 or codec 12 is supplied as an output image, and the process returns. For example, in the “i-th and j-th pixels”, the arithmetic circuit 24 calculates the true green light amount Lg (i−0.5, j−0.5) obtained in step S180 as a green value (G signal). ), The true red light amount Lr (i−0.5, j−0.5) obtained in step S180 as a red value (R signal), and the blue value (B signal) obtained in step S180. From the true blue light quantity Lb (i−0.5, j−0.5), the image signal of the “i th and j th pixels” is estimated. Then, the arithmetic circuit 24 estimates the output image by performing the estimation on all the pixels having the position (I ′, J ′) as the center position.

以上のように、第7実施の形態では、色相関の条件をさらに付加することにより、ノイズ等による誤差を軽減した、より正確な解、即ち、より本来の光に忠実で鮮明な画像を求めることができる。   As described above, in the seventh embodiment, a color correlation condition is further added to obtain a more accurate solution that reduces errors due to noise and the like, that is, a clearer image that is more faithful to the original light. be able to.

さて、本発明の特徴を明確にするために、再度、本発明と、従来技術の違いを説明する。   Now, in order to clarify the features of the present invention, the difference between the present invention and the prior art will be described again.

図40は、本発明の方法と従来の方法の処理の流れを示している。   FIG. 40 shows a processing flow of the method of the present invention and the conventional method.

図40に示したように、従来から、「図中の(ア):単板センサから出力された画像(例えば、ベイヤー配列の画像:1画素につきR信号、G信号、またはB信号のいずれか1つしかない画像)から、通常のカラー画像(1画素につきR信号、G信号、およびB信号の3つのデータが揃った画像)への変換方法」は、いくつも存在している。事実、製品として販売されている単板センサを用いたデジタルスチルカメラには、この変換方法がインプリメントされているものがある。この変換方法は、デモザイキングと呼ばれる処理である。   As shown in FIG. 40, conventionally, “(a) in the figure: an image output from a single-plate sensor (for example, an image of a Bayer array: one of R signal, G signal, or B signal per pixel) There are a number of “conversion methods from only one image) to a normal color image (an image having three data of R signal, G signal, and B signal for each pixel)”. In fact, some digital still cameras using a single-plate sensor sold as a product implement this conversion method. This conversion method is a process called demosaicing.

そして、従来から、「図中の(イ):複数枚の暗い(あるいはSN比の悪い)カラー画像(1画素につきR信号、G信号、およびB信号の3つのデータが揃った画像)から、鮮明な(あるいはSN比の良い)カラー画像(1画素につきR信号、G信号、およびB信号の3つのデータが揃った画像)を作成する方法」も、知られていた。具体的には、従来の技術のところで述べた特許文献2や特許文献3などの方法である。   Conventionally, “(a) in the figure: from a plurality of dark (or poor S / N ratio) color images (images having three data of R signal, G signal, and B signal per pixel) A method of creating a clear (or a good S / N ratio) color image (an image having three data of R signal, G signal, and B signal for each pixel) is also known. Specifically, there are methods such as Patent Document 2 and Patent Document 3 described in the related art.

従って、これら2つの方法を組み合わせることで、「複数枚の暗い(あるいはSN比の悪い)単板センサから出力された画像(例えば、ベイヤー配列の画像:1画素につきR信号、G信号、またはB信号のいずれか1つしかない画像)から、鮮明な(あるいはSN比の良い)カラー画像(1画素につきR信号、G信号、およびB信号の3つのデータが揃った画像)を作成する」ことが出来る。   Therefore, by combining these two methods, “an image output from a plurality of dark (or poor S / N) single-plate sensors (for example, an image of a Bayer array: R signal, G signal, or B per pixel) Create a clear (or good signal-to-noise ratio) color image (an image with three data of R, G, and B signals per pixel) from an image that has only one signal) I can do it.

つまり、複数枚(m枚)の暗い(あるいはSN比の悪い)単板センサから出力された画像(例えば、ベイヤー配列の画像:1画素につきR信号、G信号、またはB信号のいずれか1つしかない画像)201−mのそれぞれに対して、図中の(ア)で示されるようにデモザイキング処理202−mを行い、暗い(あるいはSN比の悪い)カラー画像(1画素につきR信号、G信号、およびB信号の3つのデータが揃った画像)203−mを一度作成する。そして、それらカラー画像203−mに対して、図中の(イ)で示した特許文献2や特許文献3の方法を使って、鮮明な(あるいはSN比の良い)カラー画像(1画素につきR信号、G信号、およびB信号の3つのデータが揃った画像)204を作成すればよい。ここで、mは、所定の枚数を表す整数とする。   That is, an image (for example, Bayer array image: one of R signal, G signal, or B signal per pixel) output from a plurality (m) of dark (or poor SN ratio) single-plate sensors. A demosaicing process 202-m is performed on each of the (only images) 201-m, as shown in (a) in the figure, and a dark (or poor S / N ratio) color image (R signal per pixel) The image 203-m is created once. Then, for these color images 203-m, a clear (or good SN ratio) color image (R per pixel) is obtained by using the methods of Patent Document 2 and Patent Document 3 shown in FIG. An image 204 in which three data of the signal, the G signal, and the B signal are gathered may be created. Here, m is an integer representing a predetermined number.

さて、デモザイキングの処理では、当然、補間処理あるいはそれに類似の処理が行われるので、画像の鮮明さは薄れる。そして、特許文献2や特許文献3などにおける処理でも、デジタルサンプリングされたデータの位置合わせを行うため、補間処理が行われるので、ここでも画像の鮮明さは薄れる。このように、図中の(ア)および(イ)において、補間処理が合計で2回行われるので、画像の鮮明さはかなり薄れる。ちなみに、補間処理は、周囲のデータから特定の地点でのデータを復元する際に用いられる処理であり、補間すればするほど画像の鮮明さがなくなるのは明白である。   In the demosaicing process, naturally, an interpolation process or a process similar thereto is performed, so that the sharpness of the image is reduced. In the processes in Patent Document 2 and Patent Document 3 and the like, the interpolation of the digitally sampled data is performed, so that the sharpness of the image is reduced. Thus, in (a) and (b) in the figure, the interpolation processing is performed twice in total, so that the sharpness of the image is considerably diminished. Incidentally, the interpolation process is a process used when restoring data at a specific point from the surrounding data, and it is clear that the sharper the image becomes, the more the interpolation is performed.

一方、本発明においては、「複数枚の暗い(あるいはSN比の悪い)単板センサから出力された画像(例えば、ベイヤー配列の画像:1画素につきR信号、G信号、またはB信号のいずれか1つしかない画像)から、直接、鮮明な(あるいはSN比の良い)カラー画像(1画素につきR信号、G信号、およびB信号の3つのデータが揃った画像)を作成する」ので、補間処理あるいはそれに類似する処理が1箇所しか存在しない。従って、従来の方法よりも鮮明な画像を復元することができる。このように、本発明と従来技術の違い、および、本発明の利点は、明白である。   On the other hand, in the present invention, “an image output from a plurality of dark (or poor signal-to-noise ratio) single-plate sensors (for example, an image in a Bayer array: one of R signal, G signal, or B signal per pixel) "It creates a clear (or good S / N ratio) color image (an image with three data of R signal, G signal, and B signal per pixel) directly from" there is only one image ". There is only one process or similar process. Therefore, a clearer image than the conventional method can be restored. Thus, the difference between the present invention and the prior art and the advantages of the present invention are clear.

また、従来の方法では、各画像に対してデモザイキング処理を行うので、例えば、8枚の画像がある場合、8回のデモザイキング処理(図中の(ア))を行わなくてはならない。つまり、計算量が膨大になってしまう欠点もあった。   Further, in the conventional method, demosaicing processing is performed on each image. For example, when there are eight images, demosaicing processing ((A) in the figure) must be performed eight times. That is, there is a drawback that the calculation amount becomes enormous.

本発明と従来の方法との差異を別の見方により説明する。   The difference between the present invention and the conventional method will be described from another viewpoint.

従来の技術のところで述べた特許文献2などに示される方法では、手ぶれの分だけ位置をずらして重ねると良いという事が述べられている。これは、手ぶれの分だけ位置をずらした画像を補間により作成することを意味している。N枚の画像を重ね合わせるということは、出力画像のすべての画素は、N個分のデータが重ね合わせられるということになる。従って、重ね合わせた後に、すべての画素に対して、一定の値(つまり、N、あるいは、「(適正露出における露出時間)÷(実際の撮影における露出時間)÷N」)で割ることになる。また、ある決まった一定量の画素のずれを起こして、複数枚撮影して、それら画像の位置合わせを行いながら、合成していくことで高精彩な画像を得るという方法も従来からあったが、その場合でも、ずれ量が決まっているので、出力画像の各画素において、常にあらかじめ決められた値で割っていく(正規化していく)ことを行っていた。   In the method disclosed in Patent Document 2 described in the background of the prior art, it is described that the positions may be shifted and overlapped by the amount of camera shake. This means that an image whose position is shifted by the amount of camera shake is created by interpolation. Superimposing N images means that N pixels of data are superimposed on all pixels of the output image. Therefore, after overlapping, all pixels are divided by a fixed value (that is, N or “(exposure time at proper exposure) ÷ (exposure time at actual photographing) ÷ N”). . In addition, there has also been a method of obtaining a high-definition image by causing a certain fixed amount of pixel shift, shooting a plurality of images, and combining the images while aligning the images. Even in this case, since the deviation amount is determined, each pixel of the output image is always divided (normalized) by a predetermined value.

それに対して、本発明の第1実施の形態や第2実施の形態では、出力画像の各位置(x,y)における条件の数、すなわち真の値の推定に用いることができる観測値(観測画素)の数は、場合によって変わる。ある人がある場面を撮影したときにおいて、ある位置(x,y)については、その近傍に沢山の入力画素Gobs(k,ig,jg)がある可能性がある。その場合、その位置(x,y)が関与する式(20)は、多くなる。また、その近傍に少しの入力画素Gobs(k,ig,jg)しかなければ、その位置(x,y)が関与する式(20)は、少なくなる。このように、出力画像の各位置(x,y)が関与する条件式の数は可変で、実際に撮影したときの状態(手ぶれによるずれ量)に依存する。このため、各画素位置の真の値の推定では、撮像状態(画像間の動き)に応じて、考慮すべき候補となる観測点およびその数等が適応的に変化し得る。この場合、例えば、観測点の数を固定しておき候補観測点からその数の観測点を選択するという構成、観測点の数と選択される観測点の双方を変動させる構成、或いは、観測点の位置、数や分布等についての所定の条件に応じて両者を使い分ける構成等が可能である。   On the other hand, in the first embodiment and the second embodiment of the present invention, the number of conditions at each position (x, y) of the output image, that is, an observed value (observation) that can be used to estimate the true value. The number of pixels varies from case to case. When a certain person captures a scene, there is a possibility that there are many input pixels Gobs (k, ig, jg) near the position (x, y). In that case, the equation (20) involving the position (x, y) increases. Also, if there are only a few input pixels Gobs (k, ig, jg) in the vicinity, the equation (20) involving the position (x, y) is reduced. As described above, the number of conditional expressions related to each position (x, y) of the output image is variable, and depends on the state (shift amount due to camera shake) when the image is actually taken. For this reason, in the estimation of the true value of each pixel position, the observation points that are candidates to be considered and the number thereof can be adaptively changed according to the imaging state (movement between images). In this case, for example, a configuration in which the number of observation points is fixed and that number of observation points is selected from the candidate observation points, a configuration in which both the number of observation points and the selected observation points are changed, or an observation point It is possible to employ a configuration in which both are used in accordance with predetermined conditions regarding the position, number, distribution, and the like.

また、本発明の第3乃至第7実施の形態では、手ぶれの分だけ位置をずらすが、ベイヤー配列のため、すべての出力位置に、なにかしらのデータが必ず加算されるわけではない。k枚目の画像について、図21に示した2×2画素の中に、位置補正したデータがなければ、その出力画素には、k枚目の画像のどのデータも加味されない。逆に、図21に示した2×2画素の中に、位置補正したデータが2つあれば、その出力画素には、2つのデータが(重みをつけて)加算される。より具体的に述べると、ある画素は、最終的に、重みの合計が10であれば、10で割って、出力画素となる。また、別の画素は、最終的に、重みの合計が3.5であれば、3.5で割って、出力画素となる。つまり、本発明では、式(25)、式(26)、式(27)などに示す式において、Σで加算される総数が、実際に撮影したときの状態(手ぶれによるずれ量)に依存する。このため、各画素位置の真の値の推定では、撮像状態(画像間の動き)に応じて、考慮すべき候補となる観測点およびその数等が適応的に変化し得る。   In the third to seventh embodiments of the present invention, the position is shifted by the amount of camera shake, but because of the Bayer array, some data is not necessarily added to all output positions. If there is no position-corrected data in the 2 × 2 pixels shown in FIG. 21 for the k-th image, none of the data of the k-th image is added to the output pixel. On the other hand, if there are two pieces of position-corrected data in the 2 × 2 pixels shown in FIG. 21, two data are added (weighted) to the output pixels. More specifically, a certain pixel will eventually become an output pixel by dividing by 10 if the total weight is 10. Another pixel finally becomes an output pixel by dividing by 3.5 if the total weight is 3.5. In other words, in the present invention, in the expressions shown in Expression (25), Expression (26), Expression (27), and the like, the total number added by Σ depends on the actual shooting state (shift amount due to camera shake). . For this reason, in the estimation of the true value of each pixel position, the observation points that are candidates to be considered and the number thereof can be adaptively changed according to the imaging state (movement between images).

このように、本発明においては、「単板センサ(ベイヤー配列のセンサ)から出力された複数の画像から、鮮明な画像を復元する場合には、条件式の数が可変、あるいは、重みが可変としなくてはいけない場合がある」ことを考慮しながら、適切な復元方法を提供した点が、従来では出来なかったことである。   As described above, in the present invention, when restoring a clear image from a plurality of images output from a single-plate sensor (Bayer array sensor), the number of conditional expressions is variable or the weight is variable. In view of the fact that there is a case where it is necessary to do so, an appropriate restoration method has been provided.

上述した一連の処理は、専用のハードウエアにより実行させることもできるし、ソフトウエアにより実行させることもできる。この場合、例えば、デジタルカメラ1は、図41に示されるようなコンピュータにプログラムを実行させることにより実現することができる。   The series of processes described above can be executed by dedicated hardware or can be executed by software. In this case, for example, the digital camera 1 can be realized by causing a computer as shown in FIG. 41 to execute a program.

図41において、CPU(Central Processing Unit)301は、ROM(Read Only Memory)302に記憶されているプログラム、または記憶部308からRAM(Random Access Memory)303にロードされたプログラムに従って各種の処理を実行する。RAM303にはまた、CPU301が各種の処理を実行する上において必要なデータなども適宜記憶される。CPU301は、信号処理回路7の動き検出回路23および演算回路24等が行う処理を実行する。   41, a CPU (Central Processing Unit) 301 executes various processes according to a program stored in a ROM (Read Only Memory) 302 or a program loaded from a storage unit 308 to a RAM (Random Access Memory) 303. To do. The RAM 303 also appropriately stores data necessary for the CPU 301 to execute various processes. The CPU 301 executes processing performed by the motion detection circuit 23 and the arithmetic circuit 24 of the signal processing circuit 7.

CPU301、ROM302、およびRAM303は、バス304を介して相互に接続されている。このバス304にはまた、入出力インタフェース305も接続されている。   The CPU 301, ROM 302, and RAM 303 are connected to each other via a bus 304. An input / output interface 305 is also connected to the bus 304.

入出力インタフェース305には、キーボード、マウスなどよりなる入力部306、CRT(Cathode Ray Tube)、LCD(Liquid Crystal display)などよりなるディスプレイ、並びにスピーカなどよりなる出力部307、ハードディスクなどより構成される記憶部308、モデム、ターミナルアダプタなどより構成される通信部309が接続されている。通信部309は、インターネットなどのネットワークを介しての通信処理を行う。撮像部311は、図1で示される撮像素子4などを有し、被写体を撮像し、その撮像した被写体の画像データを入出力インタフェース305を介してCPU301等に供給する。   The input / output interface 305 includes an input unit 306 including a keyboard and a mouse, a display including a CRT (Cathode Ray Tube) and an LCD (Liquid Crystal display), an output unit 307 including a speaker, and a hard disk. A communication unit 309 including a storage unit 308, a modem, a terminal adapter, and the like is connected. The communication unit 309 performs communication processing via a network such as the Internet. The imaging unit 311 includes the imaging device 4 illustrated in FIG. 1 and the like, images a subject, and supplies image data of the captured subject to the CPU 301 and the like via the input / output interface 305.

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

(第8実施の形態)
次に、信号処理回路7における、画像推定処理の第8実施の形態について説明する。第8実施の形態は、図24で説明した第3実施の形態の一部を改良したものである。
(Eighth embodiment)
Next, an eighth embodiment of image estimation processing in the signal processing circuit 7 will be described. In the eighth embodiment, a part of the third embodiment described with reference to FIG. 24 is improved.

第3実施の形態では、撮像素子4(図1)の各画素で受光されるデータ(受光量)をポイントサンプリングされたデータとして捉え、各画素中心で観測された画素値とカメラブレのない鮮明な画像としての画像信号との関係をバネモデルで表すことにより、より本来の光に忠実で鮮明な画像を求めた。   In the third embodiment, data received by each pixel of the image sensor 4 (FIG. 1) (amount of received light) is regarded as point-sampled data, and the pixel value observed at the center of each pixel is not clear and there is no camera shake. By expressing the relationship with the image signal as an image by a spring model, a clear image more faithful to the original light was obtained.

例えば、カメラブレのない鮮明な画像としての画像信号を構成するG信号、R信号、およびB信号のうちの、G信号については、第3実施の形態では、各画素中心の位置(I',J')の求めるべき真の緑色の光量Lg(I',J')を、上述したように、式(25)の緑色の光量のバネ関係式により表した。   For example, regarding the G signal among the G signal, the R signal, and the B signal that form an image signal as a clear image without camera shake, in the third embodiment, the position (I ′, J As described above, the true green light quantity Lg (I ′, J ′) to be obtained by “) is represented by the spring relational expression of the green light quantity in the formula (25).

式(25)のバネ定数{√2−F((x,y),(I',J'))}/(Mk×E)のうちの{√2−F((x,y),(I',J'))}は、位置(I',J')と、位置(I',J')の近傍にある位置(x,y)との距離に対して単調減少する、いわば距離に応じた重みを表す。従って、位置(x,y)の画素値Gobs(k,ig,jg)と、位置(I',J')の真の緑色の光量Lg(I',J')とは、位置(I',J')と位置(x,y)との距離が大きくなるほど、バネの引っ張る力が弱くなり、位置(I',J')と位置(x,y)との距離が小さくなるほど、バネの引っ張る力が強くなる関係がある。   {√2-F ((x, y), () of the spring constant {√2−F ((x, y), (I ′, J ′))} / (Mk × E) in the equation (25) I ′, J ′))} is monotonously decreasing with respect to the distance between the position (I ′, J ′) and the position (x, y) in the vicinity of the position (I ′, J ′). Represents the weight according to. Therefore, the pixel value Gobs (k, ig, jg) at the position (x, y) and the true green light amount Lg (I ′, J ′) at the position (I ′, J ′) are equal to the position (I ′ , J ′) and the position (x, y) are increased, the pulling force of the spring is weakened, and the distance between the position (I ′, J ′) and the position (x, y) is decreased. There is a relationship in which the pulling force becomes stronger.

一方、式(25)のバネ定数{√2−F((x,y),(I',J'))}/(Mk×E)のうちの(Mk×E)は、相関2重サンプリング回路5(図1)で除去されないノイズ成分のノイズ量Eがゲインアップにより、Mk倍(k=1乃至N)されたものである。そして、1/(Mk×E)は、ノイズ量Eに対して単調減少する、いわばノイズによる重みを表す。従って、位置(x,y)の画素値Gobs(k,ig,jg)と、位置(I',J')の真の緑色の光量Lg(I',J')とは、ノイズ量Eが大きいほどバネの引っ張る力が弱くなり、ノイズ量Eが小さいほどバネの引っ張る力が強くなる関係がある。   On the other hand, (Mk × E) in the spring constant {√2−F ((x, y), (I ′, J ′))} / (Mk × E) in the equation (25) is correlated double sampling. The noise amount E of the noise component not removed by the circuit 5 (FIG. 1) is multiplied by Mk (k = 1 to N) due to gain increase. 1 / (Mk × E) represents a weight due to noise that monotonously decreases with respect to the noise amount E. Accordingly, the pixel value Gobs (k, ig, jg) at the position (x, y) and the true green light amount Lg (I ′, J ′) at the position (I ′, J ′) have an amount of noise E. The larger the value, the weaker the pulling force of the spring, and the smaller the noise amount E, the stronger the pulling force of the spring.

第8実施の形態では、式(25)で{√2−F((x,y),(I',J'))}とされていた、位置(I',J')と画素値Gobs(k,ig,jg)がある位置(x,y)との距離に応じた重み(以下、単に、距離重みと称する)として、例えば、キュービック(Cubic)関数を用いたCubic(I'−x)×Cubic(J'−y)を採用する。即ち、第8実施の形態では、式(25)の{√2−F((x,y),(I',J'))}に代えて、Cubic(I'−x)×Cubic(J'−y)を採用する。   In the eighth embodiment, the position (I ′, J ′) and the pixel value Gobs, which are {√2−F ((x, y), (I ′, J ′))} in Expression (25), are expressed. For example, Cubic (I′−x) using a cubic (Cubic) function as a weight (hereinafter simply referred to as a distance weight) according to the distance from (k, ig, jg) to a certain position (x, y). ) × Cubic (J'-y) is adopted. That is, in the eighth embodiment, instead of {√2-F ((x, y), (I ′, J ′))} in Expression (25), Cubic (I′−x) × Cubic (J '-Y) is adopted.

ここで、キュービック関数Cubic(z)は、次式(39)で表される。   Here, the cubic function Cubic (z) is expressed by the following equation (39).

Figure 0004613510
・・・(39)
Figure 0004613510
... (39)

なお、式(39)のaは、予め決められた定数であり、例えば、−1などとされる。   In the equation (39), a is a predetermined constant, for example, -1.

キュービック関数Cubic(z)は、図42に示すように、変数zが、2≦|z|、および|z|=1の場合には、0となり、1<|z|<2の場合には、負の値となる。また、|z|<1の場合には、Cubic(z)は、正の値となり、かつ、|z|の値が大きくなるに従い、小さくなる。換言すれば、キュービック関数Cubic(z)は、周波数軸で考えた場合(フーリエ変換した場合)にローパスフィルタの特性を有する関数である。   As shown in FIG. 42, the cubic function Cubic (z) becomes 0 when the variable z is 2 ≦ | z | and | z | = 1, and when 1 <| z | <2, , Negative value. When | z | <1, Cubic (z) becomes a positive value and decreases as the value of | z | increases. In other words, the cubic function Cubic (z) is a function having a low-pass filter characteristic when considered on the frequency axis (when Fourier transformed).

なお、式(25)における、サメーション(Σ)の対象のp個目の画素値Gobs(k,ig,jg)をvpと表すとともに、そのp個目の画素値vpに対するバネ定数{√2−F((x,y),(I',J'))}/(Mk×E)を、バネ定数Kpと表し、さらに、式(25)を、真の緑色の光量Lg(I',J')について解くと、式(40)が得られる。 In Expression (25), the p-th pixel value Gobs (k, ig, jg) to be subjected to the summation (Σ) is represented by v p and the spring constant { p p pixel value v p { √2-F ((x, y), (I ′, J ′))} / (Mk × E) is represented as a spring constant K p, and further, the expression (25) is converted into a true green light quantity Lg ( Solving for I ′, J ′) yields equation (40).

Figure 0004613510
・・・(40)
Figure 0004613510
... (40)

ここで、式(40)において、Σは、pについてのサメーションを表す。   Here, in formula (40), Σ represents a summation about p.

式(40)から、バネモデルによれば、真の緑色の光量Lg(I',J')は、バネ定数Kpを重みとし、画素値vpを用いた重み付け加算を行うことにより求められている、ということができる。真の赤色の光量Lr(I',J')および真の青色の光量Lb(I',J')についても、同様である。 From equation (40), according to the spring model, the true green light quantity Lg (I ′, J ′) is obtained by weighting the spring constant K p and using the pixel value v p. It can be said that. The same applies to the true red light amount Lr (I ′, J ′) and the true blue light amount Lb (I ′, J ′).

図43は、位置(I',J')に対して、N枚の撮像画像の位置(ig−0.5,jg−0.5)を基準座標系(1枚目の座標系)上に変換した位置(x,y)が、I'−2≦x<I'+2,J'−2≦y<J'+2を満たす整数k,ig,jgの組をすべて求め、その画素値Gobs(k,ig,jg)が観測された点G11乃至G19を示したものである。   FIG. 43 shows the positions (ig−0.5, jg−0.5) of N captured images with respect to the position (I ′, J ′) on the reference coordinate system (first coordinate system). All pairs of integers k, ig, and jg satisfying I′−2 ≦ x <I ′ + 2 and J′−2 ≦ y <J ′ + 2 at the converted position (x, y) are obtained, and the pixel value Gobs ( k, ig, jg) are points G11 to G19 where the observed points are shown.

図43では、黒丸で示される位置(I',J')に対して、白丸で示される点G11乃至点G19で観測された9つの画素値Gobs(k,ig,jg)を特定する(k,ig,jg)の組が得られている。なお、点G11乃至G19の整数k,ig,jgの組は、それぞれ異なるものである。   In FIG. 43, nine pixel values Gobs (k, ig, jg) observed at points G11 to G19 indicated by white circles are specified for the position (I ′, J ′) indicated by black circles (k , Ig, jg) is obtained. The sets of integers k, ig, and jg at points G11 to G19 are different from each other.

ここで、第3実施の形態においては、図21で示したように、位置(I',J')に対して、N枚の撮像画像の位置(ig−0.5,jg−0.5)を基準座標系(1枚目の座標系)上に変換された位置(x,y)が、I'−1≦x<I'+1,J'−1≦y<J'+1を満たす整数k,ig,jgの組を求めたのに対して、第8実施の形態では、図43に示すように、I'−2≦x<I'+2,J'−2≦y<J'+2を満たす整数k,ig,jgの組を求めている。これは、上述したように、式(39)で表されるキュービック関数Cubic(z)が、−2≦z≦2の範囲で、引数zに応じた値をとるので(|z|>2の範囲では、引数zにかかわらず0であるので)、その範囲と対応する範囲、即ち、I'−2≦x<I'+2、およびJ'−2≦y<J'+2の範囲で観測される画素値Gobs(k,ig,jg)を用いて、位置(I',J')の真の緑色の光量Lg(I',J')を推定するためである。   Here, in the third embodiment, as shown in FIG. 21, the positions (ig−0.5, jg−0.5) of the N captured images with respect to the position (I ′, J ′). ) On the reference coordinate system (first coordinate system) is an integer satisfying I′−1 ≦ x <I ′ + 1 and J′−1 ≦ y <J ′ + 1. Whereas a set of k, ig, and jg is obtained, in the eighth embodiment, as shown in FIG. 43, I′−2 ≦ x <I ′ + 2, J′−2 ≦ y <J ′ + 2 A set of integers k, ig, and jg that satisfy the above is obtained. As described above, this is because the cubic function Cubic (z) represented by the equation (39) takes a value corresponding to the argument z in the range of −2 ≦ z ≦ 2 (| z |> 2). The range is 0 regardless of the argument z), so that the range corresponding to that range, ie, I′−2 ≦ x <I ′ + 2 and J′−2 ≦ y <J ′ + 2 is observed. This is because the true green light amount Lg (I ′, J ′) at the position (I ′, J ′) is estimated using the pixel value Gobs (k, ig, jg).

また、第3実施の形態においては、次のようにして、k枚目の撮像画像の位置(ig−0.5,jg−0.5)を、基準座標系である1枚目の撮像画像の位置((ig−0.5)(k),(jg−0.5)(k))に変換していた。即ち、動き検出回路23−(k−1)は、1枚目の撮像画像とk枚目の撮像画像との位置関係から、回転角度θk、スケールSk、平行移動量(Tkx,Tky)で構成されるアフィン変換の変換パラメータ(θk,Tkx,Tky,Sk)を求め、演算回路24に供給する。そして、演算回路24が、動き検出回路23−(k−1)から供給された変換パラメータ(θk,Tkx,Tky,Sk)をアフィン変換の式(3)に用いて、k枚目の撮像画像の位置(ig−0.5,jg−0.5)を、基準座標系における位置((ig−0.5)(k),(jg−0.5)(k))に変換する。 In the third embodiment, the position of the k-th captured image (ig-0.5, jg-0.5) is set to the first captured image that is the reference coordinate system as follows. position which was converted to ((ig-0.5) (k ), (jg-0.5) (k)). That is, the motion detection circuit 23- (k-1) is configured with a rotation angle θk, a scale Sk, and a parallel movement amount (Tkx, Tky) based on the positional relationship between the first captured image and the kth captured image. Conversion parameters (θk, Tkx, Tky, Sk) of the affine transformation to be performed are obtained and supplied to the arithmetic circuit 24. Then, the arithmetic circuit 24 uses the transformation parameters (θk, Tkx, Tky, Sk) supplied from the motion detection circuit 23- (k-1) in the affine transformation equation (3) to obtain the k-th captured image. (Ig−0.5, jg−0.5) is converted into a position ((ig−0.5) (k) , (jg−0.5) (k) ) in the reference coordinate system.

一方、第8実施の形態では、動き検出回路23−(k−1)は、1枚目の撮像画像とk枚目の撮像画像との位置関係が次式(41)で表されるアフィン変換の変換パラメータを求める。   On the other hand, in the eighth embodiment, the motion detection circuit 23- (k-1) uses an affine transformation in which the positional relationship between the first captured image and the kth captured image is expressed by the following equation (41). The conversion parameter of is obtained.

Figure 0004613510
・・・(41)
Figure 0004613510
... (41)

即ち、動き検出回路23−(k−1)は、1枚目の撮像画像とk枚目の撮像画像との位置関係を表す式(41)の行列(ak',bk',ck',dk')と2次元ベクトル(Tkx',Tky')を求め、演算回路24に供給する。ここで、式(41)の行列(ak',bk',ck',dk')と2次元ベクトル(Tkx',Tky')で表されるアフィン変換の変換パラメータを、単に、変換パラメータ(ak',bk',dk',Tkx',Tky')と称する。   That is, the motion detection circuit 23- (k-1) is a matrix (ak ′, bk ′, ck ′, dk) of Expression (41) that represents the positional relationship between the first captured image and the kth captured image. ') And a two-dimensional vector (Tkx', Tky ') are obtained and supplied to the arithmetic circuit 24. Here, the transformation parameters of the affine transformation represented by the matrix (ak ′, bk ′, ck ′, dk ′) and the two-dimensional vector (Tkx ′, Tky ′) in the equation (41) are simply converted into the transformation parameter (ak ', Bk', dk ', Tkx', Tky ').

なお、ak'=dk'=Sk×cos(θk)とするとともに、−bk'=ck'= Sk×sin(θk)とすることにより、式(41)は、式(3)と一致する。   In addition, by setting ak ′ = dk ′ = Sk × cos (θk) and −bk ′ = ck ′ = Sk × sin (θk), Expression (41) matches Expression (3).

ここで、式(41)の(Xk,Yk)は、式(3)と同様に、k枚目の撮像画像の画素の位置であり、(X1(k),Y1(k))は、位置(Xk,Yk)を式(41)でアフィン変換した1枚目の撮像画像上の位置(基準座標系上の位置)を表している。即ち、下付きの(k)は、k枚目の画像のある位置が基準座標系上に位置変換されたことを表している。なお、1枚目の撮像画像については、変換パラメータ(a1',b1',c1',d1',T1x',T1y')=(1,0,0,1,0,0)とみなすことで、k=1乃至Nに対して、式(41)が成り立つ。 Here, (Xk, Yk) in Expression (41) is the position of the pixel of the k-th captured image, and (X1 (k) , Y1 (k) ) is the position as in Expression (3). This represents the position (position on the reference coordinate system) on the first captured image obtained by affine transformation of (Xk, Yk) with Expression (41). That is, the subscript (k) indicates that a certain position of the k-th image has been converted on the reference coordinate system. Note that the first captured image is regarded as conversion parameters (a1 ′, b1 ′, c1 ′, d1 ′, T1x ′, T1y ′) = (1, 0, 0, 1, 0, 0). , K = 1 to N, the equation (41) is established.

例えば、動き検出回路23−1では、1枚目の撮像画像と2枚目の撮像画像との位置関係が次式(42)で表されるような、変換パラメータ(a2',b2',c2',d2',T2x',T2y')が求められ、演算回路24に供給される。   For example, in the motion detection circuit 23-1, conversion parameters (a2 ′, b2 ′, c2) in which the positional relationship between the first captured image and the second captured image is expressed by the following equation (42). ', D2', T2x ', T2y') are obtained and supplied to the arithmetic circuit 24.

Figure 0004613510
・・・(42)
Figure 0004613510
... (42)

また、例えば、動き検出回路23−2では、1枚目の撮像画像と3枚目の撮像画像との位置関係が次式(43)で表されるような、変換パラメータ(a3',b3',c3',d3',T3x',T3y')が求められ、演算回路24に供給される。   Further, for example, in the motion detection circuit 23-2, conversion parameters (a3 ′, b3 ′) in which the positional relationship between the first captured image and the third captured image is expressed by the following equation (43). , C3 ′, d3 ′, T3x ′, T3y ′) are obtained and supplied to the arithmetic circuit 24.

Figure 0004613510
・・・(43)
Figure 0004613510
... (43)

式(43)は、3枚目の撮像画像上の位置(X3,Y3)が、1枚目の撮像画像上の位置(X1,Y1)に対して、例えば、手持ち撮影のため、変換パラメータ(a3',b3',c3',d3',T3x',T3y')の分だけ移動したことを意味する。   Expression (43) indicates that the position (X3, Y3) on the third captured image is compared with the position (X1, Y1) on the first captured image, for example, for the handheld shooting, the conversion parameter ( a3 ′, b3 ′, c3 ′, d3 ′, T3x ′, T3y ′).

変換パラメータ(ak',bk',ck',dk',Tkx',Tky')は、上述のように、1枚目の撮像画像を基準とする、k枚目の撮像画像の位置関係からを求める他、デジタルカメラ1に加速度センサを設け、その加速度センサの出力から、いわば、メカニカル的に求めるようにすることもできる。また、手持ち撮影による手ブレでは、1枚目の撮像画像とk枚目の撮像画像との位置関係には、回転成分はほとんど含まれていないと考えることができるので、以下では、変換パラメータ(ak',bk',ck',dk',Tkx',Tky')の回転成分は、無視することができるもの(回転していないことを表す固定の値)としても良い。   As described above, the conversion parameters (ak ′, bk ′, ck ′, dk ′, Tkx ′, Tky ′) are obtained from the positional relationship of the k-th captured image with reference to the first captured image. In addition to obtaining, an acceleration sensor may be provided in the digital camera 1, and so-called mechanically obtained from the output of the acceleration sensor. In addition, in hand-held camera shake, it can be considered that the positional relationship between the first captured image and the k-th captured image contains almost no rotation component. The rotation components of ak ′, bk ′, ck ′, dk ′, Tkx ′, and Tky ′) may be negligible (fixed values indicating that they are not rotating).

一方、式(25)のノイズによる重みに関しては、第8実施の形態では、N枚の撮像画像について、すべて同一のゲインアップ(n'ビットシフト)が行われているものとする。即ち、第8実施の形態では、撮像素子4で撮像されたN枚の画像(入力画像)は、いずれも、適正露出で撮像された画像の1/M=1/Mkの明るさであるとする。例えば、撮像画像が適正露出で撮像された画像の1/8の明るさである場合、M=8となり、シフト回路21(図1)では、3ビットシフトによりゲインアップを行うことができる。   On the other hand, regarding the weighting due to noise in Expression (25), in the eighth embodiment, it is assumed that the same gain-up (n′-bit shift) is performed for all N captured images. In other words, in the eighth embodiment, the N images (input images) captured by the image sensor 4 are all 1 / M = 1 / Mk brightness of the image captured with appropriate exposure. To do. For example, when the captured image is 1/8 the brightness of an image captured with appropriate exposure, M = 8, and the shift circuit 21 (FIG. 1) can increase the gain by 3-bit shift.

シフト回路21において、N枚の撮像画像に対して、すべて同一のゲインアップを行うことにより、式(25)のノイズによる重み1/(Mk×E)は、第8実施の形態では、1/(M×E)と表すことができる。   In the shift circuit 21, the same gain-up is performed on all the N captured images, so that the weight 1 / (Mk × E) due to the noise in Equation (25) is 1 / (Mk × E) in the eighth embodiment. (M × E).

以上から、第3実施の形態における式(25)は、第8実施の形態では、次式(44)のように表すことができる。   From the above, the expression (25) in the third embodiment can be expressed as the following expression (44) in the eighth embodiment.

Figure 0004613510
・・・(44)
Figure 0004613510
... (44)

ここで、式(44)におけるΣは、ある位置(I',J')に対して、位置(ig−0.5,jg−0.5)を変換パラメータ(ak',bk',ck',dk',Tkx',Tky')で変換した基準座標系上の位置(x,y)が、I'−2≦x<I'+2,J'−2≦y<J'+2を満たす(k,ig,jg)の組の個数分の和を表す。例えば、図43に示した例では、点G11乃至点G19の9個の(k,ig,jg)の組についての和となる。   Here, Σ in the equation (44) is obtained by converting the position (ig−0.5, jg−0.5) into the conversion parameters (ak ′, bk ′, ck ′) with respect to a certain position (I ′, J ′). , Dk ′, Tkx ′, Tky ′), the position (x, y) on the reference coordinate system satisfies I′−2 ≦ x <I ′ + 2, J′−2 ≦ y <J ′ + 2. k, ig, jg) represents the sum of the number of sets. For example, in the example shown in FIG. 43, it is the sum of nine (k, ig, jg) pairs of points G11 to G19.

式(44)は、式(25)の緑色の光量のバネ関係式に対応する、キュービック関数Cubic(z)を用いた、第8実施の形態の緑色の光量のバネ関係式であるということができる。   Equation (44) is the green light amount spring relational expression of the eighth embodiment using the cubic function Cubic (z) corresponding to the green light amount spring relational expression of Equation (25). it can.

式(44)のノイズによる重みである1/(M×E)は、Σの対象となる(k,ig,jg)の組に関係なく一定であるから、Σの対象から外すことができ、従って、式(44)は、次式(45)に変形することができる。   Since 1 / (M × E), which is a weight due to noise in Expression (44), is constant regardless of the set of (k, ig, jg) that is the object of Σ, it can be excluded from the object of Σ. Therefore, the equation (44) can be transformed into the following equation (45).

Figure 0004613510
・・・(45)
Figure 0004613510
... (45)

さらに、式(45)を、求めるべき真の緑色の光量Lg(I',J')について解くと、次式(46)が得られる。   Further, when the equation (45) is solved for the true green light quantity Lg (I ′, J ′) to be obtained, the following equation (46) is obtained.

Figure 0004613510
・・・(46)
Figure 0004613510
... (46)

第8実施の形態では、式(46)により、真の緑色の光量Lg(I',J')を求める。   In the eighth embodiment, the true green light amount Lg (I ′, J ′) is obtained by Expression (46).

式(46)によれば、真の緑色の光量Lg(I',J')は、Cubic(I'−x)×Cubic(J'−y)を重みとして、画素値Gobs(k,ig,jg)を用いた重み付け加算を行うことにより求められている、ということができる。ここで、重みCubic(I'−x)×Cubic(J'−y)は、位置(I',J')と画素値Gobs(k,ig,jg)がある位置(x,y)との距離に対してローパスフィルタの特性を有する。   According to the equation (46), the true green light quantity Lg (I ′, J ′) has a pixel value Gobs (k, ig,) with Cubic (I′−x) × Cubic (J′−y) as a weight. It can be said that it is obtained by performing weighted addition using jg). Here, the weight Cubic (I′−x) × Cubic (J′−y) is the position (I ′, J ′) and the position (x, y) where the pixel value Gobs (k, ig, jg) is located. It has the characteristics of a low-pass filter with respect to distance.

なお、以下では、式(46)を緑色の光量の重み加算式と称する。また、式(46)の緑色の光量の重み加算式の分子と分母を、次のように、式(47)と式(48)とする。   In the following, Expression (46) is referred to as a green light quantity weight addition expression. In addition, the numerator and denominator of the weight addition formula for the green light quantity in Expression (46) are expressed as Expression (47) and Expression (48) as follows.

Figure 0004613510
・・・(47)
Figure 0004613510
... (47)

Figure 0004613510
・・・(48)
Figure 0004613510
... (48)

また、画素値Gobs(k,ig,jg)が、シフト回路21においてM倍にゲインアップされる前のデータ(光量)をDGobs(k,ig,jg)とすると、式(46)は、式(49)のように表すことができる。 If the data (light quantity) before the pixel value Gobs (k, ig, jg) is increased by M times in the shift circuit 21 is D Gobs (k, ig, jg) , the equation (46) is It can be expressed as equation (49).

Figure 0004613510
・・・(49)
Figure 0004613510
... (49)

位置(I',J')における、真の赤色の光量Lr(I',J')と、真の青色の光量Lb(I',J')も、式(46)と同様に、式(50)と式(51)により、それぞれ表すことができる。   Similarly to the equation (46), the true red light amount Lr (I ′, J ′) and the true blue light amount Lb (I ′, J ′) at the position (I ′, J ′) 50) and equation (51), respectively.

Figure 0004613510
・・・(50)
Figure 0004613510
... (50)

以下において、式(50)を、赤色の光量の重み加算式と称する。ここで、式(50)におけるΣは、ある位置(I',J')に対して、位置(ir−0.5,jr−0.5)を変換パラメータ(ak',bk',ck',dk',Tkx',Tky')で変換した基準座標系上の位置(x,y)が、I'−2≦x<I'+2,J'−2≦y<J'+2を満たす(k,ir,jr)の組の個数分の和を表す。   Hereinafter, the equation (50) is referred to as a red light amount weight addition equation. Here, Σ in the equation (50) is a position (ir−0.5, jr−0.5) is converted into a conversion parameter (ak ′, bk ′, ck ′) with respect to a certain position (I ′, J ′). , Dk ′, Tkx ′, Tky ′), the position (x, y) on the reference coordinate system satisfies I′−2 ≦ x <I ′ + 2, J′−2 ≦ y <J ′ + 2. k, ir, jr) represents the sum of the number of sets.

Figure 0004613510
・・・(51)
Figure 0004613510
... (51)

以下において、式(51)を、青色の光量の重み加算式と称する。ここで、式(51)におけるΣは、ある位置(I',J')に対して、位置(ib−0.5,jb−0.5)を変換パラメータ(ak',bk',ck',dk',Tkx',Tky')で変換した基準座標系上の位置(x,y)が、I'−2≦x<I'+2,J'−2≦y<J'+2を満たす(k,ib,jb)の組の個数分の和を表す。   Hereinafter, Expression (51) is referred to as a blue light amount weight addition expression. Here, Σ in the equation (51) is obtained by converting the position (ib−0.5, jb−0.5) into the conversion parameters (ak ′, bk ′, ck ′) with respect to a certain position (I ′, J ′). , Dk ′, Tkx ′, Tky ′), the position (x, y) on the reference coordinate system satisfies I′−2 ≦ x <I ′ + 2, J′−2 ≦ y <J ′ + 2. k, ib, jb) represents the sum of the number of sets.

また、式(50)の赤色の光量の重み加算式の分子と分母を、それぞれ、式(52)と式(53)とする。   Also, the numerator and denominator of the red light amount weight addition formula of Formula (50) are represented by Formula (52) and Formula (53), respectively.

Figure 0004613510
・・・(52)
Figure 0004613510
... (52)

Figure 0004613510
・・・(53)
Figure 0004613510
... (53)

同様に、式(51)の青色の光量の重み加算式の分子と分母を、それぞれ、式(54)と式(55)とする。   Similarly, the numerator and the denominator of the weight addition formula for the blue light quantity in Expression (51) are represented by Expression (54) and Expression (55), respectively.

Figure 0004613510
・・・(54)
Figure 0004613510
... (54)

Figure 0004613510
・・・(55)
Figure 0004613510
... (55)

以上の、式(46)で表される緑色の光量の重み加算式、式(50)で表される赤色の光量の重み加算式、および式(51)で表される青色の光量の重み加算式を用いて、演算回路24が、真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、および真の青色の光量Lb(I',J')を求める処理を、後述する例外処理に対比させて、通常処理という。   The green light quantity weight addition formula represented by Expression (46), the red light quantity weight addition formula represented by Expression (50), and the blue light quantity weight addition represented by Formula (51). Using the equation, the arithmetic circuit 24 calculates the true green light amount Lg (I ′, J ′), the true red light amount Lr (I ′, J ′), and the true blue light amount Lb (I ′, J ′). The processing for obtaining ') is referred to as normal processing in contrast to exception processing described later.

次に、式(46)の緑色の光量の重み加算式、式(50)の赤色の光量の重み加算式、および式(51)の青色の光量の重み加算式について考察する。   Next, the weight addition formula for the green light quantity in Expression (46), the weight addition expression for the red light quantity in Expression (50), and the weight addition expression for the blue light quantity in Expression (51) will be considered.

まず、式(46)の緑色の光量の重み加算式は、位置(x,y)における画素値Gobs(k,ig,jg)と距離重みCubic(I'−x)×Cubic(J'−y)との積和(距離重みCubic(I'−x)×Cubic(J'−y)による画素値Gobs(k,ig,jg)の重み付け加算値)である式(47)の分子を、距離重みCubic(I'−x)×Cubic(J'−y)の総和である式(48)の分母で除算したものである。   First, the weight addition formula of the green light quantity in Expression (46) is obtained by calculating the pixel value Gobs (k, ig, jg) and the distance weight Cubic (I′−x) × Cubic (J′−y) at the position (x, y). ) And the numerator of equation (47), which is a weighted addition value of pixel values Gobs (k, ig, jg) by distance weight Cubic (I′−x) × Cubic (J′−y)) Divided by the denominator of the equation (48), which is the sum of the weights Cubic (I′−x) × Cubic (J′−y).

しかしながら、式(46)の分母である式(48)が0(ほぼ0も含む)となる場合、式(46)で求められる真の緑色の光量Lg(I',J')は、不安定(不定)な、信頼性のない値となる。換言すれば、式(46)の分母である式(48)が0となる位置(I',J')では、式(46)の分子における画素値Gobs(k,ig,jg)に含まれる僅かなノイズ成分(誤差)が、0である分母で除算されることにより、大きな値に増幅され、その結果、式(46)で求められる真の緑色の光量Lg(I',J')は、大きなノイズを含む信頼性のない値となる。   However, when the expression (48), which is the denominator of the expression (46), is 0 (including almost 0), the true green light amount Lg (I ′, J ′) obtained by the expression (46) is unstable. (Undetermined) Unreliable value. In other words, the position (I ′, J ′) where the expression (48), which is the denominator of the expression (46), is 0 is included in the pixel value Gobs (k, ig, jg) in the numerator of the expression (46). A small noise component (error) is divided by a denominator of 0 to be amplified to a large value. As a result, the true green light amount Lg (I ′, J ′) obtained by the equation (46) is The value is unreliable, including large noise.

分母である式(48)が0となる場合は、例えば、キュービック関数Cubic(I'−x)またはCubic(J'−y)のうちの少なくとも一方が、式(48)のサメーションの全範囲にわたって0となる場合である。そして、キュービック関数Cubic(I'−x)またはCubic(J'−y)が0となる場合は、図42で示したキュービック関数の特性から、I'−x=±1またはJ'−y=±1、即ち、x=I'±1またはy=J'±1となる場合である。   When the denominator formula (48) is 0, for example, at least one of the cubic functions Cubic (I′-x) or Cubic (J′-y) is the entire summation range of the formula (48) In this case, the value becomes 0 over the entire period. When the cubic function Cubic (I′−x) or Cubic (J′−y) is 0, I′−x = ± 1 or J′−y = from the characteristics of the cubic function shown in FIG. This is a case where ± 1, that is, x = I ′ ± 1 or y = J ′ ± 1.

従って、ある位置(I',J')に対して、位置(ig−0.5,jg−0.5)を変換パラメータ(ak',bk',ck',dk',Tkx',Tky')で基準座標系上に変換した場合に、I'−2≦x<I'+2,J'−2≦y<J'+2の範囲に出現する、すべての(k,ig,jg)の画素値Gobs(k,ig,jg)の位置(x,y)が、位置(I',J')とx=I'±1またはy=J'±1の関係があるとき、式(46)で求められる真の緑色の光量Lg(I',J')は、その分母が0(またはほぼ0)となるから、不安定(不定)な、信頼性のない値となる。但し、I'−2≦x<I'+2,J'−2≦y<J'+2の範囲に出現する画素値Gobs(k,ig,jg)の位置(x,y)すべてが、位置(I',J')と、x=I'±1またはy=J'±1の関係となる状態は、極めて特別な、例外的な状態であり、以下、この関係となる状態を例外状態と称する   Therefore, for a certain position (I ′, J ′), the position (ig−0.5, jg−0.5) is converted into the conversion parameters (ak ′, bk ′, ck ′, dk ′, Tkx ′, Tky ′). ) All (k, ig, jg) pixels appearing in the range of I′−2 ≦ x <I ′ + 2 and J′−2 ≦ y <J ′ + 2 when converted into the reference coordinate system. When the position (x, y) of the value Gobs (k, ig, jg) has a relationship of x = I ′ ± 1 or y = J ′ ± 1 with the position (I ′, J ′), the expression (46) The true green light quantity Lg (I ′, J ′) obtained in (1) is an unstable (undefined) and unreliable value because its denominator is 0 (or almost 0). However, all the positions (x, y) of the pixel values Gobs (k, ig, jg) appearing in the range of I′−2 ≦ x <I ′ + 2, J′−2 ≦ y <J ′ + 2 I ′, J ′) and x = I ′ ± 1 or y = J ′ ± 1 is a very special and exceptional state. Hereinafter, this state is referred to as an exceptional state. Call

ここで、k枚目の撮像画像の画素の位置(k,i,j)を、変換パラメータ(ak',bk',ck',dk',Tkx',Tky')で基準座標系上に変換した位置(x,y)を、以下、適宜、変換位置(x,y)(補正位置)ともいう。   Here, the pixel position (k, i, j) of the k-th captured image is converted on the reference coordinate system with the conversion parameters (ak ′, bk ′, ck ′, dk ′, Tkx ′, Tky ′). The position (x, y) thus obtained is hereinafter also referred to as a conversion position (x, y) (correction position) as appropriate.

図44は、ある位置(I',J')が例外状態となっている場合を示す図である。   FIG. 44 is a diagram illustrating a case where a certain position (I ′, J ′) is in an exceptional state.

図44では、位置(ig−0.5,jg−0.5)が変換パラメータ(ak',bk',ck',dk',Tkx',Tky')で変換された点(変換位置)G11'および点G15'が、x=I'−1の関係となる位置に、点G12'およびG16'が、x=I'+1の関係となる位置に、それぞれ出現している。   In FIG. 44, a point (conversion position) G11 obtained by converting the position (ig-0.5, jg-0.5) with the conversion parameters (ak ′, bk ′, ck ′, dk ′, Tkx ′, Tky ′). 'And point G15' appear at positions where x = I'-1 and points G12 'and G16' appear at positions where x = I '+ 1.

また、位置(ig−0.5,jg−0.5)が変換パラメータ(ak',bk',ck',dk',Tkx',Tky')で変換された点G13'および点G14'が、y=J'−1の関係となる位置に、点G17'、点G18'、および点G19'が、y=J'+1の関係となる位置に、それぞれ出現している。   Further, points G13 ′ and G14 ′ obtained by converting the position (ig−0.5, jg−0.5) with the conversion parameters (ak ′, bk ′, ck ′, dk ′, Tkx ′, Tky ′) are obtained. , Y = J′−1, the point G17 ′, the point G18 ′, and the point G19 ′ respectively appear at positions that satisfy the relationship y = J ′ + 1.

図44に示す状態においては、基準座標系上のI'−2≦x<I'+2,J'−2≦y<J'+2の範囲に変換された(k,ig,jg)の組のすべての変換位置(x,y)が、位置(I',J')とx=I'±1またはy=J'±1の関係がある。この状態では、位置(I',J')を中心とした、およそ(I'±1,J'±1)内の領域(位置(I',J')を中心とする横×縦が2×2の正方形の領域)には、G信号のデータ(画素値Gobs(k,ig,jg))が1つも存在していない。   In the state shown in FIG. 44, a set of (k, ig, jg) converted into a range of I′−2 ≦ x <I ′ + 2, J′−2 ≦ y <J ′ + 2 on the reference coordinate system. All conversion positions (x, y) have a relationship of position (I ′, J ′) and x = I ′ ± 1 or y = J ′ ± 1. In this state, the region (position X (I ′, J ′) centered on the position (I ′, J ′) and the area (position X (I ′, J ′) centered on the position (I ′, J ′)) is 2 × There is no G signal data (pixel value Gobs (k, ig, jg)) in the × 2 square area.

このような状態(例外状態)において、位置(I',J')における真の緑色の光量Lg(I',J')を、式(46)によって求めた場合、上述したように、信頼性の低い(不安定な)真の緑色の光量Lg(I',J')が得られることとなる。   In such a state (exceptional state), when the true green light quantity Lg (I ′, J ′) at the position (I ′, J ′) is obtained by the equation (46), as described above, the reliability A low (unstable) true green light quantity Lg (I ′, J ′) is obtained.

そこで、位置(I',J')の画素が、このような例外状態である場合には、演算回路24は、例外処理を行う。   Therefore, when the pixel at the position (I ′, J ′) is in such an exceptional state, the arithmetic circuit 24 performs exception processing.

即ち、例えば、いま、位置(I',J')を注目位置として、その注目位置(I',J')の出力画像の画素(以下、適宜、注目画素という)における真の緑色の光量Lg(I',J')を推定するとして、注目画素(の注目位置(I',J'))が例外状態となっている場合、演算回路24は、例外状態の注目画素の注目位置(I',J')における真の緑色の光量Lg(I',J')を、変換位置(x,y)が注目位置(I',J')の近傍にあるk枚目の撮像画像の画素の画素値Gobs(k,ig,jg)の他に、変換位置(x,y)が注目画素の周辺の出力画像の画素の位置の近傍にあるk枚目の撮像画像の画素の画素値Gobs(k,ig,jg)をも用いて求める。ここで、注目位置(I',J')の注目画素の周辺の画素(以下、適宜、周辺画素という)としては、例えば、図45に示すような、位置(I'−1,J'),(I'+1,J'),(I',J'−1),(I',J'+1)それぞれの画素を採用することができる。   That is, for example, assuming that the position (I ′, J ′) is the position of interest, the true green light amount Lg at the pixel of the output image at the position of interest (I ′, J ′) (hereinafter referred to as the pixel of interest as appropriate). Assuming that (I ′, J ′) is estimated, when the target pixel (the target position (I ′, J ′)) is in an exceptional state, the arithmetic circuit 24 selects the target position (I of the target pixel in the exceptional state. ', J') is the true green light quantity Lg (I ', J'), and the pixel of the kth picked-up image whose conversion position (x, y) is in the vicinity of the target position (I ', J') In addition to the pixel value Gobs (k, ig, jg), the pixel value Gobs of the pixel of the k-th captured image whose conversion position (x, y) is in the vicinity of the pixel position of the output image around the target pixel It is also determined using (k, ig, jg). Here, as a pixel around the target pixel at the target position (I ′, J ′) (hereinafter, appropriately referred to as a peripheral pixel), for example, a position (I′-1, J ′) as shown in FIG. , (I ′ + 1, J ′), (I ′, J′−1), (I ′, J ′ + 1) pixels can be employed.

本実施の形態のデジタルカメラ1の撮像素子4は、図3を参照して説明したように、ベイヤー配列となっている。ベイヤー配列では、緑色の成分を受光する画素は、X方向およびY方向ともに、1画素おきに配列されている(図3参照)。なお、第8実施の形態では、撮像素子4は、横方向(X方向)にW画素、縦方向(Y方向)にH画素の、W×Hの画素数を有しているとする。   As described with reference to FIG. 3, the image sensor 4 of the digital camera 1 of the present embodiment has a Bayer array. In the Bayer array, the pixels that receive the green component are arranged every other pixel in both the X direction and the Y direction (see FIG. 3). In the eighth embodiment, it is assumed that the image sensor 4 has a W × H number of pixels of W pixels in the horizontal direction (X direction) and H pixels in the vertical direction (Y direction).

いま注目位置(I',J')の近傍にG信号の観測値(である画素値)Gobs(k,ig,jg)が存在していない場合、その注目位置(I',J')の注目画素は、ベイヤー配列の画素のうちの、緑色の成分を受光する画素ではないといえる。   If the observed value (or pixel value) Gobs (k, ig, jg) of the G signal does not exist in the vicinity of the target position (I ′, J ′), the target position (I ′, J ′) It can be said that the target pixel is not a pixel that receives the green component among the pixels in the Bayer array.

例えば、注目位置(I',J')の注目画素が、図46に示すように、ベイヤー配列の画素のうちの、青色の成分を受光する画素であり、丸で囲まれている画素B12である場合、画素B12の上下左右のいずれかには、緑色の成分を受光する画素が存在する。同様に、撮像素子4の赤色または青色の成分のうちのいずれかを受光する各画素に対しては、その画素の上下左右のいずれかに、緑色の成分を受光する画素が存在する。   For example, as shown in FIG. 46, the target pixel at the target position (I ′, J ′) is a pixel that receives a blue component among the pixels in the Bayer array, and is a pixel B12 surrounded by a circle. In some cases, a pixel that receives the green component is present on any of the top, bottom, left, and right of the pixel B12. Similarly, for each pixel that receives either the red or blue component of the image sensor 4, there is a pixel that receives the green component on either the top, bottom, left, or right of the pixel.

従って、注目位置(I',J')の近傍にG信号の観測値Gobs(k,ig,jg)が存在していない場合(変換位置(x,y)が注目位置(I',J')の近傍にある撮像画像の緑色の画素が存在していない場合)、その注目位置(I',J')の注目画素の上、下、左、または右に隣接する画素(周辺画素)の位置(I',J'−1),(I',J'+1),(I'−1,J')、または(I'+1,J')のうちのいずれかの近傍には、G信号の観測値Gobs(k,ig,jg)が存在する。そして、位置(I'−1,J'),(I'+1,J'),(I',J'−1)、または(I',J'+1)のうちのいずれかの周辺画素においては、G信号の観測値Gobs(k,ig,jg)が存在するので、例外状態が発生していない。即ち、位置(I'−1,J'),(I'+1,J'),(I',J'−1)、または(I',J'+1)のうちのいずれかの周辺画素については、式(46)により、信頼性のある真の緑色の光量Lg(I’,J’)を求めることができる。   Therefore, when the observed value Gobs (k, ig, jg) of the G signal does not exist in the vicinity of the target position (I ′, J ′) (the conversion position (x, y) is the target position (I ′, J ′). ) Of the captured image in the vicinity of the captured image)), and the neighboring pixels (peripheral pixels) adjacent to the top, bottom, left, or right of the target pixel of the target position (I ', J') In the vicinity of any of the positions (I ′, J′−1), (I ′, J ′ + 1), (I′−1, J ′), or (I ′ + 1, J ′), G There are signal observations Gobs (k, ig, jg). Then, in any peripheral pixel at the position (I′-1, J ′), (I ′ + 1, J ′), (I ′, J′−1), or (I ′, J ′ + 1) Since the observed value Gobs (k, ig, jg) of the G signal exists, no exceptional state has occurred. That is, for any peripheral pixel at position (I'-1, J '), (I' + 1, J '), (I', J'-1), or (I ', J' + 1). The reliable true green light quantity Lg (I ′, J ′) can be obtained from Equation (46).

以上から、演算回路24は、注目画素が例外状態である場合は、注目位置(I',J')における真の緑色の光量Lg(I',J')を、変換位置(x,y)が注目位置(I',J')の近傍にある画素の画素値Gobs(k,ig,jg)の他に、注目画素の周辺の周辺画素の位置(I'−1,J'),(I'+1,J'),(I',J'−1)、または(I',J'+1)の近傍にある画素の画素値Gobs(k,ig,jg)をも用いて求める例外処理を行う。   From the above, when the target pixel is in an exceptional state, the arithmetic circuit 24 converts the true green light amount Lg (I ′, J ′) at the target position (I ′, J ′) into the conversion position (x, y). In addition to the pixel value Gobs (k, ig, jg) of the pixel in the vicinity of the target position (I ′, J ′), the positions (I′−1, J ′), ( I '+ 1, J'), (I ', J'-1), or exception processing to be obtained using pixel values Gobs (k, ig, jg) of pixels in the vicinity of (I', J '+ 1) I do.

具体的には、演算回路24は、例外処理として、注目位置(I',J')における真の緑色の光量Lg(I',J')を、次式(56)で求める。   Specifically, the arithmetic circuit 24 obtains the true green light quantity Lg (I ′, J ′) at the target position (I ′, J ′) as an exception process by the following equation (56).

Figure 0004613510
・・・(56)
Figure 0004613510
... (56)

式(56)によれば、注目画素の注目位置(I',J')と、その注目画素の周辺の周辺画素の位置(I'−1,J'),(I'+1,J'),(I',J'−1)、および(I',J'+1)との5点それぞれにおいて通常処理のときに演算される式(46)の分子の総和、即ち、式(47)の総和を、注目画素の注目位置(I',J')と、その注目画素の周辺の周辺画素の位置(I'−1,J'),(I'+1,J'),(I',J'−1)、および(I',J'+1)との5点それぞれにおいて通常処理のときに演算される式(46)の分母の総和、即ち、式(48)の総和で除算することにより、真の緑色の光量Lg(I’,J’)が求められる。   According to Expression (56), the target position (I ′, J ′) of the target pixel and the positions (I′−1, J ′), (I ′ + 1, J ′) of the peripheral pixels around the target pixel. , (I ′, J′−1), and (I ′, J ′ + 1), and the sum of the numerators of Equation (46) calculated during normal processing at each of the five points, ie, Equation (47) The sum total is calculated as the target position (I ', J') of the target pixel and the positions (I'-1, J '), (I' + 1, J '), (I', Dividing by the sum of the denominator of Expression (46) calculated during normal processing at each of the five points J′−1) and (I ′, J ′ + 1), that is, the sum of Expression (48) Thus, the true green light amount Lg (I ′, J ′) is obtained.

なお、注目画素が例外状態である場合に、その注目位置(I',J')における真の緑色の光量Lg(I',J')を求めるにあたっては、上述の式(56)に限定されるものではなく、例えば、次の式(57)を採用してもよい。   Note that, when the target pixel is in an exceptional state, the true green light amount Lg (I ′, J ′) at the target position (I ′, J ′) is limited to the above equation (56). For example, the following equation (57) may be adopted.

Figure 0004613510
・・・(57)
Figure 0004613510
... (57)

式(57)では、注目画素の周辺の周辺画素の位置(I'−1,J'),(I'+1,J'),(I',J'−1)、および(I',J'+1)の4点それぞれについて式(46)で求められる真の緑色の光量Lg(I'−1,J'),Lg(I'+1,J'),Lg(I',J'−1)、およびLg(I',J'+1)の平均値を、注目位置(I',J')の真の緑色の光量Lg(I',J')と推定している式であるといえる。   In Expression (57), the positions (I′−1, J ′), (I ′ + 1, J ′), (I ′, J′−1), and (I ′, J) of the peripheral pixels around the target pixel. '+1) for each of the four points, the true green light quantity Lg (I'-1, J'), Lg (I '+ 1, J'), Lg (I ', J'-1) obtained by the equation (46) ) And Lg (I ′, J ′ + 1) is an equation that estimates the true green light amount Lg (I ′, J ′) at the target position (I ′, J ′). .

次に、式(50)の赤色の光量の重み加算式について考察する。   Next, the weight addition formula for the red light amount in the equation (50) will be considered.

式(50)の赤色の光量の重み加算式で求められる真の赤色の光量Lr(I',J')についても、式(46)の緑色の光量の重み加算式で求められる真の緑色の光量Lg(I',J')と同様に、値が不安定となる場合、即ち、注目画素が例外状態となる場合がある。具体的には、ある注目画素の注目位置(I',J')に対して、位置(ir−0.5,jr−0.5)を変換パラメータ(ak',bk',ck',dk',Tkx',Tky')で基準座標系上に変換した場合に、I'−2≦x<I'+2,J'−2≦y<J'+2の範囲に出現する、すべての(k,ir,jr)の画素値Robs(k,ir,jr)の変換位置(x,y)が、図44に示したように、位置(I',J')とx=I'±1またはy=J'±1の関係となることがある。このような状態(例外状態)においては、位置(I',J')を中心とした、およそ(I'±1,J'±1)内の領域(位置(I',J')を中心とする横×縦が2×2の正方形の領域)には、R信号のデータ(画素値Robs(k,ir,jr))が1つも存在していない。   The true red light quantity Lr (I ′, J ′) obtained by the red light quantity weight addition formula of Expression (50) is also true green light quantity obtained by the green light quantity weight addition expression of Expression (46). Similar to the light amount Lg (I ′, J ′), the value may become unstable, that is, the target pixel may be in an exceptional state. Specifically, the position (ir−0.5, jr−0.5) is converted into the conversion parameters (ak ′, bk ′, ck ′, dk) with respect to the target position (I ′, J ′) of a certain target pixel. (', Tkx', Tky ') all (k) appearing in the range of I'-2≤x <I' + 2, J'-2≤y <J '+ 2 when converted to the reference coordinate system. , Ir, jr), the conversion position (x, y) of the pixel value Robs (k, ir, jr) is the position (I ′, J ′) and x = I ′ ± 1 or In some cases, y = J ′ ± 1. In such a state (exceptional state), a region (position (I ', J') centered around (I '± 1, J' ± 1) centered on the position (I ', J'). No square data (pixel value Robs (k, ir, jr)) exists in a square area of horizontal x vertical 2 x 2.

この場合、演算回路24は、次の例外処理を行う。   In this case, the arithmetic circuit 24 performs the following exception processing.

即ち、演算回路24は、例外状態の注目画素の注目位置(I',J')における真の赤色の光量Lr(I',J')を、変換位置(x,y)が注目位置(I',J')の近傍にあるk枚目の撮像画像の画素の画素値Robs(k,ir,jr)の他に、変換位置(x,y)が注目画素の周辺の出力画像の画素の位置の近傍にあるk枚目の撮像画像の画素の画素値Robs(k,ir,jr)をも用いて求める。ここで、注目位置(I',J')の注目画素の周辺の周辺画素としては、例えば、図47に示すような、位置(I'−1,J'−1),(I',J'−1),(I'+1,J'−1),(I'−1,J'),(I'+1,J'),(I'−1,J'+1),(I',J'+1),(I'+1,J'+1)それぞれの画素を採用することができる。   That is, the arithmetic circuit 24 calculates the true red light amount Lr (I ′, J ′) at the target position (I ′, J ′) of the target pixel in the exceptional state, and the conversion position (x, y) as the target position (I In addition to the pixel value Robs (k, ir, jr) of the pixel of the k-th captured image in the vicinity of ', J'), the conversion position (x, y) is the pixel of the output image around the pixel of interest. The pixel value Robs (k, ir, jr) of the pixel of the k-th captured image in the vicinity of the position is also obtained. Here, as peripheral pixels around the target pixel at the target position (I ′, J ′), for example, positions (I′−1, J′−1), (I ′, J) as shown in FIG. '-1), (I' + 1, J'-1), (I'-1, J '), (I' + 1, J '), (I'-1, J' + 1), (I ', J '+ 1) and (I' + 1, J '+ 1) pixels can be employed.

注目位置(I',J')の近傍にR信号の観測値(である画素値)Robs(k,ir,jr)が存在していない場合、その注目位置(I',J')の注目画素は、ベイヤー配列の画素のうちの、赤色の成分を受光する画素ではないといえる。   When there is no observed value (or pixel value) Robs (k, ir, jr) of the R signal in the vicinity of the target position (I ′, J ′), the target position (I ′, J ′) is focused. It can be said that the pixel is not a pixel that receives the red component among the pixels in the Bayer array.

例えば、注目位置(I',J')の注目画素が、図48に示すように、ベイヤー配列の画素のうちの、緑色の成分を受光する画素であり、丸で囲まれている画素G11である場合、画素G11の上下のいずれかには、赤色の成分を受光する画素が存在する。   For example, as shown in FIG. 48, the target pixel at the target position (I ′, J ′) is a pixel that receives the green component among the pixels in the Bayer array, and is a circled pixel G11. In some cases, a pixel that receives a red component exists above or below the pixel G11.

また、例えば、注目位置(I',J')の注目画素が、図48に示すように、ベイヤー配列の画素のうちの、緑色の成分を受光する画素であり、丸で囲まれている画素G22である場合、画素G22の左右のいずれかには、赤色の成分を受光する画素が存在する。   Also, for example, as shown in FIG. 48, the target pixel at the target position (I ′, J ′) is a pixel that receives a green component among the pixels in the Bayer array, and is surrounded by a circle. In the case of G22, there is a pixel that receives the red component on either the left or right side of the pixel G22.

さらに、例えば、注目位置(I',J')の注目画素が、図48に示すように、ベイヤー配列の画素のうちの、青色の成分を受光する画素であり、丸で囲まれている画素B14である場合、画素B14の右斜め上、右斜め下、左斜め上、および左斜め下のいずれかには、赤色の成分を受光する画素が存在する。   Further, for example, as shown in FIG. 48, the target pixel at the target position (I ′, J ′) is a pixel that receives a blue component among the pixels in the Bayer array, and is surrounded by a circle. In the case of B14, a pixel that receives the red component exists at any of the upper right, lower right, upper left, and lower left of the pixel B14.

同様に、撮像素子4の、赤色の成分を受光する画素ではない各画素に対しては、その画素の上下、左右、右斜め上、右斜め下、左斜め上、および左斜め下のいずれかには、赤色の成分を受光する画素が存在する。   Similarly, for each pixel of the image sensor 4 that is not a pixel that receives the red component, any one of the top, bottom, left, right, upper right, lower right, upper left, and lower left of the pixel. Includes a pixel that receives a red component.

従って、注目位置(I',J')の近傍にR信号の観測値Robs(k,ir,jr)が存在していない場合(変換位置(x,y)が注目位置(I’,J’)の近傍にある撮像画像の赤色の画素が存在していない場合)、その注目位置(I',J')の注目画素の左斜め上、上、右斜め上、左、右、左斜め下、下、または右斜め下に隣接する画素(周辺画素)の位置(I'−1,J'−1),(I',J'−1),(I'+1,J'−1),(I'−1,J'),(I'+1,J'),(I'−1,J'+1),(I',J'+1)、または(I'+1,J'+1)のうちのいずれかの近傍には、R信号の観測値Robs(k,ir,jr)が存在する。そして、位置(I'−1,J'−1),(I',J'−1),(I'+1,J'−1),(I'−1,J'),(I'+1,J'),(I'−1,J'+1),(I',J'+1)、または(I'+1,J'+1)のうちのいずれかの周辺画素においては、R信号の観測値Robs(k,ir,jr)が存在するので、例外状態が発生していない。即ち、位置(I'−1,J'−1),(I',J'−1),(I'+1,J'−1),(I'−1,J'),(I'+1,J'),(I'−1,J'+1),(I',J'+1)、または(I'+1,J'+1)のうちのいずれかの周辺画素については、式(50)により、信頼性のある真の赤色の光量Lr(I’,J’)を求めることができる。   Therefore, when the observed value Robs (k, ir, jr) of the R signal does not exist in the vicinity of the target position (I ′, J ′) (the conversion position (x, y) is the target position (I ′, J ′). ), When there is no red pixel in the captured image), diagonally upper left, upper, diagonally upper right, left, right, diagonally lower left of the pixel of interest at the target position (I ', J') , Lower or diagonally lower right adjacent pixels (peripheral pixels) positions (I′−1, J′−1), (I ′, J′−1), (I ′ + 1, J′−1), (I'-1, J '), (I' + 1, J '), (I'-1, J' + 1), (I ', J' + 1), or (I '+ 1, J' + 1) There is an observed value Robs (k, ir, jr) of the R signal in the vicinity of any of them. And position (I'-1, J'-1), (I ', J'-1), (I' + 1, J'-1), (I'-1, J '), (I' + 1) , J ′), (I′−1, J ′ + 1), (I ′, J ′ + 1), or (I ′ + 1, J ′ + 1), the observation of the R signal in any peripheral pixel Since the value Robs (k, ir, jr) exists, no exceptional condition has occurred. That is, positions (I'-1, J'-1), (I ', J'-1), (I' + 1, J'-1), (I'-1, J '), (I' + 1) , J ′), (I′−1, J ′ + 1), (I ′, J ′ + 1), or (I ′ + 1, J ′ + 1) for any peripheral pixel, Expression (50) Thus, a reliable true red light amount Lr (I ′, J ′) can be obtained.

以上から、演算回路24は、注目画素が例外状態である場合は、注目位置(I',J')における真の赤色の光量Lr(I',J')を、変換位置(x,y)が注目位置(I',J')の近傍にある画素の画素値Robs(k,ir,jr)の他に、注目画素の周辺の周辺画素の位置(I'−1,J'−1),(I',J'−1),(I'+1,J'−1),(I'−1,J'),(I'+1,J'),(I'−1,J'+1),(I',J'+1)、または(I'+1,J'+1)の近傍にある画素の画素値Robs(k,ir,jr)をも用いて求める。   From the above, the arithmetic circuit 24 converts the true red light amount Lr (I ′, J ′) at the target position (I ′, J ′) to the conversion position (x, y) when the target pixel is in an exceptional state. In addition to the pixel value Robs (k, ir, jr) of the pixel in the vicinity of the target position (I ′, J ′), the positions (I′−1, J′−1) of the peripheral pixels around the target pixel , (I ', J'-1), (I' + 1, J'-1), (I'-1, J '), (I' + 1, J '), (I'-1, J' + 1) ), (I ′, J ′ + 1), or pixel values Robs (k, ir, jr) of pixels in the vicinity of (I ′ + 1, J ′ + 1).

具体的には、演算回路24は、例外処理として、注目位置(I',J')における真の赤色の光量Lr(I',J')を、次式(58)で求める。   Specifically, the arithmetic circuit 24 obtains the true red light amount Lr (I ′, J ′) at the target position (I ′, J ′) as an exception process by the following equation (58).

Figure 0004613510
・・・(58)
Figure 0004613510
... (58)

式(58)によれば、注目画素の注目位置(I',J')と、その注目画素の周辺の周辺画素の位置(I'−1,J'−1),(I',J'−1),(I'+1,J'−1),(I'−1,J'),(I'+1,J'),(I'−1,J'+1),(I',J'+1)、および(I'+1,J'+1)との9点それぞれにおいて通常処理のときに演算される式(50)の分子の総和、即ち、式(52)の総和を、注目画素の注目位置(I',J')と、その注目画素の周辺の周辺画素の位置(I'−1,J'−1),(I',J'−1),(I'+1,J'−1),(I'−1,J'),(I'+1,J'),(I'−1,J'+1),(I',J'+1)、および(I'+1,J'+1)との9点それぞれにおいて通常処理のときに演算される式(50)の分母の総和、即ち、式(53)の総和で除算することにより、真の赤色の光量Lr(I’,J’)が求められる。   According to Expression (58), the target position (I ′, J ′) of the target pixel and the positions (I′−1, J′−1), (I ′, J ′) of peripheral pixels around the target pixel. -1), (I '+ 1, J'-1), (I'-1, J'), (I '+ 1, J'), (I'-1, J '+ 1), (I', J '+1) and (I' + 1, J '+ 1) at the nine points, respectively, the sum of the numerators of the formula (50) calculated during normal processing, that is, the sum of the formula (52) Attention position (I ', J') and positions (I'-1, J'-1), (I ', J'-1), (I' + 1, J ') of peripheral pixels around the attention pixel -1), (I'-1, J '), (I' + 1, J '), (I'-1, J' + 1), (I ', J' + 1), and (I '+ 1, J By dividing by the sum of the denominator of the equation (50) calculated at the time of normal processing at each of the nine points “+1”, that is, the sum of the equation (53), the true red light amount Lr (I ′) J ') is required.

なお、G信号の場合における式(57)と同様に、式(58)の代わりに、注目画素の周辺の周辺画素の位置(I'−1,J'−1),(I',J'−1),(I'+1,J'−1),(I'−1,J'),(I'+1,J'),(I'−1,J'+1),(I',J'+1)、および(I'+1,J'+1)の8点それぞれの真の赤色の光量Lr(I'−1,J'−1),Lr(I',J'−1),Lr(I'+1,J'−1),Lr(I'−1,J'),Lr(I'+1,J'),Lr(I'−1,J'+1),Lr(I',J'+1)、およびLr(I'+1,J'+1)の平均値から、注目位置(I',J')の真の赤色の光量Lr(I',J')を求めてもよい。   Similar to the equation (57) in the case of the G signal, instead of the equation (58), the positions (I′−1, J′−1), (I ′, J ′) of the peripheral pixels around the pixel of interest. -1), (I '+ 1, J'-1), (I'-1, J'), (I '+ 1, J'), (I'-1, J '+ 1), (I', J '+1) and 8 points (I' + 1, J '+ 1), the true red light amounts Lr (I'-1, J'-1), Lr (I', J'-1), Lr ( I '+ 1, J'-1), Lr (I'-1, J'), Lr (I '+ 1, J'), Lr (I'-1, J '+ 1), Lr (I', J ' +1) and the average value of Lr (I ′ + 1, J ′ + 1), the true red light amount Lr (I ′, J ′) at the target position (I ′, J ′) may be obtained.

さらに、式(51)の青色の光量の重み加算式で求められる真の青色の光量Lb(I',J')についても、式(46)の緑色の光量の重み加算式で求められる真の緑色の光量Lg(I',J')や、式(50)の赤色の光量の重み加算式で求められる真の赤色の光量Lr(I',J')と同様に、値が不安定となる場合、即ち、注目位置(I',J')の注目画素が例外状態となる場合がある。   Further, the true blue light quantity Lb (I ′, J ′) obtained by the blue light quantity weight addition formula of Expression (51) is also true by the green light quantity weight addition formula of Expression (46). Similar to the green light quantity Lg (I ′, J ′) and the true red light quantity Lr (I ′, J ′) obtained by the weighted addition formula of the red light quantity in Expression (50), the value is unstable. In other words, the target pixel at the target position (I ′, J ′) may be in an exceptional state.

この場合、演算回路24は、次の例外処理を行う。   In this case, the arithmetic circuit 24 performs the following exception processing.

即ち、ベイヤー配列では、青色の成分を受光する画素は、上述の赤色の成分を受光する画素と同様の位置関係で配列されている。そこで、演算回路24は、例外状態の注目画素の注目位置(I',J')における真の青色の光量Lb(I',J')を、式(58)と同様の、式(59)で求める例外処理を行う。   That is, in the Bayer array, the pixels that receive the blue component are arranged in the same positional relationship as the pixels that receive the red component. Therefore, the arithmetic circuit 24 calculates the true blue light quantity Lb (I ′, J ′) at the target position (I ′, J ′) of the target pixel in the exceptional state by the same formula (59) as the formula (58). Perform the exception handling required in.

Figure 0004613510
・・・(59)
Figure 0004613510
... (59)

式(59)によれば、注目画素の注目位置(I',J')と、その注目画素の周辺画素の位置(I'−1,J'−1),(I',J'−1),(I'+1,J'−1),(I'−1,J'),(I'+1,J'),(I'−1,J'+1),(I',J'+1)、および(I'+1,J'+1)との9点それぞれにおいて通常処理のときに演算される式(51)の分子の総和、即ち、式(54)の総和を、注目画素の注目位置(I',J')と、その注目画素の周辺画素の位置(I'−1,J'−1),(I',J'−1),(I'+1,J'−1),(I'−1,J'),(I'+1,J'),(I'−1,J'+1),(I',J'+1)、および(I'+1,J'+1)との9点それぞれにおいて通常処理のときに演算される式(51)の分母の総和、即ち、式(55)の総和で除算することにより、真の青色の光量Lb(I’,J’)が求められる。   According to Expression (59), the target position (I ′, J ′) of the target pixel and the positions (I′−1, J′−1) and (I ′, J′−1) of the peripheral pixels of the target pixel. ), (I '+ 1, J'-1), (I'-1, J'), (I '+ 1, J'), (I'-1, J '+ 1), (I', J '+ 1) ) And (I ′ + 1, J ′ + 1), the sum of the numerators of Equation (51) calculated during normal processing, that is, the sum of Equation (54), is used as the target position of the target pixel. (I ', J') and positions (I'-1, J'-1), (I ', J'-1), (I' + 1, J'-1) of peripheral pixels of the target pixel, (I'-1, J '), (I' + 1, J '), (I'-1, J' + 1), (I ', J' + 1), and (I '+ 1, J' + 1) The true blue light quantity Lb (I ′, J ′) is obtained by dividing by the sum of the denominator of the equation (51) calculated in the normal processing at each of the nine points, that is, the sum of the equation (55). Demand It is.

なお、G信号の場合における式(57)と同様に、式(59)の代わりに、注目画素の周辺の周辺画素の位置(I'−1,J'−1),(I',J'−1),(I'+1,J'−1),(I'−1,J'),(I'+1,J'),(I'−1,J'+1),(I',J'+1)、および(I'+1,J'+1)の8点それぞれの真の青色の光量Lb(I'−1,J'−1),Lb(I',J'−1),Lb(I'+1,J'−1),Lb(I'−1,J'),Lb(I'+1,J'),Lb(I'−1,J'+1),Lb(I',J'+1)、およびLb(I'+1,J'+1)の平均値から、注目位置(I',J')の真の青色の光量Lb(I',J')を求めてもよい。   Similar to the equation (57) in the case of the G signal, instead of the equation (59), the positions (I′−1, J′−1), (I ′, J ′) of the peripheral pixels around the pixel of interest. -1), (I '+ 1, J'-1), (I'-1, J'), (I '+ 1, J'), (I'-1, J '+ 1), (I', J '+1) and 8 points (I' + 1, J '+ 1), the true blue light amounts Lb (I'-1, J'-1), Lb (I', J'-1), Lb ( I '+ 1, J'-1), Lb (I'-1, J'), Lb (I '+ 1, J'), Lb (I'-1, J '+ 1), Lb (I', J ' +1) and the average value of Lb (I ′ + 1, J ′ + 1), the true blue light quantity Lb (I ′, J ′) at the target position (I ′, J ′) may be obtained.

次に、図49と図50のフローチャートを参照して、図2のステップS4における画像推定処理の第8実施の形態について説明する。   Next, an eighth embodiment of the image estimation process in step S4 of FIG. 2 will be described with reference to the flowcharts of FIGS.

初めに、ステップS201において、演算回路24は、基準座標系上の画素がある位置(I',J')のうちのY方向の位置を表す変数J'に1をセットして、ステップS202に進む。   First, in step S201, the arithmetic circuit 24 sets 1 to a variable J ′ representing a position in the Y direction among positions (I ′, J ′) where a pixel on the reference coordinate system is located, and then proceeds to step S202. move on.

ステップS202において、演算回路24は、基準座標系上の画素がある位置(I',J')のうちのX方向の位置を表す変数I'に1をセットして、ステップS203に進む。ここで、変数I'とJ'は、それぞれ、出力画像の画素のX方向とY方向の位置を表す変数でもある。   In step S202, the arithmetic circuit 24 sets 1 to the variable I ′ representing the position in the X direction among the positions (I ′, J ′) at which the pixels are on the reference coordinate system, and proceeds to step S203. Here, the variables I ′ and J ′ are variables representing the positions of the pixels of the output image in the X direction and the Y direction, respectively.

ステップS203において、演算回路24は、位置(I',J')を注目位置として、その注目位置(I',J')に対して、k枚目画像の緑色の成分を受光する画素の中心位置(ig−0.5,jg−0.5)を変換パラメータ(ak',bk',ck',dk',Tkx',Tky')で変換した基準座標系上の変換位置(x,y)が、I'−2≦x<I'+2,J'−2≦y<J'+2を満たす(k,ig,jg)の組を、1乃至N枚目画像についてすべて求め、ステップS204に進む。   In step S203, the arithmetic circuit 24 sets the position (I ′, J ′) as the position of interest, and the center of the pixel that receives the green component of the k-th image with respect to the position of interest (I ′, J ′). A conversion position (x, y on the reference coordinate system obtained by converting the position (ig−0.5, jg−0.5) with the conversion parameters (ak ′, bk ′, ck ′, dk ′, Tkx ′, Tky ′). ) Obtain all sets (k, ig, jg) satisfying I′−2 ≦ x <I ′ + 2 and J′−2 ≦ y <J ′ + 2 for the first to Nth images, and the process proceeds to step S204. move on.

ステップS204において、演算回路24は、ステップS203で求めたすべての(k,ig,jg)の組を用いて、式(48)で表される、緑色の光量の重み加算式の分母と、式(47)で表される、緑色の光量の重み加算式の分子それぞれを演算する。また、演算回路24は、その演算の結果それぞれを図示せぬメモリに記憶させて、ステップS205に進む。   In step S204, the arithmetic circuit 24 uses the set of all (k, ig, jg) obtained in step S203, the denominator of the weight addition formula for the green light quantity expressed by the equation (48), and the equation Each numerator of the weight addition formula of the green light quantity represented by (47) is calculated. Further, the arithmetic circuit 24 stores each result of the arithmetic operation in a memory (not shown), and proceeds to step S205.

ステップS205において、演算回路24は、注目位置(I',J')に対して、k枚目画像の赤色の成分を受光する画素の中心位置(ir−0.5,jr−0.5)を変換パラメータ(ak',bk',ck',dk',Tkx',Tky')で変換した基準座標系上の変換位置(x,y)が、I'−2≦x<I'+2,J'−2≦y<J'+2を満たす(k,ir,jr)の組を、1乃至N枚目画像についてすべて求め、ステップS206に進む。   In step S205, the arithmetic circuit 24 determines the center position (ir−0.5, jr−0.5) of the pixel that receives the red component of the k-th image with respect to the target position (I ′, J ′). Is converted with the conversion parameters (ak ′, bk ′, ck ′, dk ′, Tkx ′, Tky ′), the conversion position (x, y) on the reference coordinate system is I′−2 ≦ x <I ′ + 2, All sets of (k, ir, jr) that satisfy J′−2 ≦ y <J ′ + 2 are obtained for the first to Nth images, and the process proceeds to step S206.

ステップS206において、演算回路24は、ステップS205で求めたすべての(k,ir,jr)の組を用いて、式(53)で表される、赤色の光量の重み加算式の分母と、式(52)で表される、赤色の光量の重み加算式の分子それぞれを演算する。また、演算回路24は、その演算の結果それぞれをメモリに記憶させて、ステップS207に進む。   In step S206, the arithmetic circuit 24 uses the set of all (k, ir, jr) obtained in step S205, the denominator of the red light quantity weight addition formula represented by formula (53), and the formula Each numerator of the red light quantity weight addition formula represented by (52) is calculated. Further, the arithmetic circuit 24 stores each result of the arithmetic operation in the memory, and proceeds to step S207.

ステップS207において、演算回路24は、注目位置(I',J')に対して、k枚目画像の青色の成分を受光する画素の中心位置(ib−0.5,jb−0.5)を変換パラメータ(ak',bk',ck',dk',Tkx',Tky')で変換した基準座標系上の変換位置(x,y)が、I'−2≦x<I'+2,J'−2≦y<J'+2を満たす(k,ib,jb)の組を、1乃至N枚目画像についてすべて求め、ステップS208に進む。   In step S207, the arithmetic circuit 24 determines the center position (ib−0.5, jb−0.5) of the pixel that receives the blue component of the k-th image with respect to the target position (I ′, J ′). Is converted with the conversion parameters (ak ′, bk ′, ck ′, dk ′, Tkx ′, Tky ′), the conversion position (x, y) on the reference coordinate system is I′−2 ≦ x <I ′ + 2, All sets (k, ib, jb) satisfying J′−2 ≦ y <J ′ + 2 are obtained for the first to Nth images, and the process proceeds to step S208.

ステップS208において、演算回路24は、ステップS207で求めたすべての(k,ib,jb)の組を用いて、式(55)で表される、青色の光量の重み加算式の分母と、式(54)で表される、青色の光量の重み加算式の分子それぞれを演算する。また、演算回路24は、その演算の結果それぞれをメモリに記憶させて、ステップS209に進む。   In step S208, the arithmetic circuit 24 uses the set of all (k, ib, jb) obtained in step S207, the denominator of the blue light quantity weight addition formula represented by the formula (55), and the formula Each numerator of the blue light quantity weight addition formula represented by (54) is calculated. Further, the arithmetic circuit 24 stores each result of the arithmetic operation in the memory, and proceeds to step S209.

ステップS209において、演算回路24は、変数I'がX方向の画素数Wと等しいか否かを判定する。ステップS209で、変数I'が画素数Wと等しくないと判定された場合、即ち、現在のY=J'の画素列のうち、X方向のすべての画素についてステップS203乃至S208の処理が行われていない場合、ステップS210に進み、変数I'を1だけインクリメントして、ステップS203に戻る。   In step S209, the arithmetic circuit 24 determines whether or not the variable I ′ is equal to the number of pixels W in the X direction. If it is determined in step S209 that the variable I ′ is not equal to the number of pixels W, that is, the processing in steps S203 to S208 is performed for all the pixels in the X direction in the current Y = J ′ pixel column. If not, the process proceeds to step S210, the variable I ′ is incremented by 1, and the process returns to step S203.

一方、ステップS209で、変数I'が画素数Wと等しいと判定された場合、即ち、現在のY=J'の画素列のうち、X方向のすべての画素についてステップS203乃至S208の処理が行われた場合、ステップS211に進む。   On the other hand, if it is determined in step S209 that the variable I ′ is equal to the number of pixels W, that is, the processes in steps S203 to S208 are performed for all the pixels in the X direction in the current Y = J ′ pixel column. If yes, the process proceeds to step S211.

ステップS211において、演算回路24は、変数J'がY方向の画素数Hと等しいか否かを判定する。ステップS211で、変数J'が画素数Hと等しくないと判定された場合、即ち、撮像素子4のY方向のすべての列について、ステップS203乃至S208の処理が行われていない場合、ステップS212に進み、変数J'を1だけインクリメントして、ステップS202に戻る。   In step S211, the arithmetic circuit 24 determines whether or not the variable J ′ is equal to the number of pixels H in the Y direction. If it is determined in step S211 that the variable J ′ is not equal to the number of pixels H, that is, if the processing in steps S203 to S208 has not been performed for all columns in the Y direction of the image sensor 4, the process proceeds to step S212. Then, the variable J ′ is incremented by 1, and the process returns to step S202.

一方、ステップS211で、変数J'が画素数Hと等しいと判定された場合、即ち、撮像素子4のY方向のすべての列について、ステップS203乃至S208の処理が行われた場合、図50のステップS213に進む。ここで、画素数WとHは、それぞれ、出力画像のX方向とY方向の画素数でもある。   On the other hand, if it is determined in step S211 that the variable J ′ is equal to the number of pixels H, that is, if the processing in steps S203 to S208 has been performed for all columns in the Y direction of the image sensor 4, FIG. Proceed to step S213. Here, the number of pixels W and H are also the numbers of pixels in the X direction and the Y direction of the output image, respectively.

ステップS213において、演算回路24は、ステップS201における場合と同様に、変数J'に1をセットして、ステップS214に進む。   In step S213, the arithmetic circuit 24 sets 1 to the variable J ′ as in step S201, and proceeds to step S214.

ステップS214において、演算回路24は、ステップS202における場合と同様に、変数I'に1をセットして、ステップS215に進む。   In step S214, the arithmetic circuit 24 sets 1 to the variable I ′ in the same manner as in step S202, and proceeds to step S215.

ステップS215において、演算回路24は、位置(I’,J’)を注目位置(I’,J’)として、その注目位置(I',J')に対して、真の緑色の光量Lg(I',J')を求める演算処理を行って、ステップS216に進む。即ち、ステップS215では、後述するように、式(46)の緑色の光量の重み加算式を用いた通常処理(第1の演算処理)、または、式(56)を用いた例外処理(第2の演算処理)により、注目位置(I',J')に対する真の緑色の光量Lg(I',J')が求められる。   In step S215, the arithmetic circuit 24 sets the position (I ′, J ′) as the position of interest (I ′, J ′), and the true green light amount Lg (with respect to the position of interest (I ′, J ′)). I ', J') is calculated, and the process proceeds to step S216. In other words, in step S215, as will be described later, normal processing (first calculation processing) using the weight addition formula for the green light quantity in Expression (46), or exception processing (second processing) using Expression (56). Thus, the true green light amount Lg (I ′, J ′) for the target position (I ′, J ′) is obtained.

ステップS216において、演算回路24は、位置(I’,J’)を注目位置(I’,J’)として、その注目位置(I',J')に対して、真の赤色の光量Lr(I',J')を求める演算処理を行って、ステップS217に進む。即ち、ステップS216では、後述するように、式(50)の赤色の光量の重み加算式を用いた通常処理(第1の演算処理)、または、式(58)を用いた例外処理(第2の演算処理)により、注目位置(I',J')に対する真の赤色の光量Lr(I',J')が求められる。   In step S216, the arithmetic circuit 24 sets the position (I ′, J ′) as the position of interest (I ′, J ′), and the true red light amount Lr (with respect to the position of interest (I ′, J ′)). I ', J') is calculated, and the process proceeds to step S217. That is, in step S216, as will be described later, normal processing (first calculation processing) using the red light amount weight addition formula of Formula (50) or exception processing (second processing) using Formula (58) is performed. Thus, the true red light quantity Lr (I ′, J ′) for the target position (I ′, J ′) is obtained.

ステップS217において、演算回路24は、位置(I’,J’)を注目位置(I’,J’)として、その注目位置(I',J')に対して、真の青色の光量Lb(I',J')を求める演算処理を行って、ステップS218に進む。即ち、ステップS217では、後述するように、式(51)の青色の光量の重み加算式を用いた通常処理(第1の演算処理)、または、式(59)を用いた例外処理(第2の演算処理)により、注目位置(I',J')に対する真の青色の光量Lg(I',J')が求められる。   In step S217, the arithmetic circuit 24 sets the position (I ′, J ′) as the position of interest (I ′, J ′), and the true blue light quantity Lb (with respect to the position of interest (I ′, J ′)). I ′, J ′) is calculated, and the process proceeds to step S218. That is, in step S217, as will be described later, normal processing (first calculation processing) using the blue light amount weight addition formula of Formula (51) or exception processing (second processing) using Formula (59) is used. Thus, the true blue light quantity Lg (I ′, J ′) for the target position (I ′, J ′) is obtained.

ステップS218において、演算回路24は、変数I'がX方向の画素数Wと等しいか否かを判定する。ステップS218で、変数I'が画素数Wと等しくないと判定された場合、即ち、現在のY=J'の画素列のうち、X方向のすべての画素についてステップS215乃至S217の処理が行われていない場合、ステップS219に進み、変数I'を1だけインクリメントして、ステップS215に戻る。   In step S218, the arithmetic circuit 24 determines whether or not the variable I ′ is equal to the number of pixels W in the X direction. If it is determined in step S218 that the variable I ′ is not equal to the number of pixels W, that is, the processing in steps S215 to S217 is performed for all the pixels in the X direction in the current Y = J ′ pixel column. If not, the process proceeds to step S219, increments the variable I ′ by 1, and returns to step S215.

一方、ステップS218で、変数I'が画素数Wと等しいと判定された場合、即ち、現在のY=J'の画素列のうち、X方向のすべての画素についてステップS215乃至S217の処理が行われた場合、ステップS220に進む。   On the other hand, if it is determined in step S218 that the variable I ′ is equal to the number of pixels W, that is, the processes in steps S215 to S217 are performed for all the pixels in the X direction in the current Y = J ′ pixel column. If yes, the process proceeds to step S220.

ステップS220において、演算回路24は、変数J'がY方向の画素数Hと等しいか否かを判定する。ステップS220で、変数J'が画素数Hと等しくないと判定された場合、即ち、撮像素子4のY方向のすべての列について、ステップS215乃至S217の処理が行われていない場合、ステップS221に進み、変数J'を1だけインクリメントして、ステップS214に戻る。   In step S220, the arithmetic circuit 24 determines whether or not the variable J ′ is equal to the number of pixels H in the Y direction. If it is determined in step S220 that the variable J ′ is not equal to the number of pixels H, that is, if the processing in steps S215 to S217 has not been performed for all columns in the Y direction of the image sensor 4, the process proceeds to step S221. Then, the variable J ′ is incremented by 1, and the process returns to step S214.

一方、ステップS220で、変数J'が画素数Hと等しいと判定された場合、即ち、撮像素子4のY方向のすべての列について、ステップS215乃至S217の処理が行われた場合、ステップS222に進む。   On the other hand, if it is determined in step S220 that the variable J ′ is equal to the number of pixels H, that is, if the processes in steps S215 to S217 have been performed for all columns in the Y direction of the image sensor 4, the process proceeds to step S222. move on.

ステップS222において、演算回路24は、ステップS215,S216、およびS217でそれぞれ求めた真の緑色の光量Lg(I',J')、真の赤色の光量Lr(I',J')、および真の青色の光量Lb(I',J')から、出力画像(信号)を推定し、D/Aコンバータ9またはコーデック12に供給して、処理を戻る。例えば、「i番目、j番目の画素」においては、演算回路24は、緑色の値(G信号)としてステップS215で求めた真の緑色の光量Lg(=Lg(I',J'))と、赤色の値(R信号)としてステップS216で求めた真の赤色の光量Lr(i−0.5,j−0.5)(=Lr(I',J'))と、青色の値(B信号)としてステップS217で求めた真の青色の光量Lb(i−0.5,j−0.5)(=Lb(I',J'))とから、「i番目、j番目の画素」の画像信号を推定する。そして、演算回路24は、その推定を位置(I',J')(=(i−0.5,j−0.5))を中心位置とする出力画像の画素すべてについて行うことにより、出力画像を推定する。   In step S222, the arithmetic circuit 24 calculates the true green light amount Lg (I ′, J ′), the true red light amount Lr (I ′, J ′), and the true light obtained in steps S215, S216, and S217, respectively. An output image (signal) is estimated from the blue light quantity Lb (I ′, J ′), and supplied to the D / A converter 9 or the codec 12, and the process returns. For example, in the “i-th and j-th pixels”, the arithmetic circuit 24 calculates the true green light amount Lg (= Lg (I ′, J ′)) obtained in step S215 as the green value (G signal). , The true red light quantity Lr (i−0.5, j−0.5) (= Lr (I ′, J ′)) obtained in step S216 as the red value (R signal), and the blue value ( From the true blue light quantity Lb (i−0.5, j−0.5) (= Lb (I ′, J ′)) obtained in step S217 as the B signal), the “i th and j th pixels ”Is estimated. Then, the arithmetic circuit 24 performs the estimation on all the pixels of the output image having the position (I ′, J ′) (= (i−0.5, j−0.5)) as the center position, and outputs the result. Estimate the image.

次に、図51のフローチャートを参照して、図50のステップS215における、注目位置(I',J')の真の緑色の光量Lg(I',J')を求める演算処理について説明する。   Next, with reference to the flowchart of FIG. 51, the calculation process for obtaining the true green light amount Lg (I ′, J ′) at the target position (I ′, J ′) in step S215 of FIG. 50 will be described.

初めに、ステップS251において、演算回路24は、注目位置(I',J')に対して、図49のステップS204で演算された、式(46)の緑色の光量の重み加算式の分母の絶対値、即ち、式(48)の絶対値が、所定の閾値以上であるか否かを判定する。この所定の閾値は、式(48)の絶対値を0とみなし、例外処理を適用するかどうかを判定するための値であり、例えば、予め演算回路24に設定されている。但し、所定の閾値は、その他、ユーザの操作に応じて設定可能とすることもできる。   First, in step S251, the arithmetic circuit 24 calculates the denominator of the weight addition formula of the green light quantity of the equation (46) calculated in step S204 of FIG. 49 for the target position (I ′, J ′). It is determined whether or not the absolute value, that is, the absolute value of Expression (48) is equal to or greater than a predetermined threshold value. This predetermined threshold value is a value for determining whether or not to apply exception processing by regarding the absolute value of the equation (48) as 0, and is set in advance in the arithmetic circuit 24, for example. However, the predetermined threshold can also be set according to the user's operation.

ステップS251において、注目位置(I',J')に対する式(48)の絶対値が、所定の閾値以上であると判定された場合、即ち、注目位置(I',J')に対する式(48)の絶対値が0とみなすほどの小さい値ではない場合、ステップS252に進み、演算回路24は、式(46)の緑色の光量の重み加算式を演算する通常処理を選択して行う。即ち、演算回路24は、ステップS204で演算された、式(46)の緑色の光量の重み加算式の分子の値、即ち、式(47)の値を、ステップS204で演算された、式(46)の緑色の光量の重み加算式の分母の値、即ち、式(48)の値で除算する演算を行う。これにより、ステップS252では、注目位置(I',J')における真の緑色の光量Lg(I',J')が求められる。   If it is determined in step S251 that the absolute value of the equation (48) for the target position (I ′, J ′) is equal to or greater than a predetermined threshold, that is, the equation (48) for the target position (I ′, J ′). If the absolute value of () is not small enough to be regarded as 0, the process proceeds to step S252, and the arithmetic circuit 24 selects and performs a normal process for calculating the weight addition formula for the green light quantity in the equation (46). That is, the arithmetic circuit 24 calculates the value of the numerator of the weight addition formula of the green light quantity of the equation (46) calculated in step S204, that is, the value of the equation (47), in the equation ( A calculation is performed to divide by the denominator value of the weight addition formula of the green light quantity of 46), that is, the value of formula (48). Thus, in step S252, the true green light amount Lg (I ′, J ′) at the target position (I ′, J ′) is obtained.

一方、ステップS251において、注目位置(I',J')に対する式(48)の絶対値が、所定の閾値未満であると判定された場合、即ち、式(48)の絶対値が0、または0に近い場合、ステップS253に進み、演算回路24は、例外処理を選択して行う。即ち、演算回路24は、式(56)を演算することにより、注目位置(I',J')における真の緑色の光量Lg(I',J')を求める。   On the other hand, when it is determined in step S251 that the absolute value of Expression (48) with respect to the target position (I ′, J ′) is less than the predetermined threshold, that is, the absolute value of Expression (48) is 0, or When it is close to 0, the process proceeds to step S253, and the arithmetic circuit 24 selects and performs exception processing. That is, the arithmetic circuit 24 calculates the true green light amount Lg (I ′, J ′) at the target position (I ′, J ′) by calculating the equation (56).

次に、図52のフローチャートを参照して、図50のステップS216における、注目位置(I',J')の真の赤色の光量Lr(I',J')を求める演算処理について説明する。   Next, with reference to the flowchart of FIG. 52, the calculation processing for obtaining the true red light amount Lr (I ′, J ′) at the target position (I ′, J ′) in step S216 of FIG. 50 will be described.

初めに、ステップS271において、演算回路24は、注目位置(I’,J’)に対して、図49のステップS206で演算された、式(50)の赤色の光量の重み加算式の分母の絶対値、即ち、式(53)の絶対値が、所定の閾値以上であるか否かを判定する。この所定の閾値は、式(53)の絶対値を0とみなし、例外処理を適用するかどうかを判定するための値であり、例えば、予め演算回路24に設定されている。但し、所定の閾値は、その他、ユーザの操作に応じて設定可能とすることもできる。また、この閾値は、図51のステップS251の閾値と同一でもよいし、異なるものでもよい。   First, in step S271, the arithmetic circuit 24 calculates the denominator of the red light quantity weight addition formula of equation (50) calculated in step S206 of FIG. 49 for the target position (I ′, J ′). It is determined whether the absolute value, that is, the absolute value of Expression (53) is equal to or greater than a predetermined threshold value. This predetermined threshold value is a value for determining whether or not to apply exception processing by regarding the absolute value of the equation (53) as 0, and is set in advance in the arithmetic circuit 24, for example. However, the predetermined threshold can also be set according to the user's operation. Further, this threshold value may be the same as or different from the threshold value in step S251 of FIG.

ステップS271において、注目位置(I',J')に対する式(53)の絶対値が、所定の閾値以上であると判定された場合、即ち、注目位置(I',J')に対する式(53)の絶対値が0とみなすほどの小さい値ではない場合、ステップS272に進み、演算回路24は、式(50)の赤色の光量の重み加算式を演算する通常処理を選択して行う。即ち、演算回路24は、ステップS206で演算された、式(50)の赤色の光量の重み加算式の分子の値、即ち、式(52)の値を、ステップS206で演算された、式(50)の赤色の光量の重み加算式の分母の値、即ち、式(53)の値で除算する演算を行う。これにより、ステップS272では、注目位置(I',J')における真の赤色の光量Lr(I',J')が求められる。   If it is determined in step S271 that the absolute value of the equation (53) for the target position (I ′, J ′) is equal to or greater than a predetermined threshold, that is, the equation (53) for the target position (I ′, J ′). If the absolute value of () is not small enough to be regarded as 0, the process proceeds to step S272, and the arithmetic circuit 24 selects and performs a normal process for calculating the red light quantity weight addition formula of formula (50). In other words, the arithmetic circuit 24 calculates the value of the numerator of the red light quantity weight addition formula of Formula (50) calculated in Step S206, that is, the value of Formula (52), in Formula ( 50) The operation of dividing by the denominator value of the red light quantity weight addition formula, that is, the value of formula (53) is performed. Thus, in step S272, the true red light amount Lr (I ′, J ′) at the target position (I ′, J ′) is obtained.

一方、ステップS271において、注目位置(I',J')に対する式(53)の絶対値が、所定の閾値未満であると判定された場合、即ち、式(53)の絶対値が0、または0に近い場合、ステップS273に進み、演算回路24は、例外処理を選択して行う。即ち、演算回路24は、式(58)を演算することにより、注目位置(I',J')における真の赤色の光量Lr(I',J')を求める。   On the other hand, when it is determined in step S271 that the absolute value of the equation (53) with respect to the target position (I ′, J ′) is less than the predetermined threshold, that is, the absolute value of the equation (53) is 0, or When it is close to 0, the process proceeds to step S273, and the arithmetic circuit 24 selects and performs exception processing. That is, the arithmetic circuit 24 calculates the true red light amount Lr (I ′, J ′) at the target position (I ′, J ′) by calculating the equation (58).

次に、図53のフローチャートを参照して、図50のステップS217における、注目位置(I',J')の真の青色の光量Lb(I',J')を求める演算処理について説明する。   Next, with reference to the flowchart of FIG. 53, the calculation process for obtaining the true blue light quantity Lb (I ′, J ′) at the target position (I ′, J ′) in step S217 of FIG. 50 will be described.

初めに、ステップS291において、演算回路24は、注目位置(I’,J’)に対して、図49のステップS208で演算された、式(51)の青色の光量の重み加算式の分母の絶対値、即ち、式(55)の絶対値が、所定の閾値以上であるか否かを判定する。この所定の閾値は、式(55)の絶対値を0とみなし、例外処理を適用するかどうかを判定するための値であり、例えば、予め演算回路24に設定されている。但し、所定の閾値は、その他、ユーザの操作に応じて設定可能とすることもできる。また、この閾値は、図51のステップS251および図52のステップS271の閾値それぞれと同一でもよいし、異なるものでもよい。   First, in step S291, the arithmetic circuit 24 calculates the denominator of the blue light quantity weight addition formula of equation (51) calculated in step S208 of FIG. 49 for the position of interest (I ′, J ′). It is determined whether the absolute value, that is, the absolute value of Expression (55) is equal to or greater than a predetermined threshold value. This predetermined threshold value is a value for determining whether or not to apply exception processing, assuming that the absolute value of Expression (55) is 0, and is set in advance in the arithmetic circuit 24, for example. However, the predetermined threshold can also be set according to the user's operation. Further, this threshold value may be the same as or different from the threshold values in step S251 in FIG. 51 and step S271 in FIG.

ステップS291において、注目位置(I’,J’)に対する式(55)の絶対値が、所定の閾値以上であると判定された場合、即ち、注目位置(I’,J’)に対する式(55)の絶対値が0とみなすほどの小さい値ではない場合、ステップS292に進み、演算回路24は、式(51)の青色の光量の重み加算式を演算する通常処理を選択して行う。即ち、演算回路24は、ステップS208で演算された、式(51)の青色の光量の重み加算式の分子の値、即ち、式(54)の値を、ステップS208で演算された、式(51)の青色の光量の重み加算式の分母の値、即ち、式(55)の値で除算する演算を行う。これにより、ステップS292では、注目位置(I',J')における真の青色の光量Lb(I',J')が求められる。   If it is determined in step S291 that the absolute value of the equation (55) for the target position (I ′, J ′) is equal to or greater than a predetermined threshold, that is, the equation (55) for the target position (I ′, J ′). If the absolute value of () is not small enough to be regarded as 0, the process proceeds to step S292, and the arithmetic circuit 24 selects and performs a normal process for calculating the weight addition formula for the blue light quantity in Expression (51). That is, the arithmetic circuit 24 calculates the value of the numerator of the blue light amount weight addition formula of Formula (51) calculated in Step S208, that is, the value of Formula (54), in Formula ( 51) The operation of dividing by the denominator value of the blue light quantity weight addition formula, that is, the value of formula (55) is performed. Thereby, in step S292, the true blue light quantity Lb (I ′, J ′) at the target position (I ′, J ′) is obtained.

一方、ステップS291において、注目位置(I’,J’)に対する式(55)の絶対値が、所定の閾値未満であると判定された場合、即ち、式(55)の絶対値が0、または0に近い場合、ステップS293に進み、演算回路24は、例外処理を選択して行う。即ち、演算回路24は、式(59)を演算することにより、注目位置(I',J')における真の青色の光量Lb(I',J')を求める。   On the other hand, when it is determined in step S291 that the absolute value of Expression (55) for the target position (I ′, J ′) is less than the predetermined threshold, that is, the absolute value of Expression (55) is 0, or When it is close to 0, the process proceeds to step S293, and the arithmetic circuit 24 selects and performs exception processing. That is, the arithmetic circuit 24 calculates the true blue light quantity Lb (I ′, J ′) at the target position (I ′, J ′) by calculating Expression (59).

以上のように、第8実施の形態では、注目位置(I',J')と、注目位置(I',J')の近傍にある変換位置(x,y)との距離に応じた重みとして、ローパスフィルタの特性を有するキュービック関数を用いて重み付け加算を行うことにより、真の緑色の光量Lg(I’,J’)、真の赤色の光量Lr(I’,J’)、および真の青色の光量Lb(I’,J’)を求めるようにしたので、より本来の光に忠実で鮮明な画像を求めることができる。   As described above, in the eighth embodiment, the weight according to the distance between the target position (I ′, J ′) and the converted position (x, y) near the target position (I ′, J ′). By performing weighted addition using a cubic function having the characteristics of a low-pass filter, the true green light amount Lg (I ′, J ′), the true red light amount Lr (I ′, J ′), and the true Since the blue light quantity Lb (I ′, J ′) is obtained, a clear image faithful to the original light can be obtained.

また、第8実施の形態では、位置(ig−0.5,jg−0.5)を変換パラメータ(ak',bk',ck',dk',Tkx',Tky')で基準座標系上に変換した場合に、注目位置(I',J')に対して、I'−2≦x<I'+2,J'−2≦y<J'+2の範囲に出現する、すべての(k,ig,jg)の画素値Gobs(k,ig,jg)、即ち、変換位置(x,y)が、注目位置(I',J')の近傍にある画素値Gobs(k,ig,jg)を用いた重み付け加算である、式(46)の緑色の光量の重み加算式で、真の緑色の光量Lg(I’,J’)が求められる(通常処理)。   In the eighth embodiment, the position (ig−0.5, jg−0.5) is represented on the reference coordinate system by the conversion parameters (ak ′, bk ′, ck ′, dk ′, Tkx ′, Tky ′). , All (k) appearing in the range of I′−2 ≦ x <I ′ + 2 and J′−2 ≦ y <J ′ + 2 with respect to the target position (I ′, J ′). , Ig, jg) pixel value Gobs (k, ig, jg), that is, the pixel value Gobs (k, ig, jg) in which the conversion position (x, y) is in the vicinity of the target position (I ′, J ′). The true green light quantity Lg (I ′, J ′) is obtained by the weighted addition expression of the green light quantity in Expression (46) (normal processing).

但し、注目位置(I',J')の式(46)の緑色の光量の重み加算式の分母の式(48)の絶対値が、所定の閾値未満で0とみなされる場合、即ち、式(46)の緑色の光量の重み加算式により求められる値が不安定である場合には、変換位置(x,y)が注目位置(I',J')の近傍にある画素値Gobs(k,ig,jg)と、注目位置(I',J')の注目画素の周辺の周辺画素の位置の近傍にある画素値Gobs(k,ig,jg)とを用いた重み付け加算である、式(56)により、真の緑色の光量Lg(I',J')が求められる(例外処理)。   However, when the absolute value of the denominator equation (48) of the weight addition equation of the green light quantity in the equation (46) of the target position (I ′, J ′) is considered to be 0 when it is less than the predetermined threshold, that is, the equation When the value obtained by the weight addition formula of the green light quantity in (46) is unstable, the pixel value Gobs (k) where the conversion position (x, y) is in the vicinity of the attention position (I ′, J ′). , Ig, jg) and weighted addition using pixel values Gobs (k, ig, jg) in the vicinity of the positions of the peripheral pixels around the target pixel at the target position (I ′, J ′). From (56), the true green light quantity Lg (I ′, J ′) is obtained (exception processing).

真の赤色の光量Lr(I’,J’)および真の青色の光量Lb(I’,J’)も同様にして求められる。   The true red light amount Lr (I ′, J ′) and the true blue light amount Lb (I ′, J ′) are obtained in the same manner.

従って、ノイズの目立たない良好な出力画像を得ることができる。   Therefore, it is possible to obtain a good output image with no noticeable noise.

なお、通常処理と例外処理とは、次のような見方をすることもできる。   The normal process and the exception process can be viewed as follows.

即ち、例えば、緑色に注目すると、上述の場合においては、通常処理では、変換位置(x,y)が注目画素の位置(注目位置)(I’,J’)の近傍にある撮像画像の画素の画素値Gobs(k,ig,jg)を用いた重み付け加算を行う。一方、例外処理では、変換位置(x,y)が注目画素の位置(I’,J’)の近傍にある撮像画像の画素の画素値Gobs(k,ig,jg)と、変換位置(x,y)が注目画素の周辺の周辺画素の位置の近傍にある撮像画像の画素の画素値Gobs(k,ig,jg)とを用いた重み付け加算を行う。   That is, for example, when attention is paid to green, in the case described above, in the normal processing, the pixel of the captured image in which the conversion position (x, y) is in the vicinity of the position of the target pixel (target position) (I ′, J ′). The weighted addition using the pixel values Gobs (k, ig, jg) is performed. On the other hand, in the exception processing, the pixel value Gobs (k, ig, jg) of the pixel of the captured image whose conversion position (x, y) is in the vicinity of the position (I ′, J ′) of the target pixel and the conversion position (x , Y) performs weighted addition using pixel values Gobs (k, ig, jg) of pixels of the captured image in the vicinity of the positions of the peripheral pixels around the target pixel.

従って、例外処理では、変換位置(x,y)が注目画素の位置(I’,J’)の近傍にある撮像画像の画素の他、周辺画素の位置の近傍にある撮像画像の画素の画素値Gobs(k,ig,jg)をも用いて重み付け加算が行われる。   Accordingly, in the exception processing, the pixel of the captured image whose conversion position (x, y) is in the vicinity of the position (I ′, J ′) of the target pixel and the pixel of the captured image in the vicinity of the position of the peripheral pixel Weighted addition is also performed using the value Gobs (k, ig, jg).

以上から、通常処理が、注目位置(I',J')の近傍として、I'−2≦x<I'+2,J'−2≦y<J'+2の領域内に観測される撮像画像の画素値Gobs(k,ig,jg)を用いた重み付け加算により、注目位置(I',J')の真の緑色の光量Lg(I',J')を求めるのに対し、例外処理は、注目位置(I',J')の近傍として、通常処理の近傍の領域より広いI'−3≦x<I'+3,J'−3≦y<J'+3の領域内に観測される画素値Gobs(k,ig,jg)を用いた重み付け加算により、注目位置(I',J')の真の緑色の光量Lg(I',J')を求めているということができる。   From the above, the captured image observed in the region of I′−2 ≦ x <I ′ + 2, J′−2 ≦ y <J ′ + 2 as the vicinity of the target position (I ′, J ′) in the normal processing. The true green light quantity Lg (I ′, J ′) at the target position (I ′, J ′) is obtained by weighted addition using the pixel values Gobs (k, ig, jg) of As the vicinity of the target position (I ′, J ′), the region is observed in a region of I′−3 ≦ x <I ′ + 3, J′−3 ≦ y <J ′ + 3, which is wider than the region near the normal process. It can be said that the true green light quantity Lg (I ′, J ′) at the target position (I ′, J ′) is obtained by weighted addition using the pixel value Gobs (k, ig, jg).

さらに、換言すれば、注目位置(I',J')の真の緑色の光量Lg(I',J')を求める際に、注目位置(I',J')の近傍として、予め、I'−3≦x<I'+3,J'−3≦y<J'+3の領域が設定されており、通常処理では、その近傍の領域のうちのI'−2≦x<I'+2,J'−2≦y<J'+2以外の領域に観測される画素値Gobs(k,ig,jg)に対する重みが0となる式(46)の緑色の光量の重み加算式により、注目位置(I',J')の真の緑色の光量Lg(I',J')が求められているということができる。一方、例外処理では、I'−2≦x<I'+2,J'−2≦y<J'+2以外の領域に観測される画素値Gobs(k,ig,jg)、即ち、周辺画素の近傍に観測される画素値Gobs(k,ig,jg)に対する重みとして、一定の0の重みではなく、その周辺画素の位置を原点とするキュービック関数Cubic(z)によって与えられる値を用いて、式(56)により、注目位置(I',J')の真の緑色の光量Lg(I',J')が求められていると言うことができる。   Furthermore, in other words, when the true green light amount Lg (I ′, J ′) at the target position (I ′, J ′) is obtained, I is preliminarily set as the vicinity of the target position (I ′, J ′). The region of “−3 ≦ x <I ′ + 3, J′−3 ≦ y <J ′ + 3 is set, and in the normal processing, I′−2 ≦ x <I ′ + 2, among the neighboring regions. According to the weight addition formula of the green light quantity of the formula (46) in which the weight for the pixel value Gobs (k, ig, jg) observed in the region other than J′−2 ≦ y <J ′ + 2 is 0, the target position ( It can be said that the true green light quantity Lg (I ′, J ′) of I ′, J ′) is required. On the other hand, in the exception processing, pixel values Gobs (k, ig, jg) observed in regions other than I′−2 ≦ x <I ′ + 2, J′−2 ≦ y <J ′ + 2, that is, peripheral pixels As a weight for a pixel value Gobs (k, ig, jg) observed in the vicinity, a value given by a cubic function Cubic (z) having the origin of the position of the surrounding pixel instead of a constant zero weight is used. It can be said that the true green light quantity Lg (I ′, J ′) at the target position (I ′, J ′) is obtained from the equation (56).

即ち、通常処理と例外処理とでは、異なる重み(第1と第2の重み)を用いた重み付け加算により、真の緑色の光量Lg(I’,J’)が求められるということができる。   That is, it can be said that the true green light amount Lg (I ′, J ′) is obtained by weighted addition using different weights (first and second weights) in the normal process and the exception process.

なお、第8実施の形態では、注目位置(I',J')とその近傍にある画素値Gobs(k,ig,jg)が観測される位置(x,y)との距離zに応じた重みを表す関数として、式(39)のキュービック関数Cubic(z)を採用したが、重みとしては、その他、例えば、sin(z)/zなどの、ローパスフィルタの特性を有する任意の関数を採用することができる。   In the eighth embodiment, it corresponds to the distance z between the position of interest (I ′, J ′) and the position (x, y) where the pixel value Gobs (k, ig, jg) in the vicinity is observed. The cubic function Cubic (z) of the equation (39) is adopted as a function representing the weight, but any other function having the characteristics of a low-pass filter such as sin (z) / z is adopted as the weight. can do.

ところで、上述した実施の形態では、1枚目の撮像画像を基準画像とするとともに、2乃至N枚目の撮像画像それぞれをターゲット画像とすることとしたが、1枚目の撮像画像以外の、2乃至N枚目の撮像画像のいずれを基準画像としてもよい。   In the above-described embodiment, the first captured image is used as the reference image and each of the second to Nth captured images is used as the target image. Any of the 2nd to Nth captured images may be used as the reference image.

即ち、図54は、N回の連続撮像(高速撮像)により撮像されたN枚の撮像画像を示している。なお、図54は、N=8の例である。   That is, FIG. 54 shows N captured images captured by N consecutive imaging (high-speed imaging). FIG. 54 shows an example where N = 8.

1乃至8枚目の撮像画像4011乃至4018(k枚目画像401k)は、時系列に撮像された画像であり、時間の経過とともに、図中右上方向に、手ブレによりずれた画像となっている。 The first to eighth captured images 401 1 to 401 8 (kth image 401 k ) are images captured in time series, and are images shifted due to camera shake in the upper right direction in the figure as time passes. It has become.

図55は、図54と同様の8枚の撮像画像4011乃至4018を示している。 FIG. 55 shows eight captured images 401 1 to 4018 similar to FIG.

信号処理回路7において、撮像画像4011乃至4018のうちの、1枚目画像を基準画像とするとともに、2乃至8枚目画像それぞれをターゲット画像として、出力画像を推定する場合、出力画像は、基準画像である1枚目画像4011の座標系上の画像として得られる。ここで、図55では、1枚目画像4011、即ち、出力画像を、太線で示してある。 In the signal processing circuit 7, when the output image is estimated using the first image of the captured images 401 1 to 40 8 as the reference image and the second to eighth images as target images, the output image is obtained as an image on the first image 401 1 of the coordinate system is the reference image. Here, in FIG. 55, the first image 401 1 , that is, the output image is indicated by a thick line.

図55の太線で示される出力画像の領域において、1乃至8枚目の8枚の撮像画像4011乃至4018のすべてのデータ(画素値)を使用して光量(画素値)が推定される領域は、点線で示される、出力画像の右上部分の領域411である。この領域411の画素値は、1乃至8枚目の8枚すべての撮像画像4011乃至4018のデータを使用して推定されるので、より鮮明な画質となる。 In the area of the output image indicated by the bold line in FIG. 55, the light amount (pixel value) is estimated using all the data (pixel values) of the eight captured images 401 1 to 4018 of the first to eighth images. The area is an area 411 in the upper right part of the output image indicated by a dotted line. Pixel value of the region 411, since it is estimated using data of 1 to 8 th eight all captured images 401 1 to 401 8, a clearer image quality.

しかしながら、出力画像の推定にあたり、図55の太線で示す出力画像の領域のうちの、領域411以外では、1乃至8枚目の撮像画像4011乃至4018のうちの、一部の枚数目の撮像画像のデータしか使用することができないため、即ち、1乃至8枚目の撮像画像4011乃至4018のすべてのデータを使用することができないため、その分だけ、領域411に比較して画質の鮮明さが劣化することになる。上述したように、右上方向の手ブレが生じている場合には、その反対の左下方向の領域ほど、出力画像を推定するのに用いることができるデータが少なくなり、画質の鮮明さが、領域411に比較して劣化する。 However, when estimating the output image, out of the region of the output image shown by the bold line in FIG. 55, in the region other than the region 411, of 1 to 8 th captured images 401 1 to 401 8, the part of the number-th Since only the data of the captured image can be used, that is, all the data of the first to eighth captured images 401 1 to 4018 cannot be used, the image quality is compared with the area 411 accordingly. The sharpness of the image will deteriorate. As described above, when camera shake occurs in the upper right direction, the data in the lower left direction, which is the opposite, decreases in data that can be used to estimate the output image, and the sharpness of the image quality Degraded compared to 411.

さらに、ターゲット画像である2乃至8枚目の撮像画像4011乃至4018のうちの、図55の太線で示す出力画像の領域上にない部分412のデータは、出力画像の推定に使用することができず、いわば無駄に捨てられることになる。 Furthermore, among the 2-8 th captured images 401 1 to 401 8 is the target image, data with no portion 412 over the area of the output image shown by the bold line in FIG. 55, be used to estimate the output image It cannot be said that it will be thrown away in vain.

以上のように、1枚目の撮像画像を基準として、出力画像を推定すると、ある方向の手ブレが生じている場合には、出力画像の中心から、手ブレと同一の方向の領域(例えば、図55の領域411)では、鮮明な画質が得られるが、その反対方向の領域では、画質の鮮明さが劣化する。   As described above, when the output image is estimated using the first captured image as a reference, if a camera shake in a certain direction occurs, an area in the same direction as the camera shake (for example, from the center of the output image (for example, In the area 411) of FIG. 55, a clear image quality is obtained, but in the area in the opposite direction, the image quality is deteriorated.

ところで、一般に、ユーザが画像を見るときは、その中心部分に注目することが多いので、特に、画像の中心部分の画質は鮮明であることが望ましい。   By the way, in general, when a user views an image, the user often pays attention to the central portion thereof, so that it is particularly desirable that the image quality of the central portion of the image is clear.

そこで、信号処理回路7では、N枚の画像が連続撮像された時間の、中間の時刻またはその近傍の時刻に撮像された撮像画像(以下、中間画像と称する)を基準画像とするとともに、他の撮像画像をターゲット画像として、出力画像を推定することができる。   Therefore, the signal processing circuit 7 uses a captured image (hereinafter referred to as an intermediate image) captured at an intermediate time or a time in the vicinity of the time when N images are continuously captured as a reference image, The output image can be estimated using the captured image as a target image.

例えば、図56に示すように、信号処理回路7は、8枚の撮像画像4011乃至4018のうちの、太線で示される4枚目の撮像画像を基準画像として、出力画像を推定する。この場合、出力画像の推定にあたり、その中心部分の領域421において、1乃至8枚目の8枚の撮像画像4011乃至4018のすべてのデータが使用される。 For example, as illustrated in FIG. 56, the signal processing circuit 7 estimates an output image using a fourth captured image indicated by a thick line among the eight captured images 401 1 to 4018 as a reference image. In this case, in the estimation of the output image, all the data of the first to eighth captured images 401 1 to 4018 are used in the central area 421.

即ち、時系列の複数枚の撮像画像のうちの、中間画像を基準画像とするとともに、他の撮像画像をターゲット画像として、出力画像を推定することにより、出力画像の中心部分を、より鮮明な画質とすることができる。   That is, an intermediate image of a plurality of time-series captured images is used as a reference image, and an output image is estimated using another captured image as a target image. It can be image quality.

通常の撮影(撮像)では、撮影者は、目的の被写体が画像(画枠)の中心に位置するように撮影を行う。また、上述したように、人が画像を見る場合には、画像の中央部を視点として、その画像を見ることが一般的である。そういう意味では、画像の中心部分が、画像の周辺部よりも、より鮮明な画質となっている方が、良好な画像であると言える。   In normal shooting (imaging), the photographer performs shooting so that the target subject is positioned at the center of the image (image frame). As described above, when a person views an image, the image is generally viewed from the center of the image as a viewpoint. In that sense, it can be said that a better image is obtained when the central portion of the image has a clearer image quality than the peripheral portion of the image.

従って、図56に示すように、中間画像を基準画像とするとともに、他の撮像画像をターゲット画像とすることにより、出力画像の中心部分が1乃至8枚目の8枚の撮像画像4011乃至4018のすべてのデータを使用して推定されるので、1枚目の撮像画像を基準画像とするよりも、中間画像を基準画像とする方が、良好な出力画像を得ることができる。 Therefore, as shown in FIG. 56, by using the intermediate image as a reference image and another captured image as a target image, eight captured images 401 1 to 401 whose central portions of the output image are the first to eighth images. 401 since 8 is estimated using all data, rather than the reference image captured image of the first sheet, it is possible better to the intermediate image with the reference image to obtain a good output image.

なお、手ブレの周波数は、例えば、10乃至15Hz程度である。従って、図56に示した8枚の撮像画像4011乃至4018を、例えば、1/50秒以内で撮像するようなシャッタスピードでは、手ブレによるブレ量(手ブレ量)は直線近似することができる。即ち、手ブレは、一定方向への一定の速さでの移動とみなすことができる。従って、時系列に8枚の撮像画像4011乃至4018を撮像する場合には、その撮像時間における手ブレ量を直線近似することができ、中間画像、即ち、4枚目の撮像画像4014や、5枚目の撮像画像4015を基準画像とすることにより、図56で説明したように、出力画像の中心部分の画質を鮮明にすることができる。 Note that the frequency of camera shake is, for example, about 10 to 15 Hz. Therefore, for example, at the shutter speed at which the eight captured images 401 1 to 40 8 shown in FIG. 56 are captured within 1/50 second, the amount of camera shake (the amount of camera shake) is linearly approximated. Can do. That is, camera shake can be regarded as movement at a constant speed in a certain direction. Therefore, when the eight captured images 401 1 to 401 8 are captured in time series, the amount of camera shake during the imaging time can be linearly approximated, and the intermediate image, that is, the fourth captured image 401 4 is captured. and, by the 5 th captured image 401 5 the reference image, as described in FIG. 56, the image quality of the center portion of the output image can be clear.

また、図4で示した信号処理回路7において、8枚の撮像画像4011乃至4018のうちの、例えば、4枚目の撮像画像4014を基準画像とする場合には、フレームメモリ22−1に基準画像とする4枚目の撮像画像4014を供給して記憶させ、1乃至3枚目の4011乃至4013、および5乃至8枚目の撮像画像4015乃至4018を、それぞれ、フレームメモリ22−2乃至22−8に供給して記憶させるようにすればよい。 Further, the signal processing circuit 7 shown in FIG. 4, of the eight captured images 401 1 to 401 8, for example, the 4 th captured image 401 4 when the reference image is a frame memory 22- 1 is 4 th captured image 401 4 of the supply to the memory as a reference image, the first to third sheet of 401 1 to 401 3, and 5 to 8 th captured images 401 5 to 401 8, respectively The frame memories 22-2 to 22-8 may be supplied and stored.

ここで、中間画像を基準画像とすることにより、中心部分が鮮明な出力画像を得ることができる他、信号処理回路7の設計の容易化を図ることができる。   Here, by using the intermediate image as a reference image, an output image with a clear central portion can be obtained, and the design of the signal processing circuit 7 can be facilitated.

即ち、手ブレ量が、上述したように、直線近似することができるとして、時系列に8枚の撮像画像4011乃至4018を撮像した場合に、例えば、隣り合う撮像画像間での手ブレ量が10画素であるとする。この場合、1枚目の撮像画像を基準画像としてしまうと、1枚の画像の撮像が無限小の時間で行うことができるとしても、最大で、70画素の手ブレが生じることになる。従って、信号処理回路7は、最大で70画素の手ブレに対応することができるように設計する必要がある。 That is, assuming that the amount of camera shake can be linearly approximated as described above, when eight captured images 401 1 to 40 18 are captured in time series, for example, camera shake between adjacent captured images is detected. Assume that the amount is 10 pixels. In this case, if the first captured image is used as a reference image, a maximum of 70 pixel camera shake occurs even if the capturing of one image can be performed in an infinitely small time. Therefore, it is necessary to design the signal processing circuit 7 so as to be able to cope with camera shake of 70 pixels at the maximum.

これに対して、中間画像を基準画像とする場合、即ち、撮像画像4011乃至4018のうちの、例えば、4枚目の撮像画像4014を基準画像とする場合、最大の手ブレ量は40画素になる。従って、信号処理回路7は、最大で40画素の手ブレに対応することができるように設計すればよいため、信号処理回路7としてのハードウエアの設計の容易化を図ることができる。 In contrast, when the intermediate image and the reference image, i.e., among the captured images 401 1 to 401 8, for example, the case of the 4 th captured image 401 4 with the reference image, the maximum amount of motion blur is 40 pixels. Therefore, the signal processing circuit 7 may be designed so as to be able to cope with camera shake of 40 pixels at the maximum, so that the hardware design of the signal processing circuit 7 can be facilitated.

第8実施の形態で説明した一連の処理は、その他の実施の形態と同様に、専用のハードウエアにより実行させることもできるし、ソフトウエアにより実行させることもできる。第8実施の形態で説明した一連の処理をソフトウエアにより実行させる場合、他の実施の形態と同様に、例えば、デジタルカメラ1は、図41で示したコンピュータにプログラムを実行させることにより実現することができる。   The series of processes described in the eighth embodiment can be executed by dedicated hardware as well as other embodiments, or can be executed by software. When the series of processes described in the eighth embodiment is executed by software, as in the other embodiments, for example, the digital camera 1 is realized by causing the computer shown in FIG. 41 to execute the program. be able to.

なお、本明細書において、記録媒体に記録されるプログラムを記述するステップは、記載された順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。   In the present specification, the step of describing the program recorded on the recording medium is not limited to the processing performed in chronological order according to the described order, but is not necessarily performed in chronological order. It also includes processes that are executed individually.

上述した例では、デジタルカメラ1の撮像素子4を、単板センサで構成し、撮像素子4が出力する1画素につき1個の色信号から、1画素につき3個の色信号を有する画像を推定するようにしたが、撮像素子4は、単板センサでなくてもよい。即ち、撮像素子4としては、1画素につき所定のn個の色信号を出力するものを採用し、画像推定処理では、1画素につきn個の色信号から、1画素につき(n+1)個以上の色信号を有する画像を推定するようにすることができる。   In the above-described example, the image sensor 4 of the digital camera 1 is configured by a single plate sensor, and an image having three color signals per pixel is estimated from one color signal per pixel output from the image sensor 4. However, the image sensor 4 may not be a single plate sensor. In other words, the image pickup device 4 employs a device that outputs predetermined n color signals per pixel, and in the image estimation process, from the n color signals per pixel, (n + 1) or more per pixel. An image having a color signal can be estimated.

また、上述した例では、1枚目の撮像画像または中間画像を基準画像として、ターゲット画像の基準画像に対する位置関係を検出したが、1枚目の撮像画像および中間画像以外の、任意の撮像画像を基準画像として、ターゲット画像の基準画像に対する位置関係を検出するようにすることも可能である。   In the above-described example, the positional relationship of the target image with respect to the reference image is detected using the first captured image or the intermediate image as a reference image. However, any captured image other than the first captured image and the intermediate image is detected. It is also possible to detect the positional relationship of the target image with respect to the reference image using as a reference image.

さらに、本発明は、上述したように、デジタルスチルカメラに採用することができる他、デジタルビデオカメラ等にも採用することができる。   Furthermore, as described above, the present invention can be used for a digital still camera as well as a digital video camera.

本発明を適用したデジタルカメラ1の一実施の形態の構成例を示すブロック図である。It is a block diagram which shows the structural example of one Embodiment of the digital camera 1 to which this invention is applied. 図1のデジタルカメラ1の撮像処理について説明するフローチャートである。3 is a flowchart for describing an imaging process of the digital camera 1 in FIG. 1. 図1の撮像素子4の画素の配列を示す図である。It is a figure which shows the arrangement | sequence of the pixel of the image pick-up element 4 of FIG. 図1の信号処理回路7の詳細な構成例を示すブロック図である。It is a block diagram which shows the detailed structural example of the signal processing circuit 7 of FIG. 1枚目画像と2枚目画像との座標の関係について示す図である。It is a figure shown about the relationship of the coordinate of a 1st sheet image and a 2nd sheet image. 画像推定処理の第1実施の形態について説明するフローチャートである。It is a flowchart explaining 1st Embodiment of an image estimation process. 画像推定処理の第1実施の形態について説明するフローチャートである。It is a flowchart explaining 1st Embodiment of an image estimation process. 第2実施の形態における色相関の条件を説明する図である。It is a figure explaining the conditions of color correlation in a 2nd embodiment. 第2実施の形態における色相関の条件を説明する図である。It is a figure explaining the conditions of color correlation in a 2nd embodiment. 画像推定処理の第2実施の形態について説明するフローチャートである。It is a flowchart explaining 2nd Embodiment of an image estimation process. 画像推定処理の第2実施の形態について説明するフローチャートである。It is a flowchart explaining 2nd Embodiment of an image estimation process. 画像推定処理の第2実施の形態について説明するフローチャートである。It is a flowchart explaining 2nd Embodiment of an image estimation process. フレームメモリ22−1に記憶される1枚目画像を示す図である。It is a figure which shows the 1st sheet image memorize | stored in the frame memory 22-1. フレームメモリ22−2に記憶される2枚目画像を示す図である。It is a figure which shows the 2nd sheet image memorize | stored in the frame memory 22-2. フレームメモリ22−3に記憶される3枚目画像を示す図である。It is a figure which shows the 3rd sheet image memorize | stored in frame memory 22-3. 撮像素子4の画素を示す図である。2 is a diagram illustrating pixels of an image sensor 4. 図1の撮像素子4の画素の配列を示す図である。It is a figure which shows the arrangement | sequence of the pixel of the image pick-up element 4 of FIG. バネモデルについて説明する図である。It is a figure explaining a spring model. バネモデルについて説明する図である。It is a figure explaining a spring model. バネモデルについて説明する図である。It is a figure explaining a spring model. バネモデルについて説明する図である。It is a figure explaining a spring model. バネモデルについて説明する図である。It is a figure explaining a spring model. バネモデルについて説明する図である。It is a figure explaining a spring model. 画像推定処理の第3実施の形態について説明するフローチャートである。It is a flowchart explaining 3rd Embodiment of an image estimation process. 画像推定処理の第4実施の形態について説明するフローチャートである。It is a flowchart explaining 4th Embodiment of an image estimation process. 画像推定処理の第5実施の形態について説明するフローチャートである。It is a flowchart explaining 5th Embodiment of an image estimation process. 撮像素子4の各画素が緑色の成分(G信号)を受光している状態を示す図である。It is a figure which shows the state in which each pixel of the image pick-up element 4 is light-receiving the green component (G signal). 縦方向のエッジを説明する図である。It is a figure explaining the edge of a vertical direction. 横方向のエッジを説明する図である。It is a figure explaining the edge of a horizontal direction. 左上から右下方向のエッジを説明する図である。It is a figure explaining the edge of a lower right direction from upper left. 右上から左下方向のエッジを説明する図である。It is a figure explaining the edge of a lower left direction from an upper right. 縦方向のエッジが検出された場合に作成される平面Q1を説明する図である。It is a figure explaining the plane Q1 produced when the edge of a vertical direction is detected. 横方向のエッジが検出された場合に作成される平面Q2を説明する図である。It is a figure explaining the plane Q2 created when the edge of a horizontal direction is detected. 左上から右下方向のエッジが検出された場合に作成される平面Q3を説明する図である。It is a figure explaining plane Q3 created when the edge of the lower right direction is detected from the upper left. 右上から左下方向のエッジが検出された場合に作成される平面Q4を説明する図である。It is a figure explaining plane Q4 created when the edge of a lower left direction is detected from an upper right. 画像推定処理の第6実施の形態について説明するフローチャートである。It is a flowchart explaining 6th Embodiment of an image estimation process. 第7実施の形態における色相関の条件を説明する図である。It is a figure explaining the conditions of color correlation in a 7th embodiment. 第7実施の形態における色相関の条件を説明する図である。It is a figure explaining the conditions of color correlation in a 7th embodiment. 画像推定処理の第7実施の形態について説明するフローチャートである。It is a flowchart explaining 7th Embodiment of an image estimation process. 本発明と従来の方法の違いを説明する図である。It is a figure explaining the difference between this invention and the conventional method. 本発明を適用したコンピュータの一実施の形態の構成例を示すブロック図である。It is a block diagram which shows the structural example of one Embodiment of the computer to which this invention is applied. キュービック関数を説明する図である。It is a figure explaining a cubic function. 注目位置(I',J')における、基準座標系上の画素値を説明する図である。It is a figure explaining the pixel value on a reference coordinate system in attention position (I ', J'). 例外状態の、注目位置(I',J')における、基準座標系上の画素値を説明する図である。It is a figure explaining the pixel value on a reference coordinate system in attention position (I ', J') of an exceptional state. G信号の例外処理を説明する図である。It is a figure explaining the exception process of G signal. G信号の例外処理を説明する図である。It is a figure explaining the exception process of G signal. R信号の例外処理を説明する図である。It is a figure explaining the exception process of R signal. R信号の例外処理を説明する図である。It is a figure explaining the exception process of R signal. 画像推定処理の第8実施の形態について説明するフローチャートである。It is a flowchart explaining 8th Embodiment of an image estimation process. 画像推定処理の第8実施の形態について説明するフローチャートである。It is a flowchart explaining 8th Embodiment of an image estimation process. 画像推定処理の第8実施の形態について説明するフローチャートである。It is a flowchart explaining 8th Embodiment of an image estimation process. 画像推定処理の第8実施の形態について説明するフローチャートである。It is a flowchart explaining 8th Embodiment of an image estimation process. 画像推定処理の第8実施の形態について説明するフローチャートである。It is a flowchart explaining 8th Embodiment of an image estimation process. 撮像画像4011乃至4018を示す図である。Is a diagram showing a captured image 401 1 to 401 8. 1枚目の撮像画像を基準画像とした場合に得られる出力画像を説明する図である。It is a figure explaining the output image obtained when the 1st captured image is used as a reference image. 中間画像を基準画像とした場合に得られる出力画像を説明する図である。It is a figure explaining the output image obtained when an intermediate image is used as a standard image.

符号の説明Explanation of symbols

1 デジタルカメラ, 2 レンズ, 3 絞り, 4 撮像素子, 5 相関2重サンプリング回路, 6 A/Dコンバータ, 7 信号処理回路, 8 タイミングジェネレータ, 9 D/Aコンバータ, 10 ビデオエンコーダ, 11 モニタ, 12 コーデック, 13 メモリ, 14 バス, 15 CPU, 16 入力デバイス, 21 シフト回路, 22−1乃至N フレームメモリ, 23−1乃至(N−1) 動き検出回路, 24 演算回路, 25 コントローラ   1 Digital Camera, 2 Lens, 3 Aperture, 4 Image Sensor, 5 Correlated Double Sampling Circuit, 6 A / D Converter, 7 Signal Processing Circuit, 8 Timing Generator, 9 D / A Converter, 10 Video Encoder, 11 Monitor, 12 Codec, 13 memory, 14 bus, 15 CPU, 16 input device, 21 shift circuit, 22-1 to N frame memory, 23-1 to (N-1) motion detection circuit, 24 arithmetic circuit, 25 controller

Claims (16)

複数の入力画像から出力画像を推定する画像処理方法において、
1画素につき1個の色信号の画素値を有する画像を撮像する撮像手段が撮像した前記複数の入力画像のうちの所定の1枚の入力画像を基準画像として、前記複数の入力画像どうしの位置関係を検出する検出ステップと、
R,G,Bの各色について、前記基準画像の各画素の画素中心を注目位置として、前記注目位置について、前記注目位置の真の色の光量と、前記基準画像以外の各入力画像を前記基準画像系上の位置に補正したとき前記注目位置の周辺で観測される前記基準画像以外の各入力画像の画素値である観測画素値との関係を、自然長がゼロで、前記観測画素値と前記注目位置の真の色の光量とが等価であることの確からしさをバネ定数とするバネモデルのバネ関係式として生成し、解くことにより、1画素につきR,G,Bの3個の色信号の画素値を有する前記出力画像を推定する画像推定ステップと
を含むことを特徴とする画像処理方法。
In an image processing method for estimating an output image from a plurality of input images,
Positions of the plurality of input images with a predetermined one input image among the plurality of input images captured by the imaging unit that captures an image having a pixel value of one color signal per pixel as a reference image A detection step for detecting a relationship;
For each color of R, G, and B, with the pixel center of each pixel of the reference image as the target position, for the target position, the light amount of the true color at the target position and each input image other than the reference image are the reference When corrected to a position on the image system, the relationship between the observed pixel value that is the pixel value of each input image other than the reference image observed around the target position, the natural length is zero, and the observed pixel value Three color signals R, G, and B per pixel are generated by solving and solving as a spring relational expression of a spring model with the probability that the true color light quantity at the target position is equivalent to a spring constant. An image estimation step of estimating the output image having a pixel value of.
前記画像推定ステップは、前記注目位置の周辺の前記観測画素値のうち、予め設定された所定個数の観測画素値のみを用いて、前記バネモデルのバネ関係式を生成し、解くことにより、前記出力画像を推定する
ことを特徴とする請求項1に記載の画像処理方法。
The image estimation step generates a spring relational expression of the spring model using only a predetermined number of observation pixel values set in advance among the observation pixel values around the position of interest, and solves the output. The image processing method according to claim 1, wherein an image is estimated.
前記画像推定ステップは、前記注目位置の周辺の前記観測画素値すべての平均値を求め、その平均値に近い順に前記所定個数の観測画素値のみを用いて、前記バネモデルのバネ関係式を生成し、解くことにより、前記出力画像を推定する
ことを特徴とする請求項に記載の画像処理方法。
The image estimation step calculates an average value of all the observed pixel values around the position of interest , and generates a spring relational expression of the spring model using only the predetermined number of observed pixel values in order from the average value. The image processing method according to claim 2 , wherein the output image is estimated by solving .
前記画像推定ステップは、前記注目位置の周辺の前記観測画素値のうち、前記注目位置との距離が短い順に前記所定個数の画素値のみを用いて、前記バネモデルのバネ関係式を生成し、解くことにより、前記出力画像を推定する
ことを特徴とする請求項に記載の画像処理方法。
The image estimation step generates and solves a spring relational expression of the spring model using only the predetermined number of pixel values in order of increasing distance from the target position among the observed pixel values around the target position. The image processing method according to claim 2 , wherein the output image is estimated .
前記画像推定ステップは、前記注目位置周辺にエッジ部分があるかを検出し、前記エッジ部分であると検出された位置の前記観測画素値を除いた前記バネモデルのバネ関係式を生成し、解くことにより、前記出力画像を推定する
ことを特徴とする請求項1に記載の画像処理方法。
The image estimation step detects whether there is an edge portion around the target position, and generates and solves a spring relational expression of the spring model excluding the observed pixel value at the position detected as the edge portion. The image processing method according to claim 1 , wherein the output image is estimated by :
前記画像推定ステップは、前記注目位置周辺にエッジ部分があるかを検出し、前記エッジ部分であると検出された位置の前記観測画素値を、所定の画素値に変更した前記バネモデルのバネ関係式を生成し、解くことにより、前記出力画像を推定する
ことを特徴とする請求項1に記載の画像処理方法。
The image estimation step detects whether there is an edge part around the position of interest, and the observed pixel value at the position detected as the edge part is changed to a predetermined pixel value. The image processing method according to claim 1 , wherein the output image is estimated by generating and solving .
前記画像推定ステップは、前記所定の画素値として、前記エッジ部分の傾きを有し、前記エッジ部分の前記観測画素値を通る平面の、前記注目位置上の画素値に変更する
ことを特徴とする請求項に記載の画像処理方法。
The image estimation step is characterized in that the predetermined pixel value is changed to a pixel value on the target position of a plane having the inclination of the edge portion and passing through the observed pixel value of the edge portion. The image processing method according to claim 6 .
前記画像推定ステップは、「縦方向のエッジ」、「横方向のエッジ」、「左上から右下方向のエッジ」、および「右上から左下方向のエッジ」の4つの方向の少なくとも1つについて、エッジ部分の有無を検出する
ことを特徴とする請求項5または6に記載の画像処理方法。
In the image estimation step, the edge in at least one of the four directions of “vertical edge”, “lateral edge”, “upper left to lower right edge”, and “upper right to lower left edge” is selected. The image processing method according to claim 5 , wherein presence or absence of a part is detected .
前記画像推定ステップは、前記バネ関係式の他に、GとR、GとB、及びRとBのうちの少なくとも2つについて、色の相関があることを条件として付加し、解くことにより、前記出力画像を推定する
ことを特徴とする請求項に記載の画像処理方法。
In the image estimation step, in addition to the spring relational expression, at least two of G and R, G and B, and R and B are added on the condition that there is a color correlation, and by solving, The image processing method according to claim 1 , wherein the output image is estimated .
前記画像推定ステップは、GとR、GとB、またはRとBの2色の色相関の条件として、前記注目位置を中心とする近傍領域において、前記基準画像上の位置が所定の許容値以内である前記2色の前記観測画素値を求め、主成分分析を行い、主成分と直交する成分についての分散を求め、分散が小さいほど前記バネ定数が大きくなるような前記条件を付加する
ことを特徴とする請求項9に記載の画像処理方法。
In the image estimation step, a position on the reference image is set to a predetermined allowable value in a vicinity region centered on the target position as a condition of color correlation between G and R, G and B, or R and B. Find the observed pixel values of the two colors that are within, perform principal component analysis, find the variance for the component orthogonal to the principal component, and add the condition that the spring constant increases as the variance decreases The image processing method according to claim 9.
前記注目位置の真の色の光量は、前記注目位置と前記観測画素値の距離に応じた重みの重み付け加算として表され、前記重みは、前記注目位置(I’,J')、前記観測画素値の前記基準画像系上の位置(x,y)、キュービック関数Cubicを用いて、Cubic(I’−x)×Cubic(J’−y)により計算される
ことを特徴とする請求項に記載の画像処理方法。
The amount of light of the true color at the target position is expressed as a weighted addition according to the distance between the target position and the observed pixel value, and the weight includes the target position (I ′, J ′) and the observed pixel. position on the reference image based value (x, y), a reference to cubic function cubic, to claim 1, characterized in that calculated by cubic (I'-x) × cubic (J'-y) The image processing method as described.
前記画像推定ステップは、ΣCubic(I’−x)×Cubic(J’−y)が所定の閾値以上であるかを判定し、所定の閾値以上ではないと判定された場合には、前記注目位置の画素の周辺の周辺画素の画素値も用いて、前記注目位置の画素値を推定する
ことを特徴とする請求項11に記載の画像処理方法。
The image estimation step determines whether ΣCubic (I′−x) × Cubic (J′−y) is equal to or greater than a predetermined threshold value. The image processing method according to claim 11 , wherein the pixel value of the target position is estimated also using pixel values of peripheral pixels around the pixel .
前記検出ステップは、
前記複数の入力画像が撮像された時間の、中間の時刻またはその近傍の時刻に撮像された入力画像を前記基準画像として、前記複数の入力画像どうしの位置関係を検出する
ことを特徴とする請求項1に記載の画像処理方法。
The detecting step includes
The positional relationship between the plurality of input images is detected by using, as the reference image , an input image captured at an intermediate time or a time close to the time when the plurality of input images are captured. Item 8. The image processing method according to Item 1.
前記撮像手段は、前記複数の入力画像を、適正露出未満で撮像し、
前記複数の入力画像それぞれの画素値のゲインアップを行う露出補正ステップをさらに含む
ことを特徴とする請求項1に記載の画像処理方法。
The imaging means captures the plurality of input images with less than appropriate exposure,
The image processing method according to claim 1, further comprising an exposure correction step of increasing a gain of a pixel value of each of the plurality of input images.
複数の入力画像から出力画像を推定する画像処理装置において、
1画素につき1個の色信号の画素値を有する前記複数の入力画像を撮像する撮像手段と、
前記複数の入力画像のうちの所定の1枚の入力画像を基準画像として、前記複数の入力画像どうしの位置関係を検出する検出手段と、
R,G,Bの各色について、前記基準画像の各画素の画素中心を注目位置として、前記注目位置について、前記注目位置の真の色の光量と、前記基準画像以外の各入力画像を前記基準画像系上の位置に補正したとき前記注目位置の周辺で観測される前記基準画像以外の各入力画像の画素値である観測画素値との関係を、自然長がゼロで、前記観測画素値と前記注目位置の真の色の光量とが等価であることの確からしさをバネ定数とするバネモデルのバネ関係式として生成し、解くことにより、1画素につきR,G,Bの3個の色信号の画素値を有する前記出力画像を推定する画像推定手段と
を備えることを特徴とする画像処理装置。
In an image processing apparatus that estimates an output image from a plurality of input images,
Imaging means for imaging the plurality of input images having a pixel value of one color signal per pixel;
Detecting means for detecting a positional relationship between the plurality of input images , with a predetermined one input image of the plurality of input images as a reference image ;
For each color of R, G, and B, with the pixel center of each pixel of the reference image as the target position, for the target position, the light amount of the true color at the target position and each input image other than the reference image are the reference When corrected to a position on the image system, the relationship between the observed pixel value that is the pixel value of each input image other than the reference image observed around the target position, the natural length is zero, and the observed pixel value Three color signals R, G, and B per pixel are generated by solving and solving as a spring relational expression of a spring model with the probability that the true color light quantity at the target position is equivalent to a spring constant. And an image estimation means for estimating the output image having a pixel value of.
複数の入力画像から出力画像を推定する画像処理のコンピュータに
1画素につき1個の色信号の画素値を有する画像を撮像する撮像手段が撮像した前記複数の入力画像のうちの所定の1枚の入力画像を基準画像として、前記複数の入力画像どうしの位置関係を検出する検出ステップと、
R,G,Bの各色について、前記基準画像の各画素の画素中心を注目位置として、前記注目位置について、前記注目位置の真の色の光量と、前記基準画像以外の各入力画像を前記基準画像系上の位置に補正したとき前記注目位置の周辺で観測される前記基準画像以外の各入力画像の画素値である観測画素値との関係を、自然長がゼロで、前記観測画素値と前記注目位置の真の色の光量とが等価であることの確からしさをバネ定数とするバネモデルのバネ関係式として生成し、解くことにより、1画素につきR,G,Bの3個の色信号の画素値を有する前記出力画像を推定する画像推定ステップと
を含む処理実行させることを特徴とするプログラム。
To an image processing computer that estimates an output image from a plurality of input images,
Positions of the plurality of input images with a predetermined one input image among the plurality of input images captured by the imaging unit that captures an image having a pixel value of one color signal per pixel as a reference image A detection step for detecting a relationship;
For each color of R, G, and B, with the pixel center of each pixel of the reference image as the target position, for the target position, the light amount of the true color at the target position and each input image other than the reference image are the reference When corrected to a position on the image system, the relationship between the observed pixel value that is the pixel value of each input image other than the reference image observed around the target position, the natural length is zero, and the observed pixel value Three color signals R, G, and B per pixel are generated by solving and solving as a spring relational expression of a spring model with the probability that the true color light quantity at the target position is equivalent to a spring constant. a program characterized by executing a process including the image estimation step of estimating the output image having the pixel value.
JP2004122523A 2003-06-23 2004-04-19 Image processing method and apparatus, and program Expired - Fee Related JP4613510B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004122523A JP4613510B2 (en) 2003-06-23 2004-04-19 Image processing method and apparatus, and program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2003178404 2003-06-23
JP2004122523A JP4613510B2 (en) 2003-06-23 2004-04-19 Image processing method and apparatus, and program

Publications (2)

Publication Number Publication Date
JP2005038396A JP2005038396A (en) 2005-02-10
JP4613510B2 true JP4613510B2 (en) 2011-01-19

Family

ID=34220147

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004122523A Expired - Fee Related JP4613510B2 (en) 2003-06-23 2004-04-19 Image processing method and apparatus, and program

Country Status (1)

Country Link
JP (1) JP4613510B2 (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4395763B2 (en) 2005-03-07 2010-01-13 ソニー株式会社 Imaging apparatus and imaging method
JP4304528B2 (en) 2005-12-01 2009-07-29 ソニー株式会社 Image processing apparatus and image processing method
JP4340915B2 (en) 2006-02-01 2009-10-07 ソニー株式会社 Captured image signal distortion correction method, captured image signal distortion correction apparatus, imaging method, and imaging apparatus
JP2007215114A (en) 2006-02-13 2007-08-23 Sony Corp Method of correcting distortion of taken image and device of correcting distortion of taken image, and imaging apparatus
JP5019543B2 (en) * 2006-05-09 2012-09-05 シャープ株式会社 Imaging device
JP4178480B2 (en) 2006-06-14 2008-11-12 ソニー株式会社 Image processing apparatus, image processing method, imaging apparatus, and imaging method
JP4703504B2 (en) 2006-07-21 2011-06-15 ソニー株式会社 Image processing apparatus, image processing method, and program
JP2008029125A (en) 2006-07-21 2008-02-07 Sony Corp Electromagnetic induction processor
JP4735978B2 (en) * 2006-07-21 2011-07-27 ソニー株式会社 Image processing apparatus, image processing method, and program
JP4483841B2 (en) 2006-09-06 2010-06-16 カシオ計算機株式会社 Imaging device
JP4656168B2 (en) 2008-03-05 2011-03-23 カシオ計算機株式会社 Image synthesizer
JP5347530B2 (en) * 2009-01-26 2013-11-20 株式会社ニコン Image processing program, image processing apparatus, and imaging apparatus
JP5513978B2 (en) 2010-05-14 2014-06-04 パナソニック株式会社 Imaging apparatus, integrated circuit, and image processing method
JP5798696B2 (en) * 2012-11-30 2015-10-21 富士フイルム株式会社 Image processing apparatus, method, recording medium, program, and imaging apparatus
CN109983758B (en) * 2016-12-02 2021-11-16 索尼半导体解决方案公司 Imaging element, imaging method, and electronic apparatus
JP2019161564A (en) * 2018-03-16 2019-09-19 株式会社リコー Image processing apparatus, image processing method, image processing program, photographing apparatus, photographing method, and photographing program

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004068862A1 (en) * 2003-01-31 2004-08-12 The Circle For The Promotion Of Science And Engineering Method for creating high resolution color image, system for creating high resolution color image and program for creating high resolution color image

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004068862A1 (en) * 2003-01-31 2004-08-12 The Circle For The Promotion Of Science And Engineering Method for creating high resolution color image, system for creating high resolution color image and program for creating high resolution color image

Also Published As

Publication number Publication date
JP2005038396A (en) 2005-02-10

Similar Documents

Publication Publication Date Title
KR101032233B1 (en) Image processing method and device, and program
JP4613510B2 (en) Image processing method and apparatus, and program
KR101212906B1 (en) Photographic device control method control device and recording medium for photographic device
JP5220777B2 (en) Image processing apparatus, imaging apparatus, program, and image processing method
JP2008042874A (en) Image processing device, method for restoring image and program
JP4748230B2 (en) Imaging apparatus, imaging method, and imaging program
JP2006295626A (en) Fish-eye image processing apparatus, method thereof and fish-eye imaging apparatus
JPWO2005043891A1 (en) Image correction method and imaging apparatus
JP3912404B2 (en) Imaging device
JP2018116239A (en) Image blur correction device, method for controlling the same, imaging device, program, and storage medium
WO2008035636A1 (en) Image processing device and image processing control program
JP4982897B2 (en) Image processing device
JP2008177794A (en) Color shading correcting apparatus of imaging apparatus, imaging apparatus, and color shading correcting method of imaging apparatus
JP4703504B2 (en) Image processing apparatus, image processing method, and program
US20080012964A1 (en) Image processing apparatus, image restoration method and program
JP4496883B2 (en) Image processing method, image processing apparatus, program, and recording medium
JP6245847B2 (en) Image processing apparatus and image processing method
JP2018205551A (en) Imaging device and control method of the same
JP6223135B2 (en) Imaging apparatus and control method thereof
JP5526984B2 (en) Image processing apparatus, image processing method, computer program for image processing, and imaging apparatus
JP4321317B2 (en) Electronic camera, camera system, and black spot correction method for electronic camera
JP6570706B2 (en) Distance measuring device, imaging device, distance measuring method, and program
JP4449777B2 (en) Imaging apparatus, image processing apparatus and method, recording medium, and program
JP2020005093A (en) Imaging apparatus, control method of the same, and program
JP2011130381A (en) Imaging apparatus and control method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070417

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100413

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100604

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

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

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

Free format text: PAYMENT UNTIL: 20131029

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees