JP4014512B2 - 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 PDF

Info

Publication number
JP4014512B2
JP4014512B2 JP2003031734A JP2003031734A JP4014512B2 JP 4014512 B2 JP4014512 B2 JP 4014512B2 JP 2003031734 A JP2003031734 A JP 2003031734A JP 2003031734 A JP2003031734 A JP 2003031734A JP 4014512 B2 JP4014512 B2 JP 4014512B2
Authority
JP
Japan
Prior art keywords
matrix
image
value
lens
subject
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2003031734A
Other languages
Japanese (ja)
Other versions
JP2003309723A (en
Inventor
努 藤田
克彦 三島
淳 菅野
正巳 鐘ヶ江
京丈 内海
Original Assignee
株式会社リバーベル
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社リバーベル filed Critical 株式会社リバーベル
Priority to JP2003031734A priority Critical patent/JP4014512B2/en
Publication of JP2003309723A publication Critical patent/JP2003309723A/en
Application granted granted Critical
Publication of JP4014512B2 publication Critical patent/JP4014512B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、二焦点レンズを構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像から、ピントの合った画像を求める画像改質処理方法およびその装置、プログラム、並びにデータ記録媒体に係り、例えば、携帯情報端末(PDA:Personal Digital Assistants)、携帯電話機(PHS:Personal Handy phone Systemを含む。)、テレビジョンやビデオ等の家電機器の操作用のリモート・コントロール装置、カメラ付パーソナル・コンピュータ、および監視カメラ装置等の二焦点レンズによる画像入力機能を持つ情報端末装置などに利用できる。
【0002】
【背景技術】
従来より、焦点距離の異なる二つのレンズ部を有する二焦点レンズが遠近両用コンタクトレンズとして使用されている。このような二焦点レンズにより構成されるコンタクトレンズを人間が装着した場合には、二つの各レンズ部により形成されるピントの合った画像とピントの合わない画像(いわゆるピンぼけ画像)とを人間が無意識のうちに選択し、ピントの合った画像のみを見るようにしていると考えられる。
【0003】
ところで、このような二焦点レンズを、例えば携帯電話機や携帯情報端末等の情報端末装置に設ければ、焦点深度下限(例えば、0.3m)から無限遠までの標準的な距離にある通常の被写体(例えば、人物や風景等)を、長い焦点距離を有する長焦点レンズ部により撮像し、一方、それよりも近い距離に配置された近接被写体(例えば、2次元バーコードや虹彩や文字等)を、短い焦点距離を有する短焦点レンズ部により撮像することにより、それぞれ高い解像度の画像を得ることができる。そして、このような二焦点レンズを備えた情報端末装置は、本願出願人により既に提案されている(特願2000−348800号等参照)。
【0004】
【発明が解決しようとする課題】
しかしながら、前述した二焦点レンズを備えた情報端末装置では、例えば液晶シャッター等の光学シャッターを二焦点レンズと撮像素子との間に設けることにより長焦点レンズ部と短焦点レンズ部とを切替可能な構成とした場合等には、コントラストの高い画像を得ることができるものの、そのようなレンズ部の切替を行わない場合には、二つの各レンズ部により形成されるピントの合った画像とピントの合わない画像とが重なってしまうため、鮮明な画像を得ることが困難であるという問題がある。
【0005】
この際、前述したように二焦点レンズを使用した遠近両用コンタクトレンズを人間が装着した場合には、ピントの合った画像とピントの合わない画像とを人間が無意識のうちに選択し、ピントの合った画像のみを見るようにしていると考えられるが、このような人間の脳内における画像の選択処理と類似の処理を、通常の携帯電話機や携帯情報端末等の携帯型の情報端末装置に搭載されている程度の性能を有する中央演算処理装置(CPU)により短時間で実行できれば、情報端末装置の使い勝手や性能の向上を図ることができ、しかも低コストで実現できるので便利である。
【0006】
また、このような処理を行うことができれば、携帯電話機や携帯情報端末等の携帯型の情報端末装置に二焦点レンズを設けた場合に限らず、広く一般的に二焦点レンズによる撮像を行う場合、例えば、パーソナル・コンピュータに二焦点レンズを有するカメラを接続した場合や、監視カメラとして二焦点レンズを用いる場合等においても、画像の質の改善が図られるため好都合である。
【0007】
本発明の目的は、二焦点レンズで撮像された画像の質を短時間の処理で改善することができ、ピント合わせ機構を用いることなく、標準的な距離にある通常の被写体およびこれよりも近距離にある近接被写体のいずれもについても鮮明な画像を得ることができる画像改質処理方法およびその装置、プログラム、並びにデータ記録媒体を提供するところにある。
【0008】
【課題を解決するための手段】
本発明は、二焦点レンズを構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像から、ピントの合った画像を求める画像改質処理方法であって、撮像素子の大きさをM画素×N画素とし、被写体の発する光の明るさを示すM行N列の行列をAとし、被写体を二焦点レンズにより撮像して得られた画像の出力信号を示すM行N列の行列をZとしたとき、畳み込み演算処理を行うための(2M−1)行(2N−1)列の畳み込み演算行列Qの各要素Q(x,y)の値のうち少なくとも非零要素を含む行列部分の値を下式(1)に基づき予め算出して畳み込み演算行列記憶手段に記憶しておき、被写体を二焦点レンズにより撮像した際に、再生演算手段により、畳み込み演算行列記憶手段に記憶された各要素Q(x,y)のうちの少なくとも一部の値と画像の出力信号の行列Zの各要素Z(h,k)の値とを用いて下式(2)に基づき被写体の行列Aの各要素A(s,t)の値を算出することを特徴とするものである。
【0009】

Figure 0004014512
【0010】
Figure 0004014512
【0011】
ここで、xおよびyは整数で、(1−M)≦x≦(M−1)、(1−N)≦y≦(N−1)であり、sおよびtは自然数で、1≦s≦M、1≦t≦Nであり、hおよびkは自然数で、1≦h≦M、1≦k≦Nであり、W(x,y)は、(2M−1)行(2N−1)列の行列Wの各要素の値であり、この行列Wは、端部を除く座標(m,n)で示される1点のみに輝点のある被写体を二焦点レンズで撮像したときに一方および他方のレンズ部により形成される画像の出力信号を示すM行N列の行列Zmnを、x=h−m、y=k−nを満たす座標(h,k)から座標(x,y)への座標変換で、W(0,0)=Zmn(m,n)となるように平行移動することにより、Zmn(h,k)のうちの非零要素を含む行列部分を行列Wの中央部に配置するとともに、中央部に配置された非零要素を含む行列部分の外側部分を零要素で埋めることにより構成され、cは、比例係数で、二焦点レンズの全体面積に対する一方のレンズ部の面積の比の値であり、powerは、cのべき乗数となる実数で、1≦power≦2であり、Σhは、h=1〜Mの和であり、Σkは、k=1〜Nの和である。
【0012】
また、「二焦点レンズ」とは、標準的な距離(焦点深度下限(例えば、0.3m)から無限遠までの距離)にある通常の被写体(例えば、人物や風景等)を撮像するための長い焦点距離を有する長焦点レンズ部と、標準的な距離にある被写体よりも近距離にある近接被写体(例えば、2次元バーコードや虹彩や文字等)を撮像するための短い焦点距離を有する短焦点レンズ部とが、同一の面に一体化されて形成された撮像レンズである。以下の発明においても同様である。なお、長焦点レンズ部と短焦点レンズ部とを別部材により別々に形成してから一体化してもよく、あるいは、一つの部材を用いて長焦点レンズ部および短焦点レンズ部を加工して形成してもよい。また、同一の面は、撮像レンズの光軸に直交する面であることが最も好ましい。
【0013】
そして、「一方のレンズ部」とは、ピントの合った画像を形成するレンズ部であり、標準的な距離にある通常の被写体を撮像する際には、長焦点レンズ部が該当し、通常の被写体よりも近距離にある近接被写体を撮像する際には、短焦点レンズ部が該当する。これに対し、「他方のレンズ部」とは、ピントのぼけた画像を形成するレンズ部であり、標準的な距離にある通常の被写体を撮像する際には、短焦点レンズ部が該当し、通常の被写体よりも近距離にある近接被写体を撮像する際には、長焦点レンズ部が該当する。
【0014】
さらに、「二焦点レンズ」を構成する長焦点レンズ部の正面形状(レンズの光軸に沿う方向から見た形状)は、円形、楕円形、または多角形のいずれかであり、短焦点レンズ部の正面形状は、環状であり、短焦点レンズ部は、長焦点レンズ部の外側に配置され、かつ、長焦点レンズ部と同心に配置(各レンズ部の光軸同士が一致する状態で配置)されていることが、構造の簡易化、製造の容易化、質の高い画像の取得の容易化、解読精度の向上等の観点から望ましく、特に、長焦点レンズ部の正面形状を円形とし、短焦点レンズ部の正面形状を円環状とした同心円型構造とすると、極めて好ましい結果が得られる。なお、長焦点レンズ部と短焦点レンズ部との配置関係を逆にし(従って、正面形状を逆にし)、短焦点レンズ部を内側に長焦点レンズ部を外側に配置するようにしてもよい。
【0015】
また、「撮像素子」としては、具体的には、例えば、相補性金属酸化膜半導体(CMOS:Complementary Metal-oxide Semiconductor)や電荷結合素子(CCD:Charge Coupled Device)等を採用することができる。
【0016】
さらに、powerの値は、cの値に応じて決定すればよい。この際、cの値が、0.5近傍(0.5を含む。以下、同様)のときには、powerの値を2以外の値とする必要がある。より具体的には、cの値が、0.5近傍のときには、powerの値を1以上2未満とし、より好ましくは1とする。一方、cの値が、0.5近傍以外のときには、1以上2以下とする。以下の発明においても、同様である。
【0017】
このような本発明においては、被写体を二焦点レンズにより撮像した際に、再生演算手段により、畳み込み演算行列記憶手段に記憶された畳み込み演算行列Qの各要素Q(x,y)のうちの少なくとも一部の値と、撮像して得られた画像の出力信号の行列Zの各要素Z(h,k)の値とを用い、前記式(2)に基づき被写体の行列Aの各要素A(s,t)の値を算出する。
【0018】
この際、再生演算手段による演算処理は、前記式(1)に基づき予め算出されて畳み込み演算行列記憶手段に記憶された畳み込み演算行列Qの各要素Q(x,y)の値を用いて行われるので、後述する式(1−22)で示されるM×N行M×N列の巨大逆行列Tを用いて演算処理を行う場合に比べ、非常に少ない計算量で、被写体の行列Aの各要素A(s,t)の値を算出することが可能となる。
【0019】
このため、短時間の処理で、ピントの合った画像を求めて被写体を再生することができるので、二焦点レンズで撮像された画像の質を短時間の処理で改善することができ、ピント合わせ機構を用いることなく、標準的な距離にある通常の被写体およびこれよりも近距離にある近接被写体のいずれもについても鮮明な画像を得ることができるようになる。
【0020】
また、再生演算手段による演算処理が非常に少ない計算量であることから、例えば携帯電話機や携帯情報端末等の携帯型の情報端末装置に搭載されている程度のCPUの能力でも短時間の処理で実行することが可能である。従って、二焦点レンズを備えた携帯型の情報端末装置に本発明を適用すれば、情報端末装置の使い勝手や性能の向上を図ることができるようになり、これらにより前記目的が達成される。
【0021】
さらに、前述した画像改質処理方法において、二焦点レンズへの光の入射角の不均一により画像周辺部の受光量が減少するシェージングの影響を補正するためのM行N列のシェージング補正行列Φの各要素Φ(s,t)の値をシェージング補正行列記憶手段に記憶しておき、再生演算手段による処理を行った後に、シェージング補正手段により、シェージング補正行列記憶手段に記憶された各要素Φ(s,t)の値と被写体の行列Aの各要素A(s,t)の値とを用いて下式(3)に基づきシェージング補正を行った被写体の行列Ashの各要素Ash(s,t)を算出することが望ましい。
【0022】
sh(s,t)=A(s,t)×Φ(s,t) ・・・・・・・・(3)
【0023】
ここで、sおよびtは自然数で、1≦s≦M、1≦t≦Nである。
【0024】
このようにシェージング補正を行った場合には、シェージングの影響が排除されるため、画像の質を、より一層改善することが可能となる。
【0025】
また、前述した画像改質処理方法において、二焦点レンズへの光の入射角の不均一により画像周辺部の受光量が減少するシェージングの影響を補正するためのM行N列のシェージング補正行列Φの各要素Φ(h,k)の値をシェージング補正行列記憶手段に記憶しておき、再生演算手段による処理を行う前に、シェージング補正手段により、シェージング補正行列記憶手段に記憶された各要素Φ(h,k)の値と画像の出力信号の行列Zの各要素Z(h,k)の値とを用いて下式(4)に基づきシェージング補正を行った画像の出力信号の行列Zshの各要素Zsh(h,k)を算出し、得られたZsh(h,k)の値を新たなZ(h,k)として式(2)に基づく再生演算手段による処理に使用することが望ましい。
【0026】
sh(h,k)=Z(h,k)×Φ(h,k) ・・・・・・・・(4)
【0027】
ここで、hおよびkは自然数で、1≦h≦M、1≦k≦Nである。
【0028】
このようにシェージング補正を行った場合には、シェージングの影響が排除されるため、画像の質を、より一層改善することが可能となる。
【0029】
また、以上に述べた画像改質処理方法において、式(2)に基づく再生演算手段による処理は、デジタルフィルタ回路により行われ、このデジタルフィルタ回路には、画像の出力信号の行列Zの各要素Z(h,k)の値に畳み込み演算行列Qの各要素Q(x,y)の値を乗ずる複数の乗算回路と、これらの乗算回路からの出力信号を加算する複数の加算回路と、順次入力される各要素Z(h,k)の信号の流れの速度調整を行うための複数のディレイ回路とが含まれていることが望ましい。
【0030】
このように再生演算手段による処理をデジタルフィルタ回路により行うようにした場合には、畳み込み演算行列Qを用いた畳み込み演算処理を、ハードウェアにより実現することができるので、画像改質に要する処理時間を、より一層短くすることが可能となる。
【0031】
また、以上に述べた本発明の画像改質処理方法を実現するための装置として、以下のような本発明の画像改質処理装置を挙げることができる。
【0032】
すなわち、本発明は、二焦点レンズを構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像から、ピントの合った画像を求める画像改質処理装置であって、撮像素子の大きさをM画素×N画素とし、被写体の発する光の明るさを示すM行N列の行列をAとし、被写体を前記二焦点レンズにより撮像して得られた画像の出力信号を示すM行N列の行列をZとしたとき、下式(5)に基づき算出された畳み込み演算処理を行うための(2M−1)行(2N−1)列の畳み込み演算行列Qの各要素Q(x,y)の値のうち少なくとも非零要素を含む行列部分の値を記憶する畳み込み演算行列記憶手段と、この畳み込み演算行列記憶手段に記憶された各要素Q(x,y)のうちの少なくとも一部の値と画像の出力信号の行列Zの各要素Z(h,k)の値とを用いて下式(6)に基づき被写体の行列Aの各要素A(s,t)の値を算出する再生演算手段とを備えたことを特徴とするものである。
【0033】
Figure 0004014512
【0034】
Figure 0004014512
【0035】
ここで、xおよびyは整数で、(1−M)≦x≦(M−1)、(1−N)≦y≦(N−1)であり、sおよびtは自然数で、1≦s≦M、1≦t≦Nであり、hおよびkは自然数で、1≦h≦M、1≦k≦Nであり、W(x,y)は、(2M−1)行(2N−1)列の行列Wの各要素の値であり、この行列Wは、端部を除く座標(m,n)で示される1点のみに輝点のある被写体を二焦点レンズで撮像したときに一方および他方のレンズ部により形成される画像の出力信号を示すM行N列の行列Zmnを、x=h−m、y=k−nを満たす座標(h,k)から座標(x,y)への座標変換で、W(0,0)=Zmn(m,n)となるように平行移動することにより、Zmn(h,k)のうちの非零要素を含む行列部分を行列Wの中央部に配置するとともに、中央部に配置された非零要素を含む行列部分の外側部分を零要素で埋めることにより構成され、cは、比例係数で、二焦点レンズの全体面積に対する一方のレンズ部の面積の比の値であり、powerは、cのべき乗数となる実数で、1≦power≦2であり、Σhは、h=1〜Mの和であり、Σkは、k=1〜Nの和である。
【0036】
このような本発明の画像改質処理装置においては、前述した本発明の画像改質処理方法で得られる作用・効果をそのまま得ることができる。
【0037】
また、前述した画像改質処理装置において、二焦点レンズへの光の入射角の不均一により画像周辺部の受光量が減少するシェージングの影響を補正するためのM行N列のシェージング補正行列Φの各要素Φ(s,t)の値を記憶するシェージング補正行列記憶手段と、このシェージング補正行列記憶手段に記憶された各要素Φ(s,t)の値と再生演算手段による処理を行って得られた被写体の行列Aの各要素A(s,t)の値とを用いて下式(7)に基づきシェージング補正を行った被写体の行列Ashの各要素Ash(s,t)を算出するシェージング補正手段とを備えた構成とすることが望ましい。
【0038】
sh(s,t)=A(s,t)×Φ(s,t) ・・・・・・・・(7)
【0039】
ここで、sおよびtは自然数で、1≦s≦M、1≦t≦Nである。
【0040】
このようにシェージング補正行列記憶手段およびシェージング補正手段を設けた構成とした場合には、シェージングの影響が排除されるため、画像の質を、より一層改善することが可能となる。
【0041】
さらに、前述した画像改質処理装置において、二焦点レンズへの光の入射角の不均一により画像周辺部の受光量が減少するシェージングの影響を補正するためのM行N列のシェージング補正行列Φの各要素Φ(h,k)の値を記憶するシェージング補正行列記憶手段と、このシェージング補正行列記憶手段に記憶された各要素Φ(h,k)の値と画像の出力信号の行列Zの各要素Z(h,k)の値とを用いて下式(8)に基づきシェージング補正を行った画像の出力信号の行列Zshの各要素Zsh(h,k)を算出し、得られたZsh(h,k)の値を新たなZ(h,k)として式(6)に基づく再生演算手段による処理に使用されるようにするシェージング補正手段とを備えた構成とすることが望ましい。
【0042】
sh(h,k)=Z(h,k)×Φ(h,k) ・・・・・・・・(8)
【0043】
ここで、hおよびkは自然数で、1≦h≦M、1≦k≦Nである。
【0044】
このような構成とした場合にも、シェージングの影響が排除されるため、画像の質を、より一層改善することが可能となる。
【0045】
そして、以上に述べた画像改質処理装置において、再生演算手段は、式(6)に基づく演算処理を行うデジタルフィルタ回路により構成され、このデジタルフィルタ回路には、画像の出力信号の行列Zの各要素Z(h,k)の値に畳み込み演算行列Qの各要素Q(x,y)の値を乗ずる複数の乗算回路と、これらの乗算回路からの出力信号を加算する複数の加算回路と、順次入力される各要素Z(h,k)の信号の流れの速度調整を行うための複数のディレイ回路とが含まれていることが望ましい。
【0046】
このように再生演算手段をデジタルフィルタ回路により構成した場合には、畳み込み演算行列Qを用いた畳み込み演算処理を、ハードウェアにより実現することができるので、画像改質に要する処理時間を、より一層短くすることが可能となる。
【0047】
また、本発明は、二焦点レンズを構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像から、ピントの合った画像を求める画像改質処理装置として、コンピュータを機能させるためのプログラムであって、撮像素子の大きさをM画素×N画素とし、被写体の発する光の明るさを示すM行N列の行列をAとし、被写体を前記二焦点レンズにより撮像して得られた画像の出力信号を示すM行N列の行列をZとしたとき、下式(9)に基づき算出された畳み込み演算処理を行うための(2M−1)行(2N−1)列の畳み込み演算行列Qの各要素Q(x,y)の値のうち少なくとも非零要素を含む行列部分の値を記憶する畳み込み演算行列記憶手段と、この畳み込み演算行列記憶手段に記憶された各要素Q(x,y)のうちの少なくとも一部の値と画像の出力信号の行列Zの各要素Z(h,k)の値とを用いて下式(10)に基づき被写体の行列Aの各要素A(s,t)の値を算出する再生演算手段とを備えたことを特徴とする画像改質処理装置として、コンピュータを機能させるためのものである。
【0048】
Figure 0004014512
【0049】
Figure 0004014512
【0050】
ここで、xおよびyは整数で、(1−M)≦x≦(M−1)、(1−N)≦y≦(N−1)であり、sおよびtは自然数で、1≦s≦M、1≦t≦Nであり、hおよびkは自然数で、1≦h≦M、1≦k≦Nであり、W(x,y)は、(2M−1)行(2N−1)列の行列Wの各要素の値であり、この行列Wは、端部を除く座標(m,n)で示される1点のみに輝点のある被写体を二焦点レンズで撮像したときに一方および他方のレンズ部により形成される画像の出力信号を示すM行N列の行列Zmnを、x=h−m、y=k−nを満たす座標(h,k)から座標(x,y)への座標変換で、W(0,0)=Zmn(m,n)となるように平行移動することにより、Zmn(h,k)のうちの非零要素を含む行列部分を行列Wの中央部に配置するとともに、中央部に配置された非零要素を含む行列部分の外側部分を零要素で埋めることにより構成され、cは、比例係数で、二焦点レンズの全体面積に対する一方のレンズ部の面積の比の値であり、powerは、cのべき乗数となる実数で、1≦power≦2であり、Σhは、h=1〜Mの和であり、Σkは、k=1〜Nの和である。
【0051】
さらに、本発明は、二焦点レンズを構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像から、ピントの合った画像を求める画像改質処理で使用されるデータを記録したコンピュータ読取り可能なデータ記録媒体であって、撮像素子の大きさをM画素×N画素とし、被写体の発する光の明るさを示すM行N列の行列をAとし、被写体を前記二焦点レンズにより撮像して得られた画像の出力信号を示すM行N列の行列をZとしたとき、行列Zから行列Aを算出するために用いる行列として下式(11)に基づき算出された畳み込み演算処理を行うための(2M−1)行(2N−1)列の畳み込み演算行列Qの各要素Q(x,y)の値のうち少なくとも非零要素を含む行列部分の値を記録したものである。
【0052】
Figure 0004014512
【0053】
ここで、xおよびyは整数で、(1−M)≦x≦(M−1)、(1−N)≦y≦(N−1)であり、W(x,y)は、(2M−1)行(2N−1)列の行列Wの各要素の値であり、この行列Wは、端部を除く座標(m,n)で示される1点のみに輝点のある被写体を二焦点レンズで撮像したときに一方および他方のレンズ部により形成される画像の出力信号を示すM行N列の行列Zmnを、x=h−m、y=k−nを満たす座標(h,k)から座標(x,y)への座標変換で、W(0,0)=Zmn(m,n)となるように平行移動することにより、Zmn(h,k)のうちの非零要素を含む行列部分を前記行列Wの中央部に配置するとともに、中央部に配置された非零要素を含む行列部分の外側部分を零要素で埋めることにより構成され、cは、比例係数で、二焦点レンズの全体面積に対する一方のレンズ部の面積の比の値であり、powerは、cのべき乗数となる実数で、1≦power≦2であり、hおよびkは自然数で、1≦h≦M、1≦k≦Nであり、mおよびnは自然数で、1≦m≦M、1≦n≦Nであるが、被写体端部のm=1、m=M、n=1、およびn=Nの近傍の点は除かれる。
【0054】
そして、本発明は、二焦点レンズを構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像から、ピントの合った画像を求める画像改質処理方法であって、被写体を二焦点レンズにより撮像して得られた画像の出力信号を撮像素子から引き出して出力信号記憶手段に記憶した後、この出力信号記憶手段に記憶した撮像素子の各画素の出力信号をQ画素×Q画素の単位画面分だけ取り出してから、ディスクリート・コサイン変換処理手段により、これらの取り出した信号レベルSxyについて下式(12)に基づきディスクリート・コサイン変換処理を行うことにより各空間周波数に対応した信号レベルSF uvを求め、続いて、ピンぼけ画像消去処理手段により、ディスクリート・コサイン変換処理を行って得られたSF uvのうちゼロの成分SF 00の値に、二焦点レンズの全体面積に対するピントの合った画像を形成する一方のレンズ部の面積の割合を乗じ、この乗算により得られた値を新たなSF 00の値とし、その後、量子化処理手段により、ピンぼけ画像消去処理手段による処理後の信号レベルSF uvについて量子化処理を行い、さらに、符号化処理手段により、量子化処理手段による処理で得られた量子化データを符号化し、ディスクリート・コサイン変換処理手段、ピンぼけ画像消去処理手段、量子化処理手段、および符号化処理手段による各処理を、区画された全ての画面について繰り返すことを特徴とするものである。
【0055】
Figure 0004014512
【0056】
ここで、uおよびvは整数で、0≦u≦(Q−1)、0≦v≦(Q−1)、但し、Qは2以上の整数であり、Cu,Cv=1/(21/2)(u,v=0のとき)、Cu,Cv=1(u,v=0以外のとき)であり、Σxはx=0〜(Q−1)の和、Σyはy=0〜(Q−1)の和である。
【0057】
このような本発明においては、被写体を二焦点レンズにより撮像して得られた画像の出力信号を撮像素子から単位画面分だけ取り出し、取り出した信号についてディスクリート・コサイン変換処理、ピンぼけ画像消去処理、量子化処理、および符号化処理を行う。そして、これらの各処理を、区画された全ての画面について繰り返す。
【0058】
この際、ピンぼけ画像消去処理は、ディスクリート・コサイン変換処理を行って得られたSF uvのうちゼロの成分SF 00の値に、二焦点レンズの全体面積に対するピントの合った画像を形成する一方のレンズ部の面積の割合を乗じ、この乗算により得られた値を新たなSF 00の値とするという簡単な処理を行うだけであり、残りの処理は、通常のJPEG(Joint Photographic Experts Group)による画像の圧縮処理と略同様である。従って、少ない計算量で一連の処理を実行することが可能となる。
【0059】
このため、短時間の処理で、ピントのぼけた画像を消去してピントの合った画像を求め、画像の質の改善を図ることが可能となるうえ、計算量が少ないことから、例えば携帯電話機や携帯情報端末等の携帯型の情報端末装置に搭載されている程度のCPUの能力でも短時間の処理で実行することが可能である。従って、二焦点レンズを備えた携帯型の情報端末装置に本発明を適用すれば、情報端末装置の使い勝手や性能の向上を図ることができるようになり、これらにより前記目的が達成される。
【0060】
また、以上に述べた本発明の画像改質処理方法を実現するための装置として、以下のような本発明の画像改質処理装置を挙げることができる。
【0061】
すなわち、本発明は、二焦点レンズを構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像から、ピントの合った画像を求める画像改質処理装置であって、被写体を二焦点レンズにより撮像して得られた画像の出力信号を撮像素子から引き出して記憶する出力信号記憶手段と、この出力信号記憶手段に記憶した撮像素子の各画素の出力信号をQ画素×Q画素の単位画面分だけ取り出してこれらの取り出した信号レベルSxyについて下式(13)に基づきディスクリート・コサイン変換処理を行うことにより各空間周波数に対応した信号レベルSF uvを求めるディスクリート・コサイン変換処理手段と、このディスクリート・コサイン変換処理手段による処理で得られたSF uvのうちゼロの成分SF 00の値に、二焦点レンズの全体面積に対するピントの合った画像を形成する一方のレンズ部の面積の割合を乗じ、この乗算により得られた値を新たなSF 00の値とするピンぼけ画像消去処理手段と、このピンぼけ画像消去処理手段による処理後の信号レベルSF uvについて量子化処理を行う量子化処理手段と、この量子化処理手段による処理で得られた量子化データを符号化する符号化処理手段とを備えたことを特徴とするものである。
【0062】
Figure 0004014512
【0063】
ここで、uおよびvは整数で、0≦u≦(Q−1)、0≦v≦(Q−1)、但し、Qは2以上の整数であり、Cu,Cv=1/(21/2)(u,v=0のとき)、Cu,Cv=1(u,v=0以外のとき)であり、Σxはx=0〜(Q−1)の和、Σyはy=0〜(Q−1)の和である。
【0064】
このような本発明の画像改質処理装置においては、前述した本発明の画像改質処理方法で得られる作用・効果をそのまま得ることができる。
【0065】
さらに、本発明は、二焦点レンズを構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像から、ピントの合った画像を求める画像改質処理装置として、コンピュータを機能させるためのプログラムであって、被写体を二焦点レンズにより撮像して得られた画像の出力信号を撮像素子から引き出して記憶する出力信号記憶手段と、この出力信号記憶手段に記憶した撮像素子の各画素の出力信号をQ画素×Q画素の単位画面分だけ取り出してこれらの取り出した信号レベルSxyについて下式(14)に基づきディスクリート・コサイン変換処理を行うことにより各空間周波数に対応した信号レベルSF uvを求めるディスクリート・コサイン変換処理手段と、このディスクリート・コサイン変換処理手段による処理で得られたSF uvのうちゼロの成分SF 00の値に、二焦点レンズの全体面積に対するピントの合った画像を形成する一方のレンズ部の面積の割合を乗じ、この乗算により得られた値を新たなSF 00の値とするピンぼけ画像消去処理手段と、このピンぼけ画像消去処理手段による処理後の信号レベルSF uvについて量子化処理を行う量子化処理手段と、この量子化処理手段による処理で得られた量子化データを符号化する符号化処理手段とを備えたことを特徴とする画像改質処理装置として、コンピュータを機能させるためのものである。
【0066】
Figure 0004014512
【0067】
ここで、uおよびvは整数で、0≦u≦(Q−1)、0≦v≦(Q−1)、但し、Qは2以上の整数であり、Cu,Cv=1/(21/2)(u,v=0のとき)、Cu,Cv=1(u,v=0以外のとき)であり、Σxはx=0〜(Q−1)の和、Σyはy=0〜(Q−1)の和である。
【0068】
また、本発明は、二焦点レンズを構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像から、ピントの合った画像を求める画像改質処理方法であって、撮像素子の大きさをM画素×N画素とし、被写体を二焦点レンズにより撮像して得られた画像の座標(h,k)の出力信号値をZ(h,k)としたとき、下式(15)に基づき座標(h,k)を中心とするQ画素×Q画素の単位画面内での各出力信号値Z(h,k)の移動平均値Zmean(h,k)を算出するとともに、算出した移動平均値Zmean(h,k)を用いて下式(16)に基づきZ(h,k)を画像改質処理して得られる信号値Znew(h,k)を算出することを特徴とするものである。
【0069】
Figure 0004014512
【0070】
Figure 0004014512
【0071】
ここで、Qは、3以上の奇数の自然数であり、hおよびkは、自然数で、1≦h≦M、1≦k≦Nであり、xおよびyは、整数で、(1−Q)/2≦x≦(Q−1)/2、(1−Q)/2≦y≦(Q−1)/2であり、Σxは、x=(1−Q)/2〜(Q−1)/2の和、Σyは、y=(1−Q)/2〜(Q−1)/2の和であり、cは、比例係数で、二焦点レンズの全体面積に対する一方のレンズ部の面積の比の値であり、kは、正規化係数であり、Znew(h,k)の最大値を1にするための値である。
【0072】
このように移動平均をとって画像補正を行うようにした場合には、ピンぼけ分の画像を除去することができるため、画像の質を改善することが可能となる。
【0073】
また、移動平均をとって減ずるだけの簡単な演算処理であるため、計算量が少なく、短時間で処理することが可能であることから、携帯型の情報端末装置等にも好適に用いることができるようになり、これらにより前記目的が達成される。
【0074】
そして、以上に述べた本発明の画像改質処理方法を実現するための装置として、以下のような本発明の画像改質処理装置を挙げることができる。
【0075】
すなわち、本発明は、二焦点レンズを構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像から、ピントの合った画像を求める画像改質処理装置であって、撮像素子の大きさをM画素×N画素とし、被写体を二焦点レンズにより撮像して得られた画像の座標(h,k)の出力信号値をZ(h,k)としたとき、下式(17)に基づき座標(h,k)を中心とするQ画素×Q画素の単位画面内での各出力信号値Z(h,k)の移動平均値Zmean(h,k)を算出する移動平均算出手段と、この移動平均算出手段により算出した移動平均値Zmean(h,k)を用いて下式(18)に基づきZ(h,k)を画像改質処理して得られる信号値Znew(h,k)を算出する画像補正手段とを備えたことを特徴とするものである。
【0076】
Figure 0004014512
【0077】
Figure 0004014512
【0078】
ここで、Qは、3以上の奇数の自然数であり、hおよびkは、自然数で、1≦h≦M、1≦k≦Nであり、xおよびyは、整数で、(1−Q)/2≦x≦(Q−1)/2、(1−Q)/2≦y≦(Q−1)/2であり、Σxは、x=(1−Q)/2〜(Q−1)/2の和、Σyは、y=(1−Q)/2〜(Q−1)/2の和であり、cは、比例係数で、二焦点レンズの全体面積に対する一方のレンズ部の面積の比の値であり、kは、正規化係数であり、Znew(h,k)の最大値を1にするための値である。
【0079】
このような本発明の画像改質処理装置においては、前述した本発明の画像改質処理方法で得られる作用・効果をそのまま得ることができる。
【0080】
また、前述した画像改質処理装置において、移動平均算出手段および画像補正手段は、デジタルフィルタ回路を含んで構成されていることが望ましい。このようにした場合には、移動平均算出手段および画像補正手段による各処理をハードウェアで実現することができるので、計算処理時間を短くすることが可能となる。
【0081】
さらに、本発明は、二焦点レンズを構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像から、ピントの合った画像を求める画像改質処理装置として、コンピュータを機能させるためのプログラムであって、撮像素子の大きさをM画素×N画素とし、被写体を二焦点レンズにより撮像して得られた画像の座標(h,k)の出力信号値をZ(h,k)としたとき、下式(19)に基づき座標(h,k)を中心とするQ画素×Q画素の単位画面内での各出力信号値Z(h,k)の移動平均値Zmean(h,k)を算出する移動平均算出手段と、この移動平均算出手段により算出した移動平均値Zmean(h,k)を用いて下式(20)に基づきZ(h,k)を画像改質処理して得られる信号値Znew(h,k)を算出する画像補正手段とを備えたことを特徴とする画像改質処理装置として、コンピュータを機能させるためのものである。
【0082】
Figure 0004014512
【0083】
Figure 0004014512
【0084】
ここで、Qは、3以上の奇数の自然数であり、hおよびkは、自然数で、1≦h≦M、1≦k≦Nであり、xおよびyは、整数で、(1−Q)/2≦x≦(Q−1)/2、(1−Q)/2≦y≦(Q−1)/2であり、Σxは、x=(1−Q)/2〜(Q−1)/2の和、Σyは、y=(1−Q)/2〜(Q−1)/2の和であり、cは、比例係数で、二焦点レンズの全体面積に対する一方のレンズ部の面積の比の値であり、kは、正規化係数であり、Znew(h,k)の最大値を1にするための値である。
【0085】
なお、以上に述べたプログラムまたはその一部は、例えば、光磁気ディスク(MO)、コンパクトディスク(CD)を利用した読出し専用メモリ(CD−ROM)、CDレコーダブル(CD−R)、CDリライタブル(CD−RW)、デジタル・バーサタイル・ディスク(DVD)を利用した読出し専用メモリ(DVD−ROM)、DVDを利用したランダム・アクセス・メモリ(DVD−RAM)、フレキシブルディスク(FD)、磁気テープ、ハードディスク、読出し専用メモリ(ROM)、電気的消去および書換可能な読出し専用メモリ(EEPROM)、フラッシュ・メモリ、ランダム・アクセス・メモリ(RAM)等の記録媒体に記録して保存や流通等させることが可能であるとともに、例えば、LAN、MAN、WAN、インターネット、イントラネット、エクストラネット等の有線ネットワーク、あるいは無線通信ネットワーク、さらにはこれらの組合せ等の伝送媒体を用いて伝送することが可能であり、また、搬送波に載せて搬送することも可能である。さらに、以上に述べたプログラムは、他のプログラムの一部分であってもよく、あるいは別個のプログラムと共に記録媒体に記録されていてもよい。
【0086】
また、以上に述べた本発明のデータ記録媒体としては、例えば、MO、CD−ROM、CD−R、CD−RW、DVD−ROM、DVD−RAM、FD、磁気テープ、ハードディスク、ROM、EEPROM、フラッシュ・メモリ、RAM、あるいはこれらの組合せ等を採用することができる。
【0087】
さらに、以上に述べた本発明の各々の記載(各請求項の記載)において、「cは、比例係数で、二焦点レンズの全体面積に対する一方のレンズ部の面積の比の値であり、」と定義されているが、この定義は厳密な意味での定義ではなく、光の分割が面積に比例しない場合もあるので、この定義の意味には、以下のようにしてcの値を求める場合も含まれている。すなわち、光の量の分割比がレンズの面積比と一致しない場合には、cの値は、一方のレンズ部を通過して実際にセンサ(撮像素子)に到達する光の量またはセンサの信号量と、レンズ全体(一方のレンズ部および他方のレンズ部を合わせた全体)を通過して実際にセンサに到達する光の量またはセンサの信号量との比の値として求めてもよい。
【0088】
そして、以上に述べた本発明の各々の記載(各請求項の記載)において定義されている各要素W(x,y)の値には、次のような処理を行って定められる値も含まれる。すなわち、一方のレンズ部は、ピントの合った画像を形成するものとされているが、実際には、この一方のレンズ部により形成される画像にも、収差等によるボケが生じることがあるので、一方のレンズ部により形成される画像は、W(0,0)の周囲に拡がり、W(0,0)の周囲の要素も非零要素となり得る(他方のレンズ部により形成されるピントのぼけた画像を考慮しなくても、W(0,0)の周囲に、非零要素が生じ得るということ)。従って、このような場合には、W(0,0)の値およびW(0,0)の周囲に生じた非零要素の値(但し、他方のレンズ部により形成される画像がピンぼけして拡がる範囲は考慮せずに、一方のレンズ部により形成される画像がピンぼけして拡がる範囲内の非零要素の値のみを考える。)を合計し、その合計値をcの値としてW(0,0)に入れ直すとともに、W(0,0)の周囲に生じた非零要素の値(上記かっこ書で述べた範囲内の非零要素の値のみ)をゼロにするという修正作業を行い、これらの修正作業を経て作成された各要素W(x,y)の値を用いて、畳み込み演算行列Qの各要素Q(x,y)の値を算出すればよい。
【0089】
【発明の実施の形態】
以下に本発明の各実施形態を図面に基づいて説明する。
【0090】
[第1実施形態]
図1には、第1実施形態の画像改質処理装置30を含む撮像システム10の全体構成が示されている。また、図2には、画像改質処理装置30による処理対象となる画像を形成する二焦点レンズ21の詳細構成が示されている。撮像システム10は、例えば、携帯電話機や携帯情報端末等の携帯型の情報端末装置に設けられた撮像システム、あるいはパーソナル・コンピュータおよびそれに接続されたカメラにより構成される撮像システム等である。
【0091】
図1において、撮像システム10は、被写体を撮像する撮像機構20と、この撮像機構20により撮像された画像の質を改善する画像改質処理装置30と、この画像改質処理装置30により質の改善を行った画像を表示する表示手段40とを備えている。
【0092】
撮像機構20は、被写体を撮像する二焦点レンズ21と、この二焦点レンズ21により形成された画像を取り込む撮像素子24とを含んで構成されている。
【0093】
図2において、二焦点レンズ21は、例えばガラス製の長焦点レンズ部22と、例えばガラス製の短焦点レンズ部23とにより構成され、これらの長焦点レンズ部22および短焦点レンズ部23は、同一の面に配置されて一体化されている。長焦点レンズ部22は、例えば円形の正面形状を有し、中心に配置され、一方、短焦点レンズ部23は、例えば円環状(ドーナツ型)の正面形状を有し、長焦点レンズ部22の外側に長焦点レンズ部22の外縁部に接する状態で配置されている。そして、これらの長焦点レンズ部22および短焦点レンズ部23は、両者の光軸が一致するように、すなわち同心に配置されて一体化され、これにより二焦点レンズ21は、同心円型の二焦点レンズとなっている。また、これらの各レンズ部22,23が配置された面は、二焦点レンズ21の光軸に直交している。
【0094】
撮像素子24としては、例えば、相補性金属酸化膜半導体(CMOS:Complementary Metal-oxide Semiconductor)や電荷結合素子(CCD:Charge Coupled Device)等を採用することができる。撮像素子24の大きさは、縦方向M画素×横方向N画素であるものとする。
【0095】
画像改質処理装置30は、撮像素子24の出力信号を引き出して記憶する出力信号記憶手段31と、後述する式(1−33)または(1−34)あるいは(1−37)に基づき予め算出された畳み込み演算行列Q(図7参照)の各要素Q(x,y)の値のうちの少なくとも一部を記憶する畳み込み演算行列記憶手段32と、被写体を再生する演算処理を行う再生演算手段33とを備えている。
【0096】
畳み込み演算行列記憶手段32は、図7に示された畳み込み演算行列Qの各要素Q(x,y)の値のうちの少なくとも一部を、x,yの並び順に従って表の如く整列させて記憶するものである。少なくとも一部であるから、全部を記憶しておいてもよいが、計算容量およびメモリ容量を小さくするため、非零要素を含む行列部分(図7の行列部分H)のみを記憶しておくことが好ましい。従って、ここでは、非零要素を含む行列部分Hのみを記憶するものとして説明を行う。
【0097】
再生演算手段33は、畳み込み演算行列記憶手段32に記憶された畳み込み演算行列Qの各要素Q(x,y)の値(行列部分Hの各値)と、出力信号記憶手段31に記憶された画像の出力信号を示す行列Zの各要素Z(h,k)の値とを用い、後述する式(1−36)に基づき、被写体の行列Aの各要素A(s,t)の値を算出する処理を行うものである。なお、畳み込み演算行列Qの各要素Q(x,y)のうちの非零要素を含む行列部分(図7の行列部分H)以外の部分、すなわち、畳み込み演算行列記憶手段32に記憶されない部分については、零要素であるので、計算は行われない。
【0098】
出力信号記憶手段31および畳み込み演算行列記憶手段32としては、例えば、ハードディスク、ROM、EEPROM、フラッシュ・メモリ、RAM、MO、CD−ROM、CD−R、CD−RW、DVD−ROM、DVD−RAM、FD、磁気テープ、あるいはこれらの組合せ等を採用することができる。
【0099】
再生演算手段33は、撮像システム10を構成する各種の情報端末装置(例えば、携帯電話機や携帯情報端末等の携帯型の情報端末装置、あるいはカメラを接続したパーソナル・コンピュータ、監視カメラ装置等)の内部に設けられた中央演算処理装置(CPU)、およびこのCPUの動作手順を規定する一つまたは複数のプログラムにより実現される。
【0100】
表示手段40としては、例えば、液晶ディスプレイ、CRTディスプレイ、プロジェクタおよびスクリーン、あるいはこれらの組合せ等を採用することができる。
【0101】
以下には、畳み込み演算行列記憶手段32に記憶される畳み込み演算行列Qの各要素Q(x,y)の算出方法およびその根拠、並びに再生演算手段33により行われる演算処理の根拠を説明する。
【0102】
前提条件として、ここでは、標準的な距離にある通常の被写体(例えば、人物や風景等)を二焦点レンズ21により撮像する場合、従って、内側の長焦点レンズ部22によりピントの合った画像が形成され、外側の環状の短焦点レンズ部23によりピントのぼけた画像が形成される場合の説明を行うものとする。但し、本発明の適用は、このような場合に限定されるものではない。
【0103】
先ず、被写体と画像に関する基本的な事項について説明を行う。図3は、被写体と、この被写体を二焦点レンズ21により撮像して得られる画像との関係の説明図である。なお、レンズによって形成される像は、一般には倒立像であるため、図3では、物体と像とで座標軸の向きを逆にとることにより、互いに対応する物体の位置と像の位置とが同じ座標になるようにしている。
【0104】
<単一輝点の像による二焦点レンズ21の特性の表現>
図3に示すように、1点(座標(m,n))のみに輝点のある被写体αmnを二焦点レンズ21で撮像すると、像Zmnが形成される。ここで、mおよびnは自然数で、1≦m≦M、1≦n≦N、但し、MおよびNは撮像素子24の縦横の画素数である。また、座標(m,n)とは、撮像素子24上の座標(表示した画素番号)(m,n)に投影される被写体上の対応する点を意味する。さらに、αmnやZmnは、M×N(M行N列)の行列を表し、その要素は、M画素×N画素の撮像素子24上の対応する座標の輝度(明るさ)あるいは出力信号の大きさを示す。
【0105】
この像Zmnを、内側の長焦点レンズ部22により形成されるピントの合った像Bmnと、外側の環状の短焦点レンズ部23により形成される環状のボケ画像Dmnとに分割すると、次の式(1−1)のように表すことができる。
【0106】
Zmn=Bmn+Dmn ・・・・・・・・・・・・・・・・・・・(1−1)
【0107】
ここで、Zmn、Bmn、Dmnは、撮像素子24上の像を表現するM行N列の行列であるが、撮像素子24上の座標(h,k)(hおよびkは自然数、1≦h≦M、1≦k≦N)に対応した画素の明るさは、Zmn(h,k)、Bmn(h,k)、Dmn(h,k)のように表現される。また、αmnは被写体を表すM行N列の行列であるが、その座標(s,t)(sおよびtは自然数、1≦s≦M、1≦t≦N)における被写体の明るさは、αmn(s,t)のように表現され、これらの各要素αmn(s,t)の値は、次の式(1−2)のように表すことができる。
【0108】
αmn(s,t)=δs-m,t-n ・・・・・・・・・・・・・・(1−2)
【0109】
ここで、δはクロネッカー(Kronecker)のデルタで、δs-m,t-n=1(s=m,t=nの場合)、δs-m,t-n=0(s=m,t=n以外の場合)である。
【0110】
前記式(1−1)で示されるように、座標(m,n)のみに輝点のある被写体αmnの二焦点レンズ21による像Zmnは、内側の長焦点レンズ部22によるピントの合った像Bmnと、外側の短焦点レンズ部23によるリング状のボケ画像Dmnとの重なったものであるが、その様子が、図3の撮像素子24上に示されている。但し、図3は斜視図であるため、リング状のボケ画像Dmnは、実際には楕円環状ではなく円環状である。
【0111】
図3の撮像素子24上において、Bmnは、座標(m,n)にゼロでない要素(信号)があり、他の要素はすべてゼロとなる行列であり、Dmnは、座標(m,n)を中心としたドーナツ状あるいはリング状のピントのボケた画像、いわゆるピンぼけ画像を示す行列になる。そして、このDmnのドーナツの外径と内径は、二焦点レンズ21を構成する外側の短焦点レンズ部23の外径と内径に比例した大きさになる。なお、この検討では、二焦点レンズ21を構成する外側の短焦点レンズ部23により形成されるボケが広範囲に拡がり、Dmnの要素の値は、Bmnに比べて十分小さいものとしている。
【0112】
<被写体全体の画像>
被写体の各点(s,t)がそれぞれA(s,t)の明るさを持つとすると、被写体の発する光の全体は、s行t列にA(s,t)の値の要素を持つ行列Aで表現される。これを被写体Aというように表現する。そうすると、被写体Aは、αmn(点(m,n)に輝点のある被写体)を用いて、次の式(1−3)のように表すことができる。
【0113】
A=ΣmΣn[A(m,n)αmn] ・・・・・・・・・・・・(1−3)
【0114】
ここで、Σmは、m=1〜Mの和、Σnは、n=1〜Nの和を表す。以下においても同様である。
【0115】
また、物体Aと像Zとの変換関係と、αmnと像Zmnとの変換関係とは、同じ一次元の写像と考えられるので、次の式(1−4)のように表すことができる。
【0116】
Z=ΣmΣn[A(m,n)Zmn] ・・・・・・・・・・・・(1−4)
【0117】
さらに、ピントの合った画像Bとピンぼけ画像Dとを別個に表現すれば、次の式(1−5)および(1−6)のように表現することができる。
【0118】
B=ΣmΣn[A(m,n)Bmn] ・・・・・・・・・・・・(1−5)
【0119】
D=ΣmΣn[A(m,n)Dmn] ・・・・・・・・・・・・(1−6)
【0120】
そして、被写体Aの画像Zは、ピントの合った画像Bとピンぼけ画像Dとの和になるので、次の式(1−7)のようになる。
【0121】
Figure 0004014512
【0122】
<巨大ベクトルによる物体や像の表現方法>
以上の説明では、画像を撮像素子24の画面の形(M画素×N画素)に同形のM行N列の行列で表現するとともに、被写体もまた撮像素子24の画面の相似形として表現されるとして同じくM行N列の行列で表現している。ところで、被写体Aから画像Zを導く計算式は、後述する式(1−35)に示す形式で表現することができ、これは一般に畳み込み演算というものである。従って、この計算式を逆に解くことができれば、二焦点レンズ21で撮像された画像Zからピントの合った画像を計算できるが、この計算式からでは直接に導くことができないので、被写体および画像をM行N列の行列表現からM×N個の要素を持つベクトル表現に変換する。この場合の変換方法として、画像行列の各行(第1行〜第M行)を一番上の行から順番に横一列に並べ、それを行列演算しやすいように縦ベクトルにする。その具体例を例えば画像Zについて以下に挙げる。このようにして形成されたM×N個の要素を持つ画像表現ベクトルを巨大ベクトルと称することとする。
【0123】
【数1】
Figure 0004014512
【0124】
上記の行列:Zに対し、巨大ベクトル:Zは、次の式(1−8)のようになる。なお、式(1−8)において、上付きのtは縦横の転置、つまり横ベクトルから縦ベクトルへの変換を示す。
【0125】
Figure 0004014512
【0126】
以上の巨大ベクトル表現については、これまで出てきた被写体のAやαmn、画像のB、DやZmn、Bmn、Dmnについても同様に適用することができる。
【0127】
<巨大行列による被写体からの画像形成の表現>
以上の画像を表す巨大ベクトルを用いて、被写体から画像を形成するための「被写体から画像への一次変換(写影)」を表現する行列について検討する。被写体、画像を表現する巨大ベクトルについては、例えば、Z、Zmnのように、行列表現の場合と同じ記号を用いるものとする。
【0128】
理想的な二焦点レンズ21を考える。座標(m,n)における単一輝点被写体αmnのピントの合った画像Bmnは、Uを(M×N)×(M×N)個の要素を持つ単位行列とすると、次の式(1−9)のように表すことができる。
【0129】
Bmn=cUαmn ・・・・・・・・・・・・・・・・・・・・(1−9)
【0130】
ここで、cは比例係数で、二焦点レンズ21のピントの合った画像を形成する部分である長焦点レンズ部22の面積に比例する。この場合は、二焦点レンズ21が理想レンズなのでこのように表現できる。なお、光の量の分割比がレンズの面積比と一致しない場合には、cの値は、面積比で定めるのではなく、二焦点レンズ21のピントの合った画像を形成する部分である長焦点レンズ部22を通過して実際に撮像素子24に到達する光の量または撮像素子24の信号量と、二焦点レンズ21の全体を通過して実際に撮像素子24に到達する光の量または撮像素子24の信号量との比の値として求めてもよい。
【0131】
一方、ピントの合わない画像を形成する変換処理の行列をΔ((M×N)×(M×N)個の要素を持つ行列)とすると、次の式(1−10)のように表現できる。
【0132】
Dmn=Δαmn ・・・・・・・・・・・・・・・・・・・・(1−10)
【0133】
従って、2つの画像が重なった画像Zmnは、次の式(1−11)のように表現できる。
【0134】
Zmn=Bmn+Dmn=(cU+Δ)αmn ・・・・・・・・・(1−11)
【0135】
上記の式(1−9)〜(1−11)における行列U、Δは、(M×N)×(M×N)個の要素を持ち、画像を表現するM行N列の行列に比べてM×N倍の大きさ(要素数)を持つので、巨大行列と称して区別することにする。前記式(1−4)に、式(1−11)を代入すると、次の式(1−12)のようになり、被写体と二焦点レンズ21による画像との関係は、簡単な変換式で表現される。
【0136】
Figure 0004014512
【0137】
<巨大行列の内容>
ここで、巨大行列の形・内容を具体的に見てみる。先ず、巨大行列cUは、対角項がすべてcとなるM×N行M×N列の行列である。また、Δは部分的にcに比べて十分小さな値の要素を持つM×N行M×N列の行列である。その内容は、前記式(1−10)における巨大ベクトル(縦ベクトル)Dmnを用いると、次の式(1−13)のようになる。
【0138】
Figure 0004014512
【0139】
ここで、上記式(1−13)における巨大ベクトル(縦ベクトル)Dmnに、前記式(1−8)の表現を用いると、Δを次の式(1−14)のように表すことができる。
【0140】
【数2】
Figure 0004014512
【0141】
そして、上記式(1−14)ように表されたΔにcUを加えると、cUが対角項のみにcという値の入った巨大行列であることを考慮すれば、(cU+Δ)は、次の式(1−15)のように、Δの対角項にcが加わった値を要素に持つ巨大行列になる。
【0142】
【数3】
Figure 0004014512
【0143】
この巨大行列(cU+Δ)は、前記式(1−11)を考慮すると、次の式(1−16)のようにも表現できる。
【0144】
【数4】
Figure 0004014512
【0145】
つまり、式(1−15)と式(1−16)との巨大行列(cU+Δ)の要素を比較すると、次の式(1−17)が得られる。
【0146】
Figure 0004014512
【0147】
ここで、jは自然数で、1≦j≦M×Nである。上記式(1−17)により、画像形成の一次変換の巨大行列(cU+Δ)の要素は、Δの要素Dmn(j)を求めることにより確定する。Δを構成する各列の縦ベクトルDmnは、式(1−14)から明らかなように任意の位置にある単一輝点被写体によるドーナツ状のピンぼけ画像を表す巨大ベクトルと等価であるから、ドーナツ状のピンぼけ画像を求めることによりΔの各要素の値を確定することができる。
【0148】
次に、二焦点レンズ21により形成されるピントの合った画像とピンぼけ画像との重なった画像から、被写体にピントの合った画像を求める方法について説明する。
【0149】
<基本的な考え方>
画像改善の基本は、前記式(1−12)において、巨大行列(cU+Δ)と、撮影した画像Zとを既知として、被写体に相当する画像Aを求めることである。つまり、次の式(1−18)に示される逆行列(cU+Δ)-1を求めることに尽きる。
【0150】
A=(cU+Δ)-1Z ・・・・・・・・・・・・・・・(1−18)
【0151】
巨大行列の大きさは、例えば、M=640画素、N=480画素(30万画素相当)として、M×N=307,200となり、その大きさ(要素数)は、(M×N)2≒900万となる。従って、この逆行列を求めることは相当の計算時間を要するため現実的ではない。
【0152】
そこで、Δの各要素の値が、cに比べて十分小さいという仮定をおく。この仮定は、ボケの大きさが直径10画素以上であれば十分であり、二焦点レンズ21の口径比、レンズ口径、各レンズ部22,23の焦点距離を設計上調整すればよい。このような前提条件をおいて、式(1−18)の逆行列を近似法で簡易に求める方法を説明する。先ず、一般論として、次の式(1−19)が成立する。
【0153】
Figure 0004014512
【0154】
但し、行列のゼロ乗は単位行列Uになるとする。上記式(1−19)において、Δ/cが十分小さいと仮定して、最初の3項までとり、以下の項を棄却すると、次の式(1−20)のようになる。なお、詳細は後述するが、これよりも高次の展開を必要とする場合もある。
【0155】
Figure 0004014512
【0156】
そして、上記の式(1−20)を前記式(1−18)に代入すると、次の式(1−21)が得られる。
【0157】
Figure 0004014512
【0158】
<被写体から画像への変換巨大行列の逆行列>
逆行列の近似計算の結果として得られる巨大行列の各要素の値を求める。逆行列を次のようにTとおく。Tは、M×N行M×N列の巨大逆行列である。
【0159】
(cU+Δ)-1=(1/c)(U−Δ/c)≡T
【0160】
上記の巨大逆行列Tの各要素T(i,j)の値を、前記式(1−14)を用いて表示すると、次の式(1−22)のようになる。但し、iおよびjは自然数で、1≦i≦M×N、1≦j≦M×Nである。
【0161】
【数5】
Figure 0004014512
【0162】
ここで、Dmn(j)(巨大ベクトル表現)は、Dmn(h,k)(行列表現)が求まれば、機械的に求めることができる。そして、Dmn(h,k)(行列表現)は、以下に示すように二焦点レンズ21の特性から一義的に求めることができる。
【0163】
<Dmn(h,k)の値>
単一輝点の被写体αmnにより形成されるピンぼけ画像Dmnの(h,k)要素Dmn(h,k)(行列表現)は、以下のようにして求めることができる。
【0164】
二焦点レンズ21の内側および外側の円の撮像素子24上での半径をそれぞれriおよびroとする。riは、長焦点レンズ部22の外径(半径)、すなわち短焦点レンズ部23の内径(半径)に対応し、roは、短焦点レンズ部23の外径(半径)に対応する。また、撮像素子24の一つの画素の大きさをp×pとする。
【0165】
ピンぼけ画像を形成するレンズ部が外側の短焦点レンズ部23であるとすると、αmnによるピンぼけ画像Dmnは、(m,n)を中心とする半径ri/pからro/pまでのドーナツ状になる(図3参照)。画像Zmnの全体の明るさの総量を1とすれば、ピントの合った画像Bmnの明るさはcとなり、ピンぼけ画像Dmnの明るさの総量は(1−c)となり、次の式(1−23)が成立する。
【0166】
c=πri 2/πro 2=ri 2/ro 2 ・・・・・・・・・・(1−23)
【0167】
また、ピンぼけ画像Dmn中の画素当たりの平均的な明るさεは、ピンぼけ画像Dmnの全体の明るさが(1−c)なので、次の式(1−24)のように表すことができる。
【0168】
ε=(1−c)×p2/(πro 2−πri 2) ・・・・・・(1−24)
【0169】
上記の式(1−24)を用いると、Dmn(h,k)の値は、次の式(1−25)で表すことができる。
【0170】
Figure 0004014512
【0171】
ここで、撮像素子24上での半径riおよびroは、実験により求めることが好ましいが、二焦点レンズ21を構成する各レンズ部22,23の内外径、各レンズ部22,23の焦点距離、および二焦点レンズ21と撮像素子24との間の距離を用いて計算により求めてもよい。
【0172】
以上により、単一輝点の被写体αmnに対するピンぼけ画像Dmnの行列表現の各要素Dmn(h,k)の値をすべて求めることができる。従って、この行列表現の場合の各要素Dmn(h,k)の値から、巨大ベクトル表現をした場合のDmnの各要素Dmn(j)の値を容易に求めることができるので、前記式(1−22)に基づき巨大逆行列Tの各要素T(i,j)の値をすべて求めることができる。
【0173】
<畳み込み演算行列Wの導入>
ところで、巨大逆行列Tの各要素T(i,j)は、以下のような別の考え方をしても求めることができる。すなわち、先ず、図4に示すように、(1,1)要素のみに輝点のある被写体α11により形成される画像Z11と、(1,N)要素のみに輝点のある被写体α1Nにより形成される画像Z1Nと、(M,1)要素のみに輝点のある被写体αM1により形成される画像ZM1と、(M,N)要素のみに輝点のある被写体αMNにより形成される画像ZMNとの4つの画像行列を用いて構成される(2M−1)行(2N−1)列の行列Wを考える。
【0174】
図4において、行列Wは、右下部分に画像行列Z11を配置し、左下部分に画像行列Z1Nを配置し、右上部分に画像行列ZM1を配置し、左上部分に画像行列ZMNを配置して構成されている。但し、各画像行列Z11,Z1N,ZM1,ZMNは、1行分または1列分だけ重なって配置されている。ここで、W(x,y)は、行列Wの各要素であり、次の式(1−26)のように規定され、xおよびyは、正負のいずれの値もとる整数で、(1−M)≦x≦(M−1)、(1−N)≦y≦(N−1)である。なお、W(x,y)の各値は、これらの各要素の値の総和が1になるように正規化されている。
【0175】
Figure 0004014512
【0176】
また、行列Wは、別の表現をすれば、次のようになる。すなわち、行列Wは、単一輝点被写体αmnによるM行N列の画像行列Zmnを、x=h−m、y=k−nを満たす座標(h,k)から座標(x,y)への座標変換で、W(0,0)=Zmn(m,n)となるように平行移動することにより、Zmn(h,k)のうちの非零要素(図4中のcやε)を含む行列部分Eを行列Wの中央部に配置するとともに、中央部に配置された非零要素を含む行列部分Eの外側部分を零要素で埋めることにより構成されている。
【0177】
そして、非零要素を含む行列部分Eは、例えば、31画素×31画素分に収まる程度の大きさ等である。非零要素を含む行列部分Eに含まれるcの値は、例えば、c=0.8等であり、εの値は、例えば、ε=0.0013等である。但し、これらの数値に限定されるものではない。また、図4では、εは、1行または1列分の幅で線状に記載されているが、実際には、複数行または複数列の幅で帯状に配置される。例えば、W(0,0)=cを中心として、7行または7列分の幅で零要素(W(x,y)=0)が円環状に配置され、その外側に8行または8列分の幅でε(W(x,y)=ε)が円環状に配置される等である。
【0178】
次に、行列Wにおいて、M行N列の切出行列Kを図4中の実線位置から点線位置のように1行または1列ずつ位置をずらしながら移動させることにより、行列Wの各要素W(x,y)の中からM×N個の要素を切り出せば、その切り出した要素により構成される各行列K11,K12…KMNは、画像行列Zmn(1≦m≦M,1≦n≦N)と同じになる。例えば、Z11と同じになる切出行列K11は、次の式(1−27)のようになる。
【0179】
【数6】
Figure 0004014512
【0180】
上記の式(1−27)におけるK11は、行列表現であるが、これを巨大ベクトル表現にすると、次の式(1−28)のような縦ベクトルになる。
【0181】
Figure 0004014512
【0182】
同様にして、図4において、切出行列Kを1列分だけ左方向に移動して切り出しを行うと、Z12と同じになる切出行列K12が、次の式(1−29)のように得られ、また、その巨大ベクトル表現が、次の式(1−30)のように得られる。
【0183】
【数7】
Figure 0004014512
【0184】
Figure 0004014512
【0185】
このようにして切出行列Kを順次移動させてK11,K12…KMNが得られれば、変換巨大行列(cU+Δ)は、これらの縦ベクトルK11,K12…KMNを用いて、次の式(1−31)のように表すことができる。
【0186】
Figure 0004014512
【0187】
ここで、上記式(1−31)における巨大ベクトル(縦ベクトル)K11,K12…KMNに、前記式(1−28)および(1−30)の表現を用いると、(cU+Δ)を次の式(1−32)のように表すことができる。
【0188】
【数8】
Figure 0004014512
【0189】
上記式(1−32)において変換巨大行列(cU+Δ)の対角項は、全てW(0,0)となることがわかる。これを具体的に表現してみると、図5のようになる。図5において、対角項は、W(0,0)=cで一定であり、対角項以外の部分には、cに比べて微小な数値であるεが対角項と平行に現れている。これは、図4と図5とを見比べることにより、理解することができる。
【0190】
従って、前記式(1−20)により、変換巨大行列(cU+Δ)の逆行列である巨大逆行列Tは、具体的に表現すると、図6のようになる。図6において、対角項は、1/cで一定であり、対角項以外の部分には、cに比べて微小な数値である−ε/c2が対角項と平行に現れている。
【0191】
<畳み込み演算行列Qの導入>
ここで、図4に示した(2M−1)行(2N−1)列の行列Wの各要素W(x,y)を切出行列Kで切り出すことにより、図5に示すような変換巨大行列(cU+Δ)が得られることを考えれば、図6に示すような巨大逆行列Tを構成することができる(2M−1)行(2N−1)列の行列Qを考えることができる。
【0192】
このような行列Wに対応する行列Qは、図7のようになる。これは、図6と図7とを見比べることにより、理解することができる。図7において、行列Qの中央部は、Q(0,0)=1/cを中心として、円環状に−ε/c2が配置された構成となっている。その他の部分は、零要素である。つまり、Q(x,y)は、次の式(1−33)のようになる。
【0193】
Figure 0004014512
【0194】
ここで、xおよびyは整数で、(1−M)≦x≦(M−1)、(1−N)≦y≦(N−1)である。なお、図7の行列Qにおけるcやεの値は、図4の行列Wにおけるcやεの値と同じである。
【0195】
なお、本第1実施形態で説明を行っている状況設定の場合(ピンぼけ画像Dmnが円環状になる場合)に限らず、例えば、ピンぼけ画像Dmnが円形状や楕円形状や多角形状になる場合等も含め、上記式(1−33)を一般化すると、次の式(1−34)のようになる。なお、前述した式(1−20)よりも高次の展開を考慮した場合には、より一般的な形の式になるが、これについての詳細は後述する。
【0196】
Figure 0004014512
【0197】
一方、画像行列Zの各要素Z(h,k)の値は、上述した行列Wを用いて、次の式(1−35)に基づき畳み込み演算を行うことにより、被写体の行列Aの各要素A(m,n)の値から算出することができる。従って、行列Wは、畳み込み演算処理を行うための畳み込み演算行列である。
【0198】
Figure 0004014512
【0199】
ここで、hおよびkは自然数で、1≦h≦M、1≦k≦Nであり、mおよびnは自然数で、1≦m≦M、1≦n≦Nであり、Σmは、m=1〜Mの和であり、Σnは、n=1〜Nの和である。
【0200】
これと同様に考えれば、被写体の行列Aの各要素A(s,t)の値は、上述した行列Qを用いて、次の式(1−36)に基づき畳み込み演算を行うことにより、画像行列Zの各要素Z(h,k)の値から算出することができる。従って、行列Qも、畳み込み演算処理を行うための畳み込み演算行列である。
【0201】
Figure 0004014512
【0202】
ここで、sおよびtは自然数で、1≦s≦M、1≦t≦Nであり、hおよびkは自然数で、1≦h≦M、1≦k≦Nであり、Σhは、h=1〜Mの和であり、Σkは、k=1〜Nの和である。
【0203】
以上により、畳み込み演算行列Qを用いて畳み込み演算を行えば、被写体の行列Aの各要素A(s,t)の値を再生する再生演算処理を行うことができることがわかる。
【0204】
ところで、以上の説明では、Cの値が、0.5近傍(0.5も含む。以下、同様)以外の値のときについて成立し得る処理やその根拠について述べてきた。一方、Cの値が、0.5に近づくと、式(1−20)に示された展開では不十分であり、より高次の展開を必要とする。従って、式(1−34)についても、より高次の展開に対応した形にする必要がある。
【0205】
しかし、式(1−20)に比べ、より高次の展開を行うことは計算式が複雑になり、処理の複雑化や遅延化を招くことになるので好ましくない。そこで、Cの値が、0.5近傍の値のときにも対応し得る形で、式(1−34)を簡易的に次の式(1−37)のように置き換える。なお、このような置き換えにより高次の展開と同等な効果を得られることは、多くの演算を繰り返した結果、本願出願人により見出された。
【0206】
Figure 0004014512
【0207】
ここで、powerの値は、cの値に応じて決定すればよい。この際、cの値が、0.5近傍のときには、powerの値を2以外の値とする必要がある。より具体的には、cの値が、0.5近傍のときには、powerの値を1以上2未満とし、より好ましくは1とする。一方、cの値が、0.5近傍以外のときには、1以上2以下とする。
【0208】
また、以上の説明では、二焦点レンズ21のピントの合った画像を形成する部分である長焦点レンズ部22は、ボケの無い画像を形成するという前提で、説明が行われている。従って、長焦点レンズ部22により形成される画像には、W(0,0)にのみ非零要素があり、その値はcであるという仮定を置いている。
【0209】
しかし、実際には、長焦点レンズ部22により形成される画像には、収差等によるボケが生じることがあるので、長焦点レンズ部22により形成される画像は、W(0,0)の周囲に拡がり、W(0,0)の周囲の要素も非零要素となり得る。例えば、W(x,y)の中心では、W(0,0)=0.41となり、その周囲の要素については、W(0,1)=W(0,−1)=W(1,0)=W(−1,0)=0.08、W(1,1)=W(1,−1)=W(−1,1)=W(−1,−1)=0.02となり、それ以外の要素については、W(x,y)=0となる等である。
【0210】
そこで、長焦点レンズ部22により形成される画像に、収差等によるボケが生じ、W(0,0)以外の要素も非零要素となる場合には、W(0,0)の値およびW(0,0)の周囲に生じた非零要素の値を合計し、その合計値をcの値としてW(0,0)に入れ直すとともに、W(0,0)の周囲に生じた非零要素の値をゼロにするという修正作業を行い、これらの修正作業を経て作成された各要素W(x,y)の値を用いて、畳み込み演算行列Qの各要素Q(x,y)の値を算出すればよい。例えば、前述した具体的数値例の場合には、中心の要素の値0.41と、周囲の4要素の値0.08×4と、周囲の別の4要素の値0.02×4とを合計すると、0.81になるので、W(0,0)=c=0.81とするとともに、W(0,1)=W(0,−1)=W(1,0)=W(−1,0)=W(1,1)=W(1,−1)=W(−1,1)=W(−1,−1)=0とする。
【0211】
このような第1実施形態においては、以下のようにして画像改質処理装置30により、二焦点レンズ21を用いて被写体を撮像して得られた画像の質の改善が図られる。
【0212】
先ず、被写体の撮像を行う前に、式(1−33)または(1−34)、あるいは(1−37)に基づき、畳み込み演算行列Qの各要素Q(x,y)の値を予め算出し、画像改質処理装置30の畳み込み演算行列記憶手段32に記憶しておく。なお、記憶するのは、非零要素を含む行列部分Hの各値のみでよい(図7参照)。
【0213】
次に、撮像機構20により被写体を撮像する。この際、被写体から発せられた光は、二焦点レンズ21の各レンズ部22,23を通過して撮像素子24に至る。そして、被写体からの光を受けた撮像素子24の出力信号を引き出して画像改質処理装置30に取り込み、出力信号記憶手段31に記憶する。
【0214】
続いて、再生演算手段33により、畳み込み演算行列記憶手段32に記憶された各要素Q(x,y)の値(図7の行列部分Hの各値)と、出力信号記憶手段31に記憶された画像の出力信号を示す行列Zの各要素Z(h,k)の値とを用い、式(1−36)に基づき被写体の行列Aの各要素A(s,t)の値を算出する。
【0215】
その後、求めた被写体の行列Aの各要素A(s,t)の値を用い、撮像対象となった被写体を表示手段40の画面上に表示する。また、必要に応じ、図示されないプリンター等の出力手段により、被写体の印刷を行ってもよい。
【0216】
このような第1実施形態によれば、次のような効果がある。すなわち、再生演算手段33による演算処理は、式(1−33)または(1−34)、あるいは(1−37)に基づき予め算出されて畳み込み演算行列記憶手段32に記憶された(2M−1)行(2N−1)列の畳み込み演算行列Qの各要素Q(x,y)の値(本第1実施形態では、さらにその一部である非零要素を含む行列部分Hの各値)を用いて行われるので、式(1−22)で示されるM×N行M×N列の巨大逆行列Tを用いて演算処理を行う場合に比べ、非常に少ない計算量で、被写体の行列Aの各要素A(s,t)の値を算出することができる。
【0217】
例えば、M=300画素、N=400画素とすれば、巨大逆行列Tを用いる場合の計算量(M×N)×(M×N)=1.44×1010回に対し、畳み込み演算行列Qを用いる場合の計算量は、(2M−1)×(2N−1)=約48万回となり、さらに、畳み込み演算行列Qの中の非零要素を含む行列部分Hのみを用いる場合の計算量は、例えば31×31=約1000回程度となる。
【0218】
このため、短時間の処理で、ピントの合った画像を求めて被写体を再生することができるので、二焦点レンズ21で撮像された画像の質を短時間の処理で改善することができ、ピント合わせ機構を用いることなく、標準的な距離にある通常の被写体およびこれよりも近距離にある近接被写体のいずれもについても鮮明な画像を得ることができる。
【0219】
また、再生演算手段33による演算処理が非常に少ない計算量であることから、例えば携帯電話機や携帯情報端末等の携帯型の情報端末装置に搭載されている程度のCPUの能力でも短時間の処理で実行することができる。従って、二焦点レンズ21を備えた携帯型の情報端末装置に本発明を適用すれば、情報端末装置の使い勝手や性能の向上を図ることができる。
【0220】
[第2実施形態]
図8には、本発明の第2実施形態の画像改質処理装置230を含む撮像システム200の全体構成が示されている。撮像システム200は、前記第1実施形態の撮像システム10と画像改質処理装置230の構成が異なるのみであるので、同一部分には同一符号を付して詳しい説明は省略し、以下には異なる部分のみを説明する。
【0221】
図8において、画像改質処理装置230は、出力信号記憶手段231と、畳み込み演算行列記憶手段232と、再生演算手段233と、シェージング補正行列記憶手段234と、シェージング補正手段235とを備えている。これらのうち、出力信号記憶手段231、畳み込み演算行列記憶手段232、および再生演算手段233は、前記第1実施形態の出力信号記憶手段31、畳み込み演算行列記憶手段32、および再生演算手段33と同じである。
【0222】
シェージング補正行列記憶手段234は、二焦点レンズ21への光の入射角の不均一により画像周辺部の受光量が減少するシェージングの影響を補正するためのM行N列のシェージング補正行列Φの各要素Φ(s,t)の値を記憶するものである。
【0223】
ここで、シェージング補正行列Φの各要素Φ(s,t)の値は、次のように求められる。先ず、均一白色の被写体(フラットな被写体)を撮像して形成される画像の各要素の出力信号値をΨ(s,t)とする。このΨ(s,t)の値は、実験により求めることが好ましいが、計算により求めてもよい。計算の場合には、二焦点レンズ21の中央部の法線から測った被写体上の点の方位角θによる余弦値cosθを用いて求めることができる。このとき、シェージング補正行列Φの各要素Φ(s,t)の値は、次の式(2−1)のようになる。
【0224】
Φ(s,t)=1/Ψ(s,t) ・・・・・・・・・・・・(2−1)
【0225】
ここで、sおよびtは自然数で、1≦s≦M、1≦t≦Nである。なお、Ψ(s,t)の値は、最大の明るさ(輝度)となる要素の出力信号値が1になるように正規化されている。
【0226】
シェージング補正手段235は、シェージング補正行列記憶手段234に記憶された各要素Φ(s,t)の値と、再生演算手段233による処理を行って得られた被写体の行列Aの各要素A(s,t)の値とを用いて、次の式(2−2)に基づき、シェージング補正を行った被写体の行列Ashの各要素Ash(s,t)を算出する処理を行うものである。
【0227】
sh(s,t)=A(s,t)×Φ(s,t) ・・・・・・(2−2)
【0228】
シェージング補正行列記憶手段234は、畳み込み演算行列記憶手段232と同様に、例えば、ハードディスクやROM等により実現される。
【0229】
シェージング補正手段235は、再生演算手段233と同様に、中央演算処理装置(CPU)、およびこのCPUの動作手順を規定する一つまたは複数のプログラムにより実現される。
【0230】
このような第2実施形態においては、以下のようにして画像改質処理装置230により、二焦点レンズ21を用いて被写体を撮像して得られた画像の質の改善が図られる。
【0231】
先ず、シェージング補正行列Φの各要素Φ(s,t)の値をシェージング補正行列記憶手段234に記憶しておく。
【0232】
次に、前記第1実施形態と同様な処理を行い、再生演算手段233による処理を行った後に、シェージング補正手段235により、各要素Φ(s,t)の値と、再生演算手段233による処理で得られた被写体の行列Aの各要素A(s,t)の値とを用いて、式(2−2)に基づき、シェージング補正を行った被写体の行列Ashの各要素Ash(s,t)の値を算出する。
【0233】
このような第2実施形態によれば、前記第1実施形態で得られる効果に加え、シェージング補正手段235による処理を行うので、シェージングの影響が排除されるため、画像の質を、より一層改善することができるという効果がある。
【0234】
[第3実施形態]
図9には、本発明の第3実施形態の画像改質処理装置330を含む撮像システム300の全体構成が示されている。撮像システム300は、前記第1実施形態の撮像システム10と画像改質処理装置330の構成が異なるのみであるので、同一部分には同一符号を付して詳しい説明は省略し、以下には異なる部分のみを説明する。
【0235】
図9において、画像改質処理装置330は、出力信号記憶手段331と、畳み込み演算行列記憶手段332と、再生演算手段333と、シェージング補正行列記憶手段334と、シェージング補正手段335とを備えている。これらのうち、出力信号記憶手段331、畳み込み演算行列記憶手段332、および再生演算手段333は、前記第1実施形態の出力信号記憶手段31、畳み込み演算行列記憶手段32、および再生演算手段33と同じである。
【0236】
シェージング補正行列記憶手段334は、二焦点レンズ21への光の入射角の不均一により画像周辺部の受光量が減少するシェージングの影響を補正するためのM行N列のシェージング補正行列Φの各要素Φ(h,k)の値を記憶するものである。
【0237】
ここで、シェージング補正行列Φの各要素Φ(h,k)の値は、前記第2実施形態と同様にして、Ψ(h,k)を用いて求められる。
【0238】
シェージング補正手段335は、シェージング補正行列記憶手段334に記憶された各要素Φ(h,k)の値と、画像の出力信号の行列Zの各要素Z(h,k)の値とを用いて、次の式(3−1)に基づき、シェージング補正を行った画像の出力信号の行列Zshの各要素Zsh(h,k)を算出し、得られたZsh(h,k)の値を新たなZ(h,k)として再生演算手段333による処理に使用されるようにする処理を行うものである。
【0239】
sh(h,k)=Z(h,k)×Φ(h,k) ・・・・・・(3−1)
【0240】
ここで、hおよびkは自然数で、1≦h≦M、1≦k≦Nである。
【0241】
シェージング補正行列記憶手段334は、畳み込み演算行列記憶手段332と同様に、例えば、ハードディスクやROM等により実現される。
【0242】
シェージング補正手段335は、再生演算手段333と同様に、中央演算処理装置(CPU)、およびこのCPUの動作手順を規定する一つまたは複数のプログラムにより実現される。
【0243】
このような第3実施形態においては、以下のようにして画像改質処理装置330により、二焦点レンズ21を用いて被写体を撮像して得られた画像の質の改善が図られる。
【0244】
先ず、シェージング補正行列Φの各要素Φ(h,k)の値をシェージング補正行列記憶手段334に記憶しておく。
【0245】
次に、再生演算手段333による処理を行う前に、シェージング補正手段335により、各要素Φ(h,k)の値と、画像の出力信号の行列Zの各要素Z(h,k)の値とを用いて、式(3−1)に基づき、シェージング補正を行った画像の出力信号の行列Zshの各要素Zsh(h,k)の値を算出した後、得られたZsh(h,k)の値を新たなZ(h,k)とする。
【0246】
続いて、シェージング補正手段335による処理を経たZ(h,k)の値を用いて、前記第1実施形態と同様に、再生演算手段333による処理およびその後の処理を行う。
【0247】
このような第3実施形態によれば、前記第1実施形態で得られる効果に加え、シェージング補正手段335による処理を行うので、シェージングの影響が排除されるため、画像の質を、より一層改善することができるという効果がある。
【0248】
[第4実施形態]
図10には、本発明の第4実施形態の画像改質処理装置430の一部を構成するデジタルフィルタ回路433の詳細構成が示されている。前記第1、第2、第3実施形態では、各再生演算手段33,233,333は、中央演算処理装置(CPU)およびこのCPUの動作手順を規定する一つまたは複数のプログラムにより実現されていたが、本第4実施形態では、再生演算手段は、図10に示すようなデジタルフィルタ回路433により実現されている。その他の構成は、前記第1、第2、第3実施形態と同様である。
【0249】
デジタルフィルタ回路433は、再生演算手段による処理、すなわち前記第1実施形態の式(1−36)に基づく畳み込み演算行列Qを用いた畳み込み演算処理を、ハードウェアにより実現するものである。
【0250】
なお、図10では、説明を簡略化するために、前記第1実施形態の式(1−33)または(1−34)、あるいは(1−37)で規定される畳み込み演算行列Qの各要素Q(x,y)の値を3画素×3画素分だけ用いる場合の回路が図示されている。しかし、実際には、図7の非零要素を含む行列部分Hの画素分(例えば31画素×31画素分)だけQ(x,y)の値が用いられるので、デジタルフィルタ回路433の大きさは、もっと大きくなるが、各構成回路の配置方法は、図10と同様である。
【0251】
図10において、デジタルフィルタ回路433は、順次入力されてくる画像の出力信号の行列Zの各要素Z(h,k)の値に畳み込み演算行列Qの各要素Q(x,y)の値を乗ずるための複数(図10では、9個)の乗算回路401〜409と、これらの乗算回路401〜409からの出力信号を加算する複数(図10では、8個)の加算回路411〜418と、順次入力される各要素Z(h,k)の信号の流れの速度調整を行うための複数(図10では、8個)のディレイ回路421〜428とを備えている。
【0252】
乗算回路401,402,403,404,405,406,407,408,409は、それぞれQ(−1,−1),Q(−1,0),Q(−1,1),Q(0,−1),Q(0,0),Q(0,1),Q(1,−1),Q(1,0),Q(1,1)の各値を乗ずるための回路である。
【0253】
ディレイ回路421〜426は、画素から画素に移る時間だけ信号を遅らせる1クロックディレイを行うための回路であり、ディレイ回路427,428は、行から行に移る時間だけ信号を遅らせる1Hディレイを行うための回路である。
【0254】
このような第4実施形態によれば、前記第1〜第3実施形態で得られる効果に加え、畳み込み演算行列Qを用いた畳み込み演算処理を、ハードウェアにより実現することができるので、画像改質に要する処理時間を、より一層短くすることができるという効果がある。
【0255】
[第5実施形態]
図11には、本発明の第5実施形態の画像改質処理装置530を含む撮像システム500の全体構成が示されている。撮像システム500は、前記第1実施形態の撮像システム10と画像改質処理装置530の構成が異なるのみであるので、同一部分には同一符号を付して詳しい説明は省略し、以下には異なる部分のみを説明する。
【0256】
図11において、撮像システム500は、被写体を撮像する撮像機構20と、この撮像機構20により撮像された画像の質を改善する画像改質処理装置530と、この画像改質処理装置530により質の改善を行った画像を表示する表示手段40とを備えている。これらのうち撮像機構20および表示手段40の構成は、前記第1実施形態の場合と同様である。
【0257】
画像改質処理装置530は、出力信号記憶手段531と、ディスクリート・コサイン変換処理手段532と、ピンぼけ画像消去処理手段533と、量子化処理手段534と、符号化処理手段535と、余弦値記憶手段536とを含んで構成されている。
【0258】
出力信号記憶手段531は、被写体を二焦点レンズ21により撮像して得られた画像の出力信号を撮像素子24から引き出して記憶するものである。
【0259】
ディスクリート・コサイン変換処理手段(DCT処理手段)532は、出力信号記憶手段531に記憶した撮像素子24の各画素の出力信号をQ画素×Q画素(ここでは、8画素×8画素として説明を行うものとする。)の単位画面分だけ取り出し、取り出した信号レベルSxyについて後述する式(5−1)に基づきディスクリート・コサイン変換処理(DCT処理)を行うことにより各空間周波数に対応した信号レベルSF uvを求める処理を行うものである。このDCT処理は、通常のJPEGによる画像の圧縮処理で行うものと同様の処理である。
【0260】
ピンぼけ画像消去処理手段533は、ディスクリート・コサイン変換処理手段532による処理で得られたSF uvのうちゼロの成分SF 00の値に、二焦点レンズ21の全体面積に対するピントの合った画像を形成するレンズ部(長焦点レンズ部22または短焦点レンズ部23)の面積の割合を乗じ、この乗算により得られた値を新たなSF 00の値とする処理を行うものである。
【0261】
量子化処理手段534は、ピンぼけ画像消去処理手段533による処理後の信号レベルSF uvについて量子化処理を行うものである。この量子化処理は、通常のJPEGによる画像の圧縮処理で行うものと同様の処理である。
【0262】
符号化処理手段535は、量子化処理手段534による処理で得られた量子化データを符号化する処理を行うものである。この符号化処理は、通常のJPEGによる画像の圧縮処理で行うものと同様の処理である。
【0263】
余弦値記憶手段536は、DCT処理手段532による演算処理で用いる後述する式(5−1)中のcos(余弦)の値を、xとu、および、yとvの各組み合わせについて格納して記憶するテーブルである。
【0264】
出力信号記憶手段531および余弦値記憶手段536としては、例えば、ハードディスク、ROM、EEPROM、フラッシュ・メモリ、RAM、MO、CD−ROM、CD−R、CD−RW、DVD−ROM、DVD−RAM、FD、磁気テープ、あるいはこれらの組合せ等を採用することができる。
【0265】
DCT処理手段532、ピンぼけ画像消去処理手段533、量子化処理手段534、および符号化処理手段535は、撮像システム500を構成する各種の情報端末装置(例えば、携帯電話機や携帯情報端末等の携帯型の情報端末装置、あるいはカメラを接続したパーソナル・コンピュータ、監視カメラ装置等)の内部に設けられた中央演算処理装置(CPU)、およびこのCPUの動作手順を規定する一つまたは複数のプログラムにより実現される。
【0266】
以下には、画像改質処理装置530により行われる各種演算処理の根拠を説明する。
【0267】
前記第1実施形態の説明で述べたように、光軸を共有する二焦点レンズ21による撮像素子24上の画像は、内側に配置された長焦点レンズ部22と、外側に配置された短焦点レンズ部23とのうちの、一方のレンズ部によるピントの合った画像と、他方のレンズ部によるピントの合わない画像(いわゆるピンぼけ画像)との重ね合せになっている。
【0268】
この際、ピントの合わない画像は、レンズ部の口径および倍率を適切に選ぶことにより、被写体の情報をほとんど失った、画面内の受光量の変動の少ない画像になる。
【0269】
以上のことを考慮すると、ピンぼけ画像を適切な方法で消去できれば、ピントの合った画像の再生を実現することができる。そして、画像改善処理時間(計算量/処理能力)をできるだけ少なくすることができる簡易な消去方法とすれば、携帯情報端末のCPUの能力の範囲内でも短時間に処理することができるようになる。そこで、以下では、処理時間を極力短くする消去方法について説明する。
【0270】
先ず、ピンぼけ画像消去処理の基本的な考え方を説明する。
【0271】
<画像改善処理の対象となる画像と消去処理の基本的な方法>
二焦点レンズ21により形成されたピントの合った画像とピンぼけ画像との重なった画像を、画像改善処理の対象とする。ピンぼけ画像は、画面内でほぼ完全に被写体の情報を失っており、画面の各位置の、すなわち撮像素子24の画素毎の出力信号レベルの変動も少ないものとする。この場合、二焦点レンズ21の画像から、ピンぼけ画像(の信号値)を差し引くことでピントの合った画像を形成することができる。なお、ピンぼけ画像の信号値を求める際には、被写体上における任意の点の広がり範囲での平均値は、両方のレンズ部22,23の面積に比例すると考えてよい。
【0272】
<消去処理時間の短縮のための方法>
先ず、撮像素子24の出力信号データ(=ビットマップデータ)を適当な方法で圧縮する。ここでは、JPEGデータに変換することとする。JPEGでは、各画素を8×8画素の単位で分割して処理する。従って、ピンぼけ画像消去もこの分割を利用して実行する。すなわち、JPEGで各分割単位毎のディスクリート・コサイン変換(DCT)を実行し、その周波数成分を用いて、信号レベルの平均値をとる。この平均値を、ピントの合ったデータとピンぼけデータとの平均光量比により按分し、ピンぼけ画像の信号の平均値相当分を元のデータから差し引くことで、ピントの合った画像のみを残す。そして、分割された8×8画素の単位画面で行う一連の処理を、撮像素子24の面上の全ての単位画面について繰り返して行う。
【0273】
次に、実際のデータ処理について説明する。ここでは、JPEGの圧縮処理の実行過程に、ピンぼけ画像消去処理も入れることとして、その実際的なアルゴリズムについて説明する。
【0274】
<DCT処理>
前述したように8×8画素を一単位として分割された単位画面内の各画素の信号レベルをSxy(x,yは8×8画素の単位画面内の位置座標を示し、それぞれ0〜7の値をとる。)とし、SxyをDCT処理した各空間周波数成分の信号レベルをSF uv(u,vは空間周波数を示し、それぞれ0〜7の値をとる。)とすると、次の式(5−1)が成立する。
【0275】
Figure 0004014512
【0276】
ここで、Σxはx=0〜7の和を示し、Σyはy=0〜7の和を示す。また、Cu,Cvは、次の式(5−2)で示される値をとる。
【0277】
Figure 0004014512
【0278】
一方、DCT逆変換は、次の式(5−3)のようになる。
【0279】
Figure 0004014512
【0280】
ここで、Σuはu=0〜7の和を示し、Σvはv=0〜7の和を示す。しかし、実際には、量子化処理によりゼロでないSF uvの数は64個より遥かに少なく、ほぼ10個程度と考えられる。
【0281】
<ピンぼけ画像の消去処理>
ここで、前記式(5−3)を用いて8×8画素に分割された単位画面内の信号レベルSxyの総和Ssumを求めると、次の式(5−4)のようになる。
【0282】
Figure 0004014512
【0283】
ここで、Πmはm=1〜4の積を示し、Πnはn=1〜4の積を示すが、u=0,v=0以外ではΣ記号(あるいはΠ記号)の中はゼロになるので、最終的には、Ssumは上記の式(5−4)の右辺の最後尾に示すように8SF 00になる。従って、各画素の信号レベルSxyの平均値Smeanは、次のように表すことができる。
【0284】
Smean=Ssum/64=SF 00/8
【0285】
ピンぼけ画像の消去処理後の信号をSpxyとし、また、ピンぼけ画像を生成する側のレンズ部を通過する光量の割合は、両レンズ部22,23の開口面積の按分比によって決まるので、その全光量に対する割合をρとすると、次の式(5−5)が成立する。
【0286】
Spxy=Sxy−ρ×Smean ・・・・・・・・・・・・・・・(5−5)
【0287】
上記の式(5−5)を前記式(5−1)に代入すると、次の式(5−6)のようになる。
【0288】
Figure 0004014512
【0289】
ここで、次の式(5−7)のようにおくと、式(5−8)および式(5−9)が得られる。
【0290】
SpF uv=SF uv−Cuv ・・・・・・・・・・・・・・・・(5−7)
【0291】
Figure 0004014512
【0292】
Figure 0004014512
【0293】
上記の式(5−9)において、Πmはm=1〜4の積を示し、Πnはn=1〜4の積を示すが、u=0,v=0以外ではΣ記号(あるいはΠ記号)の中はゼロになるので、結果として、次の式(5−10)のようになる。
【0294】
Figure 0004014512
【0295】
従って、消去処理後の信号SpF uvと、処理前の信号SF uvとの関係は、式(5−7)および式(5−10)より、次のようになる。
【0296】
Figure 0004014512
【0297】
以上のように、ピンぼけ画像の消去処理では、DCTにおける空間周波数ゼロの成分のみその値を(1−ρ)倍にすれば、消去処理は完了する。また、以上の一連の処理は、8×8画素の単位画面内での処理であるが、この処理を撮像素子24上に分割形成された単位画面の数だけ実行すればよい。
【0298】
このような第5実施形態においては、以下のようにして画像改質処理装置530により、二焦点レンズ21を用いて被写体を撮像して得られた画像の質の改善が図られる。
【0299】
先ず、撮像機構20により被写体を撮像する。この際、被写体から発せられた光は、二焦点レンズ21の各レンズ部22,23を通過して撮像素子24に至る。そして、被写体からの光を受けた撮像素子24から、画素数分の出力信号データを引き出して画像改質処理装置530に取り込み、出力信号記憶手段531に記憶する。
【0300】
続いて、DCT処理手段532により、出力信号記憶手段531記憶した画像データから8×8画素の単位画面分のデータを読み込み、前記式(5−1)に基づきDCTの処理計算を行い、各空間周波数に対応した信号レベルSF uvを求める。この際、式(5−1)中のcos(余弦)の値は、余弦値記憶手段536に記憶された値を読み込んで使用するため、その都度の計算は行われない。
【0301】
次に、ピンぼけ画像消去処理手段533により、SF 00(u=0,v=0)の値に、二焦点レンズ21の全体面積に対するピントの合った画像を形成するレンズ部の面積の割合(1−ρ)をかけて得られる値を、新しいSF 00とする処理を行う。つまり、前記式(5−10)により、消去処理後の信号SpF uvと、処理前の信号SF uvとが異なるのは、u=v=0のときだけであるから、SF 00にだけ(1−ρ)を乗じれば、ピンぼけ画像の消去処理が完了する。
【0302】
その後、DCT処理手段532およびピンぼけ画像消去処理手段533による各処理を経たSF uvについて、量子化処理手段534による処理を行うなど、JPEGの通常の処理を行うと、SF uvは高次のu、vに対してほとんどゼロになるので、データ量は大幅に圧縮される。
【0303】
さらに、このようにして求められたSF uvを、符号化処理手段535により、u+vの小さい順にそれまでのゼロ要素の数とセットにしてメモリに収容する(JPEGの処理)。
【0304】
そして、以上のDCT処理手段532、ピンぼけ画像消去処理手段533、量子化処理手段534、および符号化処理手段535による一連の処理を、撮像素子24上の全ての単位画面に対して繰り返す(JPEGの処理)。これらの処理により、ピンぼけ画像を消去した画像のJPEG形式でのファイルを得ることができる。
【0305】
このような第5実施形態によれば、次のような効果がある。すなわち、ピンぼけ画像消去処理手段533による処理は、DCT処理を行って得られたSF uvのうちゼロの成分SF 00の値のみに(1−ρ)を乗じ、この乗算により得られた値を新たなSF 00の値とするという簡単な処理を行うだけであり、残りの処理は、通常のJPEGによる画像の圧縮処理と同様であるため、少ない計算量で一連の処理を実行することができる。
【0306】
つまり、DCTを主体とするJPEGの圧縮法を用いることにより、その処理途中にピンぼけ画像の消去処理を簡単に盛込むことができるので、JPEG処理とほとんど同程度の処理時間でピンぼけ画像の消去処理を行うことができる。
【0307】
このため、短時間の処理で、ピントのぼけた画像を消去してピントの合った画像を求め、画像の質の改善を図ることができるうえ、計算量が少ないことから、例えば携帯電話機や携帯情報端末等の携帯型の情報端末装置に搭載されている程度のCPUの能力でも短時間の処理で実行することができる。従って、二焦点レンズ21を備えた携帯型の情報端末装置に本発明を適用すれば、情報端末装置の使い勝手や性能の向上を図ることができる。
【0308】
[第6実施形態]
図12には、本発明の第6実施形態の画像改質処理装置630を含む撮像システム600の全体構成が示されている。撮像システム600は、前記第1実施形態の撮像システム10と画像改質処理装置630の構成が異なるのみであるので、同一部分には同一符号を付して詳しい説明は省略し、以下には異なる部分のみを説明する。
【0309】
図12において、撮像システム600は、被写体を撮像する撮像機構20と、この撮像機構20により撮像された画像の質を改善する画像改質処理装置630と、この画像改質処理装置630により質の改善を行った画像を表示する表示手段40とを備えている。これらのうち撮像機構20および表示手段40の構成は、前記第1実施形態の場合と同様である。
【0310】
画像改質処理装置630は、出力信号記憶手段631と、移動平均算出手段632と、画像補正手段633とを含んで構成されている。
【0311】
出力信号記憶手段631は、被写体を二焦点レンズ21により撮像して得られた画像の各要素の出力信号値Z(h,k)を撮像素子24から引き出して記憶するものである。
【0312】
移動平均算出手段632は、次の式(6−1)に基づき、図13に示すような座標(h,k)を中心とするQ画素×Q画素の単位画面F内での各出力信号値Z(h,k)の平均値Zmean(h,k)を算出する処理を行うものである。そして、Q画素×Q画素の単位画面Fは、処理の対象となる出力信号値Z(h,k)の移動とともに移動するため、Zmean(h,k)は移動平均値となる。
【0313】
Figure 0004014512
【0314】
ここで、Qは、3以上の奇数の自然数であり、hおよびkは、自然数で、1≦h≦M、1≦k≦Nであり、xおよびyは、整数で、(1−Q)/2≦x≦(Q−1)/2、(1−Q)/2≦y≦(Q−1)/2であり、Σxは、x=(1−Q)/2〜(Q−1)/2の和、Σyは、y=(1−Q)/2〜(Q−1)/2の和である。
【0315】
画像補正手段633は、移動平均算出手段632により算出した移動平均値Zmean(h,k)を用いて、次の式(6−2)に基づき、Z(h,k)を画像改質処理して得られる信号値Znew(h,k)を算出する処理を行うものである。この処理は、ピンぼけ分の信号を減算してから、減算後の信号を元の信号レベルに戻していることに相当する。
【0316】
Figure 0004014512
【0317】
ここで、cは、比例係数で、二焦点レンズ21の全体面積に対するピントの合った画像を形成するレンズ部の面積の比の値であり、kは、正規化係数であり、Znew(h,k)の最大値を1にするための値である。なお、光の量の分割比がレンズの面積比と一致しない場合には、cの値は、面積比で定めるのではなく、二焦点レンズ21のピントの合ったレンズ部を通過して実際に撮像素子24に到達する光の量または撮像素子24の信号量と、二焦点レンズ21の全体を通過して実際に撮像素子24に到達する光の量または撮像素子24の信号量との比の値として求めてもよい。
【0318】
出力信号記憶手段631は、RAMやハードディスク等により実現される。
【0319】
移動平均算出手段632および画像補正手段633は、中央演算処理装置(CPU)およびこのCPUの動作手順を規定する一つまたは複数のプログラムにより実現してもよく、あるいはデジタルフィルタ回路により実現してもよい。デジタルフィルタ回路とした場合には、ハードウェアによる処理となるため、計算処理時間を、より一層短くすることができる。この際、デジタルフィルタ回路は、乗算回路や加算回路等により構成され、乗算回路で乗ずる値は、{−(1−c)/(c×Q2)}および{(1/c)−(1−c)/(c×Q2)}である。
【0320】
このような第6実施形態においては、以下のようにして画像改質処理装置630により、二焦点レンズ21を用いて被写体を撮像して得られた画像の質の改善が図られる。
【0321】
先ず、被写体を撮像して得られた画像の各要素の出力信号値Z(h,k)を出力信号記憶手段631に記憶する。
【0322】
次に、移動平均算出手段632により、処理対象となるZ(h,k)について、式(6−1)に基づき、座標(h,k)を中心とするQ画素×Q画素の単位画面F内での各出力信号値Z(h,k)の平均値Zmean(h,k)を算出する。
【0323】
続いて、画像補正手段633により、移動平均算出手段632により算出した移動平均値Zmean(h,k)を用いて、式(6−2)に基づき、Z(h,k)を画像改質処理して得られる信号値Znew(h,k)を算出する。なお、式(6−1)に基づく移動平均算出手段632による処理と、式(6−2)に基づく画像補正手段633による処理とは、1つの式で一体的に行ってもよい。
【0324】
そして、以上のような処理を各出力信号値Z(h,k)について繰り返す。この際、Z(h,k)の移動に伴って、平均をとる対象であるQ画素×Q画素の単位画面Fも移動するので、Zmean(h,k)は移動平均値をとっていることになる。
【0325】
その後、求めたZnew(h,k)の値を用い、撮像対象となった被写体を表示手段40の画面上に表示する。また、必要に応じ、図示されないプリンター等の出力手段により、被写体の印刷を行ってもよい。
【0326】
このような第6実施形態によれば、次のような効果がある。すなわち、画像補正手段633による処理が行われるので、ピンぼけ分の画像を除去することができるため、画像の質を改善することができる。
【0327】
また、移動平均をとって減ずるだけの簡単な演算処理であるため、計算量が少なく、短時間で処理することができる。このため、携帯型の情報端末装置等にも好適に用いることができる。
【0328】
[変形の形態]
なお、本発明は前記各実施形態に限定されるものではなく、本発明の目的を達成できる範囲内での変形等は本発明に含まれるものである。
【0329】
すなわち、前記各実施形態では、撮像機構20を構成する二焦点レンズ21は、内側に長焦点レンズ部22が配置され、外側に短焦点レンズ部23が配置されていたが、本発明の画像改質処理の対象は、このような配置の二焦点レンズにより撮像された画像に限定されるものではなく、例えば、逆の配置、すなわち内側に短焦点レンズ部が配置され、外側に長焦点レンズ部が配置された二焦点レンズによる画像であってもよい。
【0330】
また、前記各実施形態では、二焦点レンズ21を構成する長焦点レンズ部22と短焦点レンズ部23とは、同心に配置されているが、これに限定されるものではなく、本発明におけるピントの合った画像を形成する一方のレンズ部と、ピントのぼけた画像を形成する他方のレンズ部とは、同心に配置されていてもよく、同心に配置されていなくてもよい。
【0331】
また、前記第1実施形態では、外側に配置されたレンズ部によりピンぼけ画像が形成される場合について説明されていたが、本発明は、内側に配置されたレンズ部によりピンぼけ画像が形成される場合についても適用することができる。なお、この場合には、ピンぼけ画像は、リング状ではなく、内側に配置されたレンズ部の正面形状に従った円形、楕円形、多角形等の形状となる。
【0332】
さらに、前記第1実施形態では、短焦点レンズ部によりピンぼけ画像が形成される場合について説明されていたが、本発明は、長焦点レンズ部によりピンぼけ画像が形成される場合についても適用することができる。なお、この場合には、被写体は、例えば、2次元バーコードや虹彩や文字等の近接被写体である。
【0333】
そして、前記第5実施形態の説明では、ピンぼけ画像の画面内では略完全に被写体の情報が失われており、画面の受光量、すなわち撮像素子24の画素毎の出力信号レベルの変動も無視できるほど少ないものとしていたが、この条件は必ずしも必要ではなく、少なくともJPEG処理をする際の単位画面の範囲で画素毎の出力信号レベルの変動がなければ、本発明を好適に適用することができる。
【0334】
【発明の効果】
以上に述べたように本発明によれば、畳み込み演算行列Qを用いて畳み込み演算を行い、あるいは、JPEG処理またはこれに類似する処理を利用してピンぼけ画像の消去処理を行い、あるいは、移動平均をとってピンぼけ分の信号を減ずる処理を行うので、二焦点レンズで撮像された画像の質を短時間の処理で改善することができ、ピント合わせ機構を用いることなく、標準的な距離にある通常の被写体およびこれよりも近距離にある近接被写体のいずれもについても鮮明な画像を得ることができるという効果がある。
【図面の簡単な説明】
【図1】本発明の第1実施形態の画像改質処理装置を含む撮像システムの全体構成図。
【図2】第1実施形態の画像改質処理装置による処理対象となる画像を形成する二焦点レンズの詳細構成図。
【図3】第1実施形態における被写体とこの被写体を二焦点レンズにより撮像して得られる画像との関係の説明図。
【図4】第1実施形態の畳み込み演算行列Wの説明図。
【図5】第1実施形態の変換巨大行列(cU+Δ)の説明図。
【図6】第1実施形態の巨大逆行列Tの説明図。
【図7】第1実施形態の畳み込み演算行列Qの説明図。
【図8】本発明の第2実施形態の画像改質処理装置を含む撮像システムの全体構成図。
【図9】本発明の第3実施形態の画像改質処理装置を含む撮像システムの全体構成図。
【図10】本発明の第4実施形態の画像改質処理装置の一部を構成するデジタルフィルタ回路の詳細構成図。
【図11】本発明の第5実施形態の画像改質処理装置を含む撮像システムの全体構成図。
【図12】本発明の第6実施形態の画像改質処理装置を含む撮像システムの全体構成図。
【図13】第6実施形態における移動平均をとる処理の説明図。
【符号の説明】
21 二焦点レンズ
22 一方または他方のレンズ部に該当する長焦点レンズ部
23 一方または他方のレンズ部に該当する短焦点レンズ部
24 撮像素子
30,230,330,430,530,630 画像改質処理装置
32,232,332 畳み込み演算行列記憶手段
33,233,333 再生演算手段
234,334 シェージング補正行列記憶手段
235,335 シェージング補正手段
401〜409 乗算回路
411〜418 加算回路
421〜428 ディレイ回路
433 再生演算手段であるデジタルフィルタ回路
531 出力信号記憶手段
532 ディスクリート・コサイン変換処理手段(DCT処理手段)
533 ピンぼけ画像消去処理手段
534 量子化処理手段
535 符号化処理手段
632 移動平均算出手段
633 画像補正手段
E,H 非零要素を含む行列部分
M 撮像素子の縦方向の画素数
N 撮像素子の横方向の画素数
Q 畳み込み演算行列
Φ シェージング補正行列[0001]
BACKGROUND OF THE INVENTION
The present invention provides a focused image from an image in which a focused image formed by one lens unit constituting a bifocal lens overlaps a blurred image formed by the other lens unit. The present invention relates to an image modification processing method, an apparatus thereof, a program, and a data recording medium, for example, a personal digital assistant (PDA), a mobile phone (including PHS: Personal Handy phone System), a television, and the like. It can be used for a remote control device for operation of home appliances such as video, a personal computer with a camera, and an information terminal device having an image input function by a bifocal lens such as a surveillance camera device.
[0002]
[Background]
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.
[0003]
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 proposed by the present applicant (see Japanese Patent Application No. 2000-348800).
[0004]
[Problems to be solved by the invention]
However, in the information terminal device including the above-described bifocal lens, for example, an optical shutter such as a liquid crystal shutter can be provided between the bifocal lens and the image sensor to switch between the long focus lens portion and the short focus lens portion. When configured, it is possible to obtain a high-contrast image, but when such switching of the lens unit is not performed, the focused image formed by each of the two lens units and the focused image are formed. There is a problem that it is difficult to obtain a clear image because an image that does not match is overlapped.
[0005]
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.
[0006]
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.
[0007]
The object of the present invention is to improve the quality of an image captured by a bifocal lens in a short time, and without using a focusing mechanism, a normal object at a standard distance and closer to this. An object of the present invention is to provide an image modification processing method and apparatus, a program, and a data recording medium capable of obtaining a clear image for any of close objects at a distance.
[0008]
[Means for Solving the Problems]
The present invention provides a focused image from an image in which a focused image formed by one lens unit constituting a bifocal lens overlaps a blurred image formed by the other lens unit. An image modification processing method for obtaining a subject, wherein 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 the subject is imaged by the bifocal lens Each element of the (2M-1) row (2N-1) column convolution arithmetic matrix Q for performing the convolution operation processing, where Z is a matrix of M rows and N columns indicating the output signal of the image obtained as described above The value of the matrix portion including at least non-zero elements among the values of Q (x, y) is calculated in advance based on the following equation (1) and stored in the convolution calculation matrix storage means, and the subject is imaged by the bifocal lens. Tatami mats by playback calculation means The following equation is used by using at least a part of the values of each element Q (x, y) stored in the error calculation matrix storage means and the value of each element Z (h, k) of the matrix Z of the image output signal. The value of each element A (s, t) of the subject matrix A is calculated based on (2).
[0009]
Figure 0004014512
[0010]
Figure 0004014512
[0011]
Here, x and y are integers, (1-M) ≦ x ≦ (M−1), (1-N) ≦ y ≦ (N−1), s and t are natural numbers, and 1 ≦ s ≦ M, 1 ≦ t ≦ N, h and k are natural numbers, 1 ≦ h ≦ M, 1 ≦ k ≦ N, and W (x, y) is (2M−1) rows (2N−1) ) This is the value of each element of the matrix W of the column, and this matrix W is one when a subject having a bright spot at only one point indicated by coordinates (m, n) excluding the end is imaged with a bifocal lens. The matrix Zmn of M rows and N columns indicating the output signal of the image formed by the other lens unit is changed from coordinates (h, k) satisfying x = hm and y = kn to coordinates (x, y). In the coordinate conversion to, the matrix part including the non-zero element of Zmn (h, k) is moved to the center of the matrix W by moving in parallel so that W (0,0) = Zmn (m, n). When placed in the part And c is a proportionality coefficient, and the ratio of the area of one lens part to the entire area of the bifocal lens is configured by filling the outer part of the matrix part including the non-zero element arranged at the center part with zero elements. And power is a real number that is a power of c, 1 ≦ power ≦ 2, and ΣhIs the sum of h = 1 to M, and ΣkIs the sum of k = 1 to N.
[0012]
In addition, the “bifocal lens” is for capturing 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 bar code, an iris, a character, etc.) that is closer than a standard distance subject. The focus lens unit is an imaging lens formed integrally on the same surface. The same applies to the following inventions. 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.
[0013]
The “one lens unit” is a lens unit that forms an in-focus image. When a normal subject at a standard distance is imaged, the 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.
[0014]
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.
[0015]
As the “imaging device”, specifically, for example, a complementary metal oxide semiconductor (CMOS), a charge coupled device (CCD), or the like can be employed.
[0016]
Furthermore, the value of power may be determined according to the value of c. At this time, if the value of c is in the vicinity of 0.5 (including 0.5; hereinafter the same), the power value needs to be a value other than 2. More specifically, when the value of c is in the vicinity of 0.5, the power value is 1 or more and less than 2, more preferably 1. On the other hand, when the value of c is other than 0.5, it is set to 1 or more and 2 or less. The same applies to the following inventions.
[0017]
In the present invention, when the subject is imaged by the bifocal lens, at least one of the elements Q (x, y) of the convolution calculation matrix Q stored in the convolution calculation matrix storage means by the reproduction calculation means. Using some values and the value of each element Z (h, k) of the matrix Z of the output signal of the image obtained by imaging, each element A ( The value of s, t) is calculated.
[0018]
At this time, the calculation processing by the reproduction calculation means is performed using the value of each element Q (x, y) of the convolution calculation matrix Q that is calculated in advance based on the equation (1) and stored in the convolution calculation matrix storage means. Therefore, compared with the case where the calculation process is performed using the large inverse matrix T of M × N rows and M × N columns represented by the formula (1-22) to be described later, the calculation amount of the matrix A of the subject is very small. It is possible to calculate the value of each element A (s, t).
[0019]
For this reason, the subject can be reproduced by finding a focused image in a short time, so the quality of the image captured by the bifocal lens can be improved in a short time and the focus can be adjusted. Without using a mechanism, a clear image can be obtained for both a normal subject at a standard distance and a close subject at a shorter distance.
[0020]
In addition, since the calculation processing by the reproduction calculation means has a very small calculation amount, for example, even with the capability of the CPU mounted in a portable information terminal device such as a mobile phone or a portable information terminal, the processing can be performed in a short time. It is possible to execute. Therefore, if the present invention is applied to a portable information terminal device provided with a bifocal lens, the usability and performance of the information terminal device can be improved, and the above-described object is achieved.
[0021]
Further, in the above-described image modification processing method, an M-row N-column shading correction matrix Φ for correcting the influence of shading that reduces the amount of light received at the peripheral portion of the image due to non-uniformity of the incident angle of light to the bifocal lens. The value of each element Φ (s, t) is stored in the shading correction matrix storage means, and after the processing by the reproduction calculation means, each element Φ stored in the shading correction matrix storage means by the shading correction means. Subject matrix A subjected to shading correction based on the following equation (3) using the value of (s, t) and the value of each element A (s, t) of the subject matrix AshEach element AshIt is desirable to calculate (s, t).
[0022]
Ash(S, t) = A (s, t) × Φ (s, t) (3)
[0023]
Here, s and t are natural numbers, and 1 ≦ s ≦ M and 1 ≦ t ≦ N.
[0024]
When the shading correction is performed in this manner, the influence of the shading is eliminated, so that the image quality can be further improved.
[0025]
Further, in the above-described image modification processing method, an M-row N-column shading correction matrix Φ for correcting the influence of shading that reduces the amount of light received at the peripheral portion of the image due to the non-uniform incidence angle of light on the bifocal lens. The value of each element Φ (h, k) is stored in the shading correction matrix storage means, and before the processing by the reproduction calculation means, each element Φ stored in the shading correction matrix storage means by the shading correction means The output signal matrix Z of the image obtained by performing the shading correction based on the following equation (4) using the value of (h, k) and the value of each element Z (h, k) of the matrix Z of the output signal of the image.shEach element Zsh(H, k) is calculated and Z obtainedshIt is desirable to use the value of (h, k) as a new Z (h, k) for processing by the reproduction calculation means based on the equation (2).
[0026]
Zsh(H, k) = Z (h, k) × Φ (h, k) (4)
[0027]
Here, h and k are natural numbers, and 1 ≦ h ≦ M and 1 ≦ k ≦ N.
[0028]
When the shading correction is performed in this manner, the influence of the shading is eliminated, so that the image quality can be further improved.
[0029]
In the image modification processing method described above, the processing by the reproduction calculation means based on the expression (2) is performed by a digital filter circuit, and each element of the matrix Z of the image output signal is included in the digital filter circuit. A plurality of multiplier circuits that multiply the value of Z (h, k) by the value of each element Q (x, y) of the convolution arithmetic matrix Q, a plurality of adder circuits that add output signals from these multiplier circuits, and sequentially It is desirable to include a plurality of delay circuits for adjusting the speed of the signal flow of each input element Z (h, k).
[0030]
When the processing by the reproduction calculation means is performed by the digital filter circuit in this way, the convolution calculation processing using the convolution calculation matrix Q can be realized by hardware, so that the processing time required for image modification Can be made even shorter.
[0031]
Further, as an apparatus for realizing the image modification processing method of the present invention described above, the following image modification processing apparatus of the present invention can be exemplified.
[0032]
In other words, the present invention is based on an image in which a focused image formed by one lens part constituting a bifocal lens overlaps a blurred image formed by the other lens part. An image modification processing apparatus for obtaining a captured image, wherein 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 the subject is the two focal points. When a matrix of M rows and N columns indicating an output signal of an image obtained by imaging with a lens is Z, (2M−1) rows (2M−1) for performing the convolution calculation processing calculated based on the following equation (5) 2N-1) a convolution operation matrix storage means for storing a value of a matrix portion including at least a non-zero element among the values of each element Q (x, y) of the convolution operation matrix Q of the column, and the convolution operation matrix storage means Each stored element Q (x, ) And the value of each element Z (h, k) of the matrix Z of the output signal of the image using each value A (s, and a reproduction calculation means for calculating the value of t).
[0033]
Figure 0004014512
[0034]
Figure 0004014512
[0035]
Here, x and y are integers, (1-M) ≦ x ≦ (M−1), (1-N) ≦ y ≦ (N−1), s and t are natural numbers, and 1 ≦ s ≦ M, 1 ≦ t ≦ N, h and k are natural numbers, 1 ≦ h ≦ M, 1 ≦ k ≦ N, and W (x, y) is (2M−1) rows (2N−1) ) This is the value of each element of the matrix W of the column, and this matrix W is one when a subject having a bright spot at only one point indicated by coordinates (m, n) excluding the end is imaged with a bifocal lens. The matrix Zmn of M rows and N columns indicating the output signal of the image formed by the other lens unit is changed from coordinates (h, k) satisfying x = hm and y = kn to coordinates (x, y). In the coordinate conversion to, the matrix part including the non-zero element of Zmn (h, k) is moved to the center of the matrix W by moving in parallel so that W (0,0) = Zmn (m, n). When placed in the part And c is a proportionality coefficient, and the ratio of the area of one lens part to the entire area of the bifocal lens is configured by filling the outer part of the matrix part including the non-zero element arranged at the center part with zero elements. And power is a real number that is a power of c, 1 ≦ power ≦ 2, and ΣhIs the sum of h = 1 to M, and ΣkIs the sum of k = 1 to N.
[0036]
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.
[0037]
In the image modification processing apparatus described above, an M-row N-column shading correction matrix Φ for correcting the influence of shading that reduces the amount of light received at the periphery of the image due to non-uniformity of the incident angle of light to the bifocal lens. The shading correction matrix storage means for storing the value of each element Φ (s, t) of the above, the value of each element Φ (s, t) stored in the shading correction matrix storage means and processing by the reproduction calculation means Subject matrix A subjected to shading correction based on the following equation (7) using the value of each element A (s, t) of the obtained subject matrix AshEach element AshIt is desirable to have a configuration including a shading correction means for calculating (s, t).
[0038]
Ash(S, t) = A (s, t) × Φ (s, t) (7)
[0039]
Here, s and t are natural numbers, and 1 ≦ s ≦ M and 1 ≦ t ≦ N.
[0040]
In this way, when the shading correction matrix storage means and the shading correction means are provided, the influence of the shading is eliminated, so that the image quality can be further improved.
[0041]
Further, in the above-described image modification processing apparatus, an M-row N-column shading correction matrix Φ for correcting the influence of shading that reduces the amount of light received at the peripheral portion of the image due to the non-uniform incidence angle of light on the bifocal lens. A value of each element Φ (h, k) stored in the shading correction matrix storage means and a matrix Z of the output signal of the image. The matrix Z of the output signal of the image obtained by performing the shading correction based on the following equation (8) using the values of the elements Z (h, k)shEach element Zsh(H, k) is calculated and Z obtainedshIt is desirable to have a configuration including a shading correction unit that uses the value of (h, k) as a new Z (h, k) for processing by the reproduction calculation unit based on Expression (6).
[0042]
Zsh(H, k) = Z (h, k) × Φ (h, k) (8)
[0043]
Here, h and k are natural numbers, and 1 ≦ h ≦ M and 1 ≦ k ≦ N.
[0044]
Even in such a configuration, since the influence of shading is eliminated, the image quality can be further improved.
[0045]
In the image modification processing apparatus described above, the reproduction calculation means is constituted by a digital filter circuit that performs calculation processing based on the equation (6), and the digital filter circuit includes a matrix Z of the output signal of the image. A plurality of multiplication circuits for multiplying the values of the respective elements Z (h, k) by the values of the respective elements Q (x, y) of the convolution matrix Q, and a plurality of addition circuits for adding output signals from these multiplication circuits. It is desirable that a plurality of delay circuits for adjusting the speed of the signal flow of each element Z (h, k) sequentially input is included.
[0046]
In this way, when the reproduction calculation means is constituted by a digital filter circuit, the convolution calculation processing using the convolution calculation matrix Q can be realized by hardware, so that the processing time required for image modification can be further reduced. It can be shortened.
[0047]
In addition, the present invention is based on an image in which a focused image formed by one lens part constituting a bifocal lens overlaps with a blurred image formed by the other lens part. A program for causing a computer to function as an image modification processing apparatus for obtaining a captured image, wherein the size of the image sensor is M pixels × N pixels, and a matrix of M rows and N columns indicating the brightness of light emitted from the subject And A is a matrix of M rows and N columns indicating an output signal of an image obtained by imaging the subject with the bifocal lens, and the convolution calculation processing calculated based on the following equation (9) is performed. (2M-1) row (2N-1) column convolution operation matrix storage means for storing a value of a matrix portion including at least a non-zero element among the values of each element Q (x, y) of the convolution operation matrix Q And this folding Using at least a part of the values of each element Q (x, y) stored in the operation matrix storage means and the value of each element Z (h, k) of the matrix Z of the output signal of the image, And 10) an image modification processing apparatus comprising: a calculation unit for calculating the value of each element A (s, t) of the subject matrix A based on 10). .
[0048]
Figure 0004014512
[0049]
Figure 0004014512
[0050]
Here, x and y are integers, (1-M) ≦ x ≦ (M−1), (1-N) ≦ y ≦ (N−1), s and t are natural numbers, and 1 ≦ s ≦ M, 1 ≦ t ≦ N, h and k are natural numbers, 1 ≦ h ≦ M, 1 ≦ k ≦ N, and W (x, y) is (2M−1) rows (2N−1) ) This is the value of each element of the matrix W of the column, and this matrix W is one when a subject having a bright spot at only one point indicated by coordinates (m, n) excluding the end is imaged with a bifocal lens. The matrix Zmn of M rows and N columns indicating the output signal of the image formed by the other lens unit is changed from coordinates (h, k) satisfying x = hm and y = kn to coordinates (x, y). In the coordinate conversion to, the matrix part including the non-zero element of Zmn (h, k) is moved to the center of the matrix W by moving in parallel so that W (0,0) = Zmn (m, n). When placed in the part And c is a proportionality coefficient, and the ratio of the area of one lens part to the entire area of the bifocal lens is configured by filling the outer part of the matrix part including the non-zero element arranged at the center part with zero elements. And power is a real number that is a power of c, 1 ≦ power ≦ 2, and ΣhIs the sum of h = 1 to M, and ΣkIs the sum of k = 1 to N.
[0051]
Furthermore, the present invention provides a focus adjustment from an image in which an in-focus image formed by one lens portion constituting a bifocal lens overlaps an in-focus image formed by the other lens portion. A computer-readable data recording medium on which data used in an image modification process for obtaining an image is recorded, wherein the size of the image sensor is M pixels × N pixels, and M indicates the brightness of light emitted from the subject. In order to calculate the matrix A from the matrix Z, where A is a matrix of rows and N columns, and Z is a matrix of M rows and N columns indicating an output signal of an image obtained by imaging the subject with the bifocal lens. Of the values of each element Q (x, y) of the (2M-1) row (2N-1) column convolution calculation matrix Q for performing the convolution calculation processing calculated based on the following equation (11) as a matrix to be used At least non-zero elements The values of the matrix portion containing those recorded.
[0052]
Figure 0004014512
[0053]
Here, x and y are integers, (1−M) ≦ x ≦ (M−1), (1−N) ≦ y ≦ (N−1), and W (x, y) is (2M -1) Value of each element of the matrix W in the row (2N-1) column, and this matrix W is used to identify two subjects having bright points only at one point indicated by coordinates (m, n) excluding the end. A matrix Zmn of M rows and N columns indicating an output signal of an image formed by one and the other lens portions when picked up by a focus lens is represented by coordinates (h, k) satisfying x = hm and y = kn. ) To coordinates (x, y), and a non-zero element of Zmn (h, k) is converted by translating so that W (0, 0) = Zmn (m, n). The matrix part including the matrix part is arranged in the center part of the matrix W and the outer part of the matrix part including the non-zero element arranged in the center part is filled with zero elements, and c is a ratio. The coefficient is the value of the ratio of the area of one lens part to the total area of the bifocal lens, power is a real number that is a power of c, 1 ≦ power ≦ 2, h and k are natural numbers, 1 ≦ h ≦ M, 1 ≦ k ≦ N, m and n are natural numbers, and 1 ≦ m ≦ M and 1 ≦ n ≦ N, but m = 1, m = M, n = Points near 1 and n = N are excluded.
[0054]
In addition, the present invention is based on an image in which a focused image formed by one lens part constituting a bifocal lens overlaps with a blurred image formed by the other lens part. An image modification processing method for obtaining a captured image, wherein an output signal of an image obtained by capturing an image of a subject with a bifocal lens is extracted from the image sensor and stored in an output signal storage unit, and then stored in the output signal storage unit The stored output signal of each pixel of the image sensor is extracted by a unit screen of Q pixels × Q pixels, and then the extracted signal level S is output by the discrete cosine conversion processing means.xySignal level S corresponding to each spatial frequency by performing discrete cosine transform processing based on the following equation (12)F uvSubsequently, S obtained by performing the discrete cosine conversion processing by the defocused image erasing processing means.F uvComponent S of zeroF 00Is multiplied by the ratio of the area of one lens part that forms a focused image to the total area of the bifocal lens, and the value obtained by this multiplication is multiplied by the new SF 00And then the signal level S processed by the defocused image erasure processing means by the quantization processing means.F uvFurther, the encoding processing means encodes the quantized data obtained by the processing by the quantization processing means, discrete cosine transform processing means, defocused image erasure processing means, quantization processing means, And each process by an encoding process means is repeated about all the divided screens, It is characterized by the above-mentioned.
[0055]
Figure 0004014512
[0056]
Here, u and v are integers, 0 ≦ u ≦ (Q−1), 0 ≦ v ≦ (Q−1), where Q is an integer of 2 or more and Cu, Cv= 1 / (21/2) (When u, v = 0), Cu, Cv= 1 (when u, v = 0 other than), and ΣxIs the sum of x = 0 to (Q−1), ΣyIs the sum of y = 0 to (Q-1).
[0057]
In the present invention, an output signal of an image obtained by imaging a subject with a bifocal lens is extracted from the image sensor for a unit screen, and a discrete cosine transform process, a defocused image erasure process, a quantum image is performed on the extracted signal. The encoding process and the encoding process are performed. Then, each of these processes is repeated for all partitioned screens.
[0058]
At this time, the out-of-focus image erasing process is an S obtained by performing the discrete cosine conversion process.F uvComponent S of zeroF 00Is multiplied by the ratio of the area of one lens part that forms a focused image to the total area of the bifocal lens, and the value obtained by this multiplication is multiplied by the new SF 00The remaining processing is almost the same as the image compression processing by ordinary JPEG (Joint Photographic Experts Group). Therefore, a series of processing can be executed with a small amount of calculation.
[0059]
For this reason, it is possible to erase an image that is out of focus in a short time and obtain an in-focus image, and to improve the quality of the image. 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 portable information terminal. Therefore, if the present invention is applied to a portable information terminal device provided with a bifocal lens, the usability and performance of the information terminal device can be improved, and the above-described object is achieved.
[0060]
Further, as an apparatus for realizing the image modification processing method of the present invention described above, the following image modification processing apparatus of the present invention can be exemplified.
[0061]
In other words, the present invention is based on an image in which a focused image formed by one lens part constituting a bifocal lens overlaps a blurred image formed by the other lens part. An image modification processing apparatus for obtaining a captured image, wherein an output signal of an image obtained by imaging a subject with a bifocal lens is extracted from the image sensor and stored, and stored in the output signal storage unit The output signal of each pixel of the image sensor obtained is taken out for a unit screen of Q pixels × Q pixels, and these taken out signal levels SxySignal level S corresponding to each spatial frequency by performing discrete cosine transform processing based on the following equation (13)F uvThe discrete cosine transform processing means for obtaining the S and the S obtained by the processing by the discrete cosine transform processing meansF uvComponent S of zeroF 00Is multiplied by the ratio of the area of one lens part that forms a focused image to the total area of the bifocal lens, and the value obtained by this multiplication is multiplied by the new SF 00And a signal level S after processing by the defocused image erasure processing unit.F uvThe image processing apparatus includes a quantization processing unit that performs a quantization process on and a coding processing unit that encodes quantized data obtained by the processing by the quantization processing unit.
[0062]
Figure 0004014512
[0063]
Here, u and v are integers, 0 ≦ u ≦ (Q−1), 0 ≦ v ≦ (Q−1), where Q is an integer of 2 or more and Cu, Cv= 1 / (21/2) (When u, v = 0), Cu, Cv= 1 (when u, v = 0 other than), and ΣxIs the sum of x = 0 to (Q−1), ΣyIs the sum of y = 0 to (Q-1).
[0064]
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.
[0065]
Furthermore, the present invention provides a focus adjustment from an image in which an in-focus image formed by one lens portion constituting a bifocal lens overlaps an in-focus image formed by the other lens portion. Output signal storage means for causing a computer to function as an image modification processing device for obtaining a captured image and for extracting and storing an output signal of an image obtained by imaging a subject with a bifocal lens from the imaging device The output signal of each pixel of the image pickup device stored in the output signal storage means is extracted for the unit screen of Q pixels × Q pixels, and these extracted signal levels SxySignal level S corresponding to each spatial frequency by performing discrete cosine transform processing based on the following equation (14)F uvThe discrete cosine transform processing means for obtaining the S and the S obtained by the processing by the discrete cosine transform processing meansF uvComponent S of zeroF 00Is multiplied by the ratio of the area of one lens part that forms a focused image to the total area of the bifocal lens, and the value obtained by this multiplication is multiplied by the new SF 00And a signal level S after processing by the defocused image erasure processing unit.F uvAs an image modification processing apparatus comprising: a quantization processing unit that performs a quantization process on an image; and an encoding processing unit that encodes quantized data obtained by the processing by the quantization processing unit. This is to make the computer function.
[0066]
Figure 0004014512
[0067]
Here, u and v are integers, 0 ≦ u ≦ (Q−1), 0 ≦ v ≦ (Q−1), where Q is an integer of 2 or more and Cu, Cv= 1 / (21/2) (When u, v = 0), Cu, Cv= 1 (when u, v = 0 other than), and ΣxIs the sum of x = 0 to (Q−1), ΣyIs the sum of y = 0 to (Q-1).
[0068]
In addition, the present invention is based on an image in which a focused image formed by one lens part constituting a bifocal lens overlaps with a blurred image formed by the other lens part. Image modification processing method for obtaining an image, wherein the size of the image sensor is M pixels × N pixels, and the output signal value of the coordinates (h, k) of the image obtained by imaging the subject with the bifocal lens Is Z (h, k), the output signal value Z (h, k) in the unit screen of Q pixels × Q pixels centered on coordinates (h, k) based on the following equation (15) The moving average value Zmean (h, k) is calculated, and Z (h, k) is obtained by image modification processing based on the following equation (16) using the calculated moving average value Zmean (h, k). The signal value Znew (h, k) is calculated.
[0069]
Figure 0004014512
[0070]
Figure 0004014512
[0071]
Here, Q is an odd natural number of 3 or more, h and k are natural numbers, 1 ≦ h ≦ M, 1 ≦ k ≦ N, x and y are integers, (1-Q) / 2 ≦ x ≦ (Q−1) / 2, (1−Q) / 2 ≦ y ≦ (Q−1) / 2, and ΣxIs the sum of x = (1-Q) / 2 to (Q-1) / 2, ΣyIs the sum of y = (1-Q) / 2 to (Q-1) / 2, and c is a proportionality coefficient, which is the value of the ratio of the area of one lens part to the entire area of the bifocal lens. , K are normalization coefficients and are values for setting the maximum value of Znew (h, k) to 1.
[0072]
In this way, when image correction is performed by taking a moving average, it is possible to remove the defocused image, thereby improving the quality of the image.
[0073]
In addition, since it is a simple arithmetic process that only takes and reduces the moving average, the amount of calculation is small and processing can be performed in a short time. Therefore, it can be suitably used for a portable information terminal device or the like. And the above-mentioned purpose can be achieved.
[0074]
Examples of the 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.
[0075]
In other words, the present invention is based on an image in which a focused image formed by one lens part constituting a bifocal lens overlaps a blurred image formed by the other lens part. An image modification processing apparatus for obtaining a captured image, wherein the size of the image sensor is M pixels × N pixels, and the output signal value of the coordinates (h, k) of the image obtained by imaging the subject with the bifocal lens Is Z (h, k), the output signal value Z (h, k) in the unit screen of Q pixels × Q pixels centered on the coordinates (h, k) based on the following equation (17) Based on the following equation (18), Z (h, k) using a moving average calculating means for calculating the moving average value Zmean (h, k) and the moving average value Zmean (h, k) calculated by the moving average calculating means. ) For calculating the signal value Znew (h, k) obtained by image modification processing It is characterized in that a correcting means.
[0076]
Figure 0004014512
[0077]
Figure 0004014512
[0078]
Here, Q is an odd natural number of 3 or more, h and k are natural numbers, 1 ≦ h ≦ M, 1 ≦ k ≦ N, x and y are integers, (1-Q) / 2 ≦ x ≦ (Q−1) / 2, (1−Q) / 2 ≦ y ≦ (Q−1) / 2, and ΣxIs the sum of x = (1-Q) / 2 to (Q-1) / 2, ΣyIs the sum of y = (1-Q) / 2 to (Q-1) / 2, and c is a proportionality coefficient, which is the value of the ratio of the area of one lens part to the entire area of the bifocal lens. , K are normalization coefficients and are values for setting the maximum value of Znew (h, k) to 1.
[0079]
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.
[0080]
In the image modification processing apparatus described above, it is desirable that the moving average calculation unit and the image correction unit include a digital filter circuit. In such a case, since each process by the moving average calculation unit and the image correction unit can be realized by hardware, the calculation processing time can be shortened.
[0081]
Furthermore, the present invention provides a focus adjustment from an image in which an in-focus image formed by one lens portion constituting a bifocal lens overlaps an in-focus image formed by the other lens portion. Is a program for causing a computer to function as an image modification processing device for obtaining a captured image, and the coordinates of an image obtained by imaging the subject with a bifocal lens with the size of the imaging element of M pixels × N pixels When the output signal value of (h, k) is Z (h, k), each output in the unit screen of Q pixels × Q pixels centered on coordinates (h, k) based on the following equation (19) Using the moving average calculating means for calculating the moving average value Zmean (h, k) of the signal value Z (h, k) and the moving average value Zmean (h, k) calculated by the moving average calculating means, 20), Z (h, k) is subjected to image modification processing. And an image modification apparatus being characterized in that an image correction means for calculating the signal value Znew (h, k) obtained is for causing a computer to function.
[0082]
Figure 0004014512
[0083]
Figure 0004014512
[0084]
Here, Q is an odd natural number of 3 or more, h and k are natural numbers, 1 ≦ h ≦ M, 1 ≦ k ≦ N, x and y are integers, (1-Q) / 2 ≦ x ≦ (Q−1) / 2, (1−Q) / 2 ≦ y ≦ (Q−1) / 2, and ΣxIs the sum of x = (1-Q) / 2 to (Q-1) / 2, ΣyIs the sum of y = (1-Q) / 2 to (Q-1) / 2, and c is a proportionality coefficient, which is the value of the ratio of the area of one lens part to the entire area of the bifocal lens. , K are normalization coefficients and are values for setting the maximum value of Znew (h, k) to 1.
[0085]
Note that the above-described 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, Recording, storage, distribution, etc. on a recording medium such as a hard disk, read only memory (ROM), electrically erasable and rewritable read only memory (EEPROM), flash memory, random access memory (RAM), etc. For example, LAN, MAN, WAN, Internet, intranet, extranet wired network or a wireless communication network, and further is capable of transmitting using a transmission medium such as a combination thereof, also can be delivered by placing the carrier. Furthermore, the program described above may be a part of another program, or may be recorded on a recording medium together with a separate program.
[0086]
Examples of the data recording medium of the present invention described above include MO, CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, FD, magnetic tape, hard disk, ROM, EEPROM, A flash memory, a RAM, or a combination of these can be employed.
[0087]
Further, in each description of the present invention described above (in the description of each claim), “c is a proportional coefficient, and is a value of a ratio of the area of one lens portion to the entire area of the bifocal lens,” However, this definition is not a definition in a strict sense, and the division of light may not be proportional to the area, so the meaning of this definition is to obtain the value of c as follows: Is also included. That is, when the light amount division ratio does not match the lens area ratio, the value of c is the amount of light that passes through one lens unit and actually reaches the sensor (image sensor) or the signal of the sensor. It may be obtained as a value of a ratio between the amount of light and the amount of light that actually passes through the entire lens (the total of one lens unit and the other lens unit) and actually reaches the sensor, or the signal amount of the sensor.
[0088]
The value of each element W (x, y) defined in each description of the present invention described above (statement of each claim) includes a value determined by performing the following processing. It is. That is, one lens unit is supposed to form an in-focus image, but in practice, an image formed by this one lens unit may also be blurred due to aberration or the like. The image formed by one lens portion extends around W (0,0), and the elements around W (0,0) can also be non-zero elements (the focus formed by the other lens portion). This means that a non-zero element may occur around W (0,0) without considering a blurred image). Therefore, in such a case, the value of W (0,0) and the value of the non-zero element generated around W (0,0) (however, the image formed by the other lens unit is out of focus). Without considering the range to be expanded, only the values of non-zero elements within the range in which the image formed by one lens part is out of focus are considered. , 0), and the correction work of making the value of the non-zero element generated around W (0, 0) (only the value of the non-zero element within the range described in parentheses above) zero. What is necessary is just to calculate the value of each element Q (x, y) of the convolution arithmetic matrix Q using the value of each element W (x, y) created through these correction work.
[0089]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
[0090]
[First Embodiment]
FIG. 1 shows an overall configuration of an imaging system 10 including an image modification processing device 30 according to the first embodiment. FIG. 2 shows a detailed configuration of the bifocal lens 21 that forms an image to be processed by the image modification processing device 30. The imaging system 10 is, for example, an imaging system provided in a portable information terminal device such as a mobile phone or a portable information terminal, or an imaging system configured by a personal computer and a camera connected thereto.
[0091]
In FIG. 1, an imaging system 10 includes an imaging mechanism 20 that images a subject, an image modification processing device 30 that improves the quality of an image captured by the imaging mechanism 20, and a quality that is improved by the image modification processing device 30. Display means 40 for displaying the improved image.
[0092]
The imaging mechanism 20 includes a bifocal lens 21 that captures an image of a subject and an imaging element 24 that captures an image formed by the bifocal lens 21.
[0093]
In FIG. 2, the bifocal lens 21 is composed of, for example, a glass long-focus lens portion 22 and, for example, a glass short-focus lens portion 23. The long-focus lens portion 22 and the short-focus lens portion 23 are They are arranged on the same surface and integrated. The long-focus lens unit 22 has, for example, a circular front shape and is arranged at the center, while the short-focus lens unit 23 has, for example, an annular (donut-shaped) front shape, It is arranged on the outside in contact with the outer edge of the long focal length lens portion 22. The long-focus lens portion 22 and the short-focus lens portion 23 are integrated so that their optical axes coincide with each other, that is, concentrically arranged, whereby the bifocal lens 21 is concentric bifocal. It is a lens. The surface on which these lens portions 22 and 23 are arranged is orthogonal to the optical axis of the bifocal lens 21.
[0094]
As the imaging device 24, for example, a complementary metal oxide semiconductor (CMOS), a charge coupled device (CCD), or the like can be employed. The size of the image sensor 24 is assumed to be M pixels in the vertical direction × N pixels in the horizontal direction.
[0095]
The image modification processing device 30 calculates in advance based on an output signal storage unit 31 that extracts and stores the output signal of the image sensor 24 and an expression (1-33), (1-34), or (1-37) described later. A convolution calculation matrix storage means 32 for storing at least a part of the values of the respective elements Q (x, y) of the convolution calculation matrix Q (see FIG. 7), and a reproduction calculation means for performing calculation processing for reproducing a subject. 33.
[0096]
The convolution operation matrix storage means 32 arranges at least a part of the values of each element Q (x, y) of the convolution operation matrix Q shown in FIG. 7 as shown in the table according to the order of arrangement of x and y. It is something to remember. 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. 7) is stored. Is preferred. Therefore, here, the description will be made assuming that only the matrix portion H including non-zero elements is stored.
[0097]
The reproduction calculation means 33 stores the values of the elements Q (x, y) of the convolution calculation matrix Q stored in the convolution calculation matrix storage means 32 (values of the matrix part H) and the output signal storage means 31. Based on the value of each element Z (h, k) of the matrix Z indicating the output signal of the image and the value of each element A (s, t) of the matrix A of the subject based on the equation (1-36) described later. The calculation process is performed. Of the elements Q (x, y) of the convolution matrix Q, parts other than the matrix part including the non-zero elements (matrix part H in FIG. 7), that is, parts not stored in the convolution matrix storage means 32. Is a zero element, so no calculation is performed.
[0098]
As the output signal storage means 31 and the convolution calculation matrix storage means 32, 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 of these can be employed.
[0099]
The reproduction calculation means 33 is used for various information terminal devices (for example, a portable information terminal device such as a mobile phone or a portable information terminal, a personal computer connected to a camera, a monitoring camera device, or the like) constituting the imaging system 10. It is realized by a central processing unit (CPU) provided inside and one or a plurality of programs that define the operation procedure of the CPU.
[0100]
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.
[0101]
Below, the calculation method of each element Q (x, y) of the convolution calculation matrix Q memorize | stored in the convolution calculation matrix memory | storage means 32, its basis, and the basis of the calculation process performed by the reproduction | regeneration calculation means 33 are demonstrated.
[0102]
As a precondition, here, when a normal subject (for example, a person or a landscape) at a standard distance is imaged by the bifocal lens 21, an image focused by the inner long focal lens unit 22 is obtained. A case will be described where an out-of-focus image is formed by the outer annular short focus lens portion 23 formed. However, the application of the present invention is not limited to such a case.
[0103]
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 bifocal lens 21. In addition, since the image formed by the lens is generally an inverted image, in FIG. 3, by reversing the direction of the coordinate axis between the object and the image, the position of the corresponding object and the position of the image are the same. The coordinates are set.
[0104]
<Expression of Characteristics of Bifocal Lens 21 by Single Bright Spot Image>
As shown in FIG. 3, when a subject αmn having a bright point at only one point (coordinates (m, n)) is imaged by the bifocal lens 21, an image Zmn is formed. Here, m and n are natural numbers, 1 ≦ m ≦ M, 1 ≦ n ≦ N, where M and N are the number of pixels in the vertical and horizontal directions of the image sensor 24. The coordinates (m, n) mean corresponding points on the subject projected on the coordinates (displayed pixel numbers) (m, n) on the image sensor 24. Further, αmn and Zmn represent a matrix of M × N (M rows and N columns), the elements of which are the luminance (brightness) of the corresponding coordinates on the image sensor 24 of M pixels × N pixels or the magnitude of the output signal. It shows.
[0105]
When this image Zmn is divided into an in-focus image Bmn formed by the inner long-focus lens portion 22 and an annular blurred image Dmn formed by the outer annular short-focus lens portion 23, the following equation is obtained. It can be expressed as (1-1).
[0106]
Zmn = Bmn + Dmn (1)
[0107]
Here, Zmn, Bmn, and Dmn are M rows and N columns matrix representing an image on the image sensor 24, but the coordinates (h, k) on the image sensor 24 (h and k are natural numbers, 1 ≦ h) The brightness of the pixel corresponding to ≦ M, 1 ≦ k ≦ N) is expressed as Zmn (h, k), Bmn (h, k), Dmn (h, k). Αmn is a matrix of M rows and N columns representing the subject, and the brightness of the subject at the coordinates (s, t) (s and t are natural numbers, 1 ≦ s ≦ M, 1 ≦ t ≦ N) is It is expressed as αmn (s, t), and the value of each element αmn (s, t) can be expressed as the following equation (1-2).
[0108]
αmn (s, t) = δs−m, t−n (1-2)
[0109]
Here, δ is the Kronecker delta, δs-m, tn = 1 (when s = m, t = n), δs-m, tn = 0 (when other than s = m, t = n) ).
[0110]
As shown in the equation (1-1), the image Zmn of the subject αmn having a bright point only at the coordinates (m, n) by the bifocal lens 21 is an in-focus image by the inner long focal lens unit 22. Bmn and the ring-shaped blurred image Dmn formed by the outer short-focus lens unit 23 overlap each other, and this is shown on the image sensor 24 in FIG. However, since FIG. 3 is a perspective view, the ring-shaped blurred image Dmn is actually an annular shape instead of an elliptical shape.
[0111]
On the image sensor 24 of FIG. 3, Bmn is a matrix in which there are non-zero elements (signals) at coordinates (m, n) and all other elements are zero, and Dmn is the coordinates (m, n). This is a matrix indicating a donut-shaped or ring-shaped blurred image at the center, that is, a so-called blurred image. The outer diameter and inner diameter of the Dmn donut are proportional to the outer diameter and inner diameter of the outer short-focus lens portion 23 constituting the bifocal lens 21. In this examination, the blur formed by the outer short focus lens portion 23 constituting the bifocal lens 21 spreads over a wide range, and the value of the element Dmn is sufficiently smaller than that of Bmn.
[0112]
<Image of the entire subject>
Assuming that each point (s, t) of the subject has a brightness of A (s, t), the entire light emitted from the subject has an element having a value of A (s, t) in s rows and t columns. It is expressed by matrix A. This is expressed as subject A. Then, the subject A can be expressed by the following equation (1-3) using αmn (subject having a bright point at the point (m, n)).
[0113]
A = ΣmΣn [A (m, n) αmn] (1-3)
[0114]
Here, Σm represents the sum of m = 1 to M, and Σn represents the sum of n = 1 to N. The same applies to the following.
[0115]
Further, since the conversion relationship between the object A and the image Z and the conversion relationship between αmn and the image Zmn are considered to be the same one-dimensional mapping, they can be expressed as the following equation (1-4).
[0116]
Z = ΣmΣn [A (m, n) Zmn] (1-4)
[0117]
Furthermore, if the in-focus image B and the out-of-focus image D are expressed separately, they can be expressed as the following equations (1-5) and (1-6).
[0118]
B = ΣmΣn [A (m, n) Bmn] (1-5)
[0119]
D = ΣmΣn [A (m, n) Dmn] (1-6)
[0120]
Since the image Z of the subject A is the sum of the focused image B and the out-of-focus image D, the following equation (1-7) is obtained.
[0121]
Figure 0004014512
[0122]
<Expression method of objects and images by huge vectors>
In the above description, the image is represented by a matrix of M rows and N columns that is the same shape as the screen of the image sensor 24 (M pixels × N pixels), and the subject is also represented as a similar shape of the screen of the image sensor 24. Similarly, it is expressed by a matrix of M rows and N columns. By the way, the calculation formula for deriving the image Z from the subject A can be expressed in the form shown in formula (1-35) described later, which is generally a convolution operation. Therefore, if this calculation formula can be solved in reverse, an in-focus image can be calculated from the image Z captured by the bifocal lens 21, but it cannot be directly derived from this calculation formula. Is converted from a matrix representation of M rows and N columns to a vector representation having M × N elements. As a conversion method in this case, each row (first row to M-th row) of the image matrix is arranged in a horizontal row in order from the top row, and is converted into a vertical vector so that matrix calculation is easy. Specific examples thereof are given below for the image Z, for example. The image expression vector having M × N elements formed in this way is referred to as a giant vector.
[0123]
[Expression 1]
Figure 0004014512
[0124]
For the matrix: Z, the giant vector: Z is expressed by the following equation (1-8). In the equation (1-8), superscript t indicates vertical and horizontal transposition, that is, conversion from a horizontal vector to a vertical vector.
[0125]
Figure 0004014512
[0126]
The above giant vector expression can be similarly applied to A and αmn of the subject that have been described so far, and B and D of the image, Zmn, Bmn, and Dmn.
[0127]
<Expression of image formation from a subject by a huge matrix>
Consider a matrix that expresses "primary transformation (projection) from subject to image" for forming an image from the subject using the huge vector representing the above image. For the giant vector representing the subject and the image, for example, the same symbols as in the matrix representation are used, such as Z and Zmn.
[0128]
Consider an ideal bifocal lens 21. An in-focus image Bmn of a single bright spot subject αmn at coordinates (m, n), where U is a unit matrix having (M × N) × (M × N) elements, 9).
[0129]
Bmn = cUαmn (1-9)
[0130]
Here, c is a proportional coefficient, and is proportional to the area of the long focal point lens portion 22 which is a portion that forms an in-focus image of the bifocal lens 21. In this case, since the bifocal lens 21 is an ideal lens, it can be expressed in this way. When the light amount division ratio does not match the lens area ratio, the value of c is not determined by the area ratio, but is a length that is a portion of the bifocal lens 21 that forms a focused image. The amount of light that actually passes through the focus lens unit 22 and reaches the image sensor 24 or the signal amount of the image sensor 24 and the amount of light that passes through the entire bifocal lens 21 and actually reaches the image sensor 24 You may obtain | require as a value of ratio with the signal amount of the image pick-up element 24. FIG.
[0131]
On the other hand, when a conversion processing matrix for forming an out-of-focus image is Δ (matrix having (M × N) × (M × N) elements), the following expression (1-10) is expressed. it can.
[0132]
Dmn = Δαmn (1-10)
[0133]
Therefore, the image Zmn in which the two images overlap can be expressed as in the following formula (1-11).
[0134]
Zmn = Bmn + Dmn = (cU + Δ) αmn (1-11)
[0135]
The matrices U and Δ in the above equations (1-9) to (1-11) have (M × N) × (M × N) elements, and are compared with an M-row N-column matrix that represents an image. Therefore, it is distinguished as a huge matrix. Substituting equation (1-11) into equation (1-4) gives equation (1-12) below, and the relationship between the subject and the image by the bifocal lens 21 is a simple conversion equation. Expressed.
[0136]
Figure 0004014512
[0137]
<Contents of a huge matrix>
Here, let's look specifically at the shape and contents of the huge matrix. First, the giant matrix cU is a matrix of M × N rows and M × N columns in which all diagonal terms are c. Further, Δ is a matrix of M × N rows and M × N columns partially having an element having a sufficiently smaller value than c. The content is expressed by the following equation (1-13) when the giant vector (vertical vector) Dmn in the equation (1-10) is used.
[0138]
Figure 0004014512
[0139]
Here, if the expression of the above expression (1-8) is used for the giant vector (vertical vector) Dmn in the above expression (1-13), Δ can be expressed as the following expression (1-14). .
[0140]
[Expression 2]
Figure 0004014512
[0141]
Then, when cU is added to Δ expressed as the above formula (1-14), considering that cU is a huge matrix in which only the diagonal term contains the value c, (cU + Δ) is As in equation (1-15), the matrix becomes a huge matrix having a value obtained by adding c to the diagonal term of Δ.
[0142]
[Equation 3]
Figure 0004014512
[0143]
This giant matrix (cU + Δ) can also be expressed as the following equation (1-16) in consideration of the equation (1-11).
[0144]
[Expression 4]
Figure 0004014512
[0145]
In other words, when the elements of the huge matrix (cU + Δ) are compared between Expression (1-15) and Expression (1-16), the following Expression (1-17) is obtained.
[0146]
Figure 0004014512
[0147]
Here, j is a natural number and 1 ≦ j ≦ M × N. From the above equation (1-17), the elements of the giant matrix (cU + Δ) of the primary transformation of image formation are determined by obtaining the element Dmn (j) of Δ. Since the vertical vector Dmn of each column constituting Δ is equivalent to a huge vector representing a donut-shaped defocused image by a single bright spot subject at an arbitrary position as is clear from the equation (1-14), The value of each element of Δ can be determined by obtaining a defocused image.
[0148]
Next, a method for obtaining an image focused on the subject from an image formed by the bifocal lens 21 and in which the focused image and the defocused image overlap each other will be described.
[0149]
<Basic concept>
The basis of the image improvement is to obtain the image A corresponding to the subject with the huge matrix (cU + Δ) and the photographed image Z as known in the equation (1-12). That is, the inverse matrix (cU + Δ) shown in the following equation (1-18)-1It is exhausted to ask for.
[0150]
A = (cU + Δ)-1Z (1-18)
[0151]
The size of the huge matrix is, for example, M = 640 pixels, N = 480 pixels (equivalent to 300,000 pixels), and M × N = 307,200, and the size (number of elements) is (M × N)2≒ 9 million. Accordingly, obtaining this inverse matrix is not practical because it requires a considerable amount of calculation time.
[0152]
Therefore, it is assumed that the value of each element of Δ is sufficiently smaller than c. This assumption is sufficient if the size of the blur is 10 pixels or more, and the aperture ratio of the bifocal lens 21, the lens aperture, and the focal lengths of the lens portions 22 and 23 may be adjusted in design. A method for simply obtaining the inverse matrix of Equation (1-18) by the approximation method under such preconditions will be described. First, as a general theory, the following equation (1-19) is established.
[0153]
Figure 0004014512
[0154]
However, it is assumed that the zero power of the matrix becomes the unit matrix U. In the above equation (1-19), assuming that Δ / c is sufficiently small, taking the first three terms and rejecting the following terms results in the following equation (1-20). Although details will be described later, higher order development may be required in some cases.
[0155]
Figure 0004014512
[0156]
Then, when the above equation (1-20) is substituted into the equation (1-18), the following equation (1-21) is obtained.
[0157]
Figure 0004014512
[0158]
<Inverted matrix of subject to image conversion giant matrix>
The value of each element of the huge matrix obtained as a result of the approximate calculation of the inverse matrix is obtained. Let the inverse matrix be T as follows: T is a giant inverse matrix of M × N rows and M × N columns.
[0159]
(CU + Δ)-1= (1 / c) (U−Δ / c) ≡T
[0160]
When the value of each element T (i, j) of the giant inverse matrix T is displayed using the above equation (1-14), the following equation (1-22) is obtained. However, i and j are natural numbers, 1 ≦ i ≦ M × N, and 1 ≦ j ≦ M × N.
[0161]
[Equation 5]
Figure 0004014512
[0162]
Here, Dmn (j) (giant vector representation) can be obtained mechanically if Dmn (h, k) (matrix representation) is obtained. Dmn (h, k) (matrix expression) can be uniquely obtained from the characteristics of the bifocal lens 21 as described below.
[0163]
<Value of Dmn (h, k)>
The (h, k) element Dmn (h, k) (matrix representation) of the defocused image Dmn formed by the subject αmn with a single bright spot can be obtained as follows.
[0164]
The radii of the inner and outer circles of the bifocal lens 21 on the image sensor 24 are r, respectively.iAnd roAnd riCorresponds to the outer diameter (radius) of the long focus lens portion 22, that is, the inner diameter (radius) of the short focus lens portion 23, and roCorresponds to the outer diameter (radius) of the short focus lens portion 23. The size of one pixel of the image sensor 24 is assumed to be p × p.
[0165]
Assuming that the lens portion forming the defocused image is the outer short focus lens portion 23, the defocused image Dmn by αmn has a radius r centered at (m, n).i/ P to roIt becomes a donut shape up to / p (see FIG. 3). If the total brightness of the entire image Zmn is 1, the brightness of the focused image Bmn is c, the total brightness of the defocused image Dmn is (1-c), and the following formula (1- 23) is established.
[0166]
c = πri 2/ Πro 2= Ri 2/ Ro 2      (1-23)
[0167]
The average brightness ε per pixel in the defocused image Dmn can be expressed as the following equation (1-24) because the overall brightness of the defocused image Dmn is (1-c).
[0168]
ε = (1-c) × p2/ (Πro 2-Πri 2(1-24)
[0169]
Using the above equation (1-24), the value of Dmn (h, k) can be expressed by the following equation (1-25).
[0170]
Figure 0004014512
[0171]
Here, the radius r on the image sensor 24iAnd roIs preferably obtained by experiments, but the inner and outer diameters of the lens portions 22 and 23 constituting the bifocal lens 21, the focal lengths of the lens portions 22 and 23, and the distance between the bifocal lens 21 and the image sensor 24. You may obtain | require by calculation using distance.
[0172]
As described above, all the values of the elements Dmn (h, k) of the matrix representation of the defocused image Dmn for the subject αmn with a single bright spot can be obtained. Therefore, since the value of each element Dmn (j) of Dmn in the case of the giant vector expression can be easily obtained from the value of each element Dmn (h, k) in the case of this matrix expression, the above formula (1 Based on -22), all the values of each element T (i, j) of the giant inverse matrix T can be obtained.
[0173]
<Introduction of convolution matrix W>
By the way, each element T (i, j) of the giant inverse matrix T can be obtained by another way of thinking as follows. That is, first, as shown in FIG. 4, the subject α having a bright spot only in the (1,1) element.11Image Z formed by11And subject α having a bright spot only in the (1, N) element1NImage Z formed by1NAnd subject α having a bright spot only in the (M, 1) element.M1Image Z formed byM1And subject α having a bright spot only in the (M, N) elementMNImage Z formed byMNConsider a matrix W of (2M-1) rows (2N-1) columns constructed using four image matrices.
[0174]
In FIG. 4, the matrix W has an image matrix Z in the lower right part.11And the image matrix Z in the lower left part1NAnd the image matrix Z in the upper right partM1And the image matrix Z in the upper left partMNIs arranged. However, each image matrix Z11, Z1N, ZM1, ZMNAre arranged so as to overlap one row or one column. Here, W (x, y) is each element of the matrix W, and is defined as the following equation (1-26). X and y are integers based on either positive or negative values, (1 -M) ≤x≤ (M-1), (1-N) ≤y≤ (N-1). Each value of W (x, y) is normalized so that the sum of the values of these elements is 1.
[0175]
Figure 0004014512
[0176]
Further, the matrix W can be expressed as follows in another expression. That is, the matrix W is an image matrix Zmn of M rows and N columns by a single bright spot subject αmn from coordinates (h, k) satisfying x = hm and y = kn to coordinates (x, y). In coordinate conversion, the non-zero elements (c and ε in FIG. 4) of Zmn (h, k) are included by performing parallel movement so that W (0, 0) = Zmn (m, n). The matrix part E is arranged at the center of the matrix W, and the outer part of the matrix part E including the non-zero elements arranged at the center is filled with zero elements.
[0177]
The matrix part E including the non-zero elements is, for example, a size that can fit within 31 pixels × 31 pixels. The value of c included in the matrix portion E including non-zero elements is c = 0.8, for example, and the value of ε is, for example, ε = 0.0013. However, it is not limited to these numerical values. Further, in FIG. 4, ε is described in a line shape with a width of one row or one column, but actually, it is arranged in a band shape with a width of a plurality of rows or a plurality of columns. For example, zero elements (W (x, y) = 0) are arranged in an annular shape with a width of 7 rows or 7 columns centering on W (0, 0) = c, and 8 rows or 8 columns outside of it. Ε (W (x, y) = ε) is arranged in an annular shape with a width of minutes.
[0178]
Next, in the matrix W, the extracted matrix K of M rows and N columns is moved while shifting the position by one row or one column from the solid line position in FIG. If M × N elements are extracted from (x, y), each matrix K composed of the extracted elements11, K12... KMNIs the same as the image matrix Zmn (1 ≦ m ≦ M, 1 ≦ n ≦ N). For example, Z11The same cut-out matrix K11Is represented by the following equation (1-27).
[0179]
[Formula 6]
Figure 0004014512
[0180]
K in the above formula (1-27)11Is a matrix representation. If this is a giant vector representation, a vertical vector such as the following equation (1-28) is obtained.
[0181]
Figure 0004014512
[0182]
Similarly, when the extraction matrix K is moved leftward by one column in FIG.12The same cut-out matrix K12Is obtained as in the following equation (1-29), and its giant vector representation is obtained as in the following equation (1-30).
[0183]
[Expression 7]
Figure 0004014512
[0184]
Figure 0004014512
[0185]
In this way, the cut-out matrix K is sequentially moved to K11, K12... KMNIs obtained, the transformation giant matrix (cU + Δ) can be expressed by these vertical vectors K11, K12... KMNCan be expressed as in the following formula (1-31).
[0186]
Figure 0004014512
[0187]
Here, the giant vector (vertical vector) K in the above equation (1-31)11, K12... KMNIn addition, when the expressions (1-28) and (1-30) are used, (cU + Δ) can be expressed as the following expression (1-32).
[0188]
[Equation 8]
Figure 0004014512
[0189]
It can be seen that all the diagonal terms of the transformed giant matrix (cU + Δ) in the above equation (1-32) are W (0, 0). If this is expressed concretely, it will be as shown in FIG. In FIG. 5, the diagonal term is constant at W (0,0) = c, and in a portion other than the diagonal term, ε, which is a smaller numerical value than c, appears in parallel with the diagonal term. Yes. This can be understood by comparing FIG. 4 with FIG.
[0190]
Therefore, the giant inverse matrix T, which is the inverse matrix of the transformed giant matrix (cU + Δ), can be specifically expressed as shown in FIG. In FIG. 6, the diagonal term is constant at 1 / c, and the portion other than the diagonal term is −ε / c, which is a smaller numerical value than c.2Appears parallel to the diagonal term.
[0191]
<Introduction of convolution matrix Q>
Here, by converting each element W (x, y) of the matrix W of (2M-1) rows (2N-1) columns shown in FIG. Considering that a matrix (cU + Δ) is obtained, a matrix Q of (2M−1) rows (2N−1) columns that can form a giant inverse matrix T as shown in FIG. 6 can be considered.
[0192]
A matrix Q corresponding to such a matrix W is as shown in FIG. This can be understood by comparing FIG. 6 with FIG. In FIG. 7, the central portion of the matrix Q has an annular shape of −ε / c with Q (0,0) = 1 / c as the center.2Is arranged. The other parts are zero elements. That is, Q (x, y) is represented by the following equation (1-33).
[0193]
Figure 0004014512
[0194]
Here, x and y are integers, and (1−M) ≦ x ≦ (M−1) and (1−N) ≦ y ≦ (N−1). Note that the values of c and ε in the matrix Q of FIG. 7 are the same as the values of c and ε in the matrix W of FIG.
[0195]
Note that the present invention is not limited to the situation setting described in the first embodiment (when the defocused image Dmn has an annular shape), for example, when the defocused image Dmn has a circular shape, an elliptical shape, or a polygonal shape. In general, the above formula (1-33) is generalized to the following formula (1-34). In addition, when higher-order expansion is considered than the above-described expression (1-20), the expression becomes a more general form, and details thereof will be described later.
[0196]
Figure 0004014512
[0197]
On the other hand, the value of each element Z (h, k) of the image matrix Z is obtained by performing a convolution operation based on the following expression (1-35) using the matrix W described above, thereby obtaining each element of the matrix A of the subject. It can be calculated from the value of A (m, n). Therefore, the matrix W is a convolution operation matrix for performing a convolution operation process.
[0198]
Figure 0004014512
[0199]
Here, h and k are natural numbers, 1 ≦ h ≦ M, 1 ≦ k ≦ N, m and n are natural numbers, 1 ≦ m ≦ M, 1 ≦ n ≦ N, and ΣmIs the sum of m = 1 to M, and ΣnIs the sum of n = 1 to N.
[0200]
If considered similarly, the value of each element A (s, t) of the subject matrix A is obtained by performing a convolution operation based on the following equation (1-36) using the matrix Q described above. It can be calculated from the value of each element Z (h, k) of the matrix Z. Therefore, the matrix Q is also a convolution operation matrix for performing the convolution operation processing.
[0201]
Figure 0004014512
[0202]
Here, s and t are natural numbers, 1 ≦ s ≦ M, 1 ≦ t ≦ N, h and k are natural numbers, 1 ≦ h ≦ M, 1 ≦ k ≦ N, and ΣhIs the sum of h = 1 to M, and ΣkIs the sum of k = 1 to N.
[0203]
From the above, it can be seen that if the convolution calculation is performed using the convolution calculation matrix Q, the reproduction calculation processing for reproducing the value of each element A (s, t) of the subject matrix A can be performed.
[0204]
By the way, in the above description, the process which can be materialized when the value of C is a value other than the vicinity of 0.5 (including 0.5, the same applies hereinafter) and the basis thereof have been described. On the other hand, when the value of C approaches 0.5, the expansion shown in Expression (1-20) is insufficient, and higher-order expansion is required. Therefore, the expression (1-34) also needs to have a form corresponding to higher-order expansion.
[0205]
However, it is not preferable to perform higher-order expansion as compared with the equation (1-20) because the calculation equation becomes complicated and the processing becomes complicated and delayed. Therefore, Equation (1-34) is simply replaced with the following Equation (1-37) in such a way that it can cope with the value of C near 0.5. In addition, as a result of repeating many calculations, it was found by the applicant of the present application that an effect equivalent to higher-order development can be obtained by such replacement.
[0206]
Figure 0004014512
[0207]
Here, the value of power may be determined according to the value of c. At this time, when the value of c is in the vicinity of 0.5, the power value needs to be a value other than 2. More specifically, when the value of c is in the vicinity of 0.5, the power value is 1 or more and less than 2, more preferably 1. On the other hand, when the value of c is other than 0.5, it is set to 1 or more and 2 or less.
[0208]
In the above description, the description is given on the assumption that the long-focus lens unit 22, which is a portion that forms an in-focus image of the bifocal lens 21, forms an image without blur. Therefore, it is assumed that the image formed by the long focus lens unit 22 has a non-zero element only in W (0, 0), and the value thereof is c.
[0209]
However, in practice, the image formed by the long focus lens unit 22 may be blurred due to aberrations or the like, so the image formed by the long focus lens unit 22 is around W (0,0). The elements around W (0,0) can also be non-zero elements. For example, W (0,0) = 0.41 at the center of W (x, y), and W (0,1) = W (0, −1) = W (1, 0) = W (-1,0) = 0.08, W (1,1) = W (1, -1) = W (-1,1) = W (-1, -1) = 0.02 For other elements, W (x, y) = 0, and so on.
[0210]
Therefore, when the image formed by the long focus lens unit 22 is blurred due to aberration or the like and elements other than W (0,0) are also non-zero elements, the value of W (0,0) and W The values of the non-zero elements generated around (0,0) are summed, and the total value is re-entered into W (0,0) as the value of c, and the non-zero generated around W (0,0) The correction operation of making the value of the element zero is performed, and the value of each element W (x, y) created through these correction operations is used to calculate each element Q (x, y) of the convolution matrix Q. What is necessary is just to calculate a value. For example, in the case of the specific numerical example described above, the value of the central element is 0.41, the value of the surrounding four elements is 0.08 × 4, and the value of another surrounding four elements is 0.02 × 4. Is 0.81, so that W (0,0) = c = 0.81 and W (0,1) = W (0, −1) = W (1,0) = W (-1, 0) = W (1,1) = W (1, -1) = W (-1,1) = W (-1, -1) = 0.
[0211]
In such a first embodiment, the image modification processing device 30 improves the quality of the image obtained by imaging the subject using the bifocal lens 21 as follows.
[0212]
First, before imaging a subject, the value of each element Q (x, y) of the convolution matrix Q is calculated in advance based on the equation (1-33), (1-34), or (1-37). Then, it is stored in the convolution operation matrix storage means 32 of the image modification processing device 30. It is only necessary to store each value of the matrix portion H including non-zero elements (see FIG. 7).
[0213]
Next, the subject is imaged by the imaging mechanism 20. At this time, light emitted from the subject passes through the lens portions 22 and 23 of the bifocal lens 21 and reaches the image sensor 24. Then, the output signal of the image sensor 24 that has received light from the subject is extracted, taken into the image modification processing device 30, and stored in the output signal storage unit 31.
[0214]
Subsequently, the value of each element Q (x, y) (each value of the matrix portion H in FIG. 7) stored in the convolution calculation matrix storage means 32 and the output signal storage means 31 are stored by the reproduction calculation means 33. Using the value of each element Z (h, k) of the matrix Z indicating the output signal of the obtained image, the value of each element A (s, t) of the subject matrix A is calculated based on the equation (1-36). .
[0215]
Thereafter, using the value of each element A (s, t) of the obtained subject matrix A, the subject that is the subject of imaging 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).
[0216]
According to such 1st Embodiment, there exist the following effects. That is, the calculation processing by the reproduction calculation means 33 is calculated in advance based on the equation (1-33), (1-34), or (1-37) and stored in the convolution calculation matrix storage means 32 (2M-1 ) Value of each element Q (x, y) of the convolution matrix Q of row (2N-1) column (in the first embodiment, each value of the matrix part H including a non-zero element that is a part thereof) Since the calculation process is performed using the large inverse matrix T of M × N rows and M × N columns represented by the expression (1-22), the matrix of the subject can be obtained with a very small calculation amount. The value of each element A (s, t) of A can be calculated.
[0217]
For example, if M = 300 pixels and N = 400 pixels, the amount of calculation when using the giant inverse matrix T (M × N) × (M × N) = 1.44 × 10TenThe amount of calculation when using the convolution operation matrix Q for the number of times is (2M-1) × (2N-1) = about 480,000 times, and further, the matrix portion including the non-zero elements in the convolution operation matrix Q The calculation amount when only H is used is, for example, 31 × 31 = about 1000 times.
[0218]
For this reason, since the subject can be reproduced by obtaining a focused image in a short time process, the quality of the image captured by the bifocal lens 21 can be improved in a short time process. Without using the alignment mechanism, a clear image can be obtained for both a normal subject at a standard distance and a close subject at a shorter distance.
[0219]
In addition, since the calculation processing by the reproduction calculation means 33 has a very small amount of calculation, a short time processing is possible even with the capability of the CPU mounted on a portable information terminal device such as a cellular phone or a portable information terminal. Can be done with. Therefore, if the present invention is applied to a portable information terminal device including the bifocal lens 21, the usability and performance of the information terminal device can be improved.
[0220]
[Second Embodiment]
FIG. 8 shows the overall configuration of the imaging system 200 including the image modification processing device 230 according to the second embodiment of the present invention. Since the imaging system 200 is different only in the configuration of the imaging system 10 of the first embodiment and the image modification processing device 230, the same parts are denoted by the same reference numerals, detailed description thereof is omitted, and the following is different. Only the part will be described.
[0221]
In FIG. 8, the image modification processing device 230 includes an output signal storage unit 231, a convolution operation matrix storage unit 232, a reproduction operation unit 233, a shading correction matrix storage unit 234, and a shading correction unit 235. . Among these, the output signal storage means 231, the convolution calculation matrix storage means 232, and the reproduction calculation means 233 are the same as the output signal storage means 31, the convolution calculation matrix storage means 32, and the reproduction calculation means 33 of the first embodiment. It is.
[0222]
The shading correction matrix storage unit 234 corrects each of the M rows and N columns of the shading correction matrix Φ for correcting the influence of the shading that reduces the amount of light received at the periphery of the image due to the nonuniformity of the incident angle of the light to the bifocal lens 21. The value of the element Φ (s, t) is stored.
[0223]
Here, the value of each element Φ (s, t) of the shading correction matrix Φ is obtained as follows. First, let Ψ (s, t) be an output signal value of each element of an image formed by imaging a uniform white subject (flat subject). The value of Ψ (s, t) is preferably obtained by experiment, but may be obtained by calculation. In the case of calculation, it can be obtained by using a cosine value cos θ based on the azimuth angle θ of a point on the subject measured from the normal line of the central portion of the bifocal lens 21. At this time, the value of each element Φ (s, t) of the shading correction matrix Φ is expressed by the following equation (2-1).
[0224]
Φ (s, t) = 1 / Ψ (s, t) (2-1)
[0225]
Here, s and t are natural numbers, and 1 ≦ s ≦ M and 1 ≦ t ≦ N. The value of Ψ (s, t) is normalized so that the output signal value of the element having the maximum brightness (luminance) is 1.
[0226]
The shading correction means 235 uses the value of each element Φ (s, t) stored in the shading correction matrix storage means 234 and each element A (s) of the subject matrix A obtained by performing the processing by the reproduction calculation means 233. , T) and the subject matrix A subjected to the shading correction based on the following equation (2-2)shEach element AshThe process of calculating (s, t) is performed.
[0227]
Ash(S, t) = A (s, t) × Φ (s, t) (2-2)
[0228]
The shading correction matrix storage unit 234 is realized by, for example, a hard disk, a ROM, or the like, similar to the convolution calculation matrix storage unit 232.
[0229]
The shading correction unit 235 is realized by a central processing unit (CPU) and one or a plurality of programs that define the operation procedure of the CPU, like the reproduction calculation unit 233.
[0230]
In such a second embodiment, the image modification processing device 230 improves the quality of the image obtained by imaging the subject using the bifocal lens 21 as follows.
[0231]
First, the value of each element Φ (s, t) of the shading correction matrix Φ is stored in the shading correction matrix storage means 234.
[0232]
Next, the same processing as in the first embodiment is performed, and after the processing by the reproduction calculation unit 233, the value of each element Φ (s, t) and the processing by the reproduction calculation unit 233 are performed by the shading correction unit 235. Using the values of the respective elements A (s, t) of the subject matrix A obtained in the above, the subject matrix A subjected to the shading correction based on the equation (2-2)shEach element AshThe value of (s, t) is calculated.
[0233]
According to the second embodiment, in addition to the effects obtained in the first embodiment, since the processing by the shading correction unit 235 is performed, the influence of the shading is eliminated, so that the image quality is further improved. There is an effect that can be done.
[0234]
[Third Embodiment]
FIG. 9 shows an overall configuration of an imaging system 300 including an image modification processing device 330 according to the third embodiment of the present invention. Since the imaging system 300 is different only in the configuration of the imaging system 10 of the first embodiment and the image modification processing device 330, the same parts are denoted by the same reference numerals, detailed description thereof is omitted, and the following is different. Only the part will be described.
[0235]
In FIG. 9, the image modification processing device 330 includes an output signal storage unit 331, a convolution operation matrix storage unit 332, a reproduction operation unit 333, a shading correction matrix storage unit 334, and a shading correction unit 335. . Among these, the output signal storage means 331, the convolution calculation matrix storage means 332, and the reproduction calculation means 333 are the same as the output signal storage means 31, the convolution calculation matrix storage means 32, and the reproduction calculation means 33 of the first embodiment. It is.
[0236]
The shading correction matrix storage means 334 stores each of the M rows and N columns of the shading correction matrix Φ for correcting the influence of the shading that reduces the amount of light received at the periphery of the image due to the nonuniformity of the incident angle of the light to the bifocal lens 21. The value of element Φ (h, k) is stored.
[0237]
Here, the value of each element Φ (h, k) of the shading correction matrix Φ is obtained using Ψ (h, k) in the same manner as in the second embodiment.
[0238]
The shading correction means 335 uses the value of each element Φ (h, k) stored in the shading correction matrix storage means 334 and the value of each element Z (h, k) of the matrix Z of the image output signal. Based on the following equation (3-1), the matrix Z of the output signal of the image subjected to the shading correctionshEach element Zsh(H, k) is calculated and Z obtainedshProcessing is performed so that the value of (h, k) is used as the new Z (h, k) for processing by the reproduction calculation means 333.
[0239]
Zsh(H, k) = Z (h, k) × Φ (h, k) (3-1)
[0240]
Here, h and k are natural numbers, and 1 ≦ h ≦ M and 1 ≦ k ≦ N.
[0241]
The shading correction matrix storage unit 334 is realized by, for example, a hard disk, a ROM, or the like, similar to the convolution calculation matrix storage unit 332.
[0242]
The shading correction unit 335 is realized by a central processing unit (CPU) and one or a plurality of programs that define the operation procedure of the CPU, like the reproduction calculation unit 333.
[0243]
In the third embodiment as described above, the quality of the image obtained by imaging the subject using the bifocal lens 21 is improved by the image modification processing device 330 as follows.
[0244]
First, the value of each element Φ (h, k) of the shading correction matrix Φ is stored in the shading correction matrix storage means 334.
[0245]
Next, before performing the processing by the reproduction calculation unit 333, the value of each element Φ (h, k) and the value of each element Z (h, k) of the matrix Z of the output signal of the image are processed by the shading correction unit 335. And the matrix Z of the output signal of the image subjected to the shading correction based on the equation (3-1)shEach element ZshAfter calculating the value of (h, k), the Z obtainedshLet the value of (h, k) be a new Z (h, k).
[0246]
Subsequently, using the value of Z (h, k) that has undergone the processing by the shading correction means 335, the processing by the reproduction calculating means 333 and the subsequent processing are performed as in the first embodiment.
[0247]
According to the third embodiment, in addition to the effects obtained in the first embodiment, since the processing by the shading correction unit 335 is performed, the influence of the shading is eliminated, so that the image quality is further improved. There is an effect that can be done.
[0248]
[Fourth Embodiment]
FIG. 10 shows a detailed configuration of a digital filter circuit 433 constituting a part of the image modification processing device 430 according to the fourth embodiment of the present invention. In the first, second, and third embodiments, each of the reproduction calculation means 33, 233, and 333 is realized by a central processing unit (CPU) and one or more programs that define the operation procedure of the CPU. However, in the fourth embodiment, the reproduction calculation means is realized by a digital filter circuit 433 as shown in FIG. Other configurations are the same as those of the first, second, and third embodiments.
[0249]
The digital filter circuit 433 realizes the processing by the reproduction calculation means, that is, the convolution calculation processing using the convolution calculation matrix Q based on the expression (1-36) of the first embodiment by hardware.
[0250]
In FIG. 10, in order to simplify the description, each element of the convolution calculation matrix Q defined by the expression (1-33), (1-34), or (1-37) of the first embodiment. A circuit in the case where the value of Q (x, y) is used for 3 pixels × 3 pixels is shown. However, in practice, the value of Q (x, y) is used for the number of pixels (for example, 31 pixels × 31 pixels) of the matrix portion H including the non-zero elements in FIG. However, the arrangement method of each constituent circuit is the same as that shown in FIG.
[0251]
In FIG. 10, the digital filter circuit 433 converts the value of each element Q (x, y) of the convolution operation matrix Q into the value of each element Z (h, k) of the matrix Z of the output signal of the image that is sequentially input. A plurality (nine in FIG. 10) of multiplication circuits 401 to 409 for multiplication, and a plurality (eight in FIG. 10) of addition circuits 411 to 418 for adding output signals from these multiplication circuits 401 to 409, A plurality (eight in FIG. 10) of delay circuits 421 to 428 for adjusting the speed of the signal flow of each element Z (h, k) sequentially input.
[0252]
The multiplication circuits 401, 402, 403, 404, 405, 406, 407, 408, and 409 are respectively Q (-1, -1), Q (-1, 0), Q (-1, 1), Q (0 , -1), Q (0, 0), Q (0, 1), Q (1, -1), Q (1, 0), and Q (1, 1). .
[0253]
The delay circuits 421 to 426 are circuits for performing one clock delay for delaying the signal by the time from pixel to pixel, and the delay circuits 427 and 428 are for performing 1H delay to delay the signal by the time from row to row. Circuit.
[0254]
According to the fourth embodiment, in addition to the effects obtained in the first to third embodiments, the convolution operation processing using the convolution operation matrix Q can be realized by hardware. There is an effect that the processing time required for quality can be further shortened.
[0255]
[Fifth Embodiment]
FIG. 11 shows an overall configuration of an imaging system 500 including an image modification processing device 530 according to the fifth embodiment of the present invention. Since the imaging system 500 is different only in the configuration of the imaging system 10 of the first embodiment and the image modification processing device 530, the same parts are denoted by the same reference numerals, detailed description thereof is omitted, and the following is different. Only the part will be described.
[0256]
In FIG. 11, the imaging system 500 includes an imaging mechanism 20 that captures an image of an object, an image modification processing device 530 that improves the quality of an image captured by the imaging mechanism 20, and a quality that is improved by the image modification processing device 530. Display means 40 for displaying the improved image. Among these, the configurations of the imaging mechanism 20 and the display means 40 are the same as those in the first embodiment.
[0257]
The image modification processing apparatus 530 includes an output signal storage unit 531, a discrete cosine transform processing unit 532, a defocused image erasing processing unit 533, a quantization processing unit 534, an encoding processing unit 535, and a cosine value storage unit. 536.
[0258]
The output signal storage means 531 is for extracting and storing an output signal of an image obtained by imaging the subject with the bifocal lens 21 from the imaging device 24.
[0259]
Discrete / cosine transform processing means (DCT processing means) 532 is described by assuming that the output signal of each pixel of the image sensor 24 stored in the output signal storage means 531 is Q pixels × Q pixels (here, 8 pixels × 8 pixels). )), And the extracted signal level SxySignal level S corresponding to each spatial frequency by performing discrete cosine transform processing (DCT processing) based on equation (5-1) to be described later.F uvThe process which calculates | requires is performed. This DCT processing is the same processing as that performed in normal JPEG image compression processing.
[0260]
The out-of-focus image erasure processing unit 533 is the S obtained by the processing by the discrete cosine conversion processing unit 532.F uvComponent S of zeroF 00Is multiplied by the ratio of the area of the lens unit (long focal lens unit 22 or short focal lens unit 23) that forms an in-focus image with respect to the total area of the bifocal lens 21, and the value obtained by this multiplication is obtained. New SF 00Is performed.
[0261]
The quantization processing unit 534 outputs the signal level S after processing by the defocused image erasing processing unit 533.F uvQuantization processing is performed. This quantization processing is the same processing as that performed in normal JPEG image compression processing.
[0262]
The encoding processing unit 535 performs processing for encoding the quantized data obtained by the processing by the quantization processing unit 534. This encoding process is the same as that performed in the normal image compression process using JPEG.
[0263]
The cosine value storage means 536 stores the value of cos (cosine) in equation (5-1), which will be described later, used in the arithmetic processing by the DCT processing means 532 for each combination of x and u, and y and v. It is a table to memorize.
[0264]
Examples of the output signal storage unit 531 and the cosine value storage unit 536 include 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 of these can be employed.
[0265]
The DCT processing unit 532, the defocused image erasing processing unit 533, the quantization processing unit 534, and the encoding processing unit 535 are various information terminal devices (for example, portable types such as a cellular phone and a portable information terminal) that constitute the imaging system 500. Information terminal device, or a central processing unit (CPU) provided inside a personal computer connected to a camera, a monitoring camera device, etc.) and one or more programs that define the operating procedure of this CPU Is done.
[0266]
Hereinafter, the basis of various arithmetic processes performed by the image modification processing apparatus 530 will be described.
[0267]
As described in the description of the first embodiment, the image on the image sensor 24 by the bifocal lens 21 sharing the optical axis is the long focal lens portion 22 disposed on the inner side and the short focal point disposed on the outer side. Of the lens unit 23, an image focused by one lens unit and an image out of focus by the other lens unit (so-called blurred image) are superimposed.
[0268]
At this time, the out-of-focus image is an image with little variation in the amount of received light in the screen, with almost no information on the subject, by appropriately selecting the aperture and magnification of the lens unit.
[0269]
Considering the above, if an out-of-focus image can be erased by an appropriate method, reproduction of an in-focus image can be realized. If a simple erasing method that can reduce the image improvement processing time (calculation amount / processing capacity) as much as possible, processing can be performed in a short time even within the range of the CPU of the portable information terminal. . Therefore, hereinafter, an erasing method for shortening the processing time as much as possible will be described.
[0270]
First, the basic concept of the defocused image erasing process will be described.
[0271]
<Image for image improvement processing and basic method for erasing>
An image formed by the bifocal lens 21 and in which the in-focus image and the out-of-focus image overlap each other is set as an object of image improvement processing. It is assumed that the defocused image almost completely loses the information of the subject in the screen, and the fluctuation of the output signal level at each position on the screen, that is, for each pixel of the image sensor 24 is small. In this case, an in-focus image can be formed by subtracting the out-of-focus image (the signal value thereof) from the image of the bifocal lens 21. When obtaining the signal value of a defocused image, it may be considered that the average value in the spread range of an arbitrary point on the subject is proportional to the areas of both lens portions 22 and 23.
[0272]
<Method for shortening the erasing time>
First, output signal data (= bitmap data) of the image sensor 24 is compressed by an appropriate method. Here, the data is converted into JPEG data. In JPEG, each pixel is divided and processed in units of 8 × 8 pixels. Therefore, the defocused image erasure is also performed using this division. That is, discrete cosine transform (DCT) for each division unit is executed by JPEG, and an average value of signal levels is obtained using the frequency components. This average value is prorated according to the average light quantity ratio between the in-focus data and the out-of-focus data, and the average value of the out-of-focus image signal is subtracted from the original data, leaving only the in-focus image. Then, a series of processing performed on the divided unit screen of 8 × 8 pixels is repeatedly performed on all unit screens on the surface of the image sensor 24.
[0273]
Next, actual data processing will be described. Here, a practical algorithm will be described assuming that a defocused image erasure process is also included in the execution process of the JPEG compression process.
[0274]
<DCT processing>
As described above, the signal level of each pixel in the unit screen divided by 8 × 8 pixels as a unit is S.xy(X and y indicate the position coordinates in the unit screen of 8 × 8 pixels and take values of 0 to 7, respectively).xyThe signal level of each spatial frequency component obtained by DCT processing ofF uv(U and v indicate spatial frequencies, and take values of 0 to 7, respectively). Then, the following equation (5-1) is established.
[0275]
Figure 0004014512
[0276]
Where ΣxRepresents the sum of x = 0 to 7 and ΣyIndicates the sum of y = 0-7. Cu, CvTakes a value represented by the following equation (5-2).
[0277]
Figure 0004014512
[0278]
On the other hand, the DCT inverse transform is represented by the following equation (5-3).
[0279]
Figure 0004014512
[0280]
Where ΣuIndicates the sum of u = 0 to 7 and ΣvIndicates the sum of v = 0-7. However, in practice, S is not zero due to the quantization process.F uvThe number of is much less than 64, and is considered to be about 10.
[0281]
<Defocused image deletion processing>
Here, the signal level S in the unit screen divided into 8 × 8 pixels using the equation (5-3).xyWhen the sum Ssum of is obtained, the following equation (5-4) is obtained.
[0282]
Figure 0004014512
[0283]
Where ΠmIndicates the product of m = 1 to 4, and ΠnIndicates a product of n = 1 to 4, but except for u = 0 and v = 0, the Σ symbol (or Π symbol) is zero, so Ssum is finally expressed by the above equation (5-4). ) 8S as shown at the end of the right sideF 00become. Therefore, the signal level S of each pixelxyThe average value Smean of can be expressed as follows.
[0284]
Smean = Ssum / 64 = SF 00/ 8
[0285]
Sp signal after erasure processing of defocused imagexyIn addition, since the ratio of the amount of light passing through the lens portion on the side that generates the defocused image is determined by the proportional ratio of the aperture areas of both lens portions 22 and 23, when the ratio to the total amount of light is ρ, (5-5) is established.
[0286]
Spxy= Sxy-Ρ × Smean (5-5)
[0287]
When the above equation (5-5) is substituted into the equation (5-1), the following equation (5-6) is obtained.
[0288]
Figure 0004014512
[0289]
Here, if it puts like following Formula (5-7), Formula (5-8) and Formula (5-9) will be obtained.
[0290]
SpF uv= SF uv-Cuv      ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (5-7)
[0291]
Figure 0004014512
[0292]
Figure 0004014512
[0293]
In the above formula (5-9), ΠmIndicates the product of m = 1 to 4, and ΠnIndicates a product of n = 1 to 4, but except for u = 0 and v = 0, the Σ symbol (or Π symbol) is zero, and as a result, as in the following equation (5-10) Become.
[0294]
Figure 0004014512
[0295]
Therefore, the signal Sp after the erasure processF uvAnd the signal S before processingF uvFrom the formula (5-7) and the formula (5-10), the relationship with is as follows.
[0296]
Figure 0004014512
[0297]
As described above, in the defocused image erasing process, the erasing process is completed if the value of only the component of the spatial frequency zero in the DCT is multiplied by (1−ρ). The series of processing described above is processing within a unit screen of 8 × 8 pixels, but this processing may be executed by the number of unit screens divided and formed on the image sensor 24.
[0298]
In the fifth embodiment, the image modification processing device 530 improves the quality of the image obtained by imaging the subject using the bifocal lens 21 as follows.
[0299]
First, the subject is imaged by the imaging mechanism 20. At this time, light emitted from the subject passes through the lens portions 22 and 23 of the bifocal lens 21 and reaches the image sensor 24. Then, output signal data corresponding to the number of pixels is extracted from the image pickup device 24 that has received light from the subject, is taken into the image modification processing device 530, and is stored in the output signal storage unit 531.
[0300]
Subsequently, the DCT processing unit 532 reads the data for the unit screen of 8 × 8 pixels from the image data stored in the output signal storage unit 531, and performs DCT processing calculation based on the above equation (5-1). Signal level S corresponding to frequencyF uvAsk for. At this time, since the value stored in the cosine value storage means 536 is used for the value of cos (cosine) in the equation (5-1), the calculation is not performed each time.
[0301]
Next, the out-of-focus image erasing processing unit 533 performs SF 00The value obtained by multiplying the value of (u = 0, v = 0) by the ratio (1-ρ) of the area of the lens part that forms an in-focus image to the entire area of the bifocal lens 21 is the new SF 00The process is performed. In other words, the signal Sp after the erasing process is obtained by the above equation (5-10).F uvAnd the signal S before processingF uvIs different only when u = v = 0.F 00If only (1−ρ) is multiplied, bokeh image erasure processing is completed.
[0302]
After that, each process by the DCT processing unit 532 and the out-of-focus image erasing processing unit 533 is performed.F uvWhen JPEG normal processing such as processing by the quantization processing means 534 is performed, SF uvSince it becomes almost zero for higher-order u and v, the amount of data is greatly compressed.
[0303]
Further, the S thus obtained is obtained.F uvAre stored in the memory by the encoding processing means 535 in a set with the number of zero elements so far in order of increasing u + v (JPEG processing).
[0304]
Then, the above series of processing by the DCT processing unit 532, the defocused image erasing processing unit 533, the quantization processing unit 534, and the encoding processing unit 535 is repeated for all unit screens on the image sensor 24 (JPEG format). processing). With these processes, it is possible to obtain a JPEG file of an image from which a defocused image has been deleted.
[0305]
According to such 5th Embodiment, there exist the following effects. That is, the process by the defocused image erasure processing unit 533 is the S obtained by performing the DCT process.F uvComponent S of zeroF 00Multiply only the value of (1−ρ) and the value obtained by this multiplication is a new SF 00Since the remaining processing is the same as the normal JPEG image compression processing, a series of processing can be executed with a small amount of calculation.
[0306]
In other words, by using a JPEG compression method mainly consisting of DCT, it is possible to easily incorporate a defocused image erasure process in the middle of the process. It can be performed.
[0307]
For this reason, in a short time, it is possible to erase a blurred image and obtain a focused image to improve the quality of the image and to reduce the amount of calculation. Even a CPU having a capability of being mounted on a portable information terminal device such as an information terminal can be executed in a short time. Therefore, if the present invention is applied to a portable information terminal device including the bifocal lens 21, the usability and performance of the information terminal device can be improved.
[0308]
[Sixth Embodiment]
FIG. 12 shows an overall configuration of an imaging system 600 including an image modification processing device 630 according to the sixth embodiment of the present invention. Since the imaging system 600 is different only in the configuration of the imaging system 10 of the first embodiment and the image modification processing device 630, the same parts are denoted by the same reference numerals, detailed description thereof is omitted, and the following is different. Only the part will be described.
[0309]
In FIG. 12, an imaging system 600 includes an imaging mechanism 20 that captures an image of an object, an image modification processing device 630 that improves the quality of an image captured by the imaging mechanism 20, and a quality that is improved by the image modification processing device 630. Display means 40 for displaying the improved image. Among these, the configurations of the imaging mechanism 20 and the display means 40 are the same as those in the first embodiment.
[0310]
The image modification processing device 630 includes an output signal storage unit 631, a moving average calculation unit 632, and an image correction unit 633.
[0311]
The output signal storage unit 631 extracts and stores the output signal value Z (h, k) of each element of the image obtained by imaging the subject with the bifocal lens 21 from the imaging device 24.
[0312]
The moving average calculation means 632 calculates each output signal value in the unit screen F of Q pixels × Q pixels centered on coordinates (h, k) as shown in FIG. 13 based on the following equation (6-1). A process of calculating an average value Zmean (h, k) of Z (h, k) is performed. Since the Q pixel × Q pixel unit screen F moves with the movement of the output signal value Z (h, k) to be processed, Zmean (h, k) is a moving average value.
[0313]
Figure 0004014512
[0314]
Here, Q is an odd natural number of 3 or more, h and k are natural numbers, 1 ≦ h ≦ M, 1 ≦ k ≦ N, x and y are integers, (1-Q) / 2 ≦ x ≦ (Q−1) / 2, (1−Q) / 2 ≦ y ≦ (Q−1) / 2, and ΣxIs the sum of x = (1-Q) / 2 to (Q-1) / 2, ΣyIs the sum of y = (1-Q) / 2 to (Q-1) / 2.
[0315]
The image correcting unit 633 performs image modification processing on Z (h, k) based on the following equation (6-2) using the moving average value Zmean (h, k) calculated by the moving average calculating unit 632. The signal value Znew (h, k) obtained in this way is calculated. This process is equivalent to subtracting the defocused signal and then returning the subtracted signal to the original signal level.
[0316]
Figure 0004014512
[0317]
Here, c is a proportional coefficient, which is a value of the ratio of the area of the lens part that forms an in-focus image to the entire area of the bifocal lens 21, k is a normalization coefficient, and Znew (h, This is a value for setting the maximum value of k) to 1. If the split ratio of the amount of light does not coincide with the area ratio of the lens, the value of c is not determined by the area ratio but actually passes through the focused lens portion of the bifocal lens 21. The ratio between the amount of light reaching the image sensor 24 or the signal amount of the image sensor 24 and the amount of light passing through the entire bifocal lens 21 and actually reaching the image sensor 24 or the signal amount of the image sensor 24 It may be obtained as a value.
[0318]
The output signal storage unit 631 is realized by a RAM, a hard disk, or the like.
[0319]
The moving average calculation means 632 and the image correction means 633 may be realized by a central processing unit (CPU) and one or a plurality of programs that define the operation procedure of the CPU, or may be realized by a digital filter circuit. Good. In the case of the digital filter circuit, since the processing is performed by hardware, the calculation processing time can be further shortened. At this time, the digital filter circuit is constituted by a multiplier circuit, an adder circuit, and the like, and the value multiplied by the multiplier circuit is {− (1−c) / (c × Q2)} And {(1 / c)-(1-c) / (c × Q2)}.
[0320]
In the sixth embodiment as described above, the image modification processing device 630 improves the quality of the image obtained by imaging the subject using the bifocal lens 21 as follows.
[0321]
First, the output signal value Z (h, k) of each element of the image obtained by imaging the subject is stored in the output signal storage means 631.
[0322]
Next, the unit screen F of Q pixels × Q pixels centered on the coordinates (h, k) based on the equation (6-1) for Z (h, k) to be processed by the moving average calculation means 632. The average value Zmean (h, k) of each output signal value Z (h, k) is calculated.
[0323]
Subsequently, using the moving average value Zmean (h, k) calculated by the moving average calculating unit 632, the image correcting unit 633 converts Z (h, k) into an image modification process based on the equation (6-2). The signal value Znew (h, k) obtained in this way is calculated. Note that the processing by the moving average calculation unit 632 based on the equation (6-1) and the processing by the image correction unit 633 based on the equation (6-2) may be integrally performed by one equation.
[0324]
Then, the above processing is repeated for each output signal value Z (h, k). At this time, as the Z (h, k) moves, the Q pixel × Q pixel unit screen F to be averaged also moves, so that Zmean (h, k) takes a moving average value. become.
[0325]
Thereafter, using the obtained value of Znew (h, k), the subject to be imaged 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).
[0326]
According to the sixth embodiment, there are the following effects. That is, since the image correction unit 633 performs processing, it is possible to remove the defocused image, thereby improving the image quality.
[0327]
In addition, since it is a simple calculation process that is simply reduced by taking a moving average, the calculation amount is small and the process can be performed in a short time. For this reason, it can be suitably used for a portable information terminal device or the like.
[0328]
[Deformation form]
Note that the present invention is not limited to the above-described embodiments, and modifications and the like within a range in which the object of the present invention can be achieved are included in the present invention.
[0329]
That is, in each of the above embodiments, the bifocal lens 21 constituting the imaging mechanism 20 has the long focal lens portion 22 disposed on the inner side and the short focal lens portion 23 disposed on the outer side. The target of the quality processing is not limited to the image captured by the bifocal lens having such an arrangement. For example, the reverse arrangement, that is, the short focus lens unit is disposed inside, and the long focus lens unit is disposed outside. May be an image by a bifocal lens in which is arranged.
[0330]
In each of the above embodiments, the long focus lens portion 22 and the short focus lens portion 23 constituting the bifocal lens 21 are arranged concentrically, but the present invention is not limited to this, and the focus in the present invention is not limited. The one lens part that forms an image with a good image and the other lens part that forms an image that is out of focus may or may not be arranged concentrically.
[0331]
In the first embodiment, the case where the out-of-focus image is formed by the lens unit arranged on the outer side has been described. However, in the present invention, the out-of-focus image is formed by the lens unit arranged on the inner side. Can also be applied. In this case, the out-of-focus image is not in a ring shape, but in a shape such as a circle, an ellipse, or a polygon according to the front shape of the lens unit disposed inside.
[0332]
Further, in the first embodiment, the case where the defocused image is formed by the short focus lens unit has been described. However, the present invention can also be applied to the case where the defocused image is formed by the long focus lens unit. it can. In this case, the subject is, for example, a close subject such as a two-dimensional barcode, an iris, or a character.
[0333]
In the description of the fifth embodiment, information on the subject is almost completely lost in the defocused image screen, and the amount of received light on the screen, that is, the fluctuation of the output signal level for each pixel of the image sensor 24 can be ignored. However, this condition is not always necessary, and the present invention can be suitably applied as long as there is no variation in the output signal level for each pixel in the range of the unit screen when performing JPEG processing.
[0334]
【The invention's effect】
As described above, according to the present invention, a convolution operation is performed using the convolution operation matrix Q, a defocused image is erased using a JPEG process or a process similar thereto, or a moving average is performed. Since the process of reducing the signal for defocusing is performed, the quality of the image captured by the bifocal lens can be improved in a short time, and it is at a standard distance without using a focusing mechanism. There is an effect that a clear image can be obtained for both a normal subject and a close subject closer than this.
[Brief description of the drawings]
FIG. 1 is an overall configuration diagram of an imaging system including an image modification processing apparatus according to a first embodiment of the present invention.
FIG. 2 is a detailed configuration diagram of a bifocal lens that forms an image to be processed by the image modification processing apparatus of the first embodiment.
FIG. 3 is an explanatory diagram of a relationship between a subject in the first embodiment and an image obtained by imaging the subject with a bifocal lens.
FIG. 4 is an explanatory diagram of a convolution operation matrix W according to the first embodiment.
FIG. 5 is an explanatory diagram of a conversion giant matrix (cU + Δ) according to the first embodiment.
FIG. 6 is an explanatory diagram of a giant inverse matrix T according to the first embodiment.
FIG. 7 is an explanatory diagram of a convolution operation matrix Q according to the first embodiment.
FIG. 8 is an overall configuration diagram of an imaging system including an image modification processing device according to a second embodiment of the present invention.
FIG. 9 is an overall configuration diagram of an imaging system including an image modification processing apparatus according to a third embodiment of the present invention.
FIG. 10 is a detailed configuration diagram of a digital filter circuit constituting a part of an image modification processing apparatus according to a fourth embodiment of the present invention.
FIG. 11 is an overall configuration diagram of an imaging system including an image modification processing device according to a fifth embodiment of the present invention.
FIG. 12 is an overall configuration diagram of an imaging system including an image modification processing device according to a sixth embodiment of the present invention.
FIG. 13 is an explanatory diagram of a process for taking a moving average in the sixth embodiment.
[Explanation of symbols]
21 Bifocal lens
22 Long focal length lens section corresponding to one or the other lens section
23 Short-focus lens part corresponding to one or the other lens part
24 Image sensor
30, 230, 330, 430, 530, 630 Image modification processing apparatus
32, 232, 332 Convolution calculation matrix storage means
33, 233, 333 Reproduction calculation means
234,334 Shading correction matrix storage means
235, 335 Shading correction means
401-409 multiplication circuit
411-418 Adder circuit
421 to 428 delay circuit
433 Digital filter circuit as reproduction calculation means
531 Output signal storage means
532 Discrete cosine transform processing means (DCT processing means)
533 Defocused image erasing processing means
534 Quantization processing means
535 Encoding processing means
632 Moving average calculation means
633 Image correction means
E, H Matrix part containing non-zero elements
M Number of pixels in the vertical direction of the image sensor
N Number of pixels in the horizontal direction of the image sensor
Q convolution matrix
Φ Shading correction matrix

