JP2005063323A - Image modification processing method and apparatus, program, and data recording medium - Google Patents
Image modification processing method and apparatus, program, and data recording medium Download PDFInfo
- Publication number
- JP2005063323A JP2005063323A JP2003295558A JP2003295558A JP2005063323A JP 2005063323 A JP2005063323 A JP 2005063323A JP 2003295558 A JP2003295558 A JP 2003295558A JP 2003295558 A JP2003295558 A JP 2003295558A JP 2005063323 A JP2005063323 A JP 2005063323A
- Authority
- JP
- Japan
- Prior art keywords
- matrix
- image
- value
- convolution
- lens
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/73—Deblurring; Sharpening
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
- H04N23/81—Camera processing pipelines; Components thereof for suppressing or minimising disturbance in the image signal generation
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Studio Devices (AREA)
- Image Input (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
【課題】 ぼけの形状が各画素で異なることを考慮した画像改質処理を行うことができ、画像改質効果をより一層高めることができる画像改質処理方法およびその装置、プログラム、並びにデータ記録媒体を提供すること。
【解決手段】 各座標(m,n)についての畳み込み演算行列Qm,nの各要素Qm,n(x,y)のうち少なくとも非零要素を含む行列部分の値を畳み込み演算行列記憶手段32,33に記憶しておき、二焦点レンズ21で被写体を撮像した際に、再生演算手段36により、画像素子24の出力信号Z(m+x,n+y)の値と、畳み込み演算行列記憶手段32,33に記憶したQm,n(x,y)とを用いて畳み込み演算処理を行うことにより被写体行列Aの各要素A(m,n)の値を算出し、ピントの合った画像を求めるようにした。
【選択図】 図1
PROBLEM TO BE SOLVED: To provide an image modification processing method and apparatus, program, and data recording capable of performing image modification processing considering that the shape of blur is different for each pixel and further enhancing the image modification effect. To provide a medium.
Convolution operation matrix storage means for a value of a matrix part including at least a non-zero element among elements Q m, n (x, y) of a convolution operation matrix Q m, n for each coordinate (m, n). 32 and 33, and when the subject is imaged by the bifocal lens 21, the value of the output signal Z (m + x, n + y) of the image element 24 and the convolution calculation matrix storage unit 32, The value of each element A (m, n) of the subject matrix A is calculated by performing convolution operation processing using Q m, n (x, y) stored in 33, and a focused image is obtained. I made it.
[Selection] Figure 1
Description
本発明は、レンズにより形成されたピントのぼけた画像をピントの合った画像に改質する画像改質処理方法およびその装置、プログラム、並びにデータ記録媒体に係り、例えば、二焦点レンズを構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像から、ピントの合った画像を求める画像改質処理、あるいは単焦点レンズのピントのぼけを取り除く画像改質処理などに利用できる。 The present invention relates to an image modification processing method and apparatus, program, and data recording medium for modifying an in-focus image formed by a lens into an in-focus image, and configures, for example, a bifocal lens. Image modification processing for obtaining an in-focus image from an image in which an in-focus image formed by one lens unit overlaps an in-focus image formed by the other lens unit, or single focus It can be used for image modification processing that removes lens blur.
従来より、焦点距離の異なる二つのレンズ部を有する二焦点レンズが遠近両用コンタクトレンズとして使用されている。このような二焦点レンズにより構成されるコンタクトレンズを人間が装着した場合には、二つの各レンズ部により形成されるピントの合った画像とピントの合わない画像(いわゆるピンぼけ画像)とを人間が無意識のうちに選択し、ピントの合った画像のみを見るようにしていると考えられる。 Conventionally, a bifocal lens having two lens portions having different focal lengths has been used as a bifocal contact lens. When a human wears a contact lens composed of such a bifocal lens, a human can see an in-focus image and a non-focused image (so-called out-of-focus image) formed by the two lens portions. It is thought that the user selects unconsciously and sees only the image in focus.
ところで、このような二焦点レンズを、例えば携帯電話機や携帯情報端末等の情報端末装置に設ければ、焦点深度下限(例えば、0.3m)から無限遠までの標準的な距離にある通常の被写体(例えば、人物や風景等)を、長い焦点距離を有する長焦点レンズ部により撮像し、一方、それよりも近い距離に配置された近接被写体(例えば、2次元バーコードや虹彩や文字等)を、短い焦点距離を有する短焦点レンズ部により撮像することにより、それぞれ高い解像度の画像を得ることができる。そして、このような二焦点レンズを備えた情報端末装置は、本願の発明者により、既に開発されている(特許文献1参照)。 By the way, if such a bifocal lens is provided in an information terminal device such as a mobile phone or a portable information terminal, for example, a normal distance that is at a standard distance from the lower limit of focal depth (for example, 0.3 m) to infinity. A subject (for example, a person or a landscape) is imaged by a long focal length lens unit having a long focal length, while a close subject (for example, a two-dimensional barcode, an iris, a character, or the like) disposed at a shorter distance. Are picked up by a short-focus lens unit having a short focal length, whereby high-resolution images can be obtained. And the information terminal device provided with such a bifocal lens has already been developed by the inventor of the present application (see Patent Document 1).
しかし、二焦点レンズを備えた情報端末装置では、例えば液晶シャッタ等の光学シャッタを二焦点レンズと撮像素子との間に設けることにより長焦点レンズ部と短焦点レンズ部とを切替可能な構成とした場合等には、コントラストの高い画像を得ることができるものの、そのようなレンズ部の切替を行わない場合には、二つの各レンズ部により形成されるピントの合った画像とピントの合わない画像とが重なってしまうため、画像が不鮮明になるという問題がある。 However, in the information terminal device including the bifocal lens, for example, an optical shutter such as a liquid crystal shutter is provided between the bifocal lens and the image sensor, so that the long focal lens portion and the short focal lens portion can be switched. In such a case, a high-contrast image can be obtained. However, when such a lens unit is not switched, the focused image formed by the two lens units is not in focus. Since the image overlaps, there is a problem that the image becomes unclear.
この際、前述したように二焦点レンズを使用した遠近両用コンタクトレンズを人間が装着した場合には、ピントの合った画像とピントの合わない画像とを人間が無意識のうちに選択し、ピントの合った画像のみを見るようにしていると考えられるが、このような人間の脳内における画像の選択処理と類似の処理を、通常の携帯電話機や携帯情報端末等の携帯型の情報端末装置に搭載されている程度の性能を有する中央演算処理装置(CPU)により短時間で実行できれば、情報端末装置の使い勝手や性能の向上を図ることができ、しかも低コストで実現できるので便利である。 At this time, when a human wears a bifocal contact lens using a bifocal lens as described above, the human unconsciously selects an in-focus image and an out-of-focus image. Although it is considered that only matching images are viewed, a process similar to the image selection process in the human brain is applied to a portable information terminal device such as a normal cellular phone or a portable information terminal. If it can be executed in a short time by a central processing unit (CPU) having the performance of the installed level, the convenience and performance of the information terminal device can be improved, and it can be realized at low cost, which is convenient.
また、このような処理を行うことができれば、携帯電話機や携帯情報端末等の携帯型の情報端末装置に二焦点レンズを設けた場合に限らず、広く一般的に二焦点レンズによる撮像を行う場合、例えば、パーソナル・コンピュータに二焦点レンズを有するカメラを接続した場合や、監視カメラとして二焦点レンズを用いる場合等においても、画像の質の改善が図られるため好都合である。 In addition, if such processing can be performed, not only when a bifocal lens is provided in a portable information terminal device such as a mobile phone or a portable information terminal, but generally when imaging with a bifocal lens is performed. For example, when a camera having a bifocal lens is connected to a personal computer, or when a bifocal lens is used as a surveillance camera, the image quality can be improved, which is advantageous.
そこで、本願の発明者により、二焦点レンズで撮像された画像の質を短時間の処理で改善することができ、ピント合わせ機構を用いることなく、標準的な距離にある通常の被写体およびこれよりも近距離にある近接被写体のいずれもについても鮮明な画像を得ることができる画像改質処理装置が既に提案されている(特願2003−31734号参照)。 Therefore, the inventor of the present application can improve the quality of the image picked up by the bifocal lens in a short time, and without using a focusing mechanism, a normal subject at a standard distance and the like. There has already been proposed an image modification processing apparatus that can obtain a clear image for any of the close subjects at a short distance (see Japanese Patent Application No. 2003-31734).
ところで、前述した特願2003−31734号で提案されている画像改質処理装置では、全ての画素で同じ形状のぼけが発生すると仮定し、画像改質処理を行っている。すなわち、被写体の任意の1点から出た光が二焦点レンズの作用により撮像素子上で拡がる状態(ぼけの形状)は、被写体の別の1点から出た光が二焦点レンズの作用により撮像素子上で拡がる状態(ぼけの形状)と同じであると仮定している。 By the way, in the image modification processing apparatus proposed in Japanese Patent Application No. 2003-31734 described above, the image modification process is performed on the assumption that blur of the same shape occurs in all pixels. That is, in a state where light emitted from an arbitrary point on the subject spreads on the image sensor by the action of the bifocal lens (blurred shape), light emitted from another point on the subject is imaged by the action of the bifocal lens. It is assumed that it is the same as the state of spreading on the element (blurred shape).
しかし、実際の二焦点レンズによる撮像では、全ての画素で完全に同じ形状のぼけとなることはない。従って、より画像改質効果を高めるためには、各画素で異なる形状のぼけが発生することを考慮した処理を行う必要がある。 However, in the actual imaging with the bifocal lens, blur of the same shape does not occur in all pixels. Therefore, in order to further enhance the image modification effect, it is necessary to perform processing in consideration of the occurrence of blurring with different shapes in each pixel.
また、二焦点レンズによる撮像を行う場合のみならず、単焦点レンズによる撮像を行う場合であっても、全ての画素について完全にピントが合うことはなく、ピンぼけを生じる画素があり、しかも各画素でのぼけの形状は、異なっているのが通常である。従って、このような単焦点レンズによるピントのぼけを取り除くことができれば便利である。 Also, not only when imaging with a bifocal lens, but also when imaging with a single focus lens, all pixels are not completely focused, and there are pixels that are out of focus, and each pixel The shape of the blur is usually different. Therefore, it would be convenient if such defocusing due to a single focus lens could be removed.
本発明の目的は、ぼけの形状が各画素で異なることを考慮した画像改質処理を行うことができ、画像改質効果をより一層高めることができる画像改質処理方法およびその装置、プログラム、並びにデータ記録媒体を提供するところにある。 An object of the present invention is to perform an image modification process considering that the shape of blur is different for each pixel, and to further enhance the image modification effect, an image modification processing method, an apparatus thereof, a program, And providing a data recording medium.
本発明は、レンズにより形成されたピントのぼけた画像をピントの合った画像に改質する画像改質処理方法であって、撮像素子の大きさをM画素×N画素とし、被写体の発する光の明るさを示すM行N列の行列をAとし、被写体をレンズにより撮像して得られた画像の出力信号を示すM行N列の行列をZとし、被写体座標系の1点(m,n)から出た光の結像位置が画像座標系の1点(m,n)となるように被写体座標系および画像座標系を設定したとき、畳み込み演算処理を行うための座標(m,n)についての(2M−1)行(2N−1)列の畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値のうち少なくとも非零要素を含む行列部分の値を、各座標(m,n)の全部または一部について、下式(A−1)に基づき予め算出して畳み込み演算行列記憶手段に記憶しておき、被写体をレンズにより撮像した際に、再生演算手段により、畳み込み演算行列記憶手段に記憶された各要素Qm,n(x,y)のうちの少なくとも一部の値と画像の出力信号の行列Zの各要素Z(m+x,n+y)の値とを用いて下式(A−2)に基づき被写体の行列Aの各要素A(m,n)の値を算出することを特徴とするものである。 The present invention relates to an image modification processing method for modifying an in-focus image formed by a lens into an in-focus image, and the size of an image sensor is M pixels × N pixels, and light emitted from a subject. A matrix of M rows and N columns indicating the brightness of the image is A, and a matrix of M rows and N columns indicating the output signal of the image obtained by imaging the subject with the lens is Z, and one point (m, When the subject coordinate system and the image coordinate system are set so that the imaging position of the light emitted from n) is one point (m, n) in the image coordinate system, the coordinates (m, n) for performing the convolution calculation process ) Is a value of a matrix part including at least a non-zero element among the values of each element Q m, n (x, y) of the convolution matrix Q m, n of (2M-1) rows (2N-1) columns. The whole or a part of each coordinate (m, n) is calculated in advance based on the following formula (A-1) and is folded. Is stored in the viewing operation matrix storage means, when captured by the lens of a subject, the playback operation means, each element stored in the convolution matrix storage unit Q m, n (x, y ) at least one of The value of each element A (m, n) of the matrix A of the subject based on the following equation (A-2) using the value of the part and the value of each element Z (m + x, n + y) of the matrix Z of the output signal of the image Is calculated.
Qm,n(x,y)=1/Wm,n(0,0)
(x=0,y=0の場合)
=−Wm,n(−x,−y)/Wm,n(0,0)power
(x=0,y=0以外の場合)
・・・・・・・・・・・・・・・・・・・・・・(A−1)
Q m, n (x, y) = 1 / W m, n (0,0)
(When x = 0, y = 0)
= −W m, n (−x, −y) / W m, n (0,0) power
(When other than x = 0, y = 0)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (A-1)
A(m,n)=ΣxΣyQm,n(x,y)Z(m+x,n+y)
・・・・・・・・・・・・・・・・・・・・・・(A−2)
A (m, n) = Σ x Σ y Q m, n (x, y) Z (m + x, n + y)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (A-2)
ここで、xおよびyは整数で、(1−M)≦x≦(M−1)、(1−N)≦y≦(N−1)であり、mおよびnは自然数で、1≦m≦M、1≦n≦Nであり、Wm,n(x,y)は、(2M−1)行(2N−1)列の行列Wm,nの各要素の値であり、この行列Wm,nは、被写体の1点(m,n)から出た光がレンズの作用により撮像素子上で拡がる状態を示すポイント・スプレッド・ファンクション行列であり、Wm,n(0,0)は、拡がりの中心部分に位置する画素の出力信号の値であり、Wm,n(−x,−y)は、周囲のぼけ部分に位置する画素の出力信号の値であり、powerは、Wm,n(0,0)のべき乗数となる実数で、1≦power≦2であり、Σxは、x=(1−M)〜(M−1)の和であり、Σyは、y=(1−N)〜(N−1)の和である。 Here, x and y are integers, (1-M) ≦ x ≦ (M−1), (1-N) ≦ y ≦ (N−1), m and n are natural numbers, and 1 ≦ m ≦ M, 1 ≦ n ≦ N, and W m, n (x, y) is a value of each element of the matrix W m, n of (2M−1) rows (2N−1) columns. W m, n is a point spread function matrix indicating a state in which light emitted from one point (m, n) of the subject spreads on the image sensor due to the action of the lens, and W m, n (0, 0) Is the value of the output signal of the pixel located in the center part of the spread, W m, n (−x, −y) is the value of the output signal of the pixel located in the surrounding blur part, and power is W m, a real number which is a power number n (0,0), a 1 ≦ power ≦ 2, the sigma x, the sum of x = (1-M) ~ (M-1), Σ y is , Y = (1-N) to (N-1) Is the sum.
また、「レンズ」は、二焦点レンズでもよく、単焦点レンズでもよい。 Further, the “lens” may be a bifocal lens or a single focal lens.
さらに、「撮像素子」としては、具体的には、例えば、相補性金属酸化膜半導体(CMOS:Complementary Metal-oxide Semiconductor)や電荷結合素子(CCD:Charge Coupled Device)等を採用することができる。 Furthermore, specifically, for example, a complementary metal oxide semiconductor (CMOS), a charge coupled device (CCD), or the like can be employed as the “imaging device”.
そして、powerの値は、Wm,n(0,0)の値に応じて決定すればよい。この際、Wm,n(0,0)の値が、0.5近傍(0.5を含む。以下、同様)のときには、powerの値を2以外の値とする必要がある。より具体的には、Wm,n(0,0)の値が、0.5近傍のときには、powerの値を1以上2未満とし、より好ましくは1とする。一方、Wm,n(0,0)の値が、0.5近傍以外のときには、1以上2以下とする。以下の発明においても、同様である。 The power value may be determined according to the value of W m, n (0, 0). At this time, if the value of W m, n (0, 0) is in the vicinity of 0.5 (including 0.5; the same applies hereinafter), the power value needs to be a value other than 2. More specifically, when the value of W m, n (0, 0) is in the vicinity of 0.5, the power value is set to 1 or more and less than 2, more preferably 1. On the other hand, when the value of W m, n (0, 0) is not near 0.5, it is set to 1 or more and 2 or less. The same applies to the following inventions.
また、「各座標(m,n)の全部または一部について」とは、畳み込み演算行列記憶手段に記憶させておく畳み込み演算行列Qm,nは、全ての座標(m,n)についての畳み込み演算行列Qm,nでもよく、一部の座標(m,n)についての畳み込み演算行列Qm,nのみでもよい趣旨である。但し、一部の座標(m,n)についての畳み込み演算行列Qm,nのみを記憶させる場合は、その記憶させる一部の座標(m,n)についての畳み込み演算行列Qm,nに基づき、計算により全ての座標(m,n)についての畳み込み演算行列Qm,nを求めることができることが前提となる。 Further, “all or part of each coordinate (m, n)” means that the convolution calculation matrix Q m, n stored in the convolution calculation matrix storage means is convolution for all coordinates (m, n). The calculation matrix Q m, n may be used, or only the convolution calculation matrix Q m, n for some coordinates (m, n) may be used. However, when only the convolution calculation matrix Q m, n for some coordinates (m, n) is stored, it is based on the convolution calculation matrix Q m, n for some of the stored coordinates (m, n). It is assumed that the convolution matrix Q m, n for all coordinates (m, n) can be obtained by calculation.
さらに、「(2M−1)行(2N−1)列の畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値のうち少なくとも非零要素を含む行列部分の値」とは、座標(m,n)についての畳み込み演算行列Qm,nを畳み込み演算行列記憶手段に記憶させる際には、(2M−1)×(2N−1)個の全ての要素の値を記憶させておく必要はなく、非零要素を含む行列部分の値を記憶させておけばよい趣旨である。なお、前述した如く、式(A−2)において、Σxは、x=(1−M)〜(M−1)の和であり、Σyは、y=(1−N)〜(N−1)の和であると説明されているが、これは、畳み込み演算行列記憶手段に(2M−1)行(2N−1)列の畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値を全て記憶させた場合の処理を意味し、一部分の値(非零要素を含む行列部分の値)のみを記憶させた場合には、その記憶させた分についての和とすればよい。以下の発明においても同様である。 Further, “value of matrix part including at least non-zero element among values of each element Q m, n (x, y) of convolution arithmetic matrix Q m, n of (2M−1) rows (2N−1) columns” Means that when the convolution calculation matrix Q m, n for the coordinates (m, n) is stored in the convolution calculation matrix storage means, the values of all (2M−1) × (2N−1) elements are set. It is not necessary to memorize, and it is only necessary to memorize the values of the matrix part including the non-zero elements. Incidentally, as described above, in formula (A-2), Σ x is the sum of x = (1-M) ~ (M-1), Σ y is, y = (1-N) ~ (N -1) have been described as the sum of which is the convolution matrix storage unit (2M-1) lines (2N-1) row convolution matrix Q m, each element of the n Q m, n This means processing when all the values of (x, y) are stored. When only a partial value (a value of a matrix portion including a non-zero element) is stored, the sum of the stored values is stored. And it is sufficient. The same applies to the following inventions.
このような本発明の画像改質処理方法においては、被写体をレンズにより撮像した際に、再生演算手段により、畳み込み演算行列記憶手段に記憶された畳み込み演算行列Qm,nの各要素Qm,n(x,y)のうちの少なくとも一部の値と、撮像して得られた画像の出力信号の行列Zの各要素Z(m+x,n+y)の値とを用い、前記式(A−2)に基づき被写体の行列Aの各要素A(m,n)の値を算出する。 In such an image modification processing method of the present invention, each element Q m, n of the convolution calculation matrix Q m, n stored in the convolution calculation matrix storage means by the reproduction calculation means when the subject is imaged by the lens . Using the value of at least a part of n (x, y) and the value of each element Z (m + x, n + y) of the matrix Z of the output signal of the image obtained by imaging, the equation (A-2) ) To calculate the value of each element A (m, n) of the subject matrix A.
この際、再生演算手段による演算処理は、前記式(A−1)に基づき予め算出されて畳み込み演算行列記憶手段に記憶された畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値を用いて行われるので、M×N行M×N列の巨大逆変換行列Tg -1を用いて演算処理を行う場合に比べ、非常に少ない計算量で、被写体の行列Aの各要素A(m,n)の値を算出することが可能となる。 At this time, the calculation processing by the reproduction calculation means is performed by calculating each element Q m, n (x, x, n ) of the convolution calculation matrix Q m, n calculated in advance based on the equation (A-1) and stored in the convolution calculation matrix storage means. Since the calculation is performed using the value of y), the subject matrix A can be obtained with a very small amount of calculation compared to the case where the arithmetic processing is performed using the large inverse transformation matrix T g −1 of M × N rows and M × N columns. It is possible to calculate the value of each element A (m, n).
つまり、被写体の行列Aの要素数は、M×N個であり、画像の出力信号の行列Zの要素数も、M×N個である。従って、被写体の行列Aの各要素に対応する各座標から出た光が、画像の出力信号の行列Zの各要素に対応する画素に影響を与えるものと考えると、この対応関係(被写体の行列Aの各要素の値から画像の出力信号の行列Zの各要素の値を導く関係)は、M×N行M×N列の巨大変換行列Tgを用いて示すことができるので、このM×N行M×N列の巨大変換行列Tgの逆行列Tg -1を求めることができれば、この巨大逆変換行列Tg -1を用いて、逆に、画像の出力信号の行列Zの各要素の値から被写体の行列Aの各要素の値を導くことができる。しかし、M×N行M×N列の巨大逆変換行列Tg -1を用いた演算処理は、計算量が多いので、例えば、通常の携帯電話機や携帯情報端末等の携帯型の情報端末装置に搭載されている程度の性能を有する中央演算処理装置(CPU)では、短時間での処理が困難であるため、現実的ではない。 That is, the number of elements in the subject matrix A is M × N, and the number of elements in the matrix Z of the output signal of the image is also M × N. Therefore, when it is considered that light emitted from each coordinate corresponding to each element of the matrix A of the subject affects the pixels corresponding to each element of the matrix Z of the output signal of the image, this correspondence relationship (subject matrix The relationship of deriving the value of each element of the matrix Z of the output signal of the image from the value of each element of A can be shown using a giant transformation matrix T g of M × N rows and M × N columns. If the inverse matrix T g −1 of the giant transformation matrix T g of × N rows and M × N columns can be obtained, this giant inverse transformation matrix T g −1 is used to reverse the matrix Z of the output signal of the image. The value of each element of the subject matrix A can be derived from the value of each element. However, the arithmetic processing using the M × N rows and M × N giant inverse transformation matrix T g −1 has a large amount of calculation, and thus, for example, a portable information terminal device such as a normal cellular phone or a portable information terminal. In a central processing unit (CPU) having a level of performance mounted on the CPU, processing in a short time is difficult, so it is not realistic.
これに対し、本発明では、再生演算手段による演算処理は、計算量が非常に少ないので、CPUに要求される性能の条件が緩和される。従って、例えば携帯電話機や携帯情報端末等の携帯型の情報端末装置に搭載されている程度のCPUの能力でも短時間の処理で実行することが可能である。このため、携帯型の情報端末装置に本発明を適用すれば、画像改質機能を備えた携帯型の情報端末装置を実現でき、情報端末装置の使い勝手や性能の向上を図ることができるようになる。 On the other hand, in the present invention, the calculation processing by the reproduction calculation means has a very small calculation amount, so that the performance condition required for the CPU is relaxed. Therefore, it is possible to execute the processing in a short time even with the capability of the CPU mounted on a portable information terminal device such as a cellular phone or a portable information terminal. Therefore, if the present invention is applied to a portable information terminal device, a portable information terminal device having an image modification function can be realized, and the usability and performance of the information terminal device can be improved. Become.
また、畳み込み演算行列記憶手段には、各座標(m,n)についての畳み込み演算行列Qm,nが記憶されているので、再生演算手段により、ぼけの形状が各画素で異なることを考慮した画像改質処理を行うことが可能となる。このため、全ての画素で同じ形状のぼけが発生すると仮定した画像改質処理を行う場合に比べ、画像改質効果をより一層高めることができるようになり、これらにより前記目的が達成される。 In addition, since the convolution calculation matrix storage means stores the convolution calculation matrix Q m, n for each coordinate (m, n), it is considered that the blur shape differs for each pixel by the reproduction calculation means. Image modification processing can be performed. For this reason, the image modification effect can be further enhanced as compared with the case of performing the image modification process assuming that the same shape blur occurs in all the pixels, and the above object is achieved by these.
また、前述した画像改質処理方法において、各座標(m,n)についての畳み込み演算行列Qm,nのうち、光軸位置から一方向に延びる直線上に並ぶ座標についての畳み込み演算行列Qm,nをサンプリング行列として選択し、畳み込み演算行列記憶手段には、サンプリング行列Qm,nの各要素Qm,n(x,y)の値のみを記憶させておき、その他の座標についての畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値は、畳み込み演算行列回転算出手段により、レンズの軸対称を利用して、サンプリング行列Qm,nの各要素Qm,n(x,y)の値の配置を光軸位置を中心として回転させることにより算出することが望ましい。 In the image-modifying method described above, the convolution matrix Q m for each coordinate (m, n), out of n, convolution matrix for coordinates aligned on a straight line extending from the optical axis position in one direction Q m , n are selected as sampling matrices, and the convolution calculation matrix storage means stores only the values of the elements Q m, n (x, y) of the sampling matrix Q m, n and convolves other coordinates. The value of each element Q m, n (x, y) of the operation matrix Q m, n is obtained by using the axial symmetry of the lens by the convolution operation matrix rotation calculation means to calculate each element Q m of the sampling matrix Q m, n. , n (x, y) is preferably calculated by rotating the arrangement of the values about the optical axis position.
このように畳み込み演算行列記憶手段にサンプリング行列Qm,nのみを記憶させ、その他の畳み込み演算行列Qm,nについてはサンプリング行列Qm,nを回転させて算出するようにした場合には、畳み込み演算行列記憶手段に記憶させるデータ量を減らすことが可能となる。 In this way, when only the sampling matrix Q m, n is stored in the convolution calculation matrix storage means and the other convolution calculation matrix Q m, n is calculated by rotating the sampling matrix Q m, n , It is possible to reduce the amount of data stored in the convolution calculation matrix storage means.
さらに、上記のように畳み込み演算行列記憶手段にサンプリング行列Qm,nのみを記憶させ、その他の畳み込み演算行列Qm,nについてはサンプリング行列Qm,nを回転させて算出するようにした場合において、畳み込み演算行列回転算出手段によりその他の座標についての畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値を算出する際には、サンプリング行列Qm,nの各要素Qm,n(x,y)の値の配置を回転させたときに、算出対象となる畳み込み演算行列Qm,nの要素Qm,n(x,y)に対応する第一区画領域の所定位置に重なる回転後のサンプリング行列Qm,nの要素Qm,n(x,y)に対応する第二区画領域を求め、求めた第二区画領域に対応する要素Qm,n(x,y)の値を、算出対象となる畳み込み演算行列Qm,nの要素Qm,n(x,y)の値として採用するか、または、第二区画領域の所定位置が重なっている第一区画領域を求め、求めた第一区画領域に対応する要素Qm,n(x,y)の値として、この第一区画領域に所定位置が重なっている第二区画領域に対応する要素Qm,n(x,y)の値を採用することが望ましい。 Further, as described above, when only the sampling matrix Q m, n is stored in the convolution calculation matrix storage means, and the other convolution calculation matrix Q m, n is calculated by rotating the sampling matrix Q m, n When calculating the value of each element Q m, n (x, y) of the convolution matrix Q m, n for other coordinates by the convolution matrix rotation calculation means, each sampling matrix Q m, n The first partition region corresponding to the element Q m, n (x, y) of the convolution matrix Q m, n to be calculated when the arrangement of the values of the element Q m, n (x, y) is rotated The second divided area corresponding to the element Q m, n (x, y) of the rotated sampling matrix Q m, n that overlaps the predetermined position is obtained, and the element Q m, n ( x, the value of y), the calculation target convolution matrix Q m, n elements Q m of, n (x, To be adopted as a value of), or obtains a first divided region of a predetermined position overlaps the second divided area, the elements corresponding to the first divided region obtained Q m, as the value of n (x, y) It is desirable to adopt the value of the element Q m, n (x, y) corresponding to the second partitioned area whose predetermined position overlaps the first partitioned area.
ここで、「第一区画領域の所定位置」および「第二区画領域の所定位置」は、求める各要素Qm,n(x,y)の値を厳密値に近づけるという観点から、それぞれ第一区画領域の中央位置および第二区画領域の中央位置とすることが好ましいが、これに限定されるものではなく、例えば、第一区画領域および第二区画領域の角部や辺部等であってもよい。 Here, the “predetermined position of the first partitioned area” and the “predetermined position of the second partitioned area” are respectively the first from the viewpoint of bringing the value of each element Q m, n (x, y) to be obtained closer to the exact value. It is preferable to set the center position of the partition area and the center position of the second partition area, but is not limited to this, for example, the corners and sides of the first partition area and the second partition area, etc. Also good.
このように第一区画領域の所定位置に重なる第二区画領域、または第二区画領域の所定位置が重なっている第一区画領域を求め、サンプリング行列Qm,n以外の畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値を算出決定するようにした場合には、第一区画領域に重なる各第二区画領域の面積割合に基づき各第二区画領域に対応する各要素Qm,n(x,y)の値を加重平均することにより第一区画領域に対応する要素Qm,n(x,y)の値を厳密に算出する場合(図10参照)に比べ、処理内容が簡単になり、処理時間の短縮が図られる。 Thus seek second compartment area or first divided areas predetermined position overlaps the second divided region, overlaps the predetermined position of the first divided area, the sampling matrix Q m, other than the n convolution matrix Q m, When the value of each element Q m, n (x, y) of n is calculated and determined, it corresponds to each second partitioned area based on the area ratio of each second partitioned area overlapping the first partitioned area. When the value of the element Q m, n (x, y) corresponding to the first partition region is strictly calculated by weighted averaging the value of each element Q m, n (x, y) (see FIG. 10) In comparison, the processing contents are simplified, and the processing time can be shortened.
そして、以上に述べた画像改質処理方法において、レンズは、二焦点レンズであり、行列Zは、二焦点レンズを構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像の出力信号を示す行列であり、ポイント・スプレッド・ファンクション行列Wm,nは、主として一方のレンズ部の作用によりWm,n(0,0)の値が定まり、主として他方のレンズ部の作用によりWm,n(−x,−y)の値が定まるようにしてもよい。 In the image modification processing method described above, the lens is a bifocal lens, and the matrix Z is a focused image formed by one lens portion constituting the bifocal lens and the other lens. is a matrix showing the output signal of the blurred image and is overlapped image of the focus formed by the section, point-spread function matrix W m, n are, W m, n (0 by the action of mainly one lens portion , 0), and the value of W m, n (−x, −y) may be determined mainly by the action of the other lens unit.
ここで、「二焦点レンズ」とは、標準的な距離(焦点深度下限(例えば、0.3m)から無限遠までの距離)にある通常の被写体(例えば、人物や風景等)を撮像するための長い焦点距離を有する長焦点レンズ部と、標準的な距離にある被写体よりも近距離にある近接被写体(例えば、2次元バーコードや虹彩や文字等)を撮像するための短い焦点距離を有する短焦点レンズ部とが、同一の面に一体化されて形成された撮像レンズである。なお、長焦点レンズ部と短焦点レンズ部とを別部材により別々に形成してから一体化してもよく、あるいは、一つの部材を用いて長焦点レンズ部および短焦点レンズ部を加工して形成してもよい。また、同一の面は、撮像レンズの光軸に直交する面であることが最も好ましい。 Here, the “bifocal lens” is for imaging a normal subject (for example, a person or a landscape) at a standard distance (a distance from the lower limit of focal depth (for example, 0.3 m) to infinity). A long focal length lens unit having a long focal length, and a short focal length for imaging a close subject (for example, a two-dimensional barcode, an iris, or a character) that is closer than a standard distance subject The short focus lens unit is an imaging lens formed integrally on the same surface. In addition, the long focus lens portion and the short focus lens portion may be formed separately by separate members and then integrated, or the long focus lens portion and the short focus lens portion are formed by using one member. May be. The same surface is most preferably a surface orthogonal to the optical axis of the imaging lens.
また、「一方のレンズ部」とは、ピントの合った画像を形成するレンズ部であり、標準的な距離にある通常の被写体を撮像する際には、長焦点レンズ部が該当し、通常の被写体よりも近距離にある近接被写体を撮像する際には、短焦点レンズ部が該当する。これに対し、「他方のレンズ部」とは、ピントのぼけた画像を形成するレンズ部であり、標準的な距離にある通常の被写体を撮像する際には、短焦点レンズ部が該当し、通常の被写体よりも近距離にある近接被写体を撮像する際には、長焦点レンズ部が該当する。 In addition, “one lens unit” is a lens unit that forms an in-focus image. When a normal subject at a standard distance is imaged, a long-focus lens unit corresponds to the normal lens unit. The short-focus lens unit corresponds to imaging a close subject that is closer than the subject. On the other hand, the “other lens unit” is a lens unit that forms a blurred image, and when capturing a normal subject at a standard distance, the short-focus lens unit corresponds, When imaging a close subject that is closer than a normal subject, a long-focus lens unit is applicable.
さらに、「二焦点レンズ」を構成する長焦点レンズ部の正面形状(レンズの光軸に沿う方向から見た形状)は、円形、楕円形、または多角形のいずれかであり、短焦点レンズ部の正面形状は、環状であり、短焦点レンズ部は、長焦点レンズ部の外側に配置され、かつ、長焦点レンズ部と同心に配置(各レンズ部の光軸同士が一致する状態で配置)されていることが、構造の簡易化、製造の容易化、質の高い画像の取得の容易化、解読精度の向上等の観点から望ましく、特に、長焦点レンズ部の正面形状を円形とし、短焦点レンズ部の正面形状を円環状とした同心円型構造とすると、極めて好ましい結果が得られる。なお、長焦点レンズ部と短焦点レンズ部との配置関係を逆にし(従って、正面形状を逆にし)、短焦点レンズ部を内側に長焦点レンズ部を外側に配置するようにしてもよい。 Furthermore, the front shape (the shape seen from the direction along the optical axis of the lens) of the long-focus lens part constituting the “bifocal lens” is any one of a circle, an ellipse, and a polygon. The front shape of the lens is annular, and the short focus lens portion is arranged outside the long focus lens portion and is concentric with the long focus lens portion (arranged so that the optical axes of the lens portions coincide with each other). It is desirable from the viewpoints of simplification of the structure, ease of manufacture, easy acquisition of high-quality images, improvement of decoding accuracy, and the like. When a concentric structure having an annular front surface of the focus lens portion is obtained, a very favorable result can be obtained. Note that the arrangement relationship between the long focus lens portion and the short focus lens portion may be reversed (therefore, the front shape is reversed), and the short focus lens portion may be disposed inside and the long focus lens portion disposed outside.
そして、「主として一方のレンズ部の作用によりWm,n(0,0)の値が定まり、主として他方のレンズ部の作用によりWm,n(−x,−y)の値が定まる」という意味は、ピントの合った画像を形成する一方のレンズ部の作用により、多少のぼけが形成され、それがWm,n(−x,−y)の値に影響することがあり、また、ピントのぼけた画像を形成する他方のレンズ部の正面形状(要するに、ぼけの形状)次第では、他方のレンズ部の作用によるピントのぼけがWm,n(0,0)の値に影響することがあることを意味する。 The value of W m, n (0,0) is determined mainly by the action of one lens part, and the value of W m, n (−x, −y) is determined mainly by the action of the other lens part. The meaning is that a slight blur is formed by the action of one lens part that forms an in-focus image, which may affect the value of W m, n (−x, −y), and Depending on the front shape (in other words, the shape of the blur) of the other lens unit that forms a defocused image, the defocus due to the action of the other lens unit affects the value of W m, n (0, 0). It means that there are things.
このように本発明を二焦点レンズに適用した場合には、二焦点レンズを構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像から、ピントの合った画像を求める画像改質処理を、短時間の処理で実現可能となり、ピント合わせ機構を用いることなく、標準的な距離にある通常の被写体およびこれよりも近距離にある近接被写体のいずれもについても鮮明な画像を得ることができるようになる。 Thus, when the present invention is applied to a bifocal lens, an in-focus image formed by one lens portion constituting the bifocal lens and a defocused image formed by the other lens portion. It is possible to perform image modification processing that obtains an in-focus image from images that overlap with each other in a short time, and without using a focusing mechanism, a normal subject at a standard distance and more than this A clear image can be obtained for any of the close subjects at a short distance.
また、以上に述べた本発明の画像改質処理方法を実現する画像改質処理装置として、以下のような本発明の画像改質処理装置を挙げることができる。 Examples of the image modification processing apparatus for realizing the image modification processing method of the present invention described above include the following image modification processing apparatus of the present invention.
すなわち、本発明は、レンズにより形成されたピントのぼけた画像をピントの合った画像に改質する画像改質処理装置であって、撮像素子の大きさをM画素×N画素とし、被写体の発する光の明るさを示すM行N列の行列をAとし、被写体をレンズにより撮像して得られた画像の出力信号を示すM行N列の行列をZとし、被写体座標系の1点(m,n)から出た光の結像位置が画像座標系の1点(m,n)となるように被写体座標系および画像座標系を設定したとき、各座標(m,n)の全部または一部について、下式(B−1)に基づき算出された畳み込み演算処理を行うための座標(m,n)についての(2M−1)行(2N−1)列の畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値のうち少なくとも非零要素を含む行列部分の値を記憶する畳み込み演算行列記憶手段と、この畳み込み演算行列記憶手段に記憶された各要素Qm,n(x,y)のうちの少なくとも一部の値と画像の出力信号の行列Zの各要素Z(m+x,n+y)の値とを用いて下式(B−2)に基づき被写体の行列Aの各要素A(m,n)の値を算出する再生演算手段とを備えたことを特徴とするものである。 That is, the present invention is an image modification processing device that modifies a blurred image formed by a lens into a focused image, wherein the size of the image sensor is M pixels × N pixels, A matrix of M rows and N columns indicating the brightness of emitted light is A, and a matrix of M rows and N columns indicating an output signal of an image obtained by imaging the subject is Z, and one point ( When the subject coordinate system and the image coordinate system are set so that the imaging position of the light emitted from m, n) is one point (m, n) in the image coordinate system, all of the coordinates (m, n) or For some of the coordinates (m, n) for performing the convolution operation processing calculated based on the following equation (B-1), a convolution operation matrix Q m, of (2M−1) rows (2N−1) columns . each element Q m of n, n (x, y) values of the matrix portion containing at least non-zero elements of the value of A storage for convolution matrix storage unit, the convolution matrix elements Q m stored in the storage unit, n (x, y) each element Z of the matrix Z of at least some of the values and the image of the output signal of the Reproduction calculation means for calculating the value of each element A (m, n) of the matrix A of the subject based on the following formula (B-2) using the value of (m + x, n + y). Is.
Qm,n(x,y)=1/Wm,n(0,0)
(x=0,y=0の場合)
=−Wm,n(−x,−y)/Wm,n(0,0)power
(x=0,y=0以外の場合)
・・・・・・・・・・・・・・・・・・・・・・(B−1)
Q m, n (x, y) = 1 / W m, n (0,0)
(When x = 0, y = 0)
= −W m, n (−x, −y) / W m, n (0,0) power
(When other than x = 0, y = 0)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (B-1)
A(m,n)=ΣxΣyQm,n(x,y)Z(m+x,n+y)
・・・・・・・・・・・・・・・・・・・・・・(B−2)
A (m, n) = Σ x Σ y Q m, n (x, y) Z (m + x, n + y)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (B-2)
ここで、xおよびyは整数で、(1−M)≦x≦(M−1)、(1−N)≦y≦(N−1)であり、mおよびnは自然数で、1≦m≦M、1≦n≦Nであり、Wm,n(x,y)は、(2M−1)行(2N−1)列の行列Wm,nの各要素の値であり、この行列Wm,nは、被写体の1点(m,n)から出た光がレンズの作用により撮像素子上で拡がる状態を示すポイント・スプレッド・ファンクション行列であり、Wm,n(0,0)は、拡がりの中心部分に位置する画素の出力信号の値であり、Wm,n(−x,−y)は、周囲のぼけ部分に位置する画素の出力信号の値であり、powerは、Wm,n(0,0)のべき乗数となる実数で、1≦power≦2であり、Σxは、x=(1−M)〜(M−1)の和であり、Σyは、y=(1−N)〜(N−1)の和である。 Here, x and y are integers, (1-M) ≦ x ≦ (M−1), (1-N) ≦ y ≦ (N−1), m and n are natural numbers, and 1 ≦ m ≦ M, 1 ≦ n ≦ N, and W m, n (x, y) is a value of each element of the matrix W m, n of (2M−1) rows (2N−1) columns. W m, n is a point spread function matrix indicating a state in which light emitted from one point (m, n) of the subject spreads on the image sensor due to the action of the lens, and W m, n (0, 0) Is the value of the output signal of the pixel located in the center part of the spread, W m, n (−x, −y) is the value of the output signal of the pixel located in the surrounding blur part, and power is W m, a real number which is a power number n (0,0), a 1 ≦ power ≦ 2, the sigma x, the sum of x = (1-M) ~ (M-1), Σ y is , Y = (1-N) to (N-1) Is the sum.
このような本発明の画像改質処理装置においては、前述した本発明の画像改質処理方法で得られる作用・効果がそのまま得られ、これにより前記目的が達成される。 In such an image modification processing apparatus of the present invention, the actions and effects obtained by the above-described image modification processing method of the present invention can be obtained as they are, thereby achieving the object.
また、前述した画像改質処理装置において、畳み込み演算行列記憶手段には、各座標(m,n)についての畳み込み演算行列Qm,nのうち光軸位置から一方向に延びる直線上に並ぶ座標についての畳み込み演算行列Qm,nがサンプリング行列として選択されてこのサンプリング行列Qm,nの各要素Qm,n(x,y)の値のみが記憶され、その他の座標についての畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値を、レンズの軸対称を利用して、サンプリング行列Qm,nの各要素Qm,n(x,y)の値の配置を光軸位置を中心として回転させることにより算出する畳み込み演算行列回転算出手段を備えた構成とすることが望ましい。 In the image modification processing apparatus described above, the convolution calculation matrix storage means stores coordinates arranged on a straight line extending in one direction from the optical axis position in the convolution calculation matrix Q m, n for each coordinate (m, n). convolution matrix Q m on, n is selected in the sampling matrix Q m, each element Q m of n, n (x, y) only the value of are stored as a sampling matrix, convolution matrix for other coordinates Q m, each element Q m of n, n (x, y) the value of, by using the axial symmetry of the lens, the sampling matrix Q m, each element Q m of n, n (x, y) values It is desirable to have a configuration provided with a convolution calculation matrix rotation calculating means for calculating the arrangement by rotating the arrangement around the optical axis position.
さらに、上記のように畳み込み演算行列回転算出手段を備えた構成とする場合において、畳み込み演算行列回転算出手段は、サンプリング行列Qm,nの各要素Qm,n(x,y)の値の配置を回転させたときに、算出対象となる畳み込み演算行列Qm,nの要素Qm,n(x,y)に対応する第一区画領域の所定位置に重なる回転後のサンプリング行列Qm,nの要素Qm,n(x,y)に対応する第二区画領域を求め、求めた第二区画領域に対応する要素Qm,n(x,y)の値を、算出対象となる畳み込み演算行列Qm,nの要素Qm,n(x,y)の値として採用するか、または、第二区画領域の所定位置が重なっている第一区画領域を求め、求めた第一区画領域に対応する要素Qm,n(x,y)の値として、この第一区画領域に所定位置が重なっている第二区画領域に対応する要素Qm,n(x,y)の値を採用する構成とされていることが望ましい。 Furthermore, in the case of the configuration including the convolution calculation matrix rotation calculation unit as described above, the convolution calculation matrix rotation calculation unit calculates the value of each element Q m, n (x, y) of the sampling matrix Q m, n . When the arrangement is rotated, the rotated sampling matrix Q m, which overlaps with a predetermined position of the first partition region corresponding to the element Q m, n (x, y) of the convolution matrix Q m, n to be calculated . A second partitioned area corresponding to the element Q m, n (x, y) of n is obtained, and the value of the element Q m, n (x, y) corresponding to the obtained second partitioned area is convolved as a calculation target. The first partitioned area obtained by obtaining the first partitioned area that is adopted as the value of the element Q m, n (x, y) of the operation matrix Q m, n or the predetermined position of the second partitioned area overlaps As a value of an element Q m, n (x, y) corresponding to the second section whose predetermined position overlaps the first section area It is desirable that the value of the element Q m, n (x, y) corresponding to the region is adopted.
そして、以上に述べた画像改質処理装置において、レンズは、二焦点レンズであり、行列Zは、二焦点レンズを構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像の出力信号を示す行列であり、ポイント・スプレッド・ファンクション行列Wm,nは、主として一方のレンズ部の作用によりWm,n(0,0)の値が定まり、主として他方のレンズ部の作用によりWm,n(−x,−y)の値が定まる構成としてもよい。 In the image modification processing apparatus described above, the lens is a bifocal lens, and the matrix Z is a focused image formed by one lens portion constituting the bifocal lens and the other lens. is a matrix showing the output signal of the blurred image and is overlapped image of the focus formed by the section, point-spread function matrix W m, n are, W m, n (0 by the action of mainly one lens portion , 0) is determined, and the value of W m, n (−x, −y) may be determined mainly by the action of the other lens unit.
また、本発明は、レンズにより形成されたピントのぼけた画像をピントの合った画像に改質する画像改質処理装置として、コンピュータを機能させるためのプログラムであって、撮像素子の大きさをM画素×N画素とし、被写体の発する光の明るさを示すM行N列の行列をAとし、被写体をレンズにより撮像して得られた画像の出力信号を示すM行N列の行列をZとし、被写体座標系の1点(m,n)から出た光の結像位置が画像座標系の1点(m,n)となるように被写体座標系および画像座標系を設定したとき、各座標(m,n)の全部または一部について、下式(C−1)に基づき算出された畳み込み演算処理を行うための座標(m,n)についての(2M−1)行(2N−1)列の畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値のうち少なくとも非零要素を含む行列部分の値を記憶する畳み込み演算行列記憶手段と、この畳み込み演算行列記憶手段に記憶された各要素Qm,n(x,y)のうちの少なくとも一部の値と画像の出力信号の行列Zの各要素Z(m+x,n+y)の値とを用いて下式(C−2)に基づき被写体の行列Aの各要素A(m,n)の値を算出する再生演算手段とを備えたことを特徴とする画像改質処理装置として、コンピュータを機能させるためのものである。 Further, the present invention is a program for causing a computer to function as an image modification processing device that modifies a blurred image formed by a lens into a focused image. M pixels × N pixels, M rows and N columns matrix indicating the brightness of light emitted from the subject is A, and M rows and N columns matrix indicating the output signal of the image obtained by imaging the subject with the lens are Z When the subject coordinate system and the image coordinate system are set so that the imaging position of light emitted from one point (m, n) in the subject coordinate system is one point (m, n) in the image coordinate system, For all or part of the coordinates (m, n), (2M-1) rows (2N-1) for the coordinates (m, n) for performing the convolution calculation processing calculated based on the following equation (C-1) ) convolution matrix Q m columns, each element of the n Q m, n (x, y) of At least a convolution operation matrix storage means for storing the values of the matrix portion containing a non-zero elements, each element Q m stored in the convolution matrix storage unit, n (x, y) of at least a portion of one of the The value of each element A (m, n) of the matrix A of the subject is calculated based on the following equation (C-2) using the value and the value of each element Z (m + x, n + y) of the matrix Z of the output signal of the image. An image modification processing apparatus characterized by comprising a reproduction calculation means for causing a computer to function.
Qm,n(x,y)=1/Wm,n(0,0)
(x=0,y=0の場合)
=−Wm,n(−x,−y)/Wm,n(0,0)power
(x=0,y=0以外の場合)
・・・・・・・・・・・・・・・・・・・・・・(C−1)
Q m, n (x, y) = 1 / W m, n (0,0)
(When x = 0, y = 0)
= −W m, n (−x, −y) / W m, n (0,0) power
(When other than x = 0, y = 0)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (C-1)
A(m,n)=ΣxΣyQm,n(x,y)Z(m+x,n+y)
・・・・・・・・・・・・・・・・・・・・・・(C−2)
A (m, n) = Σ x Σ y Q m, n (x, y) Z (m + x, n + y)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (C-2)
ここで、xおよびyは整数で、(1−M)≦x≦(M−1)、(1−N)≦y≦(N−1)であり、mおよびnは自然数で、1≦m≦M、1≦n≦Nであり、Wm,n(x,y)は、(2M−1)行(2N−1)列の行列Wm,nの各要素の値であり、この行列Wm,nは、被写体の1点(m,n)から出た光がレンズの作用により撮像素子上で拡がる状態を示すポイント・スプレッド・ファンクション行列であり、Wm,n(0,0)は、拡がりの中心部分に位置する画素の出力信号の値であり、Wm,n(−x,−y)は、周囲のぼけ部分に位置する画素の出力信号の値であり、powerは、Wm,n(0,0)のべき乗数となる実数で、1≦power≦2であり、Σxは、x=(1−M)〜(M−1)の和であり、Σyは、y=(1−N)〜(N−1)の和である。 Here, x and y are integers, (1-M) ≦ x ≦ (M−1), (1-N) ≦ y ≦ (N−1), m and n are natural numbers, and 1 ≦ m ≦ M, 1 ≦ n ≦ N, and W m, n (x, y) is a value of each element of the matrix W m, n of (2M−1) rows (2N−1) columns. W m, n is a point spread function matrix indicating a state in which light emitted from one point (m, n) of the subject spreads on the image sensor due to the action of the lens, and W m, n (0, 0) Is the value of the output signal of the pixel located in the center part of the spread, W m, n (−x, −y) is the value of the output signal of the pixel located in the surrounding blur part, and power is W m, a real number which is a power number n (0,0), a 1 ≦ power ≦ 2, the sigma x, the sum of x = (1-M) ~ (M-1), Σ y is , Y = (1-N) to (N-1) Is the sum.
なお、上記のプログラムまたはその一部は、例えば、光磁気ディスク(MO)、コンパクトディスク(CD)を利用した読出し専用メモリ(CD−ROM)、CDレコーダブル(CD−R)、CDリライタブル(CD−RW)、デジタル・バーサタイル・ディスク(DVD)を利用した読出し専用メモリ(DVD−ROM)、DVDを利用したランダム・アクセス・メモリ(DVD−RAM)、フレキシブルディスク(FD)、磁気テープ、ハードディスク、読出し専用メモリ(ROM)、電気的消去および書換可能な読出し専用メモリ(EEPROM)、フラッシュ・メモリ、ランダム・アクセス・メモリ(RAM)等の記録媒体に記録して保存や流通等させることが可能であるとともに、例えば、ローカル・エリア・ネットワーク(LAN)、メトロポリタン・エリア・ネットワーク(MAN)、ワイド・エリア・ネットワーク(WAN)、インターネット、イントラネット、エクストラネット等の有線ネットワーク、あるいは無線通信ネットワーク、さらにはこれらの組合せ等の伝送媒体を用いて伝送することが可能であり、また、搬送波に載せて搬送することも可能である。さらに、上記のプログラムは、他のプログラムの一部分であってもよく、あるいは別個のプログラムと共に記録媒体に記録されていてもよい。 The above-mentioned program or a part thereof is, for example, a magneto-optical disk (MO), a read-only memory (CD-ROM) using a compact disk (CD), a CD recordable (CD-R), a CD rewritable (CD -RW), read-only memory (DVD-ROM) using digital versatile disk (DVD), random access memory (DVD-RAM) using DVD, flexible disk (FD), magnetic tape, hard disk, It can be recorded on storage media such as read-only memory (ROM), electrically erasable and rewritable read-only memory (EEPROM), flash memory, and random access memory (RAM) for storage and distribution. And, for example, a local area network (LA ), A metropolitan area network (MAN), a wide area network (WAN), a wired network such as the Internet, an intranet, or an extranet, or a wireless communication network, or a combination thereof. It is also possible to carry it on a carrier wave. Furthermore, the above program may be a part of another program, or may be recorded on a recording medium together with a separate program.
さらに、本発明は、レンズにより形成されたピントのぼけた画像をピントの合った画像に改質する画像改質処理で使用されるデータを記録したコンピュータ読取り可能なデータ記録媒体であって、撮像素子の大きさをM画素×N画素とし、被写体の発する光の明るさを示すM行N列の行列をAとし、被写体をレンズにより撮像して得られた画像の出力信号を示すM行N列の行列をZとし、被写体座標系の1点(m,n)から出た光の結像位置が画像座標系の1点(m,n)となるように被写体座標系および画像座標系を設定したとき、行列Zから行列Aを算出するために用いる行列として、各座標(m,n)の全部または一部について、下式(D−1)に基づき算出された畳み込み演算処理を行うための座標(m,n)についての(2M−1)行(2N−1)列の畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値のうち少なくとも非零要素を含む行列部分の値を記録したものである。 Furthermore, the present invention is a computer-readable data recording medium that records data used in an image modification process for modifying a blurred image formed by a lens into a focused image. The size of the element is M pixels × N pixels, the matrix of M rows and N columns indicating the brightness of light emitted from the subject is A, and M rows N indicating the output signal of the image obtained by imaging the subject with the lens. The column matrix is Z, and the subject coordinate system and the image coordinate system are set so that the imaging position of light emitted from one point (m, n) in the subject coordinate system is one point (m, n) in the image coordinate system. When set, in order to perform the convolution calculation processing calculated based on the following equation (D-1) for all or a part of each coordinate (m, n) as a matrix used for calculating the matrix A from the matrix Z (2M-1) for the coordinates (m, n) of In which values were recorded matrix portion that includes at least non-zero elements among the values of the row (2N-1) convolution matrix Q m columns, each element Q m of n, n (x, y) .
Qm,n(x,y)=1/Wm,n(0,0)
(x=0,y=0の場合)
=−Wm,n(−x,−y)/Wm,n(0,0)power
(x=0,y=0以外の場合)
・・・・・・・・・・・・・・・・・・・・・・(D−1)
Q m, n (x, y) = 1 / W m, n (0,0)
(When x = 0, y = 0)
= −W m, n (−x, −y) / W m, n (0,0) power
(When other than x = 0, y = 0)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (D-1)
ここで、xおよびyは整数で、(1−M)≦x≦(M−1)、(1−N)≦y≦(N−1)であり、mおよびnは自然数で、1≦m≦M、1≦n≦Nであり、Wm,n(x,y)は、(2M−1)行(2N−1)列の行列Wm,nの各要素の値であり、この行列Wm,nは、被写体の1点(m,n)から出た光がレンズの作用により撮像素子上で拡がる状態を示すポイント・スプレッド・ファンクション行列であり、Wm,n(0,0)は、拡がりの中心部分に位置する画素の出力信号の値であり、Wm,n(−x,−y)は、周囲のぼけ部分に位置する画素の出力信号の値であり、powerは、Wm,n(0,0)のべき乗数となる実数で、1≦power≦2である。 Here, x and y are integers, (1-M) ≦ x ≦ (M−1), (1-N) ≦ y ≦ (N−1), m and n are natural numbers, and 1 ≦ m ≦ M, 1 ≦ n ≦ N, and W m, n (x, y) is a value of each element of the matrix W m, n of (2M−1) rows (2N−1) columns. W m, n is a point spread function matrix indicating a state in which light emitted from one point (m, n) of the subject spreads on the image sensor due to the action of the lens, and W m, n (0, 0) Is the value of the output signal of the pixel located in the center part of the spread, W m, n (−x, −y) is the value of the output signal of the pixel located in the surrounding blur part, and power is A real number that is a power of W m, n (0, 0), and 1 ≦ power ≦ 2.
なお、上記の本発明のデータ記録媒体としては、例えば、光磁気ディスク(MO)、コンパクトディスク(CD)を利用した読出し専用メモリ(CD−ROM)、CDレコーダブル(CD−R)、CDリライタブル(CD−RW)、デジタル・バーサタイル・ディスク(DVD)を利用した読出し専用メモリ(DVD−ROM)、DVDを利用したランダム・アクセス・メモリ(DVD−RAM)、フレキシブルディスク(FD)、磁気テープ、ハードディスク、読出し専用メモリ(ROM)、電気的消去および書換可能な読出し専用メモリ(EEPROM)、フラッシュ・メモリ、ランダム・アクセス・メモリ(RAM)、あるいはこれらの組合せ等を採用することができる。 The data recording medium of the present invention includes, for example, a magneto-optical disk (MO), a read-only memory (CD-ROM) using a compact disk (CD), a CD recordable (CD-R), and a CD rewritable. (CD-RW), read-only memory (DVD-ROM) using digital versatile disk (DVD), random access memory (DVD-RAM) using DVD, flexible disk (FD), magnetic tape, A hard disk, read-only memory (ROM), electrically erasable and rewritable read-only memory (EEPROM), flash memory, random access memory (RAM), or a combination of these can be employed.
以上に述べたように本発明によれば、再生演算手段により、畳み込み演算行列記憶手段に記憶された畳み込み演算行列Qm,nを用いて画像改質処理を行うので、M×N行M×N列の巨大逆変換行列Tg -1を用いて演算処理を行う場合に比べ、非常に少ない計算量で、被写体の行列Aの各要素A(m,n)の値を算出することができるうえ、畳み込み演算行列記憶手段には各座標(m,n)についての畳み込み演算行列Qm,nが記憶されているので、再生演算手段により、ぼけの形状が各画素で異なることを考慮した画像改質処理を行うことができ、全ての画素で同じ形状のぼけが発生すると仮定した画像改質処理を行う場合に比べ、画像改質効果をより一層高めることができるという効果がある。 As described above, according to the present invention, the image processing is performed using the convolution calculation matrix Q m, n stored in the convolution calculation matrix storage means by the reproduction calculation means, so that M × N rows M × The value of each element A (m, n) of the matrix A of the subject can be calculated with a very small amount of calculation compared with the case where the arithmetic processing is performed using the N-column giant inverse transformation matrix T g −1. In addition, since the convolution operation matrix storage means stores the convolution operation matrix Q m, n for each coordinate (m, n), the reproduction operation means considers that the blur shape differs for each pixel. The modification process can be performed, and the image modification effect can be further enhanced as compared with the case where the image modification process is performed on the assumption that blur of the same shape occurs in all pixels.
以下に本発明の一実施形態について図面を参照して説明する。図1には、本実施形態の画像改質処理装置30を含む撮像システム10の全体構成が示されている。また、図2には、画像改質処理装置30による処理対象となる画像を形成する二焦点レンズ21の詳細構成が示されている。撮像システム10は、例えば、携帯電話機や携帯情報端末等の携帯型の情報端末装置に設けられた撮像システム、あるいはパーソナル・コンピュータおよびそれに接続されたカメラにより構成される撮像システム等である。
An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 shows an overall configuration of an
図1において、撮像システム10は、被写体を撮像する撮像機構20と、この撮像機構20により撮像された画像の質を改善する画像改質処理装置30と、この画像改質処理装置30により質の改善を行った画像を表示する表示手段40とを備えている。
In FIG. 1, an
撮像機構20は、被写体を撮像する二焦点レンズ21と、この二焦点レンズ21により形成された画像を取り込む撮像素子24とを含んで構成されている。
The
図2において、二焦点レンズ21は、例えばガラス製の長焦点レンズ部22と、例えばガラス製の短焦点レンズ部23とにより構成され、これらの長焦点レンズ部22および短焦点レンズ部23は、同一の面に配置されて一体化されている。長焦点レンズ部22は、例えば円形の正面形状を有し、中心に配置され、一方、短焦点レンズ部23は、例えば円環状(ドーナツ型)の正面形状を有し、長焦点レンズ部22の外側に長焦点レンズ部22の外縁部に接する状態で配置されている。そして、これらの長焦点レンズ部22および短焦点レンズ部23は、両者の光軸が一致するように、すなわち同心に配置されて一体化され、これにより二焦点レンズ21は、同心円型の二焦点レンズとなっている。また、これらの各レンズ部22,23が配置された面は、二焦点レンズ21の光軸に直交している。
In FIG. 2, the
ここで、長焦点レンズ部22は、焦点深度下限(例えば、0.3m)から無限遠までの標準的な距離にある通常の被写体(例えば、人物や風景等)を撮像するのに適した長い焦点距離を有するレンズ部である。一方、短焦点レンズ部23は、通常の被写体よりも近い距離に配置された近接被写体(例えば、2次元バーコードや虹彩や文字等)を撮像するのに適した短い焦点距離を有するレンズ部である。なお、長焦点レンズ部と短焦点レンズ部との配置関係を逆にし、長焦点レンズ部を外側に、短焦点レンズ部を内側に配置してもよい。
Here, the long
撮像素子24としては、例えば、相補性金属酸化膜半導体(CMOS:Complementary Metal-oxide Semiconductor)や電荷結合素子(CCD:Charge Coupled Device)等を採用することができる。撮像素子24の大きさは、縦方向M画素×横方向N画素であるものとする。
As the
画像改質処理装置30は、出力信号記憶手段31と、標準画像再生用の畳み込み演算行列記憶手段32と、接写画像再生用の畳み込み演算行列記憶手段33と、回転情報記憶手段34と、畳み込み演算行列回転算出手段35と、再生演算手段36と、切替操作手段37とを備えている。
The
出力信号記憶手段31は、撮像素子24の出力信号を引き出して記憶するものである。
The output signal storage means 31 extracts and stores the output signal of the
標準画像再生用の畳み込み演算行列記憶手段32は、標準的な距離にある通常の被写体(例えば、人物や風景等)を二焦点レンズ21により撮像する場合、従って、本実施形態では、内側の長焦点レンズ部22によりピントの合った画像が形成され、外側の環状の短焦点レンズ部23によりピントのぼけた画像が形成される場合に、ピントの合った画像を求める再生演算処理に用いられる畳み込み演算行列Qm,n(図6参照)を記憶するものである。
The convolution calculation matrix storage means 32 for standard image reproduction picks up a normal subject (for example, a person or a landscape) at a standard distance with the
接写画像再生用の畳み込み演算行列記憶手段33は、通常の被写体よりも近い距離に配置された近接被写体(例えば、2次元バーコードや虹彩や文字等)を撮像する場合、従って、本実施形態では、外側の環状の短焦点レンズ部23によりピントの合った画像が形成され、内側の長焦点レンズ部22によりピントのぼけた画像が形成される場合に、ピントの合った画像を求める再生演算処理に用いられる畳み込み演算行列Qm,nを記憶するものである。なお、この場合のポイント・スプレッド・ファンクション行列Wm,nにおけるぼけ部分の形状は、後述する図5のようなリング状とはならず、略中実円形状または略中実楕円形状(内部が非零要素で埋まった状態)となるので(後述する図13のぼけ部分83参照)、畳み込み演算行列Qm,nについても、ぼけ部分に対応する部分の形状は、後述する図6のようなリング状とはならず、略中実円形状または略中実楕円形状(内部が非零要素で埋まった状態)となる。
The convolution calculation matrix storage means 33 for reproducing the close-up image captures a close subject (for example, a two-dimensional bar code, an iris, or a character) arranged at a distance closer to that of a normal subject. When the outer annular short-
そして、標準画像再生用および接写画像再生用の畳み込み演算行列記憶手段32,33は、後述する式(18)に基づき予め算出された各座標(m,n)についての畳み込み演算行列Qm,n(図4参照)の各要素Qm,n(x,y)の値のうちの少なくとも一部を、x,yの並び順に従って表の如く整列させて記憶するものである。少なくとも一部であるから、全部を記憶しておいてもよいが、計算容量およびメモリ容量を小さくするため、非零要素を含む行列部分(図4の行列部分H)のみを記憶しておくことが好ましい。従って、ここでは、非零要素を含む行列部分Hのみを記憶するものとして説明を行う。 Then, the convolution operation matrix storage means 32 and 33 for standard image reproduction and close-up image reproduction convolution operation matrix Q m, n for each coordinate (m, n) calculated in advance based on equation (18) described later. At least a part of the values of the respective elements Q m, n (x, y) of (see FIG. 4) are stored as shown in the table according to the arrangement order of x and y. Since it is at least a part, the whole may be stored, but in order to reduce the calculation capacity and memory capacity, only the matrix part including the non-zero elements (matrix part H in FIG. 4) is stored. Is preferred. Therefore, here, the description will be made assuming that only the matrix portion H including non-zero elements is stored.
また、標準画像再生用および接写画像再生用の畳み込み演算行列記憶手段32,33は、各座標(m,n)の全部についての畳み込み演算行列Qm,n(つまり、M×N個のQm,n)を記憶するのではなく、二焦点レンズ21の軸対称性を考慮し、一部の座標(一直線上に並ぶ座標)についての畳み込み演算行列Qm,nのみをサンプリング行列として記憶する。本実施形態では、一例として、後述する図8のライン60上に並ぶ各座標についての畳み込み演算行列Qm,nのみを記憶するものとする。従って、本実施形態では、サンプリング行列として記憶する畳み込み演算行列Qm,nの分布が上下対称になるので、上記の非零要素を含む行列部分Hのうち、更に半分(例えば、上側半分)のみを記憶する。
Also, standard image reproduction and close-up image reproduction convolution matrix storage means 32 and 33, the convolution operation matrix Q m for all the coordinates (m, n), n (i.e., M × N number of Q m , n ) is not stored , and only the convolution matrix Q m, n for some coordinates (coordinates aligned on a straight line) is stored as a sampling matrix in consideration of the axial symmetry of the
回転情報記憶手段34は、畳み込み演算行列記憶手段32,33に記憶されたサンプリング行列としての畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値の配置を回転させてサンプリング行列以外の畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値を算出決定するときに用いる回転情報を記憶するものである。この回転情報は、求める畳み込み演算行列Qm,n(サンプリング行列以外の畳み込み演算行列Qm,n)の全て(但し、軸対称性を考慮すると、全座標の1/4でよい。)について用意され、求める畳み込み演算行列Qm,nの座標(m,n)についての中心座標(M/2,N/2)からの距離rおよび角度θにより構成される(図12参照)。角度θとは、サンプリング行列Qm,nの座標(m,n)が並ぶ直線(後述する図8のライン60)に対し、求める畳み込み演算行列Qm,nの座標(m,n)と中心座標(M/2,N/2)とを結ぶ直線がなす角度である。
The rotation information storage means 34 rotates the arrangement of the values of the elements Q m, n (x, y) of the convolution arithmetic matrix Q m, n as the sampling matrix stored in the convolution arithmetic matrix storage means 32,33. Rotation information used for calculating and determining the value of each element Q m, n (x, y) of the convolution calculation matrix Q m, n other than the sampling matrix is stored. The rotation information is obtained convolution matrix Q m, n (sampling matrix other than the convolution matrix Q m, n) of all (However, considering axial symmetry, may. 1/4 of the total coordinate) prepared for And the distance r from the center coordinates (M / 2, N / 2) and the angle θ with respect to the coordinates (m, n) of the convolution operation matrix Q m, n to be obtained (see FIG. 12). The angle θ refers to the coordinates (m, n) and center of the convolution matrix Q m, n to be obtained with respect to a straight line (
畳み込み演算行列回転算出手段35は、畳み込み演算行列記憶手段32,33に記憶されたサンプリング行列としての畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値と、回転情報記憶手段34に記憶された回転情報とを用いて、サンプリング行列以外の畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値を算出決定する処理を行うものである。 The convolution calculation matrix rotation calculation means 35 is a value of each element Q m, n (x, y) of the convolution calculation matrix Q m, n as a sampling matrix stored in the convolution calculation matrix storage means 32 and 33, and rotation information. Using the rotation information stored in the storage means 34, processing for calculating and determining the value of each element Q m, n (x, y) of the convolution matrix Q m, n other than the sampling matrix is performed.
再生演算手段36は、被写体を再生する演算処理を行うものであり、畳み込み演算行列記憶手段32,33に記憶されたサンプリング行列としての畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値(行列部分Hの各値)、または畳み込み演算行列回転算出手段35により算出決定されたサンプリング行列以外の畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値と、出力信号記憶手段31に記憶された画像の出力信号を示す行列Zの各要素Z(m,n)の値とを用い、後述する式(19)に基づき、被写体の行列Aの各要素A(m,n)の値を算出する処理を行うものである。なお、畳み込み演算行列Qm,nの各要素Qm,n(x,y)のうちの非零要素を含む行列部分(図4の行列部分H)以外の部分、すなわち、畳み込み演算行列記憶手段32,33に記憶されない部分については、零要素であるので、計算は行われない。
The
切替操作手段37は、畳み込み演算行列回転算出手段35および再生演算手段36による演算処理で、畳み込み演算行列記憶手段32,33のいずれのデータを用いるか、すなわち通常の被写体か近接被写体のいずれを撮像するのかを切替選択するための操作を行うものであり、例えば押ボタン式、トグル式、スライド式のスイッチ等である。
The switching
出力信号記憶手段31、畳み込み演算行列記憶手段32,33、および回転情報記憶手段34としては、例えば、ハードディスク、ROM、EEPROM、フラッシュ・メモリ、RAM、MO、CD−ROM、CD−R、CD−RW、DVD−ROM、DVD−RAM、FD、磁気テープ、あるいはこれらの組合せ等を採用することができる。 As the output signal storage means 31, the convolution calculation matrix storage means 32 and 33, and the rotation information storage means 34, for example, a hard disk, ROM, EEPROM, flash memory, RAM, MO, CD-ROM, CD-R, CD- RW, DVD-ROM, DVD-RAM, FD, magnetic tape, or a combination thereof can be employed.
畳み込み演算行列回転算出手段35および再生演算手段36は、撮像システム10を構成する各種の情報端末装置(例えば、携帯電話機や携帯情報端末等の携帯型の情報端末装置、あるいはカメラを接続したパーソナル・コンピュータ、監視カメラ装置等)の内部に設けられた中央演算処理装置(CPU)、およびこのCPUの動作手順を規定する一つまたは複数のプログラムにより実現される。 The convolution calculation matrix rotation calculation means 35 and the reproduction calculation means 36 are used for various information terminal devices constituting the imaging system 10 (for example, portable information terminal devices such as a mobile phone and a portable information terminal, or a personal information terminal connected with a camera). This is realized by a central processing unit (CPU) provided inside a computer, a monitoring camera device, etc.) and one or a plurality of programs that define the operation procedure of this CPU.
表示手段40としては、例えば、液晶ディスプレイ、CRTディスプレイ、プロジェクタおよびスクリーン、あるいはこれらの組合せ等を採用することができる。 As the display means 40, for example, a liquid crystal display, a CRT display, a projector and a screen, or a combination thereof can be employed.
以下には、畳み込み演算行列記憶手段32,33に記憶される畳み込み演算行列Qm,nの各要素Qm,n(x,y)の算出方法およびその根拠、並びに再生演算手段36により行われる演算処理の根拠を説明する。 Hereinafter, the calculation method and the basis of each element Q m, n (x, y) of the convolution calculation matrix Q m, n stored in the convolution calculation matrix storage means 32 and 33, and the reproduction calculation means 36 are performed. The basis of the arithmetic processing will be described.
前提条件として、ここでは、標準的な距離にある通常の被写体(例えば、人物や風景等)を二焦点レンズ21により撮像する場合、従って、内側の長焦点レンズ部22によりピントの合った画像が形成され、外側の環状の短焦点レンズ部23によりピントのぼけた画像が形成される場合の説明を行うものとする。但し、本発明の適用は、このような場合に限定されるものではない。
As a precondition, here, when a normal subject (for example, a person or a landscape) at a standard distance is imaged by the
先ず、被写体と画像に関する基本的な事項について説明を行う。図3は、被写体と、この被写体を二焦点レンズ21により撮像して得られる画像との関係の説明図である。なお、レンズによって形成される像は、一般には倒立像であるため、図3では、物体と像とで座標軸の向きを逆にとることにより、互いに対応する物体の位置と像の位置とが同じ座標になるようにしている。ここでは、図3に示すように、s軸(縦軸)とt軸(横軸)とにより構成される被写体座標系(s,t)、およびh軸(縦軸)とk軸(横軸)とにより構成される画像座標系(h,k)を設定するものとする。
First, basic matters regarding the subject and the image will be described. FIG. 3 is an explanatory diagram of a relationship between a subject and an image obtained by imaging the subject with the
また、撮像素子24の縦方向の画素数をMとし、横方向の画素数をNとする。このとき、被写体の各点(s,t)(被写体座標系における座標(s,t)の部分)がそれぞれA(s,t)の明るさを持つとすると、被写体の発する光の全体は、s行t列(sおよびtは自然数、1≦s≦M、1≦t≦N)にA(s,t)の値の要素を持つM×N(M行N列)の行列Aで表現できる(図4参照)。これを被写体行列Aと呼ぶものとする。
The number of pixels in the vertical direction of the
一方、撮像素子24上の各点(h,k)(画像座標系における座標(h,k)に位置する画素)の出力信号の大きさがそれぞれZ(h,k)であるとすると、被写体を二焦点レンズ21により撮像して得られる画像全体は、h行k列(hおよびkは自然数、1≦h≦M、1≦k≦N)にZ(h,k)の値の要素を持つM×N(M行N列)の行列Zで表現できる(図4参照)。これを画像行列Zと呼ぶものとする。
On the other hand, if the magnitude of the output signal of each point (h, k) on the image sensor 24 (pixel located at the coordinates (h, k) in the image coordinate system) is Z (h, k), respectively, The entire image obtained by imaging with the
<単一輝点の像による二焦点レンズ21の特性の表現>
図3に示すように、1点(座標(m,n))のみに輝点のある被写体を二焦点レンズ21で撮像すると、撮像素子24上には、座標(m,n)を拡がりの中心として、内側の長焦点レンズ部22により形成されるピントの合った像と、外側の環状の短焦点レンズ部23により形成される環状のボケ画像とが重なった像が形成される。ここで、mおよびnは自然数で、1≦m≦M、1≦n≦N、但し、MおよびNは撮像素子24の縦横の画素数である。また、被写体上の座標(m,n)とは、撮像素子24上の座標(m,n)に投影される被写体上の対応する点を意味する。つまり、被写体座標系(s,t)における1点(m,n)から出た光は、画像座標系(h,k)における同じ数値で示される点(m,n)に結像するようになっている。
<Expression of Characteristics of
As shown in FIG. 3, when a subject having a bright spot only at one point (coordinates (m, n)) is imaged by the
ここで、画像座標系において、図3に示すように、座標(m,n)を中心としてh軸(縦軸)およびk軸(横軸)にそれぞれ平行なx軸(縦軸)およびy軸(横軸)をとり、これらのx軸とy軸とにより構成される座標系を設定する。この座標系(x,y)は、被写体上の単一輝点(座標(m,n))が動けば、これに対応する撮像素子24上の座標(m,n)も動くので、各座標(m,n)についてそれぞれ設定される相対座標系である。
Here, in the image coordinate system, as shown in FIG. 3, the x-axis (vertical axis) and the y-axis are respectively parallel to the h-axis (vertical axis) and the k-axis (horizontal axis) around the coordinates (m, n). Taking the (horizontal axis), a coordinate system composed of these x-axis and y-axis is set. In this coordinate system (x, y), if a single bright spot (coordinate (m, n)) on the subject moves, the corresponding coordinate (m, n) on the
そして、相対座標系(x,y)における各点(x,y)に位置する画素の出力信号の大きさをWm,n(x,y)とすると、被写体の1点(m,n)から出た光が二焦点レンズ21の作用により撮像素子24上で拡がる状態(PSF:Point Spread Function)は、Wm,n(x,y)の値を要素に持つ(2M−1)行(2N−1)列の行列Wm,nで表現できる(図4参照)。これを座標(m,n)についてのポイント・スプレッド・ファンクション(PSF)行列と呼ぶものとする。
When the magnitude of the output signal of the pixel located at each point (x, y) in the relative coordinate system (x, y) is W m, n (x, y), one point (m, n) of the subject In a state in which the light emitted from the
なお、Wm,n(x,y)の値を全てのx,y(xおよびyは整数で、(1−M)≦x≦(M−1)、(1−N)≦y≦(N−1))について合計した値は、被写体の1点(m,n)から出た光の総量であり、この合計値が1になるように各要素Wm,n(x,y)の値を正規化しておく。 Note that the values of W m, n (x, y) are all x, y (x and y are integers, (1-M) ≦ x ≦ (M−1), (1-N) ≦ y ≦ ( The total value of N-1)) is the total amount of light emitted from one point (m, n) of the subject, and each element W m, n (x, y) has a total value of 1. Normalize the value.
また、PSF行列Wm,nを(2M−1)行(2N−1)列の行列、つまり被写体行列Aや画像行列Zの略4倍の要素数を持つ行列としているのは、被写体の端部の1点(例えば、座標(1,1)の点とする。)から出た光が、撮像素子24上において、対応する端部の1点(1,1)を中心として、対角方向の反対側の端部の1点(M,N)まで含めて全体的に拡がる状態を示すためである。但し、実際には、ぼけの部分が撮像素子24上における対角方向の一方の端部から他方の端部まで広範に拡がることはなく、図4に示すように、(2M−1)行(2N−1)列のPSF行列Wm,nの各要素Wm,n(x,y)のうち、非零要素を含む部分は、Wm,n(0,0)を含む一部の行列部分Eのみである。
The PSF matrix W m, n is a (2M−1) row (2N−1) column matrix, that is, a matrix having approximately four times the number of elements of the subject matrix A or the image matrix Z. Light emitted from one point (for example, a point of coordinates (1, 1)) is diagonally centered on one point (1, 1) of the corresponding end on the
<被写体行列Aから画像行列Zを導くための畳み込み演算>
図4は、被写体行列Aと画像行列Zとの変換関係の説明図である。一般に、被写体行列Aから画像行列Zを求める演算は、単純な行列演算ではなく、次の式(1)で示されるPSF行列Wm,nを用いた畳み込み演算となる。
<Convolution for Deriving Image Matrix Z from Subject Matrix A>
FIG. 4 is an explanatory diagram of the conversion relationship between the subject matrix A and the image matrix Z. In general, the calculation for obtaining the image matrix Z from the subject matrix A is not a simple matrix calculation but a convolution calculation using the PSF matrix W m, n expressed by the following equation (1).
Z(m,n)=ΣxΣy{Wm+x,n+y(−x,−y)*A(m+x,n+y)}
=Wm,n(0,0)*A(m,n)
+Σx,y{Wm+x,n+y(−x,−y)*A(m+x,n+y)}
・・・・・(1)
Z (m, n) = Σ x Σ y {W m + x, n + y (-x, -y) * A (m + x, n + y)}
= W m, n (0,0) * A (m, n)
+ Σx , y {W m + x, n + y (−x, −y) * A (m + x, n + y)}
(1)
ここで、Σxは、x=(1−M)〜(M−1)の和であり、Σyは、y=(1−N)〜(N−1)の和である。また、Σx,yは、(x,y)=(0,0)の点を除く全てのx,yについての和である。但し、ΣxおよびΣy並びにΣx,yは、PSF行列Wm+x,n+y(−x,−y)のうちの非零要素を含む行列部分E(図4参照)のみの和を考えればよい。なお、上記式(1)では、光量の単位および画像の出力信号の単位を適当にとることにより、光量と画像の出力信号との変換係数を1としている。 Here, Σ x is the sum of x = (1−M) to (M−1), and Σ y is the sum of y = (1−N) to (N−1). Also, Σx , y is the sum for all x and y except for the point (x, y) = (0,0). However, Σ x and Σ y and Σ x, y are the sum of only the matrix portion E (see FIG. 4) including the non-zero elements of the PSF matrix W m + x, n + y (−x, −y). Should be considered. In the above formula (1), the conversion coefficient between the light amount and the image output signal is set to 1 by appropriately taking the light amount unit and the image output signal unit.
また、上記式(1)の下側右辺は、上側右辺を、(x,y)=(0,0)の点と、それ以外の点とに分けたものである。 The lower right side of the above formula (1) is obtained by dividing the upper right side into points of (x, y) = (0, 0) and other points.
ところで、Z(m,n)は、撮像素子24上の点(m,n)に位置する画素の出力信号の値であるが、この点(m,n)には、被写体上の対応する点(m,n)からのピントの合った光だけではなく、その点の周辺、すなわち、被写体座標系(s,t)で考えたとき、s方向についてxピクセルに対応する距離、t方向についてyピクセルに対応する距離だけ離れた点(m+x,n+y)からのピントのぼけた光も集まる。従って、Z(m,n)の値は、被写体上の1点(m,n)から出た明るさA(m,n)の光による出力信号Wm,n(0,0)*A(m,n)の値のみならず、この値に、その周辺の点(m+x,n+y)から出た明るさA(m+x,n+y)の光による出力信号Wm+x,n+y(−x,−y)*A(m+x,n+y)の値を加えた値となる。そして、上記式(1)の下側右辺は、そのことを意味している。
Incidentally, Z (m, n) is the value of the output signal of the pixel located at the point (m, n) on the
従って、上記式(1)とは逆に、画像行列Zから被写体行列Aを導くためには、上記式(1)におけるPSF行列Wm,nに相当するような畳み込み演算処理を行うための畳み込み演算行列Qm,nを求めることができればよい。しかし、このような畳み込み演算行列Qm,nは、逆行列を求める場合のように簡単にPSF行列Wm,nから求めることはできない。 Therefore, conversely to the above equation (1), in order to derive the subject matrix A from the image matrix Z , a convolution for performing a convolution operation process corresponding to the PSF matrix W m, n in the above equation (1). It suffices if the operation matrix Q m, n can be obtained. However, such a convolution matrix Q m, n cannot be easily obtained from the PSF matrix W m, n as in the case of obtaining an inverse matrix.
<被写体行列Aと画像行列Zとの変換を行うための巨大行列の検討>
一方、被写体行列Aの要素数は、M×N個であり、画像行列Zの要素数も、M×N個である。従って、M行N列の被写体行列Aの各要素を縦一列に並べてM×N個の要素数の巨大ベクトル(縦ベクトル)Agとし、M行N列の画像行列Zの各要素を縦一列に並べてM×N個の要素数の巨大ベクトル(縦ベクトル)Zgとすれば、これらの巨大ベクトルAgからZgへの変換関係は、M×N行M×N列の巨大変換行列Tgを用いて、次の式(2)のように表わすことができる。
<Examination of huge matrix for converting between subject matrix A and image matrix Z>
On the other hand, the number of elements of the subject matrix A is M × N, and the number of elements of the image matrix Z is M × N. Thus, M rows and N by arranging the elements of the subject matrix A column in tandem to a M × huge vector (column vector) of N number of elements A g, tandem each element of the image matrix Z of M rows and N columns And a giant vector (vertical vector) Z g of M × N elements, the transformation relationship from these giant vectors A g to Z g is the giant transformation matrix T of M × N rows and M × N columns. Using g , it can be expressed as the following equation (2).
Zg=TgAg ・・・・・・・・・・・・・・・・・・・・・・・・・・・(2) Z g = T g A g · · ························· (2)
従って、上記式(2)における巨大変換行列Tgの逆行列Tg -1を求めることができれば、巨大ベクトルZgからAgへの変換関係は、巨大逆変換行列Tg -1を用いて、次の式(3)のように表わすことができる。 Therefore, if the inverse matrix T g −1 of the giant transformation matrix T g in the above equation (2) can be obtained, the transformation relationship from the giant vector Z g to A g can be obtained using the giant inverse transformation matrix T g −1. The following equation (3) can be expressed.
Ag=Tg -1Zg ・・・・・・・・・・・・・・・・・・・・・・・・・・(3) A g = T g -1 Z g (3)
このため、巨大逆変換行列Tg -1を予め求めておき、被写体の撮像時に、上記式(3)の演算を行えば、巨大ベクトルAgの各要素の値、すなわち被写体行列Aの各要素の値を求めることができ、被写体を再現することができる。 Therefore, if the huge inverse transformation matrix T g −1 is obtained in advance and the calculation of the above equation (3) is performed at the time of imaging of the subject, the value of each element of the giant vector Ag , that is, each element of the subject matrix A Can be obtained and the subject can be reproduced.
しかし、M×N行M×N列の巨大逆変換行列Tg -1を用いた演算処理は、計算量が多いので、例えば、通常の携帯電話機や携帯情報端末等の携帯型の情報端末装置に搭載されている程度の性能を有する中央演算処理装置(CPU)では、短時間での処理が困難であるため、現実的ではない。例えば、通常の画像であるVGA(Video Graphics array)では、M=640画素、N=480画素として、画素数M×Nは、約30万個であるため、巨大逆変換行列Tg -1は、行数および列数とも画素数の約30万個となり、その大きさ(要素数)は、画素数の2乗で(M×N)2≒900億個となる。 However, the arithmetic processing using the M × N rows and M × N giant inverse transformation matrix T g −1 has a large amount of calculation, and thus, for example, a portable information terminal device such as a normal cellular phone or a portable information terminal. In a central processing unit (CPU) having a level of performance mounted on the CPU, processing in a short time is difficult, so it is not realistic. For example, in a VGA (Video Graphics array) which is a normal image, M = 640 pixels and N = 480 pixels, and the number of pixels M × N is about 300,000. Therefore, the huge inverse transformation matrix T g −1 is Both the number of rows and the number of columns are about 300,000 pixels, and the size (number of elements) is the square of the number of pixels (M × N) 2 ≈90 billion.
そこで、以下では、上記式(3)による演算に比べ、少ない計算量で被写体を再生できるようにするため、画像行列Zから被写体行列Aを導くための畳み込み演算行列Qm,nを求めることにする。 Therefore, in the following, a convolution calculation matrix Q m, n for deriving the subject matrix A from the image matrix Z is obtained so that the subject can be reproduced with a smaller amount of calculation than the calculation according to the above equation (3). To do.
<画像行列Zから被写体行列Aを導くための畳み込み演算>
先ず、前述した式(1)の下側右辺の第2項を左辺に移項した後、左辺と右辺を入れ替えると、次の式(4)のようになる。
<Convolution operation for deriving the subject matrix A from the image matrix Z>
First, after shifting the second term on the lower right side of the formula (1) described above to the left side, the left side and the right side are interchanged to obtain the following formula (4).
Wm,n(0,0)*A(m,n)
=Z(m,n)−Σx,y{Wm+x,n+y(−x,−y)*A(m+x,n+y)}
・・・・・(4)
W m, n (0,0) * A (m, n)
= Z (m, n) −Σx , y {W m + x, n + y (−x, −y) * A (m + x, n + y)}
(4)
上記式(4)の簡易な近似方法として、次のような近似を行うことができる。すなわち、第1ステップでは、被写体と、撮像された画像が大きく変わらないと仮定し、A(m+x,n+y)をZ(m+x,n+y)で近似する。この結果、上記式(4)は、次の式(5)のようになる。 As a simple approximation method of the above equation (4), the following approximation can be performed. That is, in the first step, it is assumed that the subject and the captured image are not significantly changed, and A (m + x, n + y) is approximated by Z (m + x, n + y). As a result, the above equation (4) becomes the following equation (5).
Wm,n(0,0)*A(m,n)
=Z(m,n)−Σx,y{Wm+x,n+y(−x,−y)*Z(m+x,n+y)}
・・・・・(5)
W m, n (0,0) * A (m, n)
= Z (m, n)-[Sigma] x, y {Wm + x, n + y (-x, -y) * Z (m + x, n + y)}
(5)
続いて、第2ステップでは、各点でのボケの状態は、近所の点どうしでは似ていると仮定し、Wm+x,n+y(−x,−y)=Wm,n(−x,−y)と考える。この結果、上記式(5)は、次の式(6)のようになる。 Subsequently, in the second step, it is assumed that the blurring state at each point is similar between neighboring points, and W m + x, n + y (−x, −y) = W m, n ( -X, -y). As a result, the above equation (5) becomes the following equation (6).
Wm,n(0,0)*A(m,n)
=Z(m,n)−Σx,y{Wm,n(−x,−y)*Z(m+x,n+y)}
・・・・・(6)
W m, n (0,0) * A (m, n)
= Z (m, n)-[Sigma] x, y {Wm , n (-x, -y) * Z (m + x, n + y)}
(6)
従って、上記式(6)の左辺および右辺をWm,n(0,0)で除すると、次の式(7)のようになる。 Therefore, when the left side and the right side of the above equation (6) are divided by W m, n (0, 0), the following equation (7) is obtained.
A(m,n)
=Z(m,n)/Wm,n(0,0)
−Σx,y{Wm,n(−x,−y)*Z(m+x,n+y)}/Wm,n(0,0)
・・・・・(7)
A (m, n)
= Z (m, n) / W m, n (0,0)
−Σ x, y {W m, n (−x, −y) * Z (m + x, n + y)} / W m, n (0,0)
(7)
ここで、次の式(8)で示すようにQm,n(x,y)を定義し、上記式(7)におけるWm,n(x,y)をQm,n(x,y)を用いて置きかえると、次の式(9)のようになる。但し、次の式(8)において、Wm,n(0,0)のべき乗数は、power=1とする。 Here, Q m, n (x, y) is defined as shown in the following equation (8), and W m, n (x, y) in the above equation (7) is defined as Q m, n (x, y). ), The following equation (9) is obtained. However, in the following equation (8), the power multiplier of W m, n (0, 0) is set to power = 1.
Qm,n(x,y)=1/Wm,n(0,0)
(x=0,y=0の場合)
=−Wm,n(−x,−y)/Wm,n(0,0)power
(x=0,y=0以外の場合)
・・・・・・・・・・・・・・・・・・・・・・(8)
Q m, n (x, y) = 1 / W m, n (0,0)
(When x = 0, y = 0)
= −W m, n (−x, −y) / W m, n (0,0) power
(When other than x = 0, y = 0)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (8)
A(m,n)=Qm,n(0,0)*Z(m,n)
+Σx,y{Qm,n(x,y)*Z(m+x,n+y)}
=ΣxΣy{Qm,n(x,y)*Z(m+x,n+y)}
・・・・・・・・・・・・・・・・・・・・・・(9)
A (m, n) = Q m, n (0,0) * Z (m, n)
+ Σ x, y {Q m, n (x, y) * Z (m + x, n + y)}
= Σ x Σ y {Q m, n (x, y) * Z (m + x, n + y)}
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (9)
ここで、Σxは、x=(1−M)〜(M−1)の和であり、Σyは、y=(1−N)〜(N−1)の和である。また、Σx,yは、(x,y)=(0,0)の点を除く全てのx,yについての和である。 Here, Σ x is the sum of x = (1−M) to (M−1), and Σ y is the sum of y = (1−N) to (N−1). Also, Σx , y is the sum for all x and y except for the point (x, y) = (0,0).
そして、上記式(9)は、前述した式(1)に対応する畳み込み演算を行う式となっており、上記式(9)におけるQm,n(x,y)が、前述した式(1)におけるWm+x,n+y(−x,−y)に対応している。従って、行列Qm,nは、PSF行列Wm,nに対応する畳み込み演算行列であり、画像行列Zから被写体行列Aを求める再生演算は、この畳み込み演算行列Qm,nを用いて行うことができる。 The above equation (9) is an equation for performing a convolution operation corresponding to the above-described equation (1), and Q m, n (x, y) in the above equation (9) is the above-described equation (1). ) Corresponding to W m + x, n + y (−x, −y). Accordingly, the matrix Q m, n is a convolution operation matrix corresponding to the PSF matrix W m, n , and the reproduction operation for obtaining the subject matrix A from the image matrix Z is performed using this convolution operation matrix Q m, n. Can do.
次に、前述した式(4)の、より高度な近似方法として、次のような近似を行うことができる。すなわち、前述した式(4)は、撮像素子24上の点(m,n)に位置する画素の出力信号Z(m,n)の値を求めるための前述した式(1)を変形した式であるが、同様にして、撮像素子24上でh方向にx、k方向にyだけ離れた点(m+x,n+y)に位置する画素の出力信号Z(m+x,n+y)の値を求めるための式を変形した式を考える。
Next, the following approximation can be performed as a more advanced approximation method of Equation (4) described above. That is, the above-described expression (4) is an expression obtained by modifying the above-described expression (1) for obtaining the value of the output signal Z (m, n) of the pixel located at the point (m, n) on the
前述した式(4)において、mを(m+x)に、nを(n+y)に置き換えるとともに、新しい被写体の点(m+x,n+y)から出た光によるボケを表現するための座標系として相対座標系(u,v)を設定し、xをuに、yをvに置き換えると、次の式(10)のようになる。 In the above-described equation (4), m is replaced with (m + x), n is replaced with (n + y), and a relative coordinate system is used as a coordinate system for expressing blur caused by light emitted from a point (m + x, n + y) of a new subject. When (u, v) is set and x is replaced with u and y is replaced with v, the following equation (10) is obtained.
Wm+x,n+y(0,0)*A(m+x,n+y)
=Z(m+x,n+y)
−Σu,v{Wm+x+u,n+y+v(−u,−v)*A(m+x+u,n+y+v)}
・・・・・(10)
W m + x, n + y (0,0) * A (m + x, n + y)
= Z (m + x, n + y)
−Σ u, v {W m + x + u, n + y + v (−u, −v) * A (m + x + u, n + y + v)}
(10)
ここで、uおよびvは、整数で、u=(1−M)〜(M−1)、v=(1−N)〜(N−1)であり、Σu,vは、(u,v)=(0,0)の点を除く全てのu,vについての和である。 Here, u and v are integers, u = (1-M) to (M−1), v = (1−N) to (N−1), and Σ u, v is (u, v) = the sum for all u, v except for the point (0,0).
上記式(10)の左辺および右辺をWm+x,n+y(0,0)で除した後、前述した式(4)におけるA(m+x,n+y)に代入すると、次の式(11)のようになる。 After dividing the left side and the right side of the above equation (10) by W m + x, n + y (0,0) and substituting into A (m + x, n + y) in the above equation (4), the following equation (11 )become that way.
Wm,n(0,0)*A(m,n)
=Z(m,n)
−Σx,y{Wm+x,n+y(−x,−y)
*Z(m+x,n+y)/Wm+x,n+y(0,0)}
+Σx,yΣu,v[Wm+x,n+y(−x,−y)*{Wm+x+u,n+y+v(−u,−v)
*A(m+x+u,n+y+v)}/Wm+x,n+y(0,0)]
・・・・・(11)
W m, n (0,0) * A (m, n)
= Z (m, n)
−Σ x, y {W m + x, n + y (−x, −y)
* Z (m + x, n + y) / W m + x, n + y (0,0)}
+ Σ x, y Σ u, v [W m + x, n + y (−x, −y) * {W m + x + u, n + y + v (−u, −v)
* A (m + x + u, n + y + v)} / W m + x, n + y (0,0)]
(11)
そして、上記式(11)の左辺および右辺をWm,n(0,0)で除すると、次の式(12)のようになる。 Then, when the left side and the right side of the above equation (11) are divided by W m, n (0, 0), the following equation (12) is obtained.
A(m,n)
=Z(m,n)/Wm,n(0,0)
−Σx,y{Wm+x,n+y(−x,−y)
*Z(m+x,n+y)/Wm+x,n+y(0,0)}/Wm,n(0,0)
+Σx,yΣu,v[Wm+x,n+y(−x,−y)*{Wm+x+u,n+y+v(−u,−v)
*A(m+x+u,n+y+v)}/Wm+x,n+y(0,0)]/Wm,n(0,0)
・・・・・(12)
A (m, n)
= Z (m, n) / W m, n (0,0)
−Σ x, y {W m + x, n + y (−x, −y)
* Z (m + x, n + y) / W m + x, n + y (0,0)} / W m, n (0,0)
+ Σ x, y Σ u, v [W m + x, n + y (−x, −y) * {W m + x + u, n + y + v (−u, −v)
* A (m + x + u, n + y + v)} / W m + x, n + y (0,0)] / W m, n (0,0)
(12)
上記式(12)を近似する。第1ステップでは、右辺第3項に、Wm+x,n+y(−x,−y)とWm+x+u,n+y+v(−u,−v)との積があるので、この右辺第3項を無視すると、次の式(13)のようになる。 The above equation (12) is approximated. In the first step, the product of W m + x, n + y (−x, −y) and W m + x + u, n + y + v (−u, −v) is added to the third term on the right side. Therefore, if this third term on the right side is ignored, the following equation (13) is obtained.
A(m,n)
=Z(m,n)/Wm,n(0,0)
−Σx,y{Wm+x,n+y(−x,−y)
*Z(m+x,n+y)/Wm+x,n+y(0,0)}/Wm,n(0,0)
・・・・・(13)
A (m, n)
= Z (m, n) / W m, n (0,0)
−Σ x, y {W m + x, n + y (−x, −y)
* Z (m + x, n + y) / W m + x, n + y (0,0)} / W m, n (0,0)
(13)
続いて、第2ステップでは、各点でのボケの状態は、近所の点どうしでは似ていると仮定し、Wm+x,n+y(−x,−y)をWm,n(−x,−y)で近似する。この結果、上記式(13)は、次の式(14)のようになる。 Subsequently, in the second step, it is assumed that the blurring state at each point is similar between neighboring points, and W m + x, n + y (−x, −y) is changed to W m, n ( Approximate by -x, -y). As a result, the above equation (13) becomes the following equation (14).
A(m,n)
=Z(m,n)/Wm,n(0,0)
−Σx,y{Wm,n(−x,−y)
*Z(m+x,n+y)/Wm+x,n+y(0,0)}/Wm,n(0,0)
・・・・・(14)
A (m, n)
= Z (m, n) / W m, n (0,0)
−Σ x, y {W m, n (−x, −y)
* Z (m + x, n + y) / W m + x, n + y (0,0)} / W m, n (0,0)
(14)
さらに、第3ステップでは、Wm+x,n+y(0,0)もWm,n(0,0)で近似する。この結果、上記式(14)は、次の式(15)のようになる。 Further, in the third step, W m + x, n + y (0,0) is also approximated by W m, n (0,0). As a result, the above equation (14) becomes the following equation (15).
A(m,n)
=Z(m,n)/Wm,n(0,0)
−Σx,y{Wm,n(−x,−y)*Z(m+x,n+y)}/Wm,n(0,0)2
・・・・・(15)
A (m, n)
= Z (m, n) / W m, n (0,0)
−Σ x, y {W m, n (−x, −y) * Z (m + x, n + y)} / W m, n (0,0) 2
(15)
ここで、次の式(16)で示すようにQm,n(x,y)を定義し、上記式(15)におけるWm,n(x,y)をQm,n(x,y)を用いて置きかえると、次の式(17)のようになる。但し、次の式(16)において、Wm,n(0,0)のべき乗数は、power=2とする。 Here, Q m, n (x, y) is defined as shown in the following equation (16), and W m, n (x, y) in the above equation (15) is defined as Q m, n (x, y). ), The following equation (17) is obtained. However, in the following equation (16), the power of W m, n (0, 0) is set to power = 2.
Qm,n(x,y)=1/Wm,n(0,0)
(x=0,y=0の場合)
=−Wm,n(−x,−y)/Wm,n(0,0)power
(x=0,y=0以外の場合)
・・・・・・・・・・・・・・・・・・・・・・(16)
Q m, n (x, y) = 1 / W m, n (0,0)
(When x = 0, y = 0)
= −W m, n (−x, −y) / W m, n (0,0) power
(When other than x = 0, y = 0)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (16)
A(m,n)=Qm,n(0,0)*Z(m,n)
+Σx,y{Qm,n(x,y)*Z(m+x,n+y)}
=ΣxΣy{Qm,n(x,y)*Z(m+x,n+y)}
・・・・・・・・・・・・・・・・・・・・・・(17)
A (m, n) = Q m, n (0,0) * Z (m, n)
+ Σ x, y {Q m, n (x, y) * Z (m + x, n + y)}
= Σ x Σ y {Q m, n (x, y) * Z (m + x, n + y)}
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (17)
ここで、Σxは、x=(1−M)〜(M−1)の和であり、Σyは、y=(1−N)〜(N−1)の和である。また、Σx,yは、(x,y)=(0,0)の点を除く全てのx,yについての和である。 Here, Σ x is the sum of x = (1−M) to (M−1), and Σ y is the sum of y = (1−N) to (N−1). Also, Σx , y is the sum for all x and y except for the point (x, y) = (0,0).
そして、上記式(17)は、前述した式(9)と同じ式である。従って、上記式(17)における行列Qm,nは、前述した式(1)におけるPSF行列Wm,nに対応する畳み込み演算行列であり、画像行列Zから被写体行列Aを求める再生演算は、この畳み込み演算行列Qm,nを用いて行うことができる。 And said Formula (17) is the same formula as Formula (9) mentioned above. Accordingly, the matrix Q m, n in the above equation (17) is a convolution operation matrix corresponding to the PSF matrix W m, n in the above equation (1), and the reproduction operation for obtaining the subject matrix A from the image matrix Z is as follows: This convolution operation matrix Q m, n can be used.
以上より、前述した式(8)および式(16)を考慮し、次の式(18)のように畳み込み演算行列Qm,nを定義すれば、次の式(19)に基づき行列Qm,nを用いて畳み込み演算を行うことにより、被写体を再生することができる。 From the above, if the convolution calculation matrix Q m, n is defined as in the following equation (18) in consideration of the above-described equations (8) and (16), the matrix Q m is based on the following equation (19). , n can be used to perform a convolution operation to reproduce the subject.
Qm,n(x,y)=1/Wm,n(0,0)
(x=0,y=0の場合)
=−Wm,n(−x,−y)/Wm,n(0,0)power
(x=0,y=0以外の場合)
・・・・・・・・・・・・・・・・・・・・・・(18)
Q m, n (x, y) = 1 / W m, n (0,0)
(When x = 0, y = 0)
= −W m, n (−x, −y) / W m, n (0,0) power
(When other than x = 0, y = 0)
.... (18)
A(m,n)=ΣxΣy{Qm,n(x,y)*Z(m+x,n+y)}
・・・・・・・・・・・・・・・・・・・・・・(19)
A (m, n) = Σ x Σ y {Q m, n (x, y) * Z (m + x, n + y)}
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (19)
ここで、xおよびyは整数で、(1−M)≦x≦(M−1)、(1−N)≦y≦(N−1)であり、mおよびnは自然数で、1≦m≦M、1≦n≦Nであり、Wm,n(x,y)は、(2M−1)行(2N−1)列のPSF行列Wm,nの各要素の値であり、powerは、Wm,n(0,0)のべき乗数となる実数で、1≦power≦2であり、Σxは、x=(1−M)〜(M−1)の和であり、Σyは、y=(1−N)〜(N−1)の和である。 Here, x and y are integers, (1-M) ≦ x ≦ (M−1), (1-N) ≦ y ≦ (N−1), m and n are natural numbers, and 1 ≦ m ≦ M, 1 ≦ n ≦ N, and W m, n (x, y) is a value of each element of the PSF matrix W m, n of (2M−1) rows (2N−1) columns, and power is, W m, a real number which is a power number n (0,0), a 1 ≦ power ≦ 2, the sigma x, the sum of x = (1-M) ~ (M-1), Σ y is the sum of y = (1-N) to (N-1).
また、powerの値は、Wm,n(0,0)の値に応じて決定すればよい。この際、Wm,n(0,0)の値が、0.5近傍(0.5を含む。以下、同様)のときには、powerの値を2以外の値とする必要がある。より具体的には、Wm,n(0,0)の値が、0.5近傍のときには、powerの値を1以上2未満とし、より好ましくは1とする。一方、Wm,n(0,0)の値が、0.5近傍以外のときには、1以上2以下とする。 The power value may be determined according to the value of W m, n (0, 0). At this time, if the value of W m, n (0, 0) is in the vicinity of 0.5 (including 0.5; the same applies hereinafter), the power value needs to be a value other than 2. More specifically, when the value of W m, n (0, 0) is in the vicinity of 0.5, the power value is set to 1 or more and less than 2, more preferably 1. On the other hand, when the value of W m, n (0, 0) is not near 0.5, it is set to 1 or more and 2 or less.
<PSF行列Wm,nの各要素Wm,n(x,y)の分布>
図5には、PSF行列Wm,nの各要素Wm,n(x,y)の分布状況の一例が示されている。中心のWm,n(0,0)には、標準的な距離にある通常の被写体の1点(m,n)から出て二焦点レンズ21を構成する内側の長焦点レンズ部22を通った光により、ピントの合った画像が形成されている。Wm,n(0,0)の周囲には、外側の環状の短焦点レンズ部23を通った光により、環状(略円環状または略楕円環状)のピントのぼけた画像が形成されている。なお、空欄になっている部分は、零要素である。
<Distribution of each element W m, n (x, y) of PSF matrix W m, n >
FIG. 5 shows an example of a distribution situation of each element W m, n (x, y) of the PSF matrix W m, n . At the center W m, n (0,0), it passes from one point (m, n) of a normal subject at a standard distance and passes through an inner long
図5では、中心のWm,n(0,0)の値は、cとなっているが、このcの値は、二焦点レンズ21の全体面積に対する内側の長焦点レンズ部22の面積の比の値である。但し、厳密には、光の分割が面積に比例しない場合もあるので、光の量の分割比がレンズの面積比と一致しない場合には、上記のcの値は、内側の長焦点レンズ部22を通過して実際にセンサ(撮像素子24)に到達する光の量またはセンサの信号量と、二焦点レンズ21の全体(内側の長焦点レンズ部22および外側の短焦点レンズ部23を合わせた全体)を通過して実際にセンサに到達する光の量またはセンサの信号量との比の値と考えることができる。なお、図5では、説明の簡易化のため、中心のWm,n(0,0)に隣接する各要素(例えば、Wm,n(1,0)やWm,n(0,1)等)の値は、ゼロとなっているが、実際には、内側の長焦点レンズ部22により形成される画像も、完全にピントの合った画像とはならず、多少のぼけが生じるのが通常であるため(ぼけの形状は、略中実円形形状または略中実楕円形状となる。)、cの値は、Wm,n(0,0)を中心として周囲の幾つかの要素に分散される(後述する図13のぼけ部分80参照)。
In FIG. 5, the value of W m, n (0, 0) at the center is c, but this value of c is the area of the inner long
また、図5では、環状のぼけ部分の各要素の値が、e1〜e19により示されているが、これは、ぼけの形状の概略を示すものであり、実際には、ぼけ部分のリングの幅は、1〜2行または1〜2列分ではなく、より多くの行数または列数分の幅である。例えば、撮像素子24の中央位置(画像座標系(h,k)の中心座標)についてのPSF行列Wm,nの場合には、Wm,n(0,0)の周囲に例えば7行または7列分の幅で零要素が円環状に配置され、その外側に例えば8行または8列分の幅で非零要素が円環状に配置される等である。従って、この場合には、Wm,n(x,y)のうち非零要素を含む行列部分E(図4参照)は、例えば、31画素×31画素分に収まる程度の大きさ等である。そして、この場合には、Wm,n(x,y)のぼけ部分のリングの内径と外径との比は、二焦点レンズ21を構成する外側の短焦点レンズ部23の内径と外径との比に等しい。なお、Wm,n(x,y)のぼけ部分のリングの大きさ、幅、形状は、各座標(m,n)によって異なる(図7参照)。
In FIG. 5, the values of the elements of the annular blur portion are indicated by e1 to e19, but this shows an outline of the shape of the blur. The width is not a width of 1 to 2 rows or 1 to 2 columns, but a width corresponding to a larger number of rows or columns. For example, in the case of the PSF matrix W m, n about the center position of the image sensor 24 (the center coordinates of the image coordinate system (h, k)), for example, seven rows around W m, n (0,0) or Zero elements are arranged in an annular shape with a width of 7 columns, and non-zero elements are arranged in an annular shape with a width of 8 rows or 8 columns, for example. Accordingly, in this case, the matrix portion E (see FIG. 4) including the non-zero elements in W m, n (x, y) is, for example, a size that fits in 31 pixels × 31 pixels. . In this case, the ratio between the inner diameter and the outer diameter of the ring at the blurred portion of W m, n (x, y) is the same as the inner diameter and the outer diameter of the outer short-
さらに、外側の短焦点レンズ部23により形成されるボケは広範囲に拡がるので、PSF行列Wm,nにおいて、環状のぼけ部分の各要素の値(図5では、e1〜e19の値)は、中央のピントの合った部分の値(図5では、Wm,n(0,0)=cの値)に比べ、十分小さい値となる。具体的には、cの値は、例えば0.8等であり、e1〜e19の値は、例えば0.0013等である。但し、これらの数値に限定されるものではない。
Furthermore, since the blur formed by the outer short
<畳み込み演算行列Qm,nの各要素Qm,n(x,y)の分布>
図6には、前述した式(18)で定義される畳み込み演算行列Qm,nの各要素Qm,n(x,y)の分布状況の一例が示されている。畳み込み演算行列Qm,nの各要素Qm,n(x,y)の分布も、PSF行列Wm,nの各要素Wm,n(x,y)の分布(図5参照)に対応し、中心のQm,n(0,0)に非零要素があり、その周囲に非零要素が環状(略円環状または略楕円環状)に配置される分布となっている。なお、空欄になっている部分は、零要素である。
<Convolution matrix Q m, each element Q m of n, n (x, y) of the distribution>
FIG. 6 shows an example of the distribution situation of each element Q m, n (x, y) of the convolution matrix Q m, n defined by the above-described equation (18). The distribution of each element Q m, n (x, y) of the convolution matrix Q m, n also corresponds to the distribution of each element W m, n (x, y) of the PSF matrix W m, n (see FIG. 5). In addition, there is a distribution in which there is a non-zero element at the center Q m, n (0, 0), and the non-zero elements are arranged in a ring (substantially annular or substantially elliptical ring) around it. The blank part is a zero element.
但し、図6の畳み込み演算行列Qm,nの各要素Qm,n(x,y)の分布は、図5のPSF行列Wm,nの各要素Wm,n(x,y)の分布に対し、x,yが反転して、−x,−yとなっている。前述した式(18)による定義に従って反転したものである。 However, the distribution of each element Q m, n (x, y) of the convolution matrix Q m, n of FIG. 6 is the same as that of each element W m, n (x, y) of the PSF matrix W m, n of FIG. For the distribution, x and y are inverted to become -x and -y. This is inverted according to the definition given by the equation (18) described above.
<各座標(m,n)についてのPSF行列Wm,nどうしの関係>
図7には、各座標(m,n)についてのPSF行列Wm,nの各要素Wm,n(x,y)の分布状況が示されている。撮像素子24の中央位置(画像座標系(h,k)の中心座標(M/2,N/2))についてのPSF行列Wm,nの場合には、ぼけの形状は、円環状である。一方、画像座標系(h,k)の中心以外の座標では、ぼけの形状は、略楕円環状になり、画像座標系(h,k)の中心から外側に離れるにつれ、ぼけ部分の全体的な大きさやリングの幅が大きくなる。
<Relationship between PSF matrix W m, n for each coordinate (m, n)>
FIG. 7 shows the distribution status of each element W m, n (x, y) of the PSF matrix W m, n for each coordinate (m, n). In the case of the PSF matrix W m, n about the center position of the image sensor 24 (center coordinates (M / 2, N / 2) of the image coordinate system (h, k)), the blur shape is an annular shape. . On the other hand, at coordinates other than the center of the image coordinate system (h, k), the blur shape is substantially elliptical, and as the distance from the center of the image coordinate system (h, k) increases, Increases the size and width of the ring.
また、二焦点レンズ21は、軸対称性を有しているので、各座標(m,n)についてのPSF行列Wm,nの分布(ぼけの形状)についても軸対称性が保持される。従って、撮像素子24の中央位置(画像座標系(h,k)の中心座標(M/2,N/2))から放射状に延びる各直線を考えると、いずれの直線上でも放射方向について見れば、中心から外側に向って同じように分布(ぼけの形状)が変化し、撮像素子24の中央位置からの距離でPSF行列Wm,nの分布(ぼけの形状)が定まり、かつ、いずれのPSF行列Wm,nの分布も放射直線に対して対称である。つまり、撮像素子24の中央位置からの距離が同じ座標についてのPSF行列Wm,nの分布(ぼけの形状)は、全て同じとなり、単に回転しているだけの関係となる。例えば、画像座標系(h,k)におけるライン50上に並ぶ各座標(m,n)についてのPSF行列Wm,nの各要素Wm,n(x,y)の配置を、画像座標系(h,k)の中心座標(M/2,N/2)を中心として回転させれば、画像座標系(h,k)における他のライン51,52,53,54上に並ぶ各座標(m,n)についてのPSF行列Wm,nの各要素Wm,n(x,y)の配置を算出することができる。
Further, since the
<各座標(m,n)についての畳み込み演算行列Qm,nどうしの関係>
図8には、各座標(m,n)についての畳み込み演算行列Qm,nの各要素Qm,n(x,y)の分布状況が示されている。畳み込み演算行列Qm,nの分布も、前述した式(18)で定義されることから、PSF行列Wm,nの分布と同様に、軸対称性が保持される。従って、中心座標(M/2,N/2)からの距離が同じ座標についての畳み込み演算行列Qm,nの分布は、全て同じとなり、単に回転しているだけの関係となる。例えば、図8中の一点鎖線で示されるライン60上に並ぶ各座標(m,n)についての畳み込み演算行列Qm,nの各要素Qm,n(x,y)の配置を、中心座標(M/2,N/2)を中心として回転させれば、図8中の点線で示される他のライン61,62,63,64上に並ぶ各座標(m,n)についての畳み込み演算行列Qm,nの各要素Qm,n(x,y)の配置を算出することができる。なお、図8の各座標(m,n)についての畳み込み演算行列Qm,nの個々の分布が、図7の同じ座標についてのPSF行列Wm,nの分布に対し、x,yについて反転しているのは、前述した図5と図6との関係と同様である。
<Relationship between convolution matrix Q m, n for each coordinate (m, n)>
FIG. 8 shows the distribution status of each element Q m, n (x, y) of the convolution matrix Q m, n for each coordinate (m, n). Since the distribution of the convolution calculation matrix Q m, n is also defined by the above-described equation (18), the axial symmetry is maintained as with the distribution of the PSF matrix W m, n . Accordingly, the distributions of the convolution matrixes Q m, n for the coordinates having the same distance from the center coordinates (M / 2, N / 2) are all the same, and are simply rotated. For example, the arrangement of the elements Q m, n (x, y) of the convolution matrix Q m, n for the coordinates (m, n) arranged on the
このため、畳み込み演算行列記憶手段32,33には、全ての座標(m,n)(1≦m≦M、1≦n≦N)についての畳み込み演算行列Qm,nを記憶させる必要はなく、中心座標(M/2,N/2)から放射状に延びる各直線のうちの一つの直線上に並ぶ座標についての畳み込み演算行列Qm,nをサンプリング行列として記憶させ、その他の座標についての畳み込み演算行列Qm,nは、サンプリング行列を回転させればよい。本実施形態では、記憶させる個々のQm,n(x,y)の配置(ぼけの形状)自体の上下の対称性を確保するため、図8中の一点鎖線で示される水平方向のライン60上に並ぶ各座標についての畳み込み演算行列Qm,n(前述した図6に示すような上下対称の分布となる畳み込み演算行列Qm,n)を記憶させるものとする。
Therefore, the convolution calculation matrix storage means 32 and 33 do not need to store the convolution calculation matrix Q m, n for all coordinates (m, n) (1 ≦ m ≦ M, 1 ≦ n ≦ N). , The convolution matrix Q m, n for the coordinates arranged on one of the straight lines radially extending from the central coordinates (M / 2, N / 2) is stored as a sampling matrix, and the convolution for the other coordinates The operation matrix Q m, n may be obtained by rotating the sampling matrix. In the present embodiment, in order to ensure vertical symmetry of the arrangement (blurred shape) of each Q m, n (x, y) to be stored, a
但し、対角方向のライン61〜64が、最も中心座標(M/2,N/2)から離れた座標を有するので、つまり対角方向のライン61〜64上の各座標についての畳み込み演算行列Qm,nをサンプリングすれば、全ての座標(m,n)(1≦m≦M、1≦n≦N)についての畳み込み演算行列Qm,nを代表させることができるので、水平方向のライン60上に並ぶ各座標についての畳み込み演算行列Qm,nを記憶させる際には、図8に示す如く、対角方向のライン61〜64と同じ長さ(画角の最大値の半分に対応する長さ)になるように、ライン60を仮想的に延長してサンプリングする。
However, since the
また、サンプリング行列として畳み込み演算行列記憶手段32,33に記憶させる畳み込み演算行列Qm,nは、実験により求めたPSF行列Wm,nに基づき算出することが好ましいが、二焦点レンズ21を構成する各レンズ部22,23の内外径、各レンズ部22,23の焦点距離、および二焦点レンズ21と撮像素子24との間の距離等を用いて計算により求めたPSF行列Wm,nに基づき算出してもよい。
Further, the convolution calculation matrix Q m, n stored in the convolution calculation matrix storage means 32 and 33 as the sampling matrix is preferably calculated based on the PSF matrix W m, n obtained by experiment, but the
このように水平方向のライン60上に並ぶ各座標(m,n)についての畳み込み演算行列Qm,nのみを記憶させるようにすれば、記憶する情報量を減少させることができる。例えば、VGA(Video Graphics array)の場合には、M=640画素、N=480画素として、M×N=307,200箇所のデータ(約30万の全座標のそれぞれについてのQm,n(x,y)の分布)を記憶するのではなく、対角方向の半分の長さ(画角の最大値の半分に対応する長さ)分だけを記憶するものとすれば、(M2+N2)1/2/2=400箇所のデータを記憶すれば済むので、記憶する情報量を約770分の1にすることができる。さらに、図6に示す如く、水平方向のライン60上に並ぶ各座標についての畳み込み演算行列Qm,nのQm,n(x,y)の個々の分布は、いずれもライン60に対して上下対称なので、上側半分(または下側半分)のみを記憶すればよい。このため、記憶する情報量は、更に半分になり、約1540分の1にすることができる。また、このように図6の分布の上側半分(下側半分でも同じことである。)を記憶する際には、図4に示した非零要素を含む行列部分Hに相当する部分のみを記憶すればよいのは、前述した通りである。
In this way , if only the convolution matrix Q m, n for each coordinate (m, n) arranged on the
なお、メモリ容量に余裕がある場合等には、全ての座標(m,n)(1≦m≦M、1≦n≦N)についての畳み込み演算行列Qm,nを畳み込み演算行列記憶手段32,33に記憶させてもよい。
If there is a margin in the memory capacity, the convolution calculation
<畳み込み演算行列Qm,nの回転>
図9には、図6に示した水平方向のライン60(図8参照)上に並ぶ各座標についての畳み込み演算行列Qm,nの各要素Qm,n(x,y)を、一例として45度回転させた配置が示されている。図10には、図9の配置のうち、太枠で囲った9つの画素分の領域70を拡大した状態が示されている。本願明細書では、算出対象となる畳み込み演算行列Qm,n(サンプリング行列以外の行列)の要素Qm,n(x,y)に対応する領域(図9の水平・鉛直方向の点線で区画された領域)を第一区画領域と呼び、回転後のサンプリング行列Qm,nの要素Qm,n(x,y)に対応する領域(図9の斜め方向の実線で区画された領域)を第二区画領域と呼び、説明を行うものとする。
<Rotation of convolution matrix Q m, n >
FIG. 9 shows, as an example , the elements Q m, n (x, y) of the convolution matrix Q m, n for the coordinates arranged on the horizontal line 60 (see FIG. 8) shown in FIG. An arrangement rotated 45 degrees is shown. FIG. 10 shows a state in which the
図10において、f15〜f19の値は、これらの値が記載されている各第二区画領域に対応する要素Qm,n(x,y)の値である。図10の領域70に含まれる9つの第一区画領域のうちの中央の第一区画領域(ハッチングされた領域)に対応する要素Qm,n(x,y)の値は、次のように算出することができる。
In FIG. 10, the values of f15 to f19 are the values of the elements Q m, n (x, y) corresponding to the respective second partition regions in which these values are described. The value of the element Q m, n (x, y) corresponding to the central first divided area (hatched area) among the nine first divided areas included in the
先ず、正確に算出するには、ハッチングされた第一区画領域に重なる全ての第二区画領域を把握する。図10の場合には、f16,f17,f18,f19の各値を有する4つの要素に対応する4つの第二区画領域が重なっている。ここで、ハッチングされた第一区画領域とf16の第二区画領域との重なり部分の面積をα1とし、同様に、ハッチングされた第一区画領域とf17,f18,f19の第二区画領域との重なり部分の面積を、それぞれα2,α3,α4とすると、ハッチングされた第一区画領域に対応する要素Qm,n(x,y)の値は、次の式(20)により、面積割合に基づく加重平均により算出される。 First, in order to calculate correctly, all the 2nd division areas which overlap with the hatched 1st division area are grasped | ascertained. In the case of FIG. 10, four second partitioned areas corresponding to four elements having respective values of f16, f17, f18, and f19 overlap. Here, the area of the overlapping portion of the hatched first partition region and the second partition region of f16 is α1, and similarly, the hatched first partition region and the second partition regions of f17, f18, and f19 are Assuming that the areas of the overlapping portions are α2, α3, and α4, respectively, the value of the element Q m, n (x, y) corresponding to the hatched first partition region is expressed as the area ratio by the following equation (20). Calculated based on weighted average.
Qm,n(x,y)={f16×α1+f17×α2+f18×α3
+f19×α4}/(α1+α2+α3+α4) ・・・(20)
Q m, n (x, y) = {f16 × α1 + f17 × α2 + f18 × α3
+ F19 × α4} / (α1 + α2 + α3 + α4) (20)
しかし、上記式(20)による面積割合に基づく加重平均の算出を行うと、計算量が多くなる。そこで、ハッチングされた第一区画領域の所定位置(本実施形態では、一例として中央位置71とする。)に重なる第二区画領域を求め、求めた第二区画領域に対応する要素Qm,n(x,y)の値を、算出対象となる畳み込み演算行列Qm,nの要素Qm,n(x,y)の値として採用する。つまり、サンプリング行列Qm,nの各要素Qm,n(x,y)の値を、そのまま採用する。図10の場合には、ハッチングされた第一区画領域の中央位置71には、f16の第二区画領域が重なっているので、ハッチングされた第一区画領域に対応する要素Qm,n(x,y)の値は、f16とする。
However, if the weighted average is calculated based on the area ratio according to the equation (20), the amount of calculation increases. Therefore, a second partitioned area that overlaps a predetermined position of the hatched first partitioned area (in this embodiment, the
図11には、ハッチングされた第一区画領域の場合と同様にして、図10の領域70に含まれる他の8つの第一区画領域についても、それらの中央位置に重なる第二区画領域をそれぞれ求め、各要素Qm,n(x,y)の値を算出決定した結果が示されている。図11において、領域70に含まれる9つの第一区画領域のうち、右上および左下の第一区画領域については、これらの領域の中央位置に重なる第二区画領域が零要素となっているので、右上および左下の第一区画領域に対応する要素Qm,n(x,y)の値は、ゼロとする。
In the same manner as in the case of the hatched first divided area, FIG. 11 also shows the second divided areas that overlap the central positions of the other eight first divided areas included in the
なお、例えば、高性能のCPUを用いる場合や、処理速度に制約が無い場合等には、前述した式(20)による面積割合に基づく加重平均の算出を行ってもよい。 For example, when a high-performance CPU is used or when the processing speed is not limited, the weighted average may be calculated based on the area ratio according to the above-described equation (20).
そして、以上のようにして、畳み込み演算行列回転算出手段35によりサンプリング行列Qm,nを回転させて算出されるのは、畳み込み演算行列記憶手段32,33にサンプリング行列Qm,nのうち非零要素を含む行列部分H(図4参照)の対称性を考慮した略半分(図6の分布の場合には、上側半分)の値のみが記憶されていることから、これに対応し、算出対象となる畳み込み演算行列Qm,nのうち非零要素を含む行列部分Hの値のみである。 As described above, the convolution calculation matrix rotation calculation means 35 calculates the rotation of the sampling matrix Q m, n and the convolution calculation matrix storage means 32 and 33 store the sampling matrix Q m, n . Since only half of the values considering the symmetry of the matrix portion H (see FIG. 4) including zero elements (upper half in the case of the distribution of FIG. 6) are stored, the corresponding calculation is performed. Only the value of the matrix part H including the non-zero elements in the target convolution matrix Q m, n is shown.
また、畳み込み演算行列回転算出手段35によりサンプリング行列Qm,nを回転させてサンプリング行列以外の畳み込み演算行列Qm,nを算出する際には、算出対象となる各畳み込み演算行列Qm,nについて、予め回転情報を回転情報記憶手段34に記憶させておく。
When the convolution calculation matrix
図12は、畳み込み演算行列Qm,nの回転情報の説明図である。図12に示すように、畳み込み演算行列Qm,nを算出する際には、回転情報として、算出対象となる畳み込み演算行列Qm,nの座標(m,n)と中心座標(M/2,N/2)との距離r、および畳み込み演算行列Qm,nの座標(m,n)と中心座標(M/2,N/2)とを結ぶ線がライン60となす角度θがあればよい。
FIG. 12 is an explanatory diagram of the rotation information of the convolution calculation matrix Q m, n . As shown in FIG. 12, when calculating the convolution calculation matrix Q m, n , as rotation information , the coordinates (m, n) and center coordinates (M / 2) of the convolution calculation matrix Q m, n to be calculated are used. , N / 2) and the angle θ between the
r={(m−M/2)2+(n−N/2)2}1/2 ・・・・・・・・・・・・(21) r = {(m−M / 2) 2 + (n−N / 2) 2 } 1/2 (21)
θ=arctan{(m−M/2)/(n−N/2)} ・・・・・・・・・(22) θ = arctan {(m−M / 2) / (n−N / 2)} (22)
算出対象となる各畳み込み演算行列Qm,nについての回転情報は、上記式(21)および式(22)により算出される距離rおよび角度θである。そして、回転情報記憶手段34には、これらの距離rおよび角度θを、算出対象となる各畳み込み演算行列Qm,nについて記憶させておけばよいが、二焦点レンズ21が軸対称性を有することから、各畳み込み演算行列Qm,nの分布についても軸対称性が保持されるので、実際には、4象限のうちの1象限のみの各座標について記憶させておけばよい。従って、記憶させる情報量は、4分の1となる。
The rotation information about each convolution matrix Q m, n to be calculated is the distance r and the angle θ calculated by the above formulas (21) and (22). The rotation information storage means 34 may store the distance r and angle θ for each convolution matrix Q m, n to be calculated, but the
また、距離rを記憶する際に、端数が出た場合には、四捨五入等により整数化して記憶しておく。距離rは、ライン60上のいずれのサンプリング行列を回転させるかを決めるために記憶するものである。なお、端数があるままの状態で記憶しておき、畳み込み演算行列回転算出手段35による演算処理を行う際に、四捨五入等により整数化し、いずれのサンプリング行列を回転させるかを決めてもよい。また、いずれのサンプリング行列を回転させるかを決めることができればよいので、距離rではなく、サンプリング行列を特定するための番号等の識別情報を記憶しておいてもよい。
Further, when the distance r is stored, if a fraction is obtained, it is converted into an integer by rounding off or the like and stored. The distance r is stored to determine which sampling matrix on the
さらに、上記のようにサンプリング行列を特定するための番号等の識別情報(距離r以外の識別情報)を回転情報記憶手段34に記憶させる場合には、ライン60上の全ての座標についての畳み込み演算行列Qm,nをサンプリング行列として畳み込み演算行列記憶手段32,33に記憶しておく必要はなく、各畳み込み演算行列Qm,nの分布が略同じになる範囲の各座標については、それらのうちの一つの畳み込み演算行列Qm,nのみを記憶させてもよい。つまり、ライン60上において間隔を置いて定められた特定座標についての畳み込み演算行列Qm,nのみを記憶してもよい。
Further, when the rotation information storage means 34 stores identification information such as numbers (identification information other than the distance r) for specifying the sampling matrix as described above, a convolution operation for all coordinates on the
そして、上記の場合と同様に、ライン60上において間隔を置いて定められた特定座標についての畳み込み演算行列Qm,nのみを、サンプリング行列として畳み込み演算行列記憶手段32,33に記憶させる場合には、回転情報記憶手段34に記憶させる距離を、次のように決めてもよい。すなわち、前述した式(21)による距離rの算出処理で端数が出たか否かにかかわらず、式(21)により算出された距離rをそのまま記憶するのではなく、各サンプリング行列Qm,nに対応する複数の特定距離の中から、式(21)により算出された距離rが最も近いものを選択し、その選択された特定距離を、回転情報記憶手段34に記憶させるようにしてもよい。例えば、特定距離3,6,9,12,…の複数のサンプリング行列Qm,nが用意されているものとすると、式(21)により算出された距離rが、6.5や7の場合には、6が近いので特定距離6を記憶し、8や8.5の場合には、9が近いので特定距離9を記憶する。なお、式(21)により算出された距離rが、特定距離のいずれかと丁度同じになった場合には、その特定距離を記憶する。
Similarly to the case described above, when only the convolution calculation matrix Q m, n for specific coordinates determined at intervals on the
なお、以上の説明では、被写体座標系(s,t)および画像座標系(h,k)は、被写体行列Aおよび画像行列Zの行番号や列番号に対応させて各座標値が正の値のみをとるように設定され、これらの被写体座標系(s,t)および画像座標系(h,k)における1点を示す座標(m,n)は、1≦m≦M、1≦n≦Nの範囲で動くものとされていた。従って、被写体や撮像素子24の中央位置の座標は(M/2,N/2)として説明されていた。しかし、回転計算の簡易化や対称位置の把握容易性等の観点から、被写体座標系(s,t)および画像座標系(h,k)を、各座標値が正負の値をとるように設定し、例えば、被写体や撮像素子24の中央位置の座標が(0,0)になるようにして、座標(m,n)が−M/2≦m≦M/2、−N/2≦n≦N/2の範囲で動くようにしてもよい。従って、本願の請求項における各座標系の設定も、説明のための便宜上の設定であり、本発明は、請求項に記載された表現形式の設定に限定されるものではなく、実質的に同様な処理を行うことができる設定であればよい。
In the above description, in the subject coordinate system (s, t) and the image coordinate system (h, k), each coordinate value is a positive value corresponding to the row number and column number of the subject matrix A and the image matrix Z. The coordinates (m, n) indicating one point in the subject coordinate system (s, t) and the image coordinate system (h, k) are 1 ≦ m ≦ M, 1 ≦ n ≦ It was supposed to move in the range of N. Accordingly, the coordinates of the subject and the center position of the
このような本実施形態においては、以下のようにして画像改質処理装置30により、二焦点レンズ21を用いて被写体を撮像して得られた画像の質の改善が図られる。
In the present embodiment, the image
先ず、被写体の撮像を行う前に、式(18)に基づき、ライン50(図7参照)上の各座標(m,n)についてのPSF行列Wm,nの各要素Wm,n(x,y)の値を用い、ライン60(図8参照)上の各座標(m,n)についての畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値を予め算出し、サンプリング行列として画像改質処理装置30の畳み込み演算行列記憶手段32,33に記憶しておく。なお、記憶するのは、非零要素を含む行列部分H(図4参照)の各値のみでよく、しかもライン60上では図6に示すように上下対称の分布なので、上側半分の各値のみでよい。
First, before imaging the subject, each element W m, n (x of the PSF matrix W m, n for each coordinate (m, n) on the line 50 (see FIG. 7) is obtained based on the equation (18). , Y), the value of each element Q m, n (x, y) of the convolution matrix Q m, n for each coordinate (m, n) on the line 60 (see FIG. 8) is calculated in advance. Then, it is stored in the convolution operation matrix storage means 32 and 33 of the
また、式(21)および式(22)により、サンプリング行列以外の畳み込み演算行列Qm,nの回転情報(距離rおよび角度θ)を予め算出し、画像改質処理装置30の回転情報記憶手段34に記憶させておく。
Further, rotation information (distance r and angle θ) of the convolution calculation matrix Q m, n other than the sampling matrix is calculated in advance by Expression (21) and Expression (22), and rotation information storage means of the image
次に、通常の被写体または近接被写体のいずれを撮像するのかを判断し、切替操作手段37の切替選択操作を行った後、撮像機構20により被写体を撮像する。この際、被写体から発せられた光は、二焦点レンズ21の各レンズ部22,23を通過して撮像素子24に至る。そして、被写体からの光を受けた撮像素子24の出力信号を引き出して画像改質処理装置30に取り込み、出力信号記憶手段31に記憶する。
Next, it is determined whether a normal subject or a close subject is to be imaged, and a switching selection operation of the switching
続いて、畳み込み演算行列回転算出手段35により、畳み込み演算行列記憶手段32,33のいずれかに記憶されたサンプリング行列Qm,nの各要素Qm,n(x,y)の値(図6のような上下対称な分布のうち、図4に示した非零要素を含む行列部分Hに相当する部分の上側半分の各値)と、回転情報記憶手段34に記憶された回転情報とを用い、サンプリング行列以外の畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値を算出する。 Subsequently, the value of each element Q m, n (x, y) of the sampling matrix Q m, n stored in either of the convolution calculation matrix storage means 32 or 33 by the convolution calculation matrix rotation calculation means 35 (FIG. 6). 4), and the rotation information stored in the rotation information storage means 34, and the rotation information stored in the rotation information storage means 34. The value of each element Q m, n (x, y) of the convolution matrix Q m, n other than the sampling matrix is calculated.
さらに、再生演算手段36により、畳み込み演算行列記憶手段32,33のいずれかに記憶された各要素Qm,n(x,y)の値および畳み込み演算行列回転算出手段35により算出された各要素Qm,n(x,y)の値(図4の行列部分Hの各値)と、出力信号記憶手段31に記憶された画像の出力信号を示す画像行列Zの各要素Z(m+x,n+y)の値とを用い、式(19)に基づき被写体行列Aの各要素A(m,n)の値を算出する。 Further, the value of each element Q m, n (x, y) stored in one of the convolution calculation matrix storage means 32 and 33 and each element calculated by the convolution calculation matrix rotation calculation means 35 by the reproduction calculation means 36. The value of Q m, n (x, y) (each value of the matrix portion H in FIG. 4) and each element Z (m + x, n + y) of the image matrix Z indicating the output signal of the image stored in the output signal storage means 31 ) And the value of each element A (m, n) of the subject matrix A is calculated based on the equation (19).
その後、求めた被写体行列Aの各要素A(m,n)の値を用い、撮像対象となった被写体を表示手段40の画面上に表示する。また、必要に応じ、図示されないプリンター等の出力手段により、被写体の印刷を行ってもよい。 Thereafter, using the value of each element A (m, n) of the obtained subject matrix A, the subject that is the imaging target is displayed on the screen of the display means 40. If necessary, the subject may be printed by an output unit such as a printer (not shown).
このような本実施形態によれば、次のような効果がある。すなわち、画像改質処理装置30は、再生演算手段36を備えているので、被写体を二焦点レンズ21により撮像した際に、畳み込み演算行列記憶手段32,33に記憶された畳み込み演算行列Qm,nの各要素Qm,n(x,y)のうちの少なくとも一部の値と、撮像して得られた画像の出力信号を示す画像行列Zの各要素Z(m+x,n+y)の値とを用い、式(19)に基づき被写体行列Aの各要素A(m,n)の値を算出することができる。
According to this embodiment, there are the following effects. That is, since the image
この際、再生演算手段36による演算処理は、式(19)に基づき予め算出されて畳み込み演算行列記憶手段32,33に記憶された畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値を用いて行われるので、式(3)に示すようなM×N行M×N列の巨大逆変換行列Tg -1を用いて演算処理を行う場合に比べ、非常に少ない計算量で、被写体行列Aの各要素A(m,n)の値を算出することができる。 At this time, the calculation processing by the reproduction calculation means 36 is performed by calculating each element Q m, n (x of the convolution calculation matrix Q m, n calculated in advance based on the equation (19) and stored in the convolution calculation matrix storage means 32 and 33. , Y) using the value of M, N rows, M × N columns and a large inverse transformation matrix T g −1 as shown in equation (3). The value of each element A (m, n) of the subject matrix A can be calculated with a small amount of calculation.
従って、CPUに要求される性能の条件が緩和されるので、例えば携帯電話機や携帯情報端末等の携帯型の情報端末装置に搭載されている程度のCPUの能力でも、被写体の再生を短時間の処理で実行することができる。このため、携帯型の情報端末装置に画像改質処理装置30を搭載すれば、画像改質機能を備えた携帯型の情報端末装置を実現でき、情報端末装置の使い勝手や性能の向上を図ることができる。
Accordingly, since the performance condition required for the CPU is relaxed, the reproduction of the subject can be performed in a short time even with the capability of the CPU installed in a portable information terminal device such as a cellular phone or a portable information terminal. Can be executed in the process. Therefore, if the image
また、畳み込み演算行列記憶手段32,33には、ライン60(図8参照)上の各座標(m,n)についての畳み込み演算行列Qm,nが記憶されているので、再生演算手段36により、ぼけの形状が各画素で異なることを考慮した画像改質処理を行うことができる。このため、全ての画素で同じ形状のぼけが発生すると仮定した画像改質処理を行う場合に比べ、画像改質効果をより一層高めることができる。 Further, the convolution calculation matrix storage means 32 and 33 store the convolution calculation matrix Q m, n for each coordinate (m, n) on the line 60 (see FIG. 8). In addition, it is possible to perform image modification processing considering that the shape of blur is different for each pixel. For this reason, the image modification effect can be further enhanced as compared with the case of performing the image modification process assuming that the same shape blur occurs in all the pixels.
さらに、画像改質処理装置30は、回転情報記憶手段34および畳み込み演算行列回転算出手段35を備えているので、二焦点レンズ21の軸対称を利用し、光軸位置(被写体や撮像素子24の中央位置)を中心として、サンプリング行列として畳み込み演算行列記憶手段32,33に記憶されたライン60(図8参照)上の各座標(m,n)についての畳み込み演算行列Qm,nを回転させることにより、その他の座標についての畳み込み演算行列Qm,nを算出することができる。このため、畳み込み演算行列記憶手段32,33に記憶させるデータ量を減らすことができる。
Furthermore, since the image
そして、畳み込み演算行列回転算出手段35は、図10に示すように、第一区画領域の所定位置(本実施形態では、中央位置)に重なる第二区画領域を求め、その第二区画領域の値によりサンプリング行列以外の畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値を算出決定する構成とされているので、式(20)により面積割合に基づく加重平均を算出して第一区画領域に対応する要素Qm,n(x,y)の値を厳密に算出する場合に比べ、処理内容を簡単にすることができ、処理時間の短縮を図ることができる。
Then, as shown in FIG. 10, the convolution calculation matrix
また、画像改質処理装置30は、切替操作手段37を備えているので、撮像する被写体の距離に応じ、畳み込み演算行列記憶手段32,33のデータを切替選択して被写体の再生演算を行うことができる。このため、被写体が標準的な距離にある通常の被写体およびこれよりも近距離にある近接被写体のいずれの場合であっても、二焦点レンズ21を構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像から、ピントの合った画像を求める画像改質処理を、短時間の処理で実現することができ、通常の被写体および近接被写体のいずれについても鮮明な画像を得ることができる。
In addition, since the image
なお、本発明は前記実施形態に限定されるものではなく、本発明の目的を達成できる範囲内での変形等は本発明に含まれるものである。 Note that the present invention is not limited to the above-described embodiment, and modifications and the like within a scope where the object of the present invention can be achieved are included in the present invention.
すなわち、前記実施形態では、畳み込み演算行列回転算出手段35は、図10に示すように、第一区画領域の所定位置(本実施形態では、中央位置)に重なる第二区画領域を求め、求めた第二区画領域の値により第一区画領域に対応する要素Qm,n(x,y)の値を算出決定する構成とされていたが、本発明における畳み込み演算行列回転算出手段は、第二区画領域の所定位置(例えば、中央位置)が重なっている第一区画領域を求め、求めた第一区画領域に対応する要素Qm,n(x,y)の値として、この第一区画領域に所定位置が重なっている第二区画領域の値を採用する構成としてもよい。例えば、図10の場合には、f16の第二区画領域の中央位置が重なっている第一区画領域は、ハッチングされた中央の第一区画領域であるから、この中央の第一区画領域の値として、f16を採用する。
That is, in the above-described embodiment, the convolution calculation matrix
また、前記実施形態では、二焦点レンズ21に本発明が適用されていたが、本発明は、単焦点レンズに適用してもよい。図13には、二焦点レンズ21および単焦点レンズ90のぼけの形状(単一輝点からの光の拡がりを示すPSF行列Wm,nの分布)の比較結果が示されている。
Moreover, in the said embodiment, although this invention was applied to the
図13において、標準的な距離にある通常の被写体を二焦点レンズ21により撮像した場合のPSF行列Wm,nの分布は、長焦点レンズ部22を理想的なレンズであると考えたときにこの長焦点レンズ部22によりピントの合った画像が形成されるWm,n(0,0)を中心とし、実際の長焦点レンズ部22によりWm,n(0,0)の周囲に形成される略中実円形状または略中実楕円形状の若干のぼけ部分80と、短焦点レンズ部23により形成されるリング状(略円環状または略楕円環状)のぼけ部分81とを備えている。
In FIG. 13, the distribution of the PSF matrix W m, n when a normal subject at a standard distance is imaged by the
また、標準的な距離よりも近い距離にある近接被写体を二焦点レンズ21により撮像した場合のPSF行列Wm,nの分布は、短焦点レンズ部23を理想的なレンズであると考えたときにこの短焦点レンズ部23によりピントの合った画像が形成されるWm,n(0,0)を中心とし、実際の短焦点レンズ部23によりWm,n(0,0)の周囲に形成される略中実円形状または略中実楕円形状の若干のぼけ部分82と、長焦点レンズ部22により形成される略中実円形状または略中実楕円形状のぼけ部分83とを備えている。これらのぼけ部分82,83は、重なっている。
In addition, the distribution of the PSF matrix W m, n in the case where an object close to the standard distance is imaged by the
さらに、標準的な距離にある通常の被写体またはこれよりも近い距離にある近接被写体を単焦点レンズ90により撮像した場合のPSF行列Wm,nの分布は、単焦点レンズ90を理想的なレンズであると考えたときにこの単焦点レンズ90によりピントの合った画像が形成されるWm,n(0,0)を中心とし、実際の単焦点レンズ90によりWm,n(0,0)の周囲に形成される略中実円形状または略中実楕円形状の若干のぼけ部分91を備えている。単焦点レンズ90によるぼけ部分91の形成は、通常の被写体を二焦点レンズ21により撮像した場合における長焦点レンズ部22によるぼけ部分80の形成、および近接被写体を二焦点レンズ21により撮像した場合における短焦点レンズ部23によるぼけ部分82の形成と原理的には同様の意味合いを持つものである。
Furthermore, the distribution of the PSF matrix W m, n when a normal subject at a standard distance or a close subject at a shorter distance is imaged by the
本発明では、再生演算手段36による被写体の再生演算処理で用いる畳み込み演算行列Qm,n(x,y)を定義するためのPSF行列Wm,n(x,y)を、次のように定めることができる。先ず、通常の被写体を二焦点レンズ21により撮像した場合には、ぼけ部分80については、ぼけ部分81と同等に取り扱ってもよく、あるいは、ぼけ部分80の各要素の値を合計してWm,n(0,0)の値を置き換え、かつ、Wm,n(0,0)を除くぼけ部分80の各要素の値をゼロにしてもよい。後者の場合は、理想的な長焦点レンズ部22によりWm,n(0,0)に完全にピントが合った画像が形成された場合と同様な分布にするものである。
In the present invention, a PSF matrix W m, n (x, y) for defining a convolution calculation matrix Q m, n (x, y) used in subject reproduction calculation processing by the reproduction calculation means 36 is as follows. Can be determined. First, when an image by an ordinary subject
次に、近接被写体を二焦点レンズ21により撮像した場合には、ぼけ部分82については、ぼけ部分83と同等に取り扱ってもよく、あるいは、ぼけ部分82の各要素の値(実際には、長焦点レンズ部22によるぼけ部分83の画像の出力信号値が重なっているが、この値の大きさは小さいので、短焦点レンズ部23によるぼけ部分82の画像の出力信号値のみであると考えてよい。)を合計してWm,n(0,0)の値を置き換え、かつ、Wm,n(0,0)を除くぼけ部分82の各要素の値をゼロにしてもよい。後者の場合は、理想的な短焦点レンズ部23によりWm,n(0,0)に完全にピントが合った画像が形成された場合と同様な分布にするものである。
Next, when a close subject is imaged by the
さらに、通常の被写体または近接被写体を単焦点レンズ90により撮像した場合には、ぼけ部分91の各要素の値を合計してWm,n(0,0)の値を置き換えると、ぼけの部分が無くなってしまい、意味を成さないので、この方法は採用せず、Wm,n(0,0)の値はそのままの値とする。
Further, when a normal subject or a close subject is imaged by the
以上のように、本発明の画像改質処理方法およびその装置、プログラム、並びにデータ記録媒体は、例えば、携帯情報端末(PDA:Personal Digital Assistants)、携帯電話機(PHS:Personal Handy phone Systemを含む。)、テレビジョンやビデオ等の家電機器の操作用のリモート・コントロール装置、カメラ付パーソナル・コンピュータ、および監視カメラ装置等の二焦点レンズや単焦点レンズによる画像入力機能を持つ情報端末装置などに適用することができる。 As described above, the image modification processing method and apparatus, the program, and the data recording medium of the present invention include, for example, a personal digital assistant (PDA) and a personal handy phone system (PHS). ), Remote control device for operation of household appliances such as television and video, personal computer with camera, and information terminal device with image input function by bifocal lens and single focus lens such as surveillance camera device can do.
21 二焦点レンズ
22 一方または他方のレンズ部に該当する長焦点レンズ部
23 一方または他方のレンズ部に該当する短焦点レンズ部
24 撮像素子
30 画像改質処理装置
32,33 畳み込み演算行列記憶手段
35 畳み込み演算行列回転算出手段
36 再生演算手段
A 被写体行列
Z 画像行列
E,H 非零要素を含む行列部分
Wm,n 座標(m,n)についてのポイント・スプレッド・ファンクション行列
Qm,n 座標(m,n)についての畳み込み演算行列
DESCRIPTION OF
Claims (10)
撮像素子の大きさをM画素×N画素とし、被写体の発する光の明るさを示すM行N列の行列をAとし、前記被写体を前記レンズにより撮像して得られた画像の出力信号を示すM行N列の行列をZとし、被写体座標系の1点(m,n)から出た光の結像位置が画像座標系の1点(m,n)となるように前記被写体座標系および前記画像座標系を設定したとき、
畳み込み演算処理を行うための座標(m,n)についての(2M−1)行(2N−1)列の畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値のうち少なくとも非零要素を含む行列部分の値を、各座標(m,n)の全部または一部について、下式(A−1)に基づき予め算出して畳み込み演算行列記憶手段に記憶しておき、
前記被写体を前記レンズにより撮像した際に、再生演算手段により、前記畳み込み演算行列記憶手段に記憶された各要素Qm,n(x,y)のうちの少なくとも一部の値と前記画像の出力信号の行列Zの各要素Z(m+x,n+y)の値とを用いて下式(A−2)に基づき前記被写体の行列Aの各要素A(m,n)の値を算出することを特徴とする画像改質処理方法。
Qm,n(x,y)=1/Wm,n(0,0)
(x=0,y=0の場合)
=−Wm,n(−x,−y)/Wm,n(0,0)power
(x=0,y=0以外の場合)
・・・・・・・・・・・・・・・・・・・・・・(A−1)
A(m,n)=ΣxΣyQm,n(x,y)Z(m+x,n+y)
・・・・・・・・・・・・・・・・・・・・・・(A−2)
ここで、
xおよびyは整数で、(1−M)≦x≦(M−1)、(1−N)≦y≦(N−1)であり、
mおよびnは自然数で、1≦m≦M、1≦n≦Nであり、
Wm,n(x,y)は、(2M−1)行(2N−1)列の行列Wm,nの各要素の値であり、この行列Wm,nは、前記被写体の1点(m,n)から出た光が前記レンズの作用により前記撮像素子上で拡がる状態を示すポイント・スプレッド・ファンクション行列であり、Wm,n(0,0)は、拡がりの中心部分に位置する画素の出力信号の値であり、Wm,n(−x,−y)は、周囲のぼけ部分に位置する画素の出力信号の値であり、
powerは、Wm,n(0,0)のべき乗数となる実数で、1≦power≦2であり、
Σxは、x=(1−M)〜(M−1)の和であり、Σyは、y=(1−N)〜(N−1)の和である。 An image modification processing method for modifying a blurred image formed by a lens into a focused image,
The size of the image sensor is M pixels × N pixels, the matrix of M rows and N columns indicating the brightness of light emitted from the subject is A, and an output signal of an image obtained by imaging the subject with the lens is shown. The matrix of M rows and N columns is Z, and the object coordinate system and the object coordinate system are set so that the imaging position of light emitted from one point (m, n) in the subject coordinate system is one point (m, n) in the image coordinate system. When setting the image coordinate system,
The value of each element Q m, n (x, y) of the (2M-1) row (2N-1) column convolution matrix Q m, n for the coordinates (m, n) for performing the convolution operation processing Among them, the values of the matrix part including at least non-zero elements are calculated in advance for all or part of each coordinate (m, n) based on the following equation (A-1) and stored in the convolution matrix storage means. ,
When the subject is imaged by the lens, the reproduction calculation means outputs at least a part of values of each element Q m, n (x, y) stored in the convolution calculation matrix storage means and the output of the image The value of each element A (m, n) of the subject matrix A is calculated based on the following equation (A-2) using the value of each element Z (m + x, n + y) of the signal matrix Z. An image modification processing method.
Q m, n (x, y) = 1 / W m, n (0,0)
(When x = 0, y = 0)
= −W m, n (−x, −y) / W m, n (0,0) power
(When other than x = 0, y = 0)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (A-1)
A (m, n) = Σ x Σ y Q m, n (x, y) Z (m + x, n + y)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (A-2)
here,
x and y are integers, (1-M) ≦ x ≦ (M−1), (1-N) ≦ y ≦ (N−1),
m and n are natural numbers, 1 ≦ m ≦ M, 1 ≦ n ≦ N,
W m, n (x, y) is the value of each element of the matrix W m, n of (2M-1) rows (2N-1) columns, and this matrix W m, n is one point of the subject. (M , n ) is a point spread function matrix indicating a state in which light emitted from (m, n) spreads on the image pickup device by the action of the lens, and W m, n (0, 0) is located at the center of the spread W m, n (−x, −y) is the value of the output signal of the pixel located in the surrounding blurred portion,
power is a real number that is a power of W m, n (0, 0), and 1 ≦ power ≦ 2.
The sigma x, the sum of x = (1-M) ~ (M-1), Σ y is the sum of y = (1-N) ~ (N-1).
各座標(m,n)についての畳み込み演算行列Qm,nのうち、光軸位置から一方向に延びる直線上に並ぶ座標についての畳み込み演算行列Qm,nをサンプリング行列として選択し、
前記畳み込み演算行列記憶手段には、前記サンプリング行列Qm,nの各要素Qm,n(x,y)の値のみを記憶させておき、
その他の座標についての畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値は、畳み込み演算行列回転算出手段により、前記レンズの軸対称を利用して、前記サンプリング行列Qm,nの各要素Qm,n(x,y)の値の配置を前記光軸位置を中心として回転させることにより算出する
ことを特徴とする画像改質処理方法。 The image modification processing method according to claim 1,
Of the convolution matrix Q m, n for each coordinate (m, n), select the convolution matrix Q m, n for coordinates aligned on a straight line extending in one direction from the optical axis position as the sampling matrix,
In the convolution calculation matrix storage means, only the value of each element Q m, n (x, y) of the sampling matrix Q m, n is stored,
The value of each element Q m, n (x, y) of the convolution matrix Q m, n for other coordinates is calculated by the convolution matrix rotation calculation means using the axial symmetry of the lens, and the sampling matrix Q m, each element Q m of n, n (x, y) image modification processing method and calculating by rotating the arrangement of values of about said optical axis position.
前記畳み込み演算行列回転算出手段により前記その他の座標についての畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値を算出する際には、
前記サンプリング行列Qm,nの各要素Qm,n(x,y)の値の配置を回転させたときに、
算出対象となる畳み込み演算行列Qm,nの要素Qm,n(x,y)に対応する第一区画領域の所定位置に重なる回転後の前記サンプリング行列Qm,nの要素Qm,n(x,y)に対応する第二区画領域を求め、求めた第二区画領域に対応する要素Qm,n(x,y)の値を、算出対象となる畳み込み演算行列Qm,nの要素Qm,n(x,y)の値として採用するか、
または、前記第二区画領域の所定位置が重なっている前記第一区画領域を求め、求めた前記第一区画領域に対応する要素Qm,n(x,y)の値として、この第一区画領域に前記所定位置が重なっている前記第二区画領域に対応する要素Qm,n(x,y)の値を採用する
ことを特徴とする画像改質処理方法。 The image modification processing method according to claim 2,
When calculating the value of each element Q m, n (x, y) of the convolution matrix Q m, n for the other coordinates by the convolution matrix rotation calculation means,
When the arrangement of values of each element Q m, n (x, y) of the sampling matrix Q m, n is rotated,
A calculation target convolution matrix Q m, element Q m of n, n (x, y) the sampling matrix Q after rotation overlapping the predetermined position of the first divided area corresponding to the m, n elements Q m of, n A second partition region corresponding to (x, y) is obtained, and the value of the element Q m, n (x, y) corresponding to the obtained second partition region is calculated from the convolution operation matrix Q m, n to be calculated. Adopted as the value of element Q m, n (x, y),
Alternatively, the first partition area where the predetermined positions of the second partition area overlap is obtained, and the value of the element Q m, n (x, y) corresponding to the calculated first partition area is determined as the first partition area. A value of an element Q m, n (x, y) corresponding to the second partitioned area where the predetermined position overlaps the area is adopted.
前記レンズは、二焦点レンズであり、
前記行列Zは、前記二焦点レンズを構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像の出力信号を示す行列であり、
前記ポイント・スプレッド・ファンクション行列Wm,nは、主として前記一方のレンズ部の作用によりWm,n(0,0)の値が定まり、主として前記他方のレンズ部の作用によりWm,n(−x,−y)の値が定まる
ことを特徴とする画像改質処理方法。 In the image modification processing method according to any one of claims 1 to 3,
The lens is a bifocal lens;
The matrix Z indicates an output signal of an image in which an in-focus image formed by one lens unit constituting the bifocal lens and an in-focus image formed by the other lens unit overlap each other. Matrix
In the point spread function matrix W m, n , the value of W m, n (0,0) is determined mainly by the action of the one lens part, and W m, n ( An image modification processing method characterized in that a value of -x, -y) is determined.
撮像素子の大きさをM画素×N画素とし、被写体の発する光の明るさを示すM行N列の行列をAとし、前記被写体を前記レンズにより撮像して得られた画像の出力信号を示すM行N列の行列をZとし、被写体座標系の1点(m,n)から出た光の結像位置が画像座標系の1点(m,n)となるように前記被写体座標系および前記画像座標系を設定したとき、
各座標(m,n)の全部または一部について、下式(B−1)に基づき算出された畳み込み演算処理を行うための座標(m,n)についての(2M−1)行(2N−1)列の畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値のうち少なくとも非零要素を含む行列部分の値を記憶する畳み込み演算行列記憶手段と、
この畳み込み演算行列記憶手段に記憶された各要素Qm,n(x,y)のうちの少なくとも一部の値と前記画像の出力信号の行列Zの各要素Z(m+x,n+y)の値とを用いて下式(B−2)に基づき前記被写体の行列Aの各要素A(m,n)の値を算出する再生演算手段と
を備えたことを特徴とする画像改質処理装置。
Qm,n(x,y)=1/Wm,n(0,0)
(x=0,y=0の場合)
=−Wm,n(−x,−y)/Wm,n(0,0)power
(x=0,y=0以外の場合)
・・・・・・・・・・・・・・・・・・・・・・(B−1)
A(m,n)=ΣxΣyQm,n(x,y)Z(m+x,n+y)
・・・・・・・・・・・・・・・・・・・・・・(B−2)
ここで、
xおよびyは整数で、(1−M)≦x≦(M−1)、(1−N)≦y≦(N−1)であり、
mおよびnは自然数で、1≦m≦M、1≦n≦Nであり、
Wm,n(x,y)は、(2M−1)行(2N−1)列の行列Wm,nの各要素の値であり、この行列Wm,nは、前記被写体の1点(m,n)から出た光が前記レンズの作用により前記撮像素子上で拡がる状態を示すポイント・スプレッド・ファンクション行列であり、Wm,n(0,0)は、拡がりの中心部分に位置する画素の出力信号の値であり、Wm,n(−x,−y)は、周囲のぼけ部分に位置する画素の出力信号の値であり、
powerは、Wm,n(0,0)のべき乗数となる実数で、1≦power≦2であり、
Σxは、x=(1−M)〜(M−1)の和であり、Σyは、y=(1−N)〜(N−1)の和である。 An image modification processing apparatus for modifying a blurred image formed by a lens into a focused image,
The size of the image sensor is M pixels × N pixels, the matrix of M rows and N columns indicating the brightness of light emitted from the subject is A, and an output signal of an image obtained by imaging the subject with the lens is shown. The matrix of M rows and N columns is Z, and the object coordinate system and the object coordinate system are set so that the imaging position of light emitted from one point (m, n) in the subject coordinate system is one point (m, n) in the image coordinate system. When setting the image coordinate system,
For all or part of each coordinate (m, n), (2M−1) rows (2N−) for the coordinates (m, n) for performing the convolution calculation processing calculated based on the following equation (B-1) 1) Convolution operation matrix storage means for storing values of matrix portions including at least non-zero elements among the values of each element Q m, n (x, y) of the column convolution operation matrix Q m, n ;
The value of at least a part of each element Q m, n (x, y) stored in the convolution calculation matrix storage means and the value of each element Z (m + x, n + y) of the matrix Z of the output signal of the image, An image modification processing apparatus comprising: a reproduction calculation means for calculating a value of each element A (m, n) of the matrix A of the subject based on the following formula (B-2) using:
Q m, n (x, y) = 1 / W m, n (0,0)
(When x = 0, y = 0)
= −W m, n (−x, −y) / W m, n (0,0) power
(When other than x = 0, y = 0)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (B-1)
A (m, n) = Σ x Σ y Q m, n (x, y) Z (m + x, n + y)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (B-2)
here,
x and y are integers, (1-M) ≦ x ≦ (M−1), (1-N) ≦ y ≦ (N−1),
m and n are natural numbers, 1 ≦ m ≦ M, 1 ≦ n ≦ N,
W m, n (x, y) is the value of each element of the matrix W m, n of (2M-1) rows (2N-1) columns, and this matrix W m, n is one point of the subject. (M , n ) is a point spread function matrix indicating a state in which light emitted from (m, n) spreads on the image pickup device by the action of the lens, and W m, n (0, 0) is located at the center of the spread W m, n (−x, −y) is the value of the output signal of the pixel located in the surrounding blurred portion,
power is a real number that is a power of W m, n (0, 0), and 1 ≦ power ≦ 2.
The sigma x, the sum of x = (1-M) ~ (M-1), Σ y is the sum of y = (1-N) ~ (N-1).
前記畳み込み演算行列記憶手段には、各座標(m,n)についての畳み込み演算行列Qm,nのうち光軸位置から一方向に延びる直線上に並ぶ座標についての畳み込み演算行列Qm,nがサンプリング行列として選択されてこのサンプリング行列Qm,nの各要素Qm,n(x,y)の値のみが記憶され、
その他の座標についての畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値を、前記レンズの軸対称を利用して、前記サンプリング行列Qm,nの各要素Qm,n(x,y)の値の配置を前記光軸位置を中心として回転させることにより算出する畳み込み演算行列回転算出手段を備えた
ことを特徴とする画像改質処理装置。 The image modification processing apparatus according to claim 5,
The said convolution matrix storage means, the coordinates (m, n) convolution matrix Q m in the convolution operation matrix Q m of coordinates aligned on a straight line extending from the optical axis position in one direction of n, n is Only the value of each element Q m, n (x, y) of this sampling matrix Q m, n selected as the sampling matrix is stored,
The values of the elements Q m, n (x, y) of the convolution arithmetic matrix Q m, n for other coordinates are used as the elements Q m of the sampling matrix Q m, n using the axial symmetry of the lens. , n (x, y) is provided with convolution operation matrix rotation calculating means for calculating by rotating the arrangement of values about the optical axis position.
前記畳み込み演算行列回転算出手段は、
前記サンプリング行列Qm,nの各要素Qm,n(x,y)の値の配置を回転させたときに、
算出対象となる畳み込み演算行列Qm,nの要素Qm,n(x,y)に対応する第一区画領域の所定位置に重なる回転後の前記サンプリング行列Qm,nの要素Qm,n(x,y)に対応する第二区画領域を求め、求めた第二区画領域に対応する要素Qm,n(x,y)の値を、算出対象となる畳み込み演算行列Qm,nの要素Qm,n(x,y)の値として採用するか、
または、前記第二区画領域の所定位置が重なっている前記第一区画領域を求め、求めた前記第一区画領域に対応する要素Qm,n(x,y)の値として、この第一区画領域に前記所定位置が重なっている前記第二区画領域に対応する要素Qm,n(x,y)の値を採用する構成とされている
ことを特徴とする画像改質処理装置。 The image modification processing apparatus according to claim 6,
The convolution operation matrix rotation calculation means is:
When the arrangement of values of each element Q m, n (x, y) of the sampling matrix Q m, n is rotated,
A calculation target convolution matrix Q m, element Q m of n, n (x, y) the sampling matrix Q after rotation overlapping the predetermined position of the first divided area corresponding to the m, n elements Q m of, n A second partition region corresponding to (x, y) is obtained, and the value of the element Q m, n (x, y) corresponding to the obtained second partition region is calculated from the convolution operation matrix Q m, n to be calculated. Adopted as the value of element Q m, n (x, y),
Alternatively, the first partition area where the predetermined positions of the second partition area overlap is obtained, and the value of the element Q m, n (x, y) corresponding to the calculated first partition area is determined as the first partition area. An image modification processing apparatus characterized by adopting a value of an element Q m, n (x, y) corresponding to the second partitioned area where the predetermined position overlaps the area.
前記レンズは、二焦点レンズであり、
前記行列Zは、前記二焦点レンズを構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像の出力信号を示す行列であり、
前記ポイント・スプレッド・ファンクション行列Wm,nは、主として前記一方のレンズ部の作用によりWm,n(0,0)の値が定まり、主として前記他方のレンズ部の作用によりWm,n(−x,−y)の値が定まる
ことを特徴とする画像改質処理装置。 In the image modification processing apparatus according to any one of claims 5 to 7,
The lens is a bifocal lens;
The matrix Z indicates an output signal of an image in which an in-focus image formed by one lens unit constituting the bifocal lens and an in-focus image formed by the other lens unit overlap each other. Matrix
In the point spread function matrix W m, n , the value of W m, n (0,0) is determined mainly by the action of the one lens part, and W m, n ( An image modification processing apparatus characterized in that a value of -x, -y) is determined.
撮像素子の大きさをM画素×N画素とし、被写体の発する光の明るさを示すM行N列の行列をAとし、前記被写体を前記レンズにより撮像して得られた画像の出力信号を示すM行N列の行列をZとし、被写体座標系の1点(m,n)から出た光の結像位置が画像座標系の1点(m,n)となるように前記被写体座標系および前記画像座標系を設定したとき、
各座標(m,n)の全部または一部について、下式(C−1)に基づき算出された畳み込み演算処理を行うための座標(m,n)についての(2M−1)行(2N−1)列の畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値のうち少なくとも非零要素を含む行列部分の値を記憶する畳み込み演算行列記憶手段と、
この畳み込み演算行列記憶手段に記憶された各要素Qm,n(x,y)のうちの少なくとも一部の値と前記画像の出力信号の行列Zの各要素Z(m+x,n+y)の値とを用いて下式(C−2)に基づき前記被写体の行列Aの各要素A(m,n)の値を算出する再生演算手段と
を備えたことを特徴とする画像改質処理装置として、コンピュータを機能させるためのプログラム。
Qm,n(x,y)=1/Wm,n(0,0)
(x=0,y=0の場合)
=−Wm,n(−x,−y)/Wm,n(0,0)power
(x=0,y=0以外の場合)
・・・・・・・・・・・・・・・・・・・・・・(C−1)
A(m,n)=ΣxΣyQm,n(x,y)Z(m+x,n+y)
・・・・・・・・・・・・・・・・・・・・・・(C−2)
ここで、
xおよびyは整数で、(1−M)≦x≦(M−1)、(1−N)≦y≦(N−1)であり、
mおよびnは自然数で、1≦m≦M、1≦n≦Nであり、
Wm,n(x,y)は、(2M−1)行(2N−1)列の行列Wm,nの各要素の値であり、この行列Wm,nは、前記被写体の1点(m,n)から出た光が前記レンズの作用により前記撮像素子上で拡がる状態を示すポイント・スプレッド・ファンクション行列であり、Wm,n(0,0)は、拡がりの中心部分に位置する画素の出力信号の値であり、Wm,n(−x,−y)は、周囲のぼけ部分に位置する画素の出力信号の値であり、
powerは、Wm,n(0,0)のべき乗数となる実数で、1≦power≦2であり、
Σxは、x=(1−M)〜(M−1)の和であり、Σyは、y=(1−N)〜(N−1)の和である。 A program for causing a computer to function as an image modification processing device that modifies a blurred image formed by a lens into a focused image,
The size of the image sensor is M pixels × N pixels, the matrix of M rows and N columns indicating the brightness of light emitted from the subject is A, and an output signal of an image obtained by imaging the subject with the lens is shown. The matrix of M rows and N columns is Z, and the object coordinate system and the object coordinate system are set so that the imaging position of light emitted from one point (m, n) in the subject coordinate system is one point (m, n) in the image coordinate system. When setting the image coordinate system,
For all or part of each coordinate (m, n), (2M−1) rows (2N−) for the coordinates (m, n) for performing the convolution calculation processing calculated based on the following equation (C-1) 1) Convolution operation matrix storage means for storing values of matrix portions including at least non-zero elements among the values of each element Q m, n (x, y) of the column convolution operation matrix Q m, n ;
The value of at least a part of each element Q m, n (x, y) stored in the convolution calculation matrix storage means and the value of each element Z (m + x, n + y) of the matrix Z of the output signal of the image, An image modification processing apparatus comprising: a calculation unit that calculates a value of each element A (m, n) of the subject matrix A based on the following formula (C-2) using: A program that allows a computer to function.
Q m, n (x, y) = 1 / W m, n (0,0)
(When x = 0, y = 0)
= −W m, n (−x, −y) / W m, n (0,0) power
(When other than x = 0, y = 0)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (C-1)
A (m, n) = Σ x Σ y Q m, n (x, y) Z (m + x, n + y)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (C-2)
here,
x and y are integers, (1-M) ≦ x ≦ (M−1), (1-N) ≦ y ≦ (N−1),
m and n are natural numbers, 1 ≦ m ≦ M, 1 ≦ n ≦ N,
W m, n (x, y) is the value of each element of the matrix W m, n of (2M-1) rows (2N-1) columns, and this matrix W m, n is one point of the subject. (M , n ) is a point spread function matrix indicating a state in which light emitted from (m, n) spreads on the image pickup device by the action of the lens, and W m, n (0, 0) is located at the center of the spread W m, n (−x, −y) is the value of the output signal of the pixel located in the surrounding blurred portion,
power is a real number that is a power of W m, n (0, 0), and 1 ≦ power ≦ 2.
The sigma x, the sum of x = (1-M) ~ (M-1), Σ y is the sum of y = (1-N) ~ (N-1).
撮像素子の大きさをM画素×N画素とし、被写体の発する光の明るさを示すM行N列の行列をAとし、前記被写体を前記レンズにより撮像して得られた画像の出力信号を示すM行N列の行列をZとし、被写体座標系の1点(m,n)から出た光の結像位置が画像座標系の1点(m,n)となるように前記被写体座標系および前記画像座標系を設定したとき、
行列Zから行列Aを算出するために用いる行列として、各座標(m,n)の全部または一部について、下式(D−1)に基づき算出された畳み込み演算処理を行うための座標(m,n)についての(2M−1)行(2N−1)列の畳み込み演算行列Qm,nの各要素Qm,n(x,y)の値のうち少なくとも非零要素を含む行列部分の値を記録したコンピュータ読取り可能なデータ記録媒体。
Qm,n(x,y)=1/Wm,n(0,0)
(x=0,y=0の場合)
=−Wm,n(−x,−y)/Wm,n(0,0)power
(x=0,y=0以外の場合)
・・・・・・・・・・・・・・・・・・・・・・(D−1)
ここで、
xおよびyは整数で、(1−M)≦x≦(M−1)、(1−N)≦y≦(N−1)であり、
mおよびnは自然数で、1≦m≦M、1≦n≦Nであり、
Wm,n(x,y)は、(2M−1)行(2N−1)列の行列Wm,nの各要素の値であり、この行列Wm,nは、前記被写体の1点(m,n)から出た光が前記レンズの作用により前記撮像素子上で拡がる状態を示すポイント・スプレッド・ファンクション行列であり、Wm,n(0,0)は、拡がりの中心部分に位置する画素の出力信号の値であり、Wm,n(−x,−y)は、周囲のぼけ部分に位置する画素の出力信号の値であり、
powerは、Wm,n(0,0)のべき乗数となる実数で、1≦power≦2である。 A computer-readable data recording medium on which data used in an image modification process for modifying a blurred image formed by a lens into a focused image is recorded.
The size of the image sensor is M pixels × N pixels, the matrix of M rows and N columns indicating the brightness of light emitted from the subject is A, and an output signal of an image obtained by imaging the subject with the lens is shown. The matrix of M rows and N columns is Z, and the object coordinate system and the object coordinate system are set so that the imaging position of light emitted from one point (m, n) in the subject coordinate system is one point (m, n) in the image coordinate system. When setting the image coordinate system,
As a matrix used to calculate the matrix A from the matrix Z, the coordinates (m for performing the convolution calculation processing calculated based on the following equation (D-1) for all or part of the coordinates (m, n) , N) of the matrix part including at least non-zero elements among the values of each element Q m, n (x, y) of the (2M−1) row (2N−1) column convolution matrix Q m, n A computer-readable data recording medium on which values are recorded.
Q m, n (x, y) = 1 / W m, n (0,0)
(When x = 0, y = 0)
= −W m, n (−x, −y) / W m, n (0,0) power
(When other than x = 0, y = 0)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (D-1)
here,
x and y are integers, (1-M) ≦ x ≦ (M−1), (1-N) ≦ y ≦ (N−1),
m and n are natural numbers, 1 ≦ m ≦ M, 1 ≦ n ≦ N,
W m, n (x, y) is the value of each element of the matrix W m, n of (2M-1) rows (2N-1) columns, and this matrix W m, n is one point of the subject. (M , n ) is a point spread function matrix indicating a state in which light emitted from (m, n) spreads on the image pickup device by the action of the lens, and W m, n (0, 0) is located at the center of the spread W m, n (−x, −y) is the value of the output signal of the pixel located in the surrounding blurred portion,
power is a real number that is a power of W m, n (0, 0), and 1 ≦ power ≦ 2.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003295558A JP3855079B2 (en) | 2003-08-19 | 2003-08-19 | Image modification processing method and apparatus, program, and data recording medium |
| PCT/JP2004/002646 WO2005017829A1 (en) | 2003-08-19 | 2004-03-03 | Video quality improvement method and device thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003295558A JP3855079B2 (en) | 2003-08-19 | 2003-08-19 | Image modification processing method and apparatus, program, and data recording medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2005063323A true JP2005063323A (en) | 2005-03-10 |
| JP3855079B2 JP3855079B2 (en) | 2006-12-06 |
Family
ID=34191110
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2003295558A Expired - Fee Related JP3855079B2 (en) | 2003-08-19 | 2003-08-19 | Image modification processing method and apparatus, program, and data recording medium |
Country Status (2)
| Country | Link |
|---|---|
| JP (1) | JP3855079B2 (en) |
| WO (1) | WO2005017829A1 (en) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2006137355A1 (en) * | 2005-06-20 | 2006-12-28 | Riverbell Co., Ltd. | Multifocal lens and imaging system |
| JP2013038563A (en) * | 2011-08-08 | 2013-02-21 | Canon Inc | Image processing method, image processing apparatus, image pickup apparatus, and image processing program |
| JP2014064304A (en) * | 2013-11-13 | 2014-04-10 | Canon Inc | Image processing method, image processing apparatus, image pickup apparatus, and image processing program |
| US8774545B2 (en) | 2010-12-20 | 2014-07-08 | Canon Kabushiki Kaisha | Image processing apparatus and image processing method with weighted vectors for filtering |
| US8792015B2 (en) | 2011-08-08 | 2014-07-29 | Canon Kabushiki Kaisha | Image processing apparatus, image processing method, image pickup apparatus, and a non-transitory computer-readable storage medium |
| JP2015114740A (en) * | 2013-12-09 | 2015-06-22 | キヤノン株式会社 | Image processing method, image processing apparatus, imaging apparatus, and image processing program |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103971319B (en) * | 2013-05-13 | 2017-06-09 | 段然 | A kind of image processing method performed by computer |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS62127976A (en) * | 1985-11-29 | 1987-06-10 | Kyocera Corp | Image recording processor |
| JPH03181281A (en) * | 1989-12-08 | 1991-08-07 | Kyocera Corp | Picture processing method |
| JPH0414960A (en) * | 1990-05-09 | 1992-01-20 | Fujitsu Ltd | Color picture reader |
| JP4014512B2 (en) * | 2002-02-12 | 2007-11-28 | 株式会社リバーベル | Image modification processing method and apparatus, program, and data recording medium |
-
2003
- 2003-08-19 JP JP2003295558A patent/JP3855079B2/en not_active Expired - Fee Related
-
2004
- 2004-03-03 WO PCT/JP2004/002646 patent/WO2005017829A1/en not_active Ceased
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2006137355A1 (en) * | 2005-06-20 | 2006-12-28 | Riverbell Co., Ltd. | Multifocal lens and imaging system |
| US8774545B2 (en) | 2010-12-20 | 2014-07-08 | Canon Kabushiki Kaisha | Image processing apparatus and image processing method with weighted vectors for filtering |
| JP2013038563A (en) * | 2011-08-08 | 2013-02-21 | Canon Inc | Image processing method, image processing apparatus, image pickup apparatus, and image processing program |
| US8792015B2 (en) | 2011-08-08 | 2014-07-29 | Canon Kabushiki Kaisha | Image processing apparatus, image processing method, image pickup apparatus, and a non-transitory computer-readable storage medium |
| US9007482B2 (en) | 2011-08-08 | 2015-04-14 | Canon Kabushiki Kaisha | Image processing method, image processing apparatus, image pickup apparatus, and non-transitory computer-readable storage medium |
| JP2014064304A (en) * | 2013-11-13 | 2014-04-10 | Canon Inc | Image processing method, image processing apparatus, image pickup apparatus, and image processing program |
| JP2015114740A (en) * | 2013-12-09 | 2015-06-22 | キヤノン株式会社 | Image processing method, image processing apparatus, imaging apparatus, and image processing program |
Also Published As
| Publication number | Publication date |
|---|---|
| JP3855079B2 (en) | 2006-12-06 |
| WO2005017829A1 (en) | 2005-02-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8749694B2 (en) | Methods and apparatus for rendering focused plenoptic camera data using super-resolved demosaicing | |
| CN103685922B (en) | Image processing apparatus, image pickup apparatus, and image processing method | |
| JP6847718B6 (en) | How and devices to handle light field data | |
| US8665341B2 (en) | Methods and apparatus for rendering output images with simulated artistic effects from focused plenoptic camera data | |
| US9305375B2 (en) | High-quality post-rendering depth blur | |
| US8724000B2 (en) | Methods and apparatus for super-resolution in integral photography | |
| CN108432230B (en) | Imaging device and method for displaying an image of a scene | |
| US9535193B2 (en) | Image processing apparatus, image processing method, and storage medium | |
| CN102291527B (en) | Panoramic video roaming method and device based on single fisheye lens | |
| US20120242855A1 (en) | Device and method including function for reconstituting an image, and storage medium | |
| JP2004336106A (en) | Image processing apparatus, image processing method, and imaging apparatus | |
| KR101140953B1 (en) | Method and apparatus for correcting distorted image | |
| CN111669567A (en) | Multi-angle free visual angle video data generation method and device, medium and server | |
| CN111669518A (en) | Multi-angle free visual angle interaction method and device, medium, terminal and equipment | |
| JP3855079B2 (en) | Image modification processing method and apparatus, program, and data recording medium | |
| JP2013153375A (en) | Image processing apparatus, image processing method, and recording medium | |
| US20250016444A1 (en) | Image pickup apparatus capable of setting focus detection area to area that user wants to set for detectable subject, image processing apparatus, control method for image processing apparatus, control method for image pickup apparatus, and storage medium | |
| CN101534375B (en) | Method for correcting chromatic aberration | |
| WO2006137355A1 (en) | Multifocal lens and imaging system | |
| JP6531848B2 (en) | Real-time color preview generation for plenoptic imaging systems | |
| TWI599809B (en) | Lens module array, image sensing device and fusing method for digital zoomed images | |
| CN103650473A (en) | Auto Focus Image System | |
| JP6569769B2 (en) | Arbitrary viewpoint image composition method and image processing apparatus | |
| JP6168220B2 (en) | Image generation apparatus, image processing apparatus, image generation method, and image processing program | |
| CN111669568A (en) | Multi-angle free visual angle interaction method and device, medium, terminal and equipment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060418 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060615 |
|
| 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: 20060725 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20060823 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| LAPS | Cancellation because of no payment of annual fees |