Claims (9)

二焦点レンズを構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像から、ピントの合った画像を求める画像改質処理方法であって、
撮像素子の大きさをM画素×N画素とし、被写体の発する光の明るさを示すM行N列の行列をAとし、前記被写体を前記二焦点レンズにより撮像して得られた画像の出力信号を示すM行N列の行列をZとしたとき、
畳み込み演算処理を行うための(2M−1)行(2N−1)列の畳み込み演算行列Qの各要素Q(x,y)の値のうち少なくとも非零要素を含む行列部分の値を下式(1)に基づき予め算出して畳み込み演算行列記憶手段に記憶しておき、
前記被写体を前記二焦点レンズにより撮像した際に、再生演算手段により、前記畳み込み演算行列記憶手段に記憶された各要素Q(x,y)のうちの少なくとも一部の値と前記画像の出力信号の行列Zの各要素Z(h,k)の値とを用いて下式(2)に基づき前記被写体の行列Aの各要素A(s,t)の値を算出することを特徴とする画像改質処理方法。
Q(x,y)=1/c−(W(0,0)−c)/cpower
(x=0,y=0の場合)
=−W(x,y)/cpower
(x=0,y=0以外の場合)
・・・・・・・・・・・・・・・・・・・・・・(1)
A(s,t)=ΣhΣkQ(s−h,t−k)Z(h,k)
・・・・・・・・・・・・・・・・・・・・・・(2)
ここで、
xおよびyは整数で、(1−M)≦x≦(M−1)、(1−N)≦y≦(N−1)であり、
sおよびtは自然数で、1≦s≦M、1≦t≦Nであり、
hおよびkは自然数で、1≦h≦M、1≦k≦Nであり、
W(x,y)は、(2M−1)行(2N−1)列の行列Wの各要素の値であり、この行列Wは、端部を除く座標(m,n)で示される1点のみに輝点のある被写体を前記二焦点レンズで撮像したときに前記一方および前記他方のレンズ部により形成される画像の出力信号を示すM行N列の行列Zmnを、x=h−m、y=k−nを満たす座標(h,k)から座標(x,y)への座標変換で、W(0,0)=Zmn(m,n)となるように平行移動することにより、Zmn(h,k)のうちの非零要素を含む行列部分を前記行列Wの中央部に配置するとともに、前記中央部に配置された前記非零要素を含む行列部分の外側部分を零要素で埋めることにより構成され、
cは、比例係数で、前記二焦点レンズの全体面積に対する前記一方のレンズ部の面積の比の値であり、
powerは、cのべき乗数となる実数で、1≦power≦2であり、
Σhは、h=1〜Mの和であり、Σkは、k=1〜Nの和である。
An image modification for obtaining an in-focus image from an image in which an in-focus image formed by one lens portion constituting a bifocal lens overlaps an in-focus image formed by the other lens portion. A quality treatment method,
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 bifocal lens When the matrix of M rows and N columns indicating
The value of the matrix part including at least a non-zero element among the values of each element Q (x, y) of the (2M-1) row (2N-1) column convolution arithmetic matrix Q for performing the convolution operation processing is expressed by the following equation. Pre-calculated based on (1) and stored in the convolution matrix storage means;
When the subject is imaged by the bifocal lens, at least a part of the values of each element Q (x, y) stored in the convolution calculation matrix storage means and the output signal of the image by the reproduction calculation means The value of each element A (s, t) of the matrix A of the subject is calculated based on the following equation (2) using the value of each element Z (h, k) of the matrix Z: Modification processing method.
Q (x, y) = 1 / c- (W (0,0) -c) / cpower
(When x = 0, y = 0)
= -W (x, y) / c power
(When other than x = 0, y = 0)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (1)
A (s, t) = Σ h Σ k Q (s−h, tk) Z (h, k)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (2)
here,
x and y are integers, (1-M) ≦ x ≦ (M−1), (1-N) ≦ y ≦ (N−1),
s and t are natural numbers, 1 ≦ s ≦ M, 1 ≦ t ≦ N,
h and k are natural numbers, 1 ≦ h ≦ M, 1 ≦ k ≦ N,
W (x, y) is the value of each element of the matrix W of (2M-1) rows (2N-1) columns, and this matrix W is 1 indicated by coordinates (m, n) excluding the ends. A matrix Zmn of M rows and N columns indicating an output signal of an image formed by the one and the other lens unit when an object having a bright spot only at a point is imaged by the bifocal lens is expressed as x = hm , By coordinate conversion from coordinates (h, k) satisfying y = k−n to coordinates (x, y), by parallel translation so that W (0, 0) = Zmn (m, n), A matrix portion including non-zero elements of Zmn (h, k) is disposed in the central portion of the matrix W, and an outer portion of the matrix portion including the non-zero elements disposed in the central portion is defined as a zero element. Composed by filling,
c is a proportional coefficient, which is a value of the ratio of the area of the one lens part to the entire area of the bifocal lens;
power is a real number that is a power of c, and 1 ≦ power ≦ 2.
Σ h is the sum of h = 1~M, Σ k is the sum of k = 1~N.
請求項1に記載の画像改質処理方法において、
前記二焦点レンズへの光の入射角の不均一により画像周辺部の受光量が減少するシェージングの影響を補正するためのM行N列のシェージング補正行列Φの各要素Φ(s,t)の値をシェージング補正行列記憶手段に記憶しておき、
前記再生演算手段による処理を行った後に、シェージング補正手段により、前記シェージング補正行列記憶手段に記憶された各要素Φ(s,t)の値と前記被写体の行列Aの各要素A(s,t)の値とを用いて下式(3)に基づきシェージング補正を行った前記被写体の行列Ashの各要素Ash(s,t)を算出することを特徴とする画像改質処理方法。
sh(s,t)=A(s,t)×Φ(s,t) ・・・・・・・・(3)
ここで、sおよびtは自然数で、1≦s≦M、1≦t≦Nである。
The image modification processing method according to claim 1,
For each element Φ (s, t) of the M-row N-column shading correction matrix Φ for correcting the influence of shading that reduces the amount of light received at the periphery of the image due to the non-uniform incidence angle of light on the bifocal lens. The value is stored in the shading correction matrix storage means,
After the processing by the reproduction calculating means, the value of each element Φ (s, t) stored in the shading correction matrix storage means and each element A (s, t) of the subject matrix A are processed by the shading correction means. ) To calculate each element A sh (s, t) of the subject matrix A sh that has been subjected to shading correction based on the following equation (3) using the value of
A sh (s, t) = A (s, t) × Φ (s, t) (3)
Here, s and t are natural numbers, and 1 ≦ s ≦ M and 1 ≦ t ≦ N.
請求項1に記載の画像改質処理方法において、
前記二焦点レンズへの光の入射角の不均一により画像周辺部の受光量が減少するシェージングの影響を補正するためのM行N列のシェージング補正行列Φの各要素Φ(h,k)の値をシェージング補正行列記憶手段に記憶しておき、
前記再生演算手段による処理を行う前に、シェージング補正手段により、前記シェージング補正行列記憶手段に記憶された各要素Φ(h,k)の値と前記画像の出力信号の行列Zの各要素Z(h,k)の値とを用いて下式(4)に基づきシェージング補正を行った前記画像の出力信号の行列Zshの各要素Zsh(h,k)を算出し、得られたZsh(h,k)の値を新たなZ(h,k)として前記式(2)に基づく前記再生演算手段による処理に使用することを特徴とする画像改質処理方法。
sh(h,k)=Z(h,k)×Φ(h,k) ・・・・・・・・(4)
ここで、hおよびkは自然数で、1≦h≦M、1≦k≦Nである。
The image modification processing method according to claim 1,
For each element Φ (h, k) of the M-by-N shading correction matrix Φ for correcting the influence of shading that reduces the amount of light received at the periphery of the image due to the non-uniform incidence angle of light on the bifocal lens. The value is stored in the shading correction matrix storage means,
Before performing the processing by the reproduction calculating means, the value of each element Φ (h, k) stored in the shading correction matrix storage means and each element Z ( Each element Z sh (h, k) of the matrix Z sh of the output signal of the image subjected to the shading correction based on the following equation (4) using the value of h, k) is calculated, and the obtained Z sh An image modification processing method, wherein a value of (h, k) is used as a new Z (h, k) for processing by the reproduction calculation means based on the equation (2).
Z sh (h, k) = Z (h, k) × Φ (h, k) (4)
Here, h and k are natural numbers, and 1 ≦ h ≦ M and 1 ≦ k ≦ N.
請求項1〜3のいずれかに記載の画像改質処理方法において、
前記式(2)に基づく前記再生演算手段による処理は、デジタルフィルタ回路により行われ、
このデジタルフィルタ回路には、前記画像の出力信号の行列Zの各要素Z(h,k)の値に前記畳み込み演算行列Qの各要素Q(x,y)の値を乗ずる複数の乗算回路と、これらの乗算回路からの出力信号を加算する複数の加算回路と、順次入力される各要素Z(h,k)の信号の流れの速度調整を行うための複数のディレイ回路とが含まれていることを特徴とする画像改質処理方法。
In the image modification processing method according to any one of claims 1 to 3,
The processing by the reproduction calculation means based on the equation (2) is performed by a digital filter circuit,
The digital filter circuit includes a plurality of multiplication circuits that multiply the value of each element Z (h, k) of the matrix Z of the output signal of the image by the value of each element Q (x, y) of the convolution matrix Q. A plurality of addition circuits for adding the output signals from these multiplication circuits, and a plurality of delay circuits for adjusting the speed of the signal flow of each element Z (h, k) sequentially input. An image modification processing method characterized by comprising:
二焦点レンズを構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像から、ピントの合った画像を求める画像改質処理装置であって、
撮像素子の大きさをM画素×N画素とし、被写体の発する光の明るさを示すM行N列の行列をAとし、前記被写体を前記二焦点レンズにより撮像して得られた画像の出力信号を示すM行N列の行列をZとしたとき、
下式(5)に基づき算出された畳み込み演算処理を行うための(2M−1)行(2N−1)列の畳み込み演算行列Qの各要素Q(x,y)の値のうち少なくとも非零要素を含む行列部分の値を記憶する畳み込み演算行列記憶手段と、
この畳み込み演算行列記憶手段に記憶された各要素Q(x,y)のうちの少なくとも一部の値と前記画像の出力信号の行列Zの各要素Z(h,k)の値とを用いて下式(6)に基づき前記被写体の行列Aの各要素A(s,t)の値を算出する再生演算手段と
を備えたことを特徴とする画像改質処理装置。
Q(x,y)=1/c−(W(0,0)−c)/cpower
(x=0,y=0の場合)
=−W(x,y)/cpower
(x=0,y=0以外の場合)
・・・・・・・・・・・・・・・・・・・・・・(5)
A(s,t)=ΣhΣkQ(s−h,t−k)Z(h,k)
・・・・・・・・・・・・・・・・・・・・・・(6)
ここで、
xおよびyは整数で、(1−M)≦x≦(M−1)、(1−N)≦y≦(N−1)であり、
sおよびtは自然数で、1≦s≦M、1≦t≦Nであり、
hおよびkは自然数で、1≦h≦M、1≦k≦Nであり、
W(x,y)は、(2M−1)行(2N−1)列の行列Wの各要素の値であり、この行列Wは、端部を除く座標(m,n)で示される1点のみに輝点のある被写体を前記二焦点レンズで撮像したときに前記一方および前記他方のレンズ部により形成される画像の出力信号を示すM行N列の行列Zmnを、x=h−m、y=k−nを満たす座標(h,k)から座標(x,y)への座標変換で、W(0,0)=Zmn(m,n)となるように平行移動することにより、Zmn(h,k)のうちの非零要素を含む行列部分を前記行列Wの中央部に配置するとともに、前記中央部に配置された前記非零要素を含む行列部分の外側部分を零要素で埋めることにより構成され、
cは、比例係数で、前記二焦点レンズの全体面積に対する前記一方のレンズ部の面積の比の値であり、
powerは、cのべき乗数となる実数で、1≦power≦2であり、
Σhは、h=1〜Mの和であり、Σkは、k=1〜Nの和である。
An image modification for obtaining an in-focus image from an image in which an in-focus image formed by one lens portion constituting a bifocal lens overlaps with an in-focus image formed by the other lens portion. Quality processing equipment,
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 bifocal lens When the matrix of M rows and N columns indicating
At least non-zero among the values of each element Q (x, y) of the (2M-1) row (2N-1) column convolution calculation matrix Q for performing the convolution calculation processing calculated based on the following equation (5) A convolution matrix storage means for storing values of matrix parts including elements;
Using at least a part of the values of each element Q (x, y) stored in the convolution calculation matrix storage means and the value of each element Z (h, k) of the matrix Z of the output signal of the image. An image modification processing apparatus comprising: a reproduction calculation unit that calculates a value of each element A (s, t) of the matrix A of the subject based on the following equation (6).
Q (x, y) = 1 / c- (W (0,0) -c) / cpower
(When x = 0, y = 0)
= -W (x, y) / c power
(When other than x = 0, y = 0)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (5)
A (s, t) = Σ h Σ k Q (s−h, tk) Z (h, k)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (6)
here,
x and y are integers, (1-M) ≦ x ≦ (M−1), (1-N) ≦ y ≦ (N−1),
s and t are natural numbers, 1 ≦ s ≦ M, 1 ≦ t ≦ N,
h and k are natural numbers, 1 ≦ h ≦ M, 1 ≦ k ≦ N,
W (x, y) is the value of each element of the matrix W of (2M-1) rows (2N-1) columns, and this matrix W is 1 indicated by coordinates (m, n) excluding the ends. A matrix Zmn of M rows and N columns indicating an output signal of an image formed by the one and the other lens unit when an object having a bright spot only at a point is imaged by the bifocal lens is expressed as x = hm , By coordinate conversion from coordinates (h, k) satisfying y = k−n to coordinates (x, y), by parallel translation so that W (0, 0) = Zmn (m, n), A matrix portion including non-zero elements of Zmn (h, k) is disposed in the central portion of the matrix W, and an outer portion of the matrix portion including the non-zero elements disposed in the central portion is defined as a zero element. Composed by filling,
c is a proportional coefficient, which is a value of the ratio of the area of the one lens part to the entire area of the bifocal lens;
power is a real number that is a power of c, and 1 ≦ power ≦ 2.
Σ h is the sum of h = 1~M, Σ k is the sum of k = 1~N.
請求項5に記載の画像改質処理装置において、
前記二焦点レンズへの光の入射角の不均一により画像周辺部の受光量が減少するシェージングの影響を補正するためのM行N列のシェージング補正行列Φの各要素Φ(s,t)の値を記憶するシェージング補正行列記憶手段と、
このシェージング補正行列記憶手段に記憶された各要素Φ(s,t)の値と前記再生演算手段による処理を行って得られた前記被写体の行列Aの各要素A(s,t)の値とを用いて下式(7)に基づきシェージング補正を行った前記被写体の行列Ashの各要素Ash(s,t)を算出するシェージング補正手段と
を備えたことを特徴とする画像改質処理装置。
sh(s,t)=A(s,t)×Φ(s,t) ・・・・・・・・(7)
ここで、sおよびtは自然数で、1≦s≦M、1≦t≦Nである。
The image modification processing apparatus according to claim 5,
For each element Φ (s, t) of the M-row N-column shading correction matrix Φ for correcting the influence of shading that reduces the amount of light received at the periphery of the image due to the non-uniform incidence angle of light on the bifocal lens Shading correction matrix storage means for storing values;
The value of each element Φ (s, t) stored in the shading correction matrix storage means and the value of each element A (s, t) of the subject matrix A obtained by performing the processing by the reproduction calculation means And a shading correction means for calculating each element A sh (s, t) of the matrix A sh of the subject subjected to the shading correction based on the following equation (7) using: apparatus.
A sh (s, t) = A (s, t) × Φ (s, t) (7)
Here, s and t are natural numbers, and 1 ≦ s ≦ M and 1 ≦ t ≦ N.
請求項5に記載の画像改質処理装置において、
前記二焦点レンズへの光の入射角の不均一により画像周辺部の受光量が減少するシェージングの影響を補正するためのM行N列のシェージング補正行列Φの各要素Φ(h,k)の値を記憶するシェージング補正行列記憶手段と、
このシェージング補正行列記憶手段に記憶された各要素Φ(h,k)の値と前記画像の出力信号の行列Zの各要素Z(h,k)の値とを用いて下式(8)に基づきシェージング補正を行った前記画像の出力信号の行列Zshの各要素Zsh(h,k)を算出し、得られたZsh(h,k)の値を新たなZ(h,k)として前記式(6)に基づく前記再生演算手段による処理に使用されるようにするシェージング補正手段と
を備えたことを特徴とする画像改質処理装置。
sh(h,k)=Z(h,k)×Φ(h,k) ・・・・・・・・(8)
ここで、hおよびkは自然数で、1≦h≦M、1≦k≦Nである。
The image modification processing apparatus according to claim 5,
Each element Φ (h, k) of the M-row N-column shading correction matrix Φ for correcting the influence of shading that reduces the amount of light received at the periphery of the image due to the nonuniformity of the incident angle of light to the bifocal lens. Shading correction matrix storage means for storing values;
Using the value of each element Φ (h, k) stored in the shading correction matrix storage means and the value of each element Z (h, k) of the matrix Z of the image output signal, the following equation (8) is obtained. based each element Z sh (h, k) of the matrix Z sh of the output signal of the image subjected to shading correction is calculated, and the resulting Z sh (h, k) values a new Z of (h, k) An image modification processing apparatus comprising: a shading correction unit configured to be used for processing by the reproduction calculation unit based on the formula (6).
Z sh (h, k) = Z (h, k) × Φ (h, k) (8)
Here, h and k are natural numbers, and 1 ≦ h ≦ M and 1 ≦ k ≦ N.
請求項5〜7のいずれかに記載の画像改質処理装置において、
前記再生演算手段は、前記式(6)に基づく演算処理を行うデジタルフィルタ回路により構成され、
このデジタルフィルタ回路には、前記画像の出力信号の行列Zの各要素Z(h,k)の値に前記畳み込み演算行列Qの各要素Q(x,y)の値を乗ずる複数の乗算回路と、これらの乗算回路からの出力信号を加算する複数の加算回路と、順次入力される各要素Z(h,k)の信号の流れの速度調整を行うための複数のディレイ回路とが含まれていることを特徴とする画像改質処理装置。
In the image modification processing apparatus according to any one of claims 5 to 7,
The reproduction calculation means is constituted by a digital filter circuit that performs calculation processing based on the equation (6),
The digital filter circuit includes a plurality of multiplication circuits that multiply the value of each element Z (h, k) of the matrix Z of the output signal of the image by the value of each element Q (x, y) of the convolution matrix Q. A plurality of addition circuits for adding the output signals from these multiplication circuits, and a plurality of delay circuits for adjusting the speed of the signal flow of each element Z (h, k) sequentially input. An image modification processing apparatus characterized by comprising:
二焦点レンズを構成する一方のレンズ部により形成されるピントの合った画像と、他方のレンズ部により形成されるピントのぼけた画像とが重なった画像から、ピントの合った画像を求める画像改質処理装置として、コンピュータを機能させるためのプログラムであって、
撮像素子の大きさをM画素×N画素とし、被写体の発する光の明るさを示すM行N列の行列をAとし、前記被写体を前記二焦点レンズにより撮像して得られた画像の出力信号を示すM行N列の行列をZとしたとき、
下式(9)に基づき算出された畳み込み演算処理を行うための(2M−1)行(2N−1)列の畳み込み演算行列Qの各要素Q(x,y)の値のうち少なくとも非零要素を含む行列部分の値を記憶する畳み込み演算行列記憶手段と、
この畳み込み演算行列記憶手段に記憶された各要素Q(x,y)のうちの少なくとも一部の値と前記画像の出力信号の行列Zの各要素Z(h,k)の値とを用いて下式(10)に基づき前記被写体の行列Aの各要素A(s,t)の値を算出する再生演算手段と
を備えたことを特徴とする画像改質処理装置として、コンピュータを機能させるためのプログラム。
Q(x,y)=1/c−(W(0,0)−c)/cpower
(x=0,y=0の場合)
=−W(x,y)/cpower
(x=0,y=0以外の場合)
・・・・・・・・・・・・・・・・・・・・・・(9)
A(s,t)=ΣhΣkQ(s−h,t−k)Z(h,k)
・・・・・・・・・・・・・・・・・・・・・(10)
ここで、
xおよびyは整数で、(1−M)≦x≦(M−1)、(1−N)≦y≦(N−1)であり、
sおよびtは自然数で、1≦s≦M、1≦t≦Nであり、
hおよびkは自然数で、1≦h≦M、1≦k≦Nであり、
W(x,y)は、(2M−1)行(2N−1)列の行列Wの各要素の値であり、この行列Wは、端部を除く座標(m,n)で示される1点のみに輝点のある被写体を前記二焦点レンズで撮像したときに前記一方および前記他方のレンズ部により形成される画像の出力信号を示すM行N列の行列Zmnを、x=h−m、y=k−nを満たす座標(h,k)から座標(x,y)への座標変換で、W(0,0)=Zmn(m,n)となるように平行移動することにより、Zmn(h,k)のうちの非零要素を含む行列部分を前記行列Wの中央部に配置するとともに、前記中央部に配置された前記非零要素を含む行列部分の外側部分を零要素で埋めることにより構成され、
cは、比例係数で、前記二焦点レンズの全体面積に対する前記一方のレンズ部の面積の比の値であり、
powerは、cのべき乗数となる実数で、1≦power≦2であり、
Σhは、h=1〜Mの和であり、Σkは、k=1〜Nの和である。
An image modification for obtaining an in-focus image from an image in which an in-focus image formed by one lens portion constituting a bifocal lens overlaps an in-focus image formed by the other lens portion. A program for causing a computer to function as a quality processing device,
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 bifocal lens When the matrix of M rows and N columns indicating
At least non-zero among the values of each element Q (x, y) of the (2M-1) row (2N-1) column convolution calculation matrix Q for performing the convolution calculation processing calculated based on the following equation (9): A convolution matrix storage means for storing values of matrix parts including elements;
Using at least a part of the values of each element Q (x, y) stored in the convolution calculation matrix storage means and the value of each element Z (h, k) of the matrix Z of the output signal of the image. In order to cause a computer to function as an image modification processing apparatus, comprising: a reproduction calculation unit that calculates a value of each element A (s, t) of the subject matrix A based on the following equation (10): Program.
Q (x, y) = 1 / c- (W (0,0) -c) / cpower
(When x = 0, y = 0)
= -W (x, y) / c power
(When other than x = 0, y = 0)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (9)
A (s, t) = Σ h Σ k Q (s−h, tk) Z (h, k)
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (10)
here,
x and y are integers, (1-M) ≦ x ≦ (M−1), (1-N) ≦ y ≦ (N−1),
s and t are natural numbers, 1 ≦ s ≦ M, 1 ≦ t ≦ N,
h and k are natural numbers, 1 ≦ h ≦ M, 1 ≦ k ≦ N,
W (x, y) is the value of each element of the matrix W of (2M-1) rows (2N-1) columns, and this matrix W is 1 indicated by coordinates (m, n) excluding the ends. A matrix Zmn of M rows and N columns indicating an output signal of an image formed by the one and the other lens unit when an object having a bright spot only at a point is imaged by the bifocal lens is expressed as x = hm , By coordinate conversion from coordinates (h, k) satisfying y = k−n to coordinates (x, y), by parallel translation so that W (0, 0) = Zmn (m, n), A matrix portion including non-zero elements of Zmn (h, k) is disposed in the central portion of the matrix W, and an outer portion of the matrix portion including the non-zero elements disposed in the central portion is defined as a zero element. Composed by filling,
c is a proportional coefficient, which is a value of the ratio of the area of the one lens part to the entire area of the bifocal lens;
power is a real number that is a power of c, and 1 ≦ power ≦ 2.
Σ h is the sum of h = 1~M, Σ k is the sum of k = 1~N.
JP2003031734A 2002-02-12 2003-02-07 Image modification processing method and apparatus, program, and data recording medium Expired - Fee Related JP4014512B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003031734A JP4014512B2 (en) 2002-02-12 2003-02-07 Image modification processing method and apparatus, program, and data recording medium

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2002-33344 2002-02-12
JP2002033344 2002-02-12
JP2003031734A JP4014512B2 (en) 2002-02-12 2003-02-07 Image modification processing method and apparatus, program, and data recording medium

Publications (2)

Publication Number Publication Date
JP2003309723A JP2003309723A (en) 2003-10-31
JP4014512B2 true JP4014512B2 (en) 2007-11-28

Family

ID=29405045

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003031734A Expired - Fee Related JP4014512B2 (en) 2002-02-12 2003-02-07 Image modification processing method and apparatus, program, and data recording medium

Country Status (1)

Country Link
JP (1) JP4014512B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3855079B2 (en) * 2003-08-19 2006-12-06 学校法人早稲田大学 Image modification processing method and apparatus, program, and data recording medium
WO2006137355A1 (en) * 2005-06-20 2006-12-28 Riverbell Co., Ltd. Multifocal lens and imaging system
WO2013027507A1 (en) * 2011-08-23 2013-02-28 富士フイルム株式会社 Imaging device
JP5666402B2 (en) * 2011-08-25 2015-02-12 富士フイルム株式会社 Imaging device
DE112017008040T5 (en) * 2017-09-14 2020-07-09 Mitsubishi Electric Corporation COMPUTING OPERATION CIRCUIT, COMPUTING OPERATION PROCEDURE AND PROGRAM

Also Published As

Publication number Publication date
JP2003309723A (en) 2003-10-31

Similar Documents

Publication Publication Date Title
JP5142701B2 (en) Encoding method, electronic camera, encoding program, and decoding method
JP4378994B2 (en) Image processing apparatus, image processing method, and imaging apparatus
US8350948B2 (en) Image device which bypasses blurring restoration during a through image
US20110149103A1 (en) Image processing apparatus and image pickup apparatus using same
KR100799212B1 (en) Imaging device and image processing method
WO2014155755A1 (en) Image-processing device, image-capturing device, image-processing method, program, and recording medium
JP5752866B2 (en) Image processing apparatus, imaging apparatus, image processing method, program, and recording medium
JP2008516299A (en) Imaging apparatus and image modification processing method
JP5237978B2 (en) Imaging apparatus and imaging method, and image processing method for the imaging apparatus
JP2005286482A (en) Distortion correcting apparatus and imaging apparatus provided with distortion correcting apparatus
JP5660711B2 (en) Restoration gain data generation method
JP2009194896A (en) Image processing device and method, and imaging apparatus
WO2014122804A1 (en) Image processing device, image capture device, image processing method, and program
JPWO2014125659A1 (en) Image processing apparatus, imaging apparatus, filter generation apparatus, image restoration method, and program
US9131130B2 (en) Image pickup apparatus, and control method thereof
JP2008092297A (en) Image processor, image processing program, image manufacturing method, and recording medium
CN105009563A (en) Restoration filter generation device and method, image processing device, imaging device, restoration filter generation program, and recording medium
JP5870231B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
CN105409198A (en) Image capture device and image processing method
JP5514042B2 (en) Imaging module, image signal processing method, and imaging apparatus
CN113962859A (en) Panorama generation method, device, equipment and medium
JP4014512B2 (en) Image modification processing method and apparatus, program, and data recording medium
KR20090063611A (en) Digital photographing apparatus and method for controlling the same
JPH11275391A (en) Digital image pickup device for selecting distortion correction
JP3855079B2 (en) Image modification processing method and apparatus, program, and data recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041122

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070110

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070123

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070313

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070911

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

Free format text: PAYMENT UNTIL: 20100921

Year of fee payment: 3

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