JP4441846B2 - Image processing apparatus and method, recording medium, and program - Google Patents

Image processing apparatus and method, recording medium, and program Download PDF

Info

Publication number
JP4441846B2
JP4441846B2 JP2003052101A JP2003052101A JP4441846B2 JP 4441846 B2 JP4441846 B2 JP 4441846B2 JP 2003052101 A JP2003052101 A JP 2003052101A JP 2003052101 A JP2003052101 A JP 2003052101A JP 4441846 B2 JP4441846 B2 JP 4441846B2
Authority
JP
Japan
Prior art keywords
pixel
pixel value
shutter
calculation target
value
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
JP2003052101A
Other languages
Japanese (ja)
Other versions
JP2004259218A (en
Inventor
哲二郎 近藤
淳一 石橋
貴志 沢尾
隆浩 永野
直樹 藤原
徹 三宅
成司 和田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2003052101A priority Critical patent/JP4441846B2/en
Publication of JP2004259218A publication Critical patent/JP2004259218A/en
Application granted granted Critical
Publication of JP4441846B2 publication Critical patent/JP4441846B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、画像処理装置および方法、記録媒体、並びにプログラムに関し、特に、アクティビティに応じて動きボケを除去するようにした画像処理装置および方法、記録媒体、並びにプログラムに関する。
【0002】
【従来の技術】
動きのある画像を撮像する際に生じる動きボケを除去する技術が一般に普及しつつある。
【0003】
CCD(Charge Coupled Device)などの入射される光の積分効果を用いて画素値を生成する検出素子を用いて、動きのある物体を撮像する際、物体の動きに応じて、検出素子に入射される光が物体の動きに連動して連続的に変化することにより、生成される画素値ににじみが生じる現象が動きボケである。
【0004】
画像中の動きボケの除去は、例えば、画像中の平坦部、すなわち、隣接する画素間の画素値の差分が小さくなる領域を検出し、その領域内の各画素の画素値が同一であるという前提に基づいて、各画素の画素値を時間的に複数の要素に分割して、各要素に対応する画素値を連立方程式により求め、各要素のうち被写体となる物体の画像に相当する要素を引き出して画素値を生成することにより動きボケが除去された画像を生成するというものもあった(例えば、特許文献1参照)。
【0005】
【特許文献1】
特開2001−111438号公報
【0006】
【発明が解決しようとする課題】
しかしながら、以上の手法で連立方程式を生成して、画素値を分割した各要素を求める場合、連立方程式の解は、平坦部の端部の要素から順番に解が得られることになるため、端部からの誤差が中央部に進むにつれて積算されることにより伝播され、結果として、最終的に平坦部の中央部に存在する、値を求めたい画素の要素を正確に求めることができないという課題があった。
【0007】
本発明はこのような状況に鑑みてなされたものであり、画素の生成に使用する要素を求めるために使用する画素を複数に用意しておき、各画素毎にアクティビティに基づいた重みを求め、各々の画素値により求められた要素の値との積和をとることで要素を求め、より正確に動きボケが除去された画像を生成できるようにするものである。
【0008】
【課題を解決するための手段】
本発明の画像処理装置は、れぞれ時間積分効果を有する複数の画素に現実世界の光信号が射影されて所定のシャッタ時間の露光で第1の画像データを取得する際の、入力された動きベクトルの動き量に応じてシャッタ時間を均等に分割した分割時間ごとの各画素に入射する入射光の成分をシャッタ成分とし、第1の画像データの動きボケが除去された第2の画像データの注目画素の成分の一部に対応するシャッタ成分がシャッタ時間における中央の分割時間で得られる画素を注目画素に対応する第1の画像データの対応画素として、対応画素に対して所定の第1の方向に配置されている画素のうちの、注目画素の成分の一部に対応するシャッタ成分がシャッタ時間における先頭の分割時間で得られる画素の画素値を、第1の演算対象の画素値として抽出し、第1の演算対象の画素値を抽出した画素に対して第1の方向に隣接している画素の画素値を、第2の演算対象の画素値として抽出し、第2の演算対象の画素値を抽出した画素に対して第1の方向に配置されている画素のうちの、第2の演算対象の画素値を抽出した画素の各分割時間で得られるシャッタ成分であって第1の演算対象の画素値を抽出した画素の各分割時間で得られるシャッタ成分と重複しないシャッタ成分が得られる画素の画素値を、第3の演算対象の画素値として抽出する第1の画素抽出手段と、第1の画素抽出手段により抽出された第1の演算対象の画素値から第2の演算対象の画素値を減算した値に動きベクトルの動き量を積算し、第3の演算対象の画素値を加算した値を、第2の画像データの注目画素の画素値を求めるための第1の画素値として演算する第1の演算手段と、対応画素に対して第1の方向とは逆の第2の方向に配置されている画素のうちの、注目画素の成分の一部に対応するシャッタ成分がシャッタ時間における最後尾の分割時間で得られる画素の画素値を、第4の演算対象の画素値として抽出し、第4の演算対象の画素値を抽出した画素に対して第2の方向に隣接している画素の画素値を、第5の演算対象の画素値として抽出し、第5の演算対象の画素値を抽出した画素に対して第2の方向に配置されている画素のうちの、第5の演算対象の画素値を抽出した画素の各分割時間で得られるシャッタ成分であって第4の演算対象の画素値を抽出した画素の各分割時間で得られるシャッタ成分と重複しないシャッタ成分が得られる画素の画素値を、第6の演算対象の画素値として抽出する第2の画素抽出手段と、第2の画素抽出手段により抽出された第4の演算対象の画素値から第5の演算対象の画素値を減算した値に動きベクトルの動き量を積算し、第6の演算対象の画素値を加算した値を、第2の画像データの注目画素の画素値を求めるための第2の画素値として演算する第2の演算手段と、第3の演算対象の画素値を抽出した画素と当該画素に隣接する複数の画素から演算される第1のアクティビティと、第6の演算対象の画素値を抽出した画素と当該画素に隣接する複数の画素から演算される第2のアクティビティとに応じて、第1の画素値と第2の画素値とを重み付け加算して出力する画素生成手段とを備えることを特徴とする。
【0011】
本発明の画像処理方法は、れぞれ時間積分効果を有する複数の画素に現実世界の光信号が射影されて所定のシャッタ時間の露光で第1の画像データを取得する際の、入力された動きベクトルの動き量に応じてシャッタ時間を均等に分割した分割時間ごとの各画素に入射する入射光の成分をシャッタ成分とし、第1の画像データの動きボケが除去された第2の画像データの注目画素の成分の一部に対応するシャッタ成分がシャッタ時間における中央の分割時間で得られる画素を注目画素に対応する第1の画像データの対応画素として、対応画素に対して所定の第1の方向に配置されている画素のうちの、注目画素の成分の一部に対応するシャッタ成分がシャッタ時間における先頭の分割時間で得られる画素の画素値を、第1の演算対象の画素値として抽出し、第1の演算対象の画素値を抽出した画素に対して第1の方向に隣接している画素の画素値を、第2の演算対象の画素値として抽出し、第2の演算対象の画素値を抽出した画素に対して第1の方向に配置されている画素のうちの、第2の演算対象の画素値を抽出した画素の各分割時間で得られるシャッタ成分であって第1の演算対象の画素値を抽出した画素の各分割時間で得られるシャッタ成分と重複しないシャッタ成分が得られる画素の画素値を、第3の演算対象の画素値として抽出する第1の画素抽出ステップと、第1の画素抽出ステップの処理で抽出された第1の演算対象の画素値から第2の演算対象の画素値を減算した値に動きベクトルの動き量を積算し、第3の演算対象の画素値を加算した値を、第2の画像データの注目画素の画素値を求めるための第1の画素値として演算する第1の演算ステップと、対応画素に対して第1の方向とは逆の第2の方向に配置されている画素のうちの、注目画素の成分の一部に対応するシャッタ成分がシャッタ時間における最後尾の分割時間で得られる画素の画素値を、第4の演算対象の画素値として抽出し、第4の演算対象の画素値を抽出した画素に対して第2の方向に隣接している画素の画素値を、第5の演算対象の画素値として抽出し、第5の演算対象の画素値を抽出した画素に対して第2の方向に配置されている画素のうちの、第5の演算対象の画素値を抽出した画素の各分割時間で得られるシャッタ成分であって第4の演算対象の画素値を抽出した画素の各分割時間で得られるシャッタ成分と重複しないシャッタ成分が得られる画素の画素値を、第6の演算対象の画素値として抽出する第2の画素抽出ステップと、第2の画素抽出ステップの処理で抽出された第4の演算対象の画素値から第5の演算対象の画素値を減算した値に動きベクトルの動き量を積算し、第6の演算対象の画素値を加算した値を、第2の画像データの注目画素の画素値を求めるための第2の画素値として演算する第2の演算ステップと、第3の演算対象の画素値を抽出した画素と当該画素に隣接する複数の画素から演算される第1のアクティビティと、第6の演算対象の画素値を抽出した画素と当該画素に隣接する複数の画素から演算される第2のアクティビティとに応じて、第1の画素値と第2の画素値とを重み付け加算して出力する画素生成ステップとを含むことを特徴とする。
【0012】
本発明の記録媒体のプログラムは、れぞれ時間積分効果を有する複数の画素に現実世界の光信号が射影されて所定のシャッタ時間の露光で第1の画像データを取得する際の、入力された動きベクトルの動き量に応じてシャッタ時間を均等に分割した分割時間ごとの各画素に入射する入射光の成分をシャッタ成分とし、第1の画像データの動きボケが除去された第2の画像データの注目画素の成分の一部に対応するシャッタ成分がシャッタ時間における中央の分割時間で得られる画素を注目画素に対応する第1の画像データの対応画素として、対応画素に対して所定の第1の方向に配置されている画素のうちの、注目画素の成分の一部に対応するシャッタ成分がシャッタ時間における先頭の分割時間で得られる画素の画素値を、第1の演算対象の画素値として抽出し、第1の演算対象の画素値を抽出した画素に対して第1の方向に隣接している画素の画素値を、第2の演算対象の画素値として抽出し、第2の演算対象の画素値を抽出した画素に対して第1の方向に配置されている画素のうちの、第2の演算対象の画素値を抽出した画素の各分割時間で得られるシャッタ成分であって第1の演算対象の画素値を抽出した画素の各分割時間で得られるシャッタ成分と重複しないシャッタ成分が得られる画素の画素値を、第3の演算対象の画素値として抽出する第1の画素抽出ステップと、第1の画素抽出ステップの処理で抽出された第1の演算対象の画素値から第2の演算対象の画素値を減算した値に動きベクトルの動き量を積算し、第3の演算対象の画素値を加算した値を、第2の画像データの注目画素の画素値を求めるための第1の画素値として演算する第1の演算ステップと、対応画素に対して第1の方向とは逆の第2の方向に配置されている画素のうちの、注目画素の成分の一部に対応するシャッタ成分がシャッタ時間における最後尾の分割時間で得られる画素の画素値を、第4の演算対象の画素値として抽出し、第4の演算対象の画素値を抽出した画素に対して第2の方向に隣接している画素の画素値を、第5の演算対象の画素値として抽出し、第5の演算対象の画素値を抽出した画素に対して第2の方向に配置されている画素のうちの、第5の演算対象の画素値を抽出した画素の各分割時間で得られるシャッタ成分であって第4の演算対象の画素値を抽出した画素の各分割時間で得られるシャッタ成分と重複しないシャッタ成分が得られる画素の画素値を、第6の演算対象の画素値として抽出する第2の画素抽出ステップと、第2の画素抽出ステップの処理で抽出された第4の演算対象の画素値から第5の演算対象の画素値を減算した値に動きベクトルの動き量を積算し、第6の演算対象の画素値を加算した値を、第2の画像データの注目画素の画素値を求めるための第2の画素値として演算する第2の演算ステップと、第3の演算対象の画素値を抽出した画素と当該画素に隣接する複数の画素から演算される第1のアクティビティと、第6の演算対象の画素値を抽出した画素と当該画素に隣接する複数の画素から演算される第2のアクティビティとに応じて、第1の画素値と第2の画素値とを重み付け加算して出力する画素生成ステップとを含むことを特徴とする。
【0013】
本発明のプログラムは、れぞれ時間積分効果を有する複数の画素に現実世界の光信号が射影されて所定のシャッタ時間の露光で第1の画像データを取得する際の、入力された動きベクトルの動き量に応じてシャッタ時間を均等に分割した分割時間ごとの各画素に入射する入射光の成分をシャッタ成分とし、第1の画像データの動きボケが除去された第2の画像データの注目画素の成分の一部に対応するシャッタ成分がシャッタ時間における中央の分割時間で得られる画素を注目画素に対応する第1の画像データの対応画素として、対応画素に対して所定の第1の方向に配置されている画素のうちの、注目画素の成分の一部に対応するシャッタ成分がシャッタ時間における先頭の分割時間で得られる画素の画素値を、第1の演算対象の画素値として抽出し、第1の演算対象の画素値を抽出した画素に対して第1の方向に隣接している画素の画素値を、第2の演算対象の画素値として抽出し、第2の演算対象の画素値を抽出した画素に対して第1の方向に配置されている画素のうちの、第2の演算対象の画素値を抽出した画素の各分割時間で得られるシャッタ成分であって第1の演算対象の画素値を抽出した画素の各分割時間で得られるシャッタ成分と重複しないシャッタ成分が得られる画素の画素値を、第3の演算対象の画素値として抽出する第1の画素抽出ステップと、第1の画素抽出ステップの処理で抽出された第1の演算対象の画素値から第2の演算対象の画素値を減算した値に動きベクトルの動き量を積算し、第3の演算対象の画素値を加算した値を、第2の画像データの注目画素の画素値を求めるための第1の画素値として演算する第1の演算ステップと、対応画素に対して第1の方向とは逆の第2の方向に配置されている画素のうちの、注目画素の成分の一部に対応するシャッタ成分がシャッタ時間における最後尾の分割時間で得られる画素の画素値を、第4の演算対象の画素値として抽出し、第4の演算対象の画素値を抽出した画素に対して第2の方向に隣接している画素の画素値を、第5の演算対象の画素値として抽出し、第5の演算対象の画素値を抽出した画素に対して第2の方向に配置されている画素のうちの、第5の演算対象の画素値を抽出した画素の各分割時間で得られるシャッタ成分であって第4の演算対象の画素値を抽出した画素の各分割時間で得られるシャッタ成分と重複しないシャッタ成分が得られる画素の画素値を、第6の演算対象の画素値として抽出する第2の画素抽出ステップと、第2の画素抽出ステップの処理で抽出された第4の演算対象の画素値から第5の演算対象の画素値を減算した値に動きベクトルの動き量を積算し、第6の演算対象の画素値を加算した値を、第2の画像データの注目画素の画素値を求めるための第2の画素値として演算する第2の演算ステップと、第3の演算対象の画素値を抽出した画素と当該画素に隣接する複数の画素から演算される第1のアクティビティと、第6の演算対象の画素値を抽出した画素と当該画素に隣接する複数の画素から演算される第2のアクティビティとに応じて、第1の画素値と第2の画素値とを重み付け加算して出力する画素生成ステップとを含む処理をコンピュータに実行させることを特徴とする。
【0019】
本発明の画像処理装置および方法、並びにプログラムにおいては、れぞれ時間積分効果を有する複数の画素に現実世界の光信号が射影されて所定のシャッタ時間の露光で第1の画像データを取得する際の、入力された動きベクトルの動き量に応じてシャッタ時間を均等に分割した分割時間ごとの各画素に入射する入射光の成分をシャッタ成分とし、第1の画像データの動きボケが除去された第2の画像データの注目画素の成分の一部に対応するシャッタ成分がシャッタ時間における中央の分割時間で得られる画素を注目画素に対応する第1の画像データの対応画素として、対応画素に対して所定の第1の方向に配置されている画素のうちの、注目画素の成分の一部に対応するシャッタ成分がシャッタ時間における先頭の分割時間で得られる画素の画素値が、第1の演算対象の画素値として抽出され、第1の演算対象の画素値を抽出した画素に対して第1の方向に隣接している画素の画素値が、第2の演算対象の画素値として抽出され、第2の演算対象の画素値を抽出した画素に対して第1の方向に配置されている画素のうちの、第2の演算対象の画素値を抽出した画素の各分割時間で得られるシャッタ成分であって第1の演算対象の画素値を抽出した画素の各分割時間で得られるシャッタ成分と重複しないシャッタ成分が得られる画素の画素値が、第3の演算対象の画素値として抽出される。そして、その抽出された第1の演算対象の画素値から第2の演算対象の画素値を減算した値に動きベクトルの動き量が積算され、第3の演算対象の画素値が加算した値が、第2の画像データの注目画素の画素値を求めるための第1の画素値として演算される。また、対応画素に対して第1の方向とは逆の第2の方向に配置されている画素のうちの、注目画素の成分の一部に対応するシャッタ成分がシャッタ時間における最後尾の分割時間で得られる画素の画素値が、第4の演算対象の画素値として抽出され、第4の演算対象の画素値を抽出した画素に対して第2の方向に隣接している画素の画素値が、第5の演算対象の画素値として抽出され、第5の演算対象の画素値を抽出した画素に対して第2の方向に配置されている画素のうちの、第5の演算対象の画素値を抽出した画素の各分割時間で得られるシャッタ成分であって第4の演算対象の画素値を抽出した画素の各分割時間で得られるシャッタ成分と重複しないシャッタ成分が得られる画素の画素値が、第6の演算対象の画素値として抽出される。そして、その抽出された第4の演算対象の画素値から第5の演算対象の画素値を減算した値に動きベクトルの動き量が積算され、第6の演算対象の画素値が加算された値が、第2の画像データの注目画素を求めるための第2の画素値として演算される。さらに、第3の演算対象の画素値を抽出した画素と当該画素に隣接する複数の画素から演算される第1のアクティビティと、第6の演算対象の画素値を抽出した画素とに隣接する複数の画素から演算される第2のアクティビティとに応じて、第1の画素値と第2の画素値とが重み付け加算されて出力される。
【0021】
本発明の画像処理装置、および、学習装置は、独立した装置であっても良いし、画像処理を行うブロックであっても良い。
【0022】
【発明の実施の形態】
図1は、本発明の画像処理部1の一実施の形態の構成を示すブロック図である。
【0023】
動きベクトル検出部11は、入力画像より動きベクトルを検出して、その動きベクトルの情報に基づいて、動き量を画素値演算部12−1乃至12−Nに出力する。
【0024】
ここで、入力画像と共に、動きボケおよび動き量について説明する。
【0025】
図2は、センサ2による撮像を説明する図である。センサ2は、例えば、固体検出素子であるCCD(Charge-Coupled Device)エリアセンサを備えたCCDビデオカメラなどで構成される。現実世界における、前景に対応するオブジェクトは、現実世界における、背景に対応するオブジェクトと、センサとの間を、例えば、図中の左側から右側に水平に移動する。
【0026】
センサ2は、前景に対応するオブジェクトを、背景に対応するオブジェクトと共に撮像する。センサ2は、撮像した画像を1フレーム単位で出力する。例えば、センサ2は、1秒間に30フレームから成る画像を出力する。センサ2の露光時間は、1/30秒とすることができる。露光時間は、センサ2が入力された光の電荷への変換を開始してから、入力された光の電荷への変換を終了するまでの期間である。以下、露光時間をシャッタ時間とも称する。
【0027】
図3は、画素の配置を説明する図である。図3中において、A乃至Iは、個々の画素を示す。画素は、画像に対応する平面上に配置されている。1つの画素に対応する1つの検出素子は、センサ2上に配置されている。センサ2が画像を撮像するとき、1つの検出素子は、画像を構成する1つの画素に対応する画素値を出力する。例えば、検出素子のX方向の位置は、画像上の横方向の位置に対応し、検出素子のY方向の位置は、画像上の縦方向の位置に対応する。
【0028】
図4に示すように、例えば、CCDである検出素子は、シャッタ時間に対応する期間、入力された光を電荷に変換して、変換された電荷を蓄積する。電荷の量は、入力された光の強さと、光が入力されている時間にほぼ比例する。検出素子は、シャッタ時間に対応する期間において、入力された光から変換された電荷を、既に蓄積されている電荷に加えていく。すなわち、検出素子は、シャッタ時間に対応する期間、入力される光を積分して、積分された光に対応する量の電荷を蓄積する。検出素子は、時間に対して、積分効果があるとも言える。
【0029】
検出素子に蓄積された電荷は、図示せぬ回路により、電圧値に変換され、電圧値は更にデジタルデータなどの画素値に変換されて出力される。従って、センサ2から出力される個々の画素値は、前景または背景に対応するオブジェクトの空間的に広がりを有するある部分を、シャッタ時間について積分した結果である、1次元の空間に射影された値を有する。
【0030】
図5は、動いている前景に対応するオブジェクトと、静止している背景に対応するオブジェクトとを撮像して得られる画像を説明する図である。図5Aは、動きを伴う前景に対応するオブジェクトと、静止している背景に対応するオブジェクトとを撮像して得られる画像を示している。図5Aに示す例において、前景に対応するオブジェクトは、画面に対して水平に左から右に動いている。
【0031】
図5Bは、図5Aに示す画像の1つのラインに対応する画素値を時間方向に展開したモデル図である。図5Bの横方向は、図5Aの空間方向Xに対応している。
【0032】
背景領域の画素は、背景の成分、すなわち、背景のオブジェクトに対応する画像の成分のみから、その画素値が構成されている。前景領域の画素は、前景の成分、すなわち、前景のオブジェクトに対応する画像の成分のみから、その画素値が構成されている。
【0033】
混合領域の画素は、背景の成分、および前景の成分から、その画素値が構成されている。混合領域は、背景の成分、および前景の成分から、その画素値が構成されているので、歪み領域ともいえる。混合領域は、更に、カバードバックグラウンド領域およびアンカバードバックグラウンド領域に分類される。
【0034】
カバードバックグラウンド領域は、前景領域に対して、前景のオブジェクトの進行方向の前端部に対応する位置の混合領域であり、時間の経過に対応して背景成分が前景に覆い隠される領域をいう。
【0035】
これに対して、アンカバードバックグラウンド領域は、前景領域に対して、前景のオブジェクトの進行方向の後端部に対応する位置の混合領域であり、時間の経過に対応して背景成分が現れる領域をいう。
【0036】
図6は、以上のような、背景領域、前景領域、混合領域、カバードバックグラウンド領域、およびアンカバードバックグラウンド領域を説明する図である。図5に示す画像に対応する場合、背景領域は、静止部分であり、前景領域は、動き部分であり、混合領域のカバードバックグラウンド領域は、背景から前景に変化する部分であり、混合領域のアンカバードバックグラウンド領域は、前景から背景に変化する部分である。
【0037】
図7は、静止している前景に対応するオブジェクトおよび静止している背景に対応するオブジェクトを撮像した画像における、隣接して1列に並んでいる画素の画素値を時間方向に展開したモデル図である。例えば、隣接して1列に並んでいる画素として、画面の1つのライン上に並んでいる画素を選択することができる。
【0038】
図7に示すF01乃至F04の画素値は、静止している前景のオブジェクトに対応する画素の画素値である。図7に示すB01乃至B04の画素値は、静止している背景のオブジェクトに対応する画素の画素値である。
【0039】
図7における縦方向は、時間に対応し、図中の上から下に向かって時間が経過する。図7中の矩形の上辺の位置は、センサ2が入力された光の電荷への変換を開始する時刻に対応し、図7中の矩形の下辺の位置は、センサ2が入力された光の電荷への変換を終了する時刻に対応する。すなわち、図7中の矩形の上辺から下辺までの距離は、シャッタ時間に対応する。
【0040】
以下において、シャッタ時間とフレーム間隔とが同一である場合を例に説明する。
【0041】
図7における横方向は、図5で説明した空間方向Xに対応する。より具体的には、図7に示す例において、図7中の"F01"と記載された矩形の左辺から"B04"と記載された矩形の右辺までの距離は、画素のピッチの8倍、すなわち、連続している8つの画素の間隔に対応する。
【0042】
前景のオブジェクトおよび背景のオブジェクトが静止している場合、シャッタ時間に対応する期間において、センサ2に入力される光は変化しない。
【0043】
ここで、シャッタ時間に対応する期間を2つ以上の同じ長さの期間に分割する。仮想分割数は、前景に対応するオブジェクトのシャッタ時間内での動き量vなどに対応して設定される。例えば、図8に示すように、4である動き量vに対応して、仮想分割数は、4とされ、シャッタ時間に対応する期間は4つに分割される。
【0044】
ここで、動き量vは、動いているオブジェクトに対応する画像の位置の変化を画素間隔を単位として表す値である。例えば、前景に対応するオブジェクトの画像が、あるフレームを基準として次のフレームにおいて4画素分離れた位置に表示されるように移動しているとき、前景に対応するオブジェクトの画像の動き量vは、4とされる。
【0045】
図8中の最も上の行は、シャッタが開いて最初の、分割された期間に対応する。図中の上から2番目の行は、シャッタが開いて2番目の、分割された期間に対応する。図中の上から3番目の行は、シャッタが開いて3番目の、分割された期間に対応する。図中の上から4番目の行は、シャッタが開いて4番目の、分割された期間に対応する。
【0046】
以下、動き量vに対応して分割されたシャッタ時間をシャッタ時間/vとも称する。
【0047】
前景に対応するオブジェクトが静止しているとき、センサ2に入力される光は変化しないので、前景の成分F01/vは、画素値F01を仮想分割数で除した値に等しい。同様に、前景に対応するオブジェクトが静止しているとき、前景の成分F02/vは、画素値F02を仮想分割数で除した値に等しく、前景の成分F03/vは、画素値F03を仮想分割数で除した値に等しく、前景の成分F04/vは、画素値F04を仮想分割数で除した値に等しい。
【0048】
背景に対応するオブジェクトが静止しているとき、センサ2に入力される光は変化しないので、背景の成分B01/vは、画素値B01を仮想分割数で除した値に等しい。同様に、背景に対応するオブジェクトが静止しているとき、背景の成分B02/vは、画素値B02を仮想分割数で除した値に等しく、B03/vは、画素値B03を仮想分割数で除した値に等しく、B04/vは、画素値B04を仮想分割数で除した値に等しい。
【0049】
すなわち、前景に対応するオブジェクトが静止している場合、シャッタ時間に対応する期間において、センサ2に入力される前景のオブジェクトに対応する光が変化しないので、シャッタが開いて最初の、シャッタ時間/vに対応する前景の成分F01/vと、シャッタが開いて2番目の、シャッタ時間/vに対応する前景の成分F01/vと、シャッタが開いて3番目の、シャッタ時間/vに対応する前景の成分F01/vと、シャッタが開いて4番目の、シャッタ時間/vに対応する前景の成分F01/vとは、同じ値となる。F02/v乃至F04/vも、F01/vと同様の関係を有する。
【0050】
背景に対応するオブジェクトが静止している場合、シャッタ時間に対応する期間において、センサ2に入力される背景のオブジェクトに対応する光は変化しないので、シャッタが開いて最初の、シャッタ時間/vに対応する背景の成分B01/vと、シャッタが開いて2番目の、シャッタ時間/vに対応する背景の成分B01/vと、シャッタが開いて3番目の、シャッタ時間/vに対応する背景の成分B01/vと、シャッタが開いて4番目の、シャッタ時間/vに対応する背景の成分B01/vとは、同じ値となる。B02/v乃至B04/vも、同様の関係を有する。
【0051】
次に、前景に対応するオブジェクトが移動し、背景に対応するオブジェクトが静止している場合について説明する。
【0052】
図9は、前景に対応するオブジェクトが図中の右側に向かって移動する場合の、カバードバックグラウンド領域を含む、1つのライン上の画素の画素値を時間方向に展開したモデル図である。図9において、前景の動き量vは、4である。1フレームは短い時間なので、前景に対応するオブジェクトが剛体であり、等速で移動していると仮定することができる。図9において、前景に対応するオブジェクトの画像は、あるフレームを基準として次のフレームにおいて4画素分右側に表示されるように移動する。
【0053】
図9において、最も左側の画素乃至左から4番目の画素は、前景領域に属する。図9において、左から5番目乃至左から7番目の画素は、カバードバックグラウンド領域である混合領域に属する。図9において、最も右側の画素は、背景領域に属する。
【0054】
前景に対応するオブジェクトが時間の経過と共に背景に対応するオブジェクトを覆い隠すように移動しているので、カバードバックグラウンド領域に属する画素の画素値に含まれる成分は、シャッタ時間に対応する期間のある時点で、背景の成分から、前景の成分に替わる。
【0055】
例えば、図9中に太線枠を付した画素値Mは、式(1)で表される。
【0056】
M=B02/v+B02/v+F07/v+F06/v・・・(1)
【0057】
例えば、左から5番目の画素は、1つのシャッタ時間/vに対応する背景の成分を含み、3つのシャッタ時間/vに対応する前景の成分を含むので、左から5番目の画素の混合比αは、1/4である。左から6番目の画素は、2つのシャッタ時間/vに対応する背景の成分を含み、2つのシャッタ時間/vに対応する前景の成分を含むので、左から6番目の画素の混合比αは、1/2である。左から7番目の画素は、3つのシャッタ時間/vに対応する背景の成分を含み、1つのシャッタ時間/vに対応する前景の成分を含むので、左から7番目の画素の混合比αは、3/4である。
【0058】
前景に対応するオブジェクトが、剛体であり、前景の画像が次のフレームにおいて4画素右側に表示されるように等速で移動すると仮定できるので、例えば、図9中の左から4番目の画素の、シャッタが開いて最初の、シャッタ時間/vの前景の成分F07/vは、図9中の左から5番目の画素の、シャッタが開いて2番目のシャッタ時間/vに対応する前景の成分に等しい。同様に、前景の成分F07/vは、図9中の左から6番目の画素の、シャッタが開いて3番目のシャッタ時間/vに対応する前景の成分と、図9中の左から7番目の画素の、シャッタが開いて4番目のシャッタ時間/vに対応する前景の成分とに、それぞれ等しい。
【0059】
前景に対応するオブジェクトが、剛体であり、前景の画像が次のフレームにおいて4画素右側に表示されるように等速で移動すると仮定できるので、例えば、図9中の左から3番目の画素の、シャッタが開いて最初のシャッタ時間/vの前景の成分F06/vは、図9中の左から4番目の画素の、シャッタが開いて2番目のシャッタ時間/vに対応する前景の成分に等しい。同様に、前景の成分F06/vは、図9中の左から5番目の画素の、シャッタが開いて3番目のシャッタ時間/vに対応する前景の成分と、図9中の左から6番目の画素の、シャッタが開いて4番目のシャッタ時間/vに対応する前景の成分とに、それぞれ等しい。
【0060】
前景に対応するオブジェクトが、剛体であり、前景の画像が次のフレームにおいて4画素右側に表示されるように等速で移動すると仮定できるので、例えば、図9中の左から2番目の画素の、シャッタが開いて最初のシャッタ時間/vの前景の成分F05/vは、図9中の左から3番目の画素の、シャッタが開いて2番目のシャッタ時間/vに対応する前景の成分に等しい。同様に、前景の成分F05/vは、図9中の左から4番目の画素の、シャッタが開いて3番目のシャッタ時間/vに対応する前景の成分と、図9中の左から5番目の画素の、シャッタが開いて4番目のシャッタ時間/vに対応する前景の成分とに、それぞれ等しい。
【0061】
前景に対応するオブジェクトが、剛体であり、前景の画像が次のフレームにおいて4画素右側に表示されるように等速で移動すると仮定できるので、例えば、図9中の最も左側の画素の、シャッタが開いて最初のシャッタ時間/vの前景の成分F04/vは、図9中の左から2番目の画素の、シャッタが開いて2番目のシャッタ時間/vに対応する前景の成分に等しい。同様に、前景の成分F04/vは、図9中の左から3番目の画素の、シャッタが開いて3番目のシャッタ時間/vに対応する前景の成分と、図9中の左から4番目の画素の、シャッタが開いて4番目のシャッタ時間/vに対応する前景の成分とに、それぞれ等しい。
【0062】
このような動いているオブジェクトに対応する前景の領域の状態が、動きボケである。また、動いているオブジェクトに対応する前景の領域は、このように動きボケを含むので、歪み領域とも言える。
【0063】
図10は、前景が図中の右側に向かって移動する場合の、アンカバードバックグラウンド領域を含む、1つのライン上の画素の画素値を時間方向に展開したモデル図である。図10において、前景の動き量vは、4である。1フレームは短い時間なので、前景に対応するオブジェクトが剛体であり、等速で移動していると仮定することができる。図10において、前景に対応するオブジェクトの画像は、あるフレームを基準として次のフレームにおいて4画素分右側に移動する。
【0064】
図10において、最も左側の画素乃至左から4番目の画素は、背景領域に属する。図10において、左から5番目乃至左から7番目の画素は、アンカバードバックグラウンドである混合領域に属する。図10において、最も右側の画素は、前景領域に属する。
【0065】
背景に対応するオブジェクトを覆っていた前景に対応するオブジェクトが時間の経過と共に背景に対応するオブジェクトの前から取り除かれるように移動しているので、アンカバードバックグラウンド領域に属する画素の画素値に含まれる成分は、シャッタ時間に対応する期間のある時点で、前景の成分から、背景の成分に替わる。
【0066】
例えば、図10中に太線枠を付した画素値M'は、式(2)で表される。
【0067】
M'=F02/v+F01/v+B26/v+B26/v・・・(2)
【0068】
例えば、左から5番目の画素は、3つのシャッタ時間/vに対応する背景の成分を含み、1つのシャッタ時間/vに対応する前景の成分を含むので、左から5番目の画素の混合比αは、3/4である。左から6番目の画素は、2つのシャッタ時間/vに対応する背景の成分を含み、2つのシャッタ時間/vに対応する前景の成分を含むので、左から6番目の画素の混合比αは、1/2である。左から7番目の画素は、1つのシャッタ時間/vに対応する背景の成分を含み、3つのシャッタ時間/vに対応する前景の成分を含むので、左から7番目の画素の混合比αは、1/4である。
【0069】
式(1)および式(2)をより一般化すると、画素値Mは、式(3)で表される。
【0070】
【数1】

Figure 0004441846
・・・(3)
ここで、αは、混合比である。Bは、背景の画素値であり、Fi/vは、前景の成分である。
【0071】
前景に対応するオブジェクトが剛体であり、等速で動くと仮定でき、かつ、動き量vが4であるので、例えば、図10中の左から5番目の画素の、シャッタが開いて最初の、シャッタ時間/vの前景の成分F01/vは、図10中の左から6番目の画素の、シャッタが開いて2番目のシャッタ時間/vに対応する前景の成分に等しい。同様に、F01/vは、図10中の左から7番目の画素の、シャッタが開いて3番目のシャッタ時間/vに対応する前景の成分と、図10中の左から8番目の画素の、シャッタが開いて4番目のシャッタ時間/vに対応する前景の成分とに、それぞれ等しい。
【0072】
前景に対応するオブジェクトが剛体であり、等速で動くと仮定でき、かつ、仮想分割数が4であるので、例えば、図10中の左から6番目の画素の、シャッタが開いて最初の、シャッタ時間/vの前景の成分F02/vは、図10中の左から7番目の画素の、シャッタが開いて2番目のシャッタ時間/vに対応する前景の成分に等しい。同様に、前景の成分F02/vは、図10中の左から8番目の画素の、シャッタが開いて3番目のシャッタ時間/vに対応する前景の成分に等しい。
【0073】
前景に対応するオブジェクトが剛体であり、等速で動くと仮定でき、かつ、動き量vが4であるので、例えば、図10中の左から7番目の画素の、シャッタが開いて最初の、シャッタ時間/vの前景の成分F03/vは、図10中の左から8番目の画素の、シャッタが開いて2番目のシャッタ時間/vに対応する前景の成分に等しい。
【0074】
図8乃至図10の説明において、仮想分割数は、4であるとして説明したが、仮想分割数は、動き量vに対応する。動き量vは、一般に、前景に対応するオブジェクトの移動速度に対応する。例えば、前景に対応するオブジェクトが、あるフレームを基準として次のフレームにおいて4画素分右側に表示されるように移動しているとき、動き量vは、4とされる。動き量vに対応し、仮想分割数は、4とされる。同様に、例えば、前景に対応するオブジェクトが、あるフレームを基準として次のフレームにおいて6画素分左側に表示されるように移動しているとき、動き量vは、6とされ、仮想分割数は、6とされる。
【0075】
図11および図12に、以上で説明した、前景領域、背景領域、カバードバックグラウンド領域若しくはアンカバードバックグラウンド領域から成る混合領域と、分割されたシャッタ時間に対応する前景の成分および背景の成分との関係を示す。
【0076】
図11は、静止している背景の前を移動しているオブジェクトに対応する前景を含む画像から、前景領域、背景領域、および混合領域の画素を抽出した例を示す。図11に示す例において、前景に対応するオブジェクトは、画面に対して水平に移動している。
【0077】
フレーム#n+1は、フレーム#nの次のフレームであり、フレーム#n+2は、フレーム#n+1の次のフレームである。
【0078】
フレーム#n乃至フレーム#n+2のいずれかから抽出した、前景領域、背景領域、および混合領域の画素を抽出して、動き量vを4として、抽出された画素の画素値を時間方向に展開したモデルを図12に示す。
【0079】
前景領域の画素値は、前景に対応するオブジェクトが移動するので、シャッタ時間/vの期間に対応する、4つの異なる前景の成分から構成される。例えば、図12に示す前景領域の画素のうち最も左側に位置する画素は、F01/v,F02/v,F03/v、およびF04/vから構成される。すなわち、前景領域の画素は、動きボケを含んでいる。
【0080】
背景に対応するオブジェクトが静止しているので、シャッタ時間に対応する期間において、センサ2に入力される背景に対応する光は変化しない。この場合、背景領域の画素値は、動きボケを含まない。
【0081】
カバードバックグラウンド領域若しくはアンカバードバックグラウンド領域から成る混合領域に属する画素の画素値は、前景の成分と、背景の成分とから構成される。
【0082】
次に、オブジェクトに対応する画像が動いているとき、複数のフレームにおける、隣接して1列に並んでいる画素であって、フレーム上で同一の位置の画素の画素値を時間方向に展開したモデルについて説明する。例えば、オブジェクトに対応する画像が画面に対して水平に動いているとき、隣接して1列に並んでいる画素として、画面の1つのライン上に並んでいる画素を選択することができる。
【0083】
図13は、静止している背景に対応するオブジェクトを撮像した画像の3つのフレームの、隣接して1列に並んでいる画素であって、フレーム上で同一の位置の画素の画素値を時間方向に展開したモデル図である。フレーム#nは、フレーム#n-1の次のフレームであり、フレーム#n+1は、フレーム#nの次のフレームである。他のフレームも同様に称する。
【0084】
図13に示すB01乃至B12の画素値は、静止している背景のオブジェクトに対応する画素の画素値である。背景に対応するオブジェクトが静止しているので、フレーム#n-1乃至フレームn+1において、対応する画素の画素値は、変化しない。例えば、フレーム#n-1におけるB05の画素値を有する画素の位置に対応する、フレーム#nにおける画素、およびフレーム#n+1における画素は、それぞれ、B05の画素値を有する。
【0085】
図14は、静止している背景に対応するオブジェクトと共に図中の右側に移動する前景に対応するオブジェクトを撮像した画像の3つのフレームの、隣接して1列に並んでいる画素であって、フレーム上で同一の位置の画素の画素値を時間方向に展開したモデル図である。図14に示すモデルは、カバードバックグラウンド領域を含む。
【0086】
図14において、前景に対応するオブジェクトが、剛体であり、等速で移動すると仮定でき、前景の画像が次のフレームにおいて4画素右側に表示されるように移動するので、前景の動き量vは、4であり、仮想分割数は、4である。
【0087】
例えば、図14中のフレーム#n-1の最も左側の画素の、シャッタが開いて最初のシャッタ時間/vの前景の成分は、F12/vとなり、図14中の左から2番目の画素の、シャッタが開いて2番目のシャッタ時間/vの前景の成分も、F12/vとなる。図14中の左から3番目の画素の、シャッタが開いて3番目のシャッタ時間/vの前景の成分、および図14中の左から4番目の画素の、シャッタが開いて4番目のシャッタ時間/vの前景の成分は、F12/vとなる。
【0088】
図14中のフレーム#n-1の最も左側の画素の、シャッタが開いて2番目のシャッタ時間/vの前景の成分は、F11/vとなり、図14中の左から2番目の画素の、シャッタが開いて3番目のシャッタ時間/vの前景の成分も、F11/vとなる。図14中の左から3番目の画素の、シャッタが開いて4番目のシャッタ時間/vの前景の成分は、F11/vとなる。
【0089】
図14中のフレーム#n-1の最も左側の画素の、シャッタが開いて3番目のシャッタ時間/vの前景の成分は、F10/vとなり、図14中の左から2番目の画素の、シャッタが開いて4番目のシャッタ時間/vの前景の成分も、F10/vとなる。図14中のフレーム#n-1の最も左側の画素の、シャッタが開いて4番目のシャッタ時間/vの前景の成分は、F09/vとなる。
【0090】
背景に対応するオブジェクトが静止しているので、図14中のフレーム#n-1の左から2番目の画素の、シャッタが開いて最初のシャッタ時間/vの背景の成分は、B01/vとなる。図14中のフレーム#n-1の左から3番目の画素の、シャッタが開いて最初および2番目のシャッタ時間/vの背景の成分は、B02/vとなる。図14中のフレーム#n-1の左から4番目の画素の、シャッタが開いて最初乃至3番目のシャッタ時間/vの背景の成分は、B03/vとなる。
【0091】
図14中のフレーム#n-1において、最も左側の画素は、前景領域に属し、左側から2番目乃至4番目の画素は、カバードバックグラウンド領域である混合領域に属する。
【0092】
図14中のフレーム#n-1の左から5番目の画素乃至12番目の画素は、背景領域に属し、その画素値は、それぞれ、B04乃至B11となる。
【0093】
図14中のフレーム#nの左から1番目の画素乃至5番目の画素は、前景領域に属する。フレーム#nの前景領域における、シャッタ時間/vの前景の成分は、F05/v乃至F12/vのいずれかである。
【0094】
前景に対応するオブジェクトが、剛体であり、等速で移動すると仮定でき、前景の画像が次のフレームにおいて4画素右側に表示されるように移動するので、図14中のフレーム#nの左から5番目の画素の、シャッタが開いて最初のシャッタ時間/vの前景の成分は、F12/vとなり、図14中の左から6番目の画素の、シャッタが開いて2番目のシャッタ時間/vの前景の成分も、F12/vとなる。図14中の左から7番目の画素の、シャッタが開いて3番目のシャッタ時間/vの前景の成分、および図14中の左から8番目の画素の、シャッタが開いて4番目のシャッタ時間/vの前景の成分は、F12/vとなる。
【0095】
図14中のフレーム#nの左から5番目の画素の、シャッタが開いて2番目のシャッタ時間/vの前景の成分は、F11/vとなり、図14中の左から6番目の画素の、シャッタが開いて3番目のシャッタ時間/vの前景の成分も、F11/vとなる。図14中の左から7番目の画素の、シャッタが開いて4番目のシャッタ時間/vの前景の成分は、F11/vとなる。
【0096】
図14中のフレーム#nの左から5番目の画素の、シャッタが開いて3番目のシャッタ時間/vの前景の成分は、F10/vとなり、図14中の左から6番目の画素の、シャッタが開いて4番目のシャッタ時間/vの前景の成分も、F10/vとなる。図14中のフレーム#nの左から5番目の画素の、シャッタが開いて4番目のシャッタ時間/vの前景の成分は、F09/vとなる。
【0097】
背景に対応するオブジェクトが静止しているので、図14中のフレーム#nの左から6番目の画素の、シャッタが開いて最初のシャッタ時間/vの背景の成分は、B05/vとなる。図14中のフレーム#nの左から7番目の画素の、シャッタが開いて最初および2番目のシャッタ時間/vの背景の成分は、B06/vとなる。図14中のフレーム#nの左から8番目の画素の、シャッタが開いて最初乃至3番目の、シャッタ時間/vの背景の成分は、B07/vとなる。
【0098】
図14中のフレーム#nにおいて、左側から6番目乃至8番目の画素は、カバードバックグラウンド領域である混合領域に属する。
【0099】
図14中のフレーム#nの左から9番目の画素乃至12番目の画素は、背景領域に属し、画素値は、それぞれ、B08乃至B11となる。
【0100】
図14中のフレーム#n+1の左から1番目の画素乃至9番目の画素は、前景領域に属する。フレーム#n+1の前景領域における、シャッタ時間/vの前景の成分は、F01/v乃至F12/vのいずれかである。
【0101】
前景に対応するオブジェクトが、剛体であり、等速で移動すると仮定でき、前景の画像が次のフレームにおいて4画素右側に表示されるように移動するので、図14中のフレーム#n+1の左から9番目の画素の、シャッタが開いて最初のシャッタ時間/vの前景の成分は、F12/vとなり、図14中の左から10番目の画素の、シャッタが開いて2番目のシャッタ時間/vの前景の成分も、F12/vとなる。図14中の左から11番目の画素の、シャッタが開いて3番目のシャッタ時間/vの前景の成分、および図14中の左から12番目の画素の、シャッタが開いて4番目のシャッタ時間/vの前景の成分は、F12/vとなる。
【0102】
図14中のフレーム#n+1の左から9番目の画素の、シャッタが開いて2番目のシャッタ時間/vの期間の前景の成分は、F11/vとなり、図14中の左から10番目の画素の、シャッタが開いて3番目のシャッタ時間/vの前景の成分も、F11/vとなる。図14中の左から11番目の画素の、シャッタが開いて4番目の、シャッタ時間/vの前景の成分は、F11/vとなる。
【0103】
図14中のフレーム#n+1の左から9番目の画素の、シャッタが開いて3番目の、シャッタ時間/vの前景の成分は、F10/vとなり、図14中の左から10番目の画素の、シャッタが開いて4番目のシャッタ時間/vの前景の成分も、F10/vとなる。図14中のフレーム#n+1の左から9番目の画素の、シャッタが開いて4番目のシャッタ時間/vの前景の成分は、F09/vとなる。
【0104】
背景に対応するオブジェクトが静止しているので、図14中のフレーム#n+1の左から10番目の画素の、シャッタが開いて最初のシャッタ時間/vの背景の成分は、B09/vとなる。図14中のフレーム#n+1の左から11番目の画素の、シャッタが開いて最初および2番目のシャッタ時間/vの背景の成分は、B10/vとなる。図14中のフレーム#n+1の左から12番目の画素の、シャッタが開いて最初乃至3番目の、シャッタ時間/vの背景の成分は、B11/vとなる。
【0105】
図14中のフレーム#n+1において、左側から10番目乃至12番目の画素は、カバードバックグラウンド領域である混合領域に対応する。
【0106】
図15は、図14に示す画素値から前景の成分を抽出した画像のモデル図である。
【0107】
図16は、静止している背景と共に図中の右側に移動するオブジェクトに対応する前景を撮像した画像の3つのフレームの、隣接して1列に並んでいる画素であって、フレーム上で同一の位置の画素の画素値を時間方向に展開したモデル図である。図16において、アンカバードバックグラウンド領域が含まれている。
【0108】
図16において、前景に対応するオブジェクトは、剛体であり、かつ等速で移動していると仮定できる。前景に対応するオブジェクトが、次のフレームにおいて4画素分右側に表示されるように移動しているので、動き量vは、4である。
【0109】
例えば、図16中のフレーム#n-1の最も左側の画素の、シャッタが開いて最初の、シャッタ時間/vの前景の成分は、F13/vとなり、図16中の左から2番目の画素の、シャッタが開いて2番目のシャッタ時間/vの前景の成分も、F13/vとなる。図16中の左から3番目の画素の、シャッタが開いて3番目のシャッタ時間/vの前景の成分、および図16中の左から4番目の画素の、シャッタが開いて4番目のシャッタ時間/vの前景の成分は、F13/vとなる。
【0110】
図16中のフレーム#n-1の左から2番目の画素の、シャッタが開いて最初のシャッタ時間/vの前景の成分は、F14/vとなり、図16中の左から3番目の画素の、シャッタが開いて2番目のシャッタ時間/vの前景の成分も、F14/vとなる。図16中の左から3番目の画素の、シャッタが開いて最初の、シャッタ時間/vの前景の成分は、F15/vとなる。
【0111】
背景に対応するオブジェクトが静止しているので、図16中のフレーム#n-1の最も左側の画素の、シャッタが開いて2番目乃至4番目の、シャッタ時間/vの背景の成分は、B25/vとなる。図16中のフレーム#n-1の左から2番目の画素の、シャッタが開いて3番目および4番目の、シャッタ時間/vの背景の成分は、B26/vとなる。図16中のフレーム#n-1の左から3番目の画素の、シャッタが開いて4番目のシャッタ時間/vの背景の成分は、B27/vとなる。
【0112】
図16中のフレーム#n-1において、最も左側の画素乃至3番目の画素は、アンカバードバックグラウンド領域である混合領域に属する。
【0113】
図16中のフレーム#n-1の左から4番目の画素乃至12番目の画素は、前景領域に属する。フレームの前景の成分は、F13/v乃至F24/vのいずれかである。
【0114】
図16中のフレーム#nの最も左側の画素乃至左から4番目の画素は、背景領域に属し、画素値は、それぞれ、B25乃至B28となる。
【0115】
前景に対応するオブジェクトが、剛体であり、等速で移動すると仮定でき、前景の画像が次のフレームにおいて4画素右側に表示されるように移動するので、図16中のフレーム#nの左から5番目の画素の、シャッタが開いて最初のシャッタ時間/vの前景の成分は、F13/vとなり、図16中の左から6番目の画素の、シャッタが開いて2番目のシャッタ時間/vの前景の成分も、F13/vとなる。図16中の左から7番目の画素の、シャッタが開いて3番目のシャッタ時間/vの前景の成分、および図16中の左から8番目の画素の、シャッタが開いて4番目のシャッタ時間/vの前景の成分は、F13/vとなる。
【0116】
図16中のフレーム#nの左から6番目の画素の、シャッタが開いて最初のシャッタ時間/vの前景の成分は、F14/vとなり、図16中の左から7番目の画素の、シャッタが開いて2番目のシャッタ時間/vの前景の成分も、F14/vとなる。図16中の左から8番目の画素の、シャッタが開いて最初のシャッタ時間/vの前景の成分は、F15/vとなる。
【0117】
背景に対応するオブジェクトが静止しているので、図16中のフレーム#nの左から5番目の画素の、シャッタが開いて2番目乃至4番目のシャッタ時間/vの背景の成分は、B29/vとなる。図16中のフレーム#nの左から6番目の画素の、シャッタが開いて3番目および4番目のシャッタ時間/vの背景の成分は、B30/vとなる。図16中のフレーム#nの左から7番目の画素の、シャッタが開いて4番目のシャッタ時間/vの背景の成分は、B31/vとなる。
【0118】
図16中のフレーム#nにおいて、左から5番目の画素乃至7番目の画素は、アンカバードバックグラウンド領域である混合領域に属する。
【0119】
図16中のフレーム#nの左から8番目の画素乃至12番目の画素は、前景領域に属する。フレーム#nの前景領域における、シャッタ時間/vの期間に対応する値は、F13/v乃至F20/vのいずれかである。
【0120】
図16中のフレーム#n+1の最も左側の画素乃至左から8番目の画素は、背景領域に属し、画素値は、それぞれ、B25乃至B32となる。
【0121】
前景に対応するオブジェクトが、剛体であり、等速で移動すると仮定でき、前景の画像が次のフレームにおいて4画素右側に表示されるように移動するので、図16中のフレーム#n+1の左から9番目の画素の、シャッタが開いて最初のシャッタ時間/vの前景の成分は、F13/vとなり、図16中の左から10番目の画素の、シャッタが開いて2番目のシャッタ時間/vの前景の成分も、F13/vとなる。図16中の左から11番目の画素の、シャッタが開いて3番目のシャッタ時間/vの前景の成分、および図16中の左から12番目の画素の、シャッタが開いて4番目のシャッタ時間/vの前景の成分は、F13/vとなる。
【0122】
図16中のフレーム#n+1の左から10番目の画素の、シャッタが開いて最初のシャッタ時間/vの前景の成分は、F14/vとなり、図16中の左から11番目の画素の、シャッタが開いて2番目のシャッタ時間/vの前景の成分も、F14/vとなる。図16中の左から12番目の画素の、シャッタが開いて最初のシャッタ時間/vの前景の成分は、F15/vとなる。
【0123】
背景に対応するオブジェクトが静止しているので、図16中のフレーム#n+1の左から9番目の画素の、シャッタが開いて2番目乃至4番目の、シャッタ時間/vの背景の成分は、B33/vとなる。図16中のフレーム#n+1の左から10番目の画素の、シャッタが開いて3番目および4番目のシャッタ時間/vの背景の成分は、B34/vとなる。図16中のフレーム#n+1の左から11番目の画素の、シャッタが開いて4番目のシャッタ時間/vの背景の成分は、B35/vとなる。
【0124】
図16中のフレーム#n+1において、左から9番目の画素乃至11番目の画素は、アンカバードバックグラウンド領域である混合領域に属する。
【0125】
図16中のフレーム#n+1の左から12番目の画素は、前景領域に属する。フレーム#n+1の前景領域における、シャッタ時間/vの前景の成分は、F13/v乃至F16/vのいずれかである。
【0126】
図17は、図16に示す画素値から前景の成分を抽出した画像のモデル図である。
【0127】
以上のように、動き量vは、設定される。従って、図1の画像処理部1の動きベクトル検出部11は、動きベクトルを検出すると共に、その動きベクトルから動き量vを求めて、動きベクトルと共に、画素値演算部12−1乃至12−Nに出力する。
【0128】
画素値演算部12−1乃至12−Nは、それぞれが、動きボケを除去した画素値を求めるために必要とされる、異なるモデルからなる複数の画素を入力画像から抽出し、各モデル毎に求められる画素値を求めて、画素生成部14に出力する。尚、以降において、画素値演算部12−1乃至12−Nにおいて、特に区別する必要がない場合、単に、画素値演算部12とも称する。また、画素値を求めるモデルについて後述する。
【0129】
モデル信頼度演算部13は、各画素値演算部12で画素の演算に使用される画素のうち、モデル毎にアクティビティの影響を受ける画素を抽出して、その画素のアクティビティを求め、さらに、それらのアクティビティを正規化した値を信頼度としてモデルの信頼度の情報として画素生成部14に出力する。尚、アクティビティと、信頼度については詳細を後述する。
【0130】
画素生成部14は、各画素値演算部12より入力される画素値の情報と、モデル信頼度演算部13より入力される信頼度に基づいて、各モデル毎に求められた画素値と信頼度の積和を求め、これを画素値とした画素を生成し、処理画像として出力する。
【0131】
次に、画素値演算部12−1乃至12−Nが動きボケを除去した画素値を求めるために、個々に設定されるモデルについて説明する。
【0132】
図18は、検出素子の1画素幅の1行を示しており、各マス目は、画素を示し、F0乃至F14は、その各画素に入射される光のレベルを示す。従って、図18の場合、一番左の画素に入射される光のレベルがF0であり、左から2番目の画素に入射される光のレベルがF1であり、左から3番目の画素に入射される光のレベルがF2であり、以下同様にして、最も右側の画素に入射される光のレベルがF14となる。
【0133】
また、図19は、図18で示された各画素に入射された光のレベルに基づいて、各検出素子から出力される画素値を示している。従って、一番左の画素は、画素値M0であり、左から2番目の画素は、画素値M1であり、それ以下同様であり、最も右側の画素は、画素値M14である。
【0134】
さらに、図20は、各画素に入射される光のレベルのシャッタ時間/vの成分を示しているものである。今の場合、動き量vは、5であり、図18で示されている各レベルが、シャッタ時間に対して5分割された成分が示されている(今の場合、物体は、右から左に動いている)。従って、例えば、一番左側の画素は、シャッタが開いて最初のシャッタ時間/vの成分はf4となり、シャッタが開いて2番目のシャッタ時間/vの成分は、f3となり、シャッタが開いて3番目のシャッタ時間/vの成分は、f2となり、シャッタが開いて4番目のシャッタ時間/vの成分は、f1となり、シャッタが開いて5番目のシャッタ時間/vの成分は、f0となる。
【0135】
そして、各画素毎に、これらのレベルで入射された光がシャッタ時間で積分された結果が、各画素の画素値となる。すなわち、例えば、一番左側の画素の画素値は、以下の式(4)で示されることになる。
【0136】
M0=f0+f1+f2+f3+f4+f5・・・(4)
【0137】
従って、画素M1乃至M14についても同様の関係が成立する。
【0138】
動きボケは、被写体となる物体が、シャッタ時間内に移動することにより、1つの画素に対して、異なるレベルの光(シャッタ時間/vの成分)がシャッタ時間内に入射されることにより、異なるレベルの光が混合されて生じるものであることは上述した通りである。
【0139】
そもそも動きボケは、シャッタ時間が十分に短くないことにより生じる。従って、シャッタ時間を短くすれば、動きボケの少ない画像を取得することができることになるが、動きボケがない分、かえって不自然な画像となってしまうこともある。また、シャッタ時間を短くしすぎてしまうと、ノイズ感が増してしまうことがある。
【0140】
これらの条件により、シャッタ時間は通常フレームレートにより決定される事が多く、結果として、動きボケは、被写体の動きのレベルに応じて発生することになる。
【0141】
そこで、上述したように、動き量vで分割された各シャッタ時間/vを求めることができれば、動きボケを除去した画像を生成することが可能になる。すなわち、例えば、図20の場合、各画素について、シャッタが開いて3番目のシャッタ時間/vの成分のみを求めて、各画素について動き量vで乗じることで動きボケが除去された画像を生成することが可能となる。もちろん、その他のシャッタが開いて何番目のシャッタ時間/vの成分を用いてもよい。
【0142】
画素値演算部12は、各シャッタ時間/vの成分を画素値として求める。この際、1個のシャッタ時間/vの成分を求める手法は、1つだけではなく複数に存在する為、それぞれの手法毎にモデルが設定されており、各画素値演算部12は、各々が定められた、個々に異なるモデルを用いて各シャッタ時間/vの成分を求めて、画素生成部14に出力している。従って、画素値演算部12−1乃至N−1は、同じタイミングで、同じ画素に対応するシャッタ時間/vの成分を異なるモデルを用いて求めている。
【0143】
例えば、図20の中央に丸印が付された、画素値M7となっている、左から8番目の画素のシャッタが開いて3番目のシャッタ時間/vの成分であるf9からなる、シャッタ成分を求め、動き量との積をとることで画素に入力される動きボケのない光のレベルF9を求める場合について説明する。
【0144】
尚、以下においては、シャッタ時間/vは、単にシャッタ成分とも称する。また、以下においては、図20において画素値M7で示される、処理の対象となる画素を着目画素と称し、光のレベルF9に対応した、動きボケが除去された画像の画素を注目画素と称する。すなわち、この例においては、処理の基準となる着目画素は、画素値M7と示された図20中の左から8番目の画素であるが、実際に動きボケが除去された画像において求められる注目画素は、例えば、図19における左から10番目の画素となる。すなわち、処理対処となる着目画素と、その処理により得られる注目画素は、センサ2上の異なる位置の画素となる。
【0145】
例えば、図21(シャッタ成分は図20と同じ)においては、以下の式(5),式(6)が成立している。
【0146】
F9−F4=(M5−M4)×v(=(f9−f4)×v)・・・(5)
F14−F9=(M10−M9)×v(=(f14−f9)×v)・・・(6)
【0147】
すなわち、左から5,6番目の画素の画素値の差分は、図21で示されるように、点線で囲まれた左から5番目の画素のシャッタが開いて最初のシャッタ成分から4番目までのシャッタ成分がf8乃至f5であり、同様に、点線で囲まれた左から6番目の画素のシャッタが開いてから2番目乃至5番目のシャッタ成分がf8乃至f5であるため、その差分は、実質的に、左から6番目の画素のシャッタが開いてから最初のシャッタ成分と、左から5番目の画素のシャッタが開いてから5番目のシャッタ成分の差分(f9−f4)となる。この差分を動き量vで乗じることにより左から5,6番目の画素間のレベルの差分(F9−F4)が求められることになる。
【0148】
同様にして、左から10,11番目の画素の画素値の差分は、図21で示されるように、点線で囲まれた左から10番目の画素のシャッタが開いて最初のシャッタ成分から4番目までのシャッタ成分がf13乃至f10であり、同様に、点線で囲まれた左から11番目の画素のシャッタが開いてから2番目乃至5番目のシャッタ成分がf13乃至f10であるため、その差分は、実質的に、左から11番目の画素のシャッタが開いてから最初のシャッタ成分と、左から10番目の画素のシャッタが開いてから5番目のシャッタ成分の差分(f14−f9)となる。この差分を動き量vで乗じることにより左から5,6番目の画素間の差分(F14−F9)が求められることになる。
【0149】
従って、式(5),式(6)からシャッタ成分であるf9を求めることができれば、f9を含む画素値を求めることができ、画像に含まれる全ての画素を求めることで、動きボケを除去した画像を生成することが可能となる。
【0150】
しかしながら、式(5),式(6)は、2つの式に対して、未知数が3個存在する(F4,F9,F14)ことになるため、求めることができない。
【0151】
そこで、レベルF9を求めるために、レベルF4、または、F14を空間相関を利用して近似的に求める。
【0152】
より具体的には、例えば、左から3番目の画素の、周辺画素との空間相関が高ければ、以下の式(7)で示すような近似が成立する。
【0153】
f4=M2/v・・・(7)
ここでいう空間相関とは、各画素のアクティビティの大小で表される関係である。すなわち、アクティビティとは、例えば、注目する画素に隣接する画素間の差分値の和である。例えば、図22で示される3画素×3画素の合計9画素の画素間の差分がアクティビティであり、以下の式(8)で示される。尚、図22において、各マス目は、画素に対応し、マス目に記された文字は、各画素の画素値を示す。また、着目画素は、画素値M2で示される画素である。
【0154】
Activity(M2)=|M101-M102|+|M102-M103|+|M1-M2|+|M2-M3|
+|M201-M202|+|M202-M203|+|M101-M1|+|M1-M201|
+|M102-M2|+|M2-M202|+|M103-M3|+|M3-M203|・・・(8)
【0155】
式(8)で示される、画素値がM2で表される画素のアクティビティ(Activity)は、その値が小さいほど、画素値がM2で表された画素の空間相関が高く、画素値がM2で表された画素の周辺の画素は、相互により近い画素値を持っていることが示されることになり、逆に、このアクティビティが大きいとき、画素値がM2で表された画素は、その周辺の画素と相関が低く、周辺の画素とは異なる画素値である可能性が高い。
【0156】
すなわち、空間相関が高いということは、画素内における画素値の変化は小さく、変化がないものと仮定することができるので、式(9)で示すような関係が成立するはずである。
【0157】
f6=f5=f4=f3=f2・・・(9)
【0158】
結果として、以下の式(10)が導出されることになるため、式(7)は、成立することになる。
M2=f6+f5+f4+f3+f2=f4×v(=F4)・・・(10)
【0159】
以上の結果から、式(5)を変形し、式(7)の関係を代入すると、以下の式(11)で示されるように、動きボケのない画像の画素に入射される光のレベルとして、F9が求められることになる。
【0160】
F9=(M5−M4)×v+M2・・・(11)
【0161】
また、例えば、図21の左から11番目の画素の、周辺画素との空間相関が高ければ、以下の式(12)で示すような近似が成立する。
【0162】
f14=M12/v・・・(12)
【0163】
すなわち、空間相関が高いということは、画素内における画素値の変化は小さく、変化がないものと仮定することができるので、式(13)で示すような関係が成立するはずである。
【0164】
f16=f15=f14=f13=f12・・・(13)
【0165】
結果として、以下の式(14)が導出されることになるため、式(12)は、成立することになる。
M12=f16+f15+f14+f13+f12=f14×v(=F12)・・・(14)
【0166】
以上の結果から、式(6)を変形し、式(14)の関係を代入すると、以下の式(15)で示されるように、動きボケのない画像の画素に入射される光のレベルとしてF9が求められることになる。
【0167】
F9=M12+(M9−M10)×v・・・(15)
【0168】
すなわち、画素値演算部12は、例えば、式(11),式(15)の2つのモデル(着目画素)により、動きボケのない画像の画素に入射されるレベルF9が求め、これをもって、動きボケが除去された画素値として画像生成部14に出力する。
【0169】
さらに、動きボケが除去された画素値を求めるモデルとしては、次のようなものも考えられる。
【0170】
例えば、図23で示されるように、上述した図21を参照して説明したレベルF9を求めるためにレベルF4を近似的に求めたが、このレベルF4を求めるために、上述したレベルF9を求めるために使用した手法と同様の手法で求め、求められたレベルF4を用いてレベルF9を求めるというものである。
【0171】
すなわち、図23においては、上述した関係と同様に、以下の式(16),式(17)で示されるような関係が成立している。
【0172】
F4−F(-1)=(M0−M(-1))×v(=(f4−f(-1))×v)・・・(16)
F19−F14=(M15−M14)×v(=(f19−f14)×v)・・・(17)
【0173】
すなわち、左から4,5番目の画素の画素値の差分は、図23で示されるように、点線で囲まれた左から4番目の画素のシャッタが開いて最初のシャッタ成分乃至4番目までのシャッタ成分がf3乃至f0であり、同様に、点線で囲まれた左から5番目の画素のシャッタが開いてから2番目乃至5番目のシャッタ成分がf3乃至f0であるため、その差分は、実質的に、左から5番目の画素のシャッタが開いてから最初のシャッタ成分と、左から4番目の画素のシャッタが開いてから5番目のシャッタ成分の差分(f4−f(-1))となる。この差分を動き量vで乗じることにより左から4,5番目の画素間のレベルの差分(F4−F(-1))が求められることになる。
【0174】
同様にして、右から3,4番目の画素の画素値の差分は、図23で示されるように、点線で囲まれた右から4番目の画素のシャッタが開いて最初のシャッタ成分乃至4番目までのシャッタ成分がf18乃至f15であり、同様に、点線で囲まれた右から3番目の画素のシャッタが開いてから2番目乃至5番目のシャッタ成分がf18乃至f15であるため、その差分は、実質的に、右から3番目の画素のシャッタが開いてから最初のシャッタ成分と、右から4番目の画素のシャッタが開いてから5番目のシャッタ成分の差分(f19−f14)となる。この差分を動き量vで乗じることにより右から3,4番目の画素間の差分(F19−F14)が求められることになる。
【0175】
従って、式(16),式(17)については、上述した式(5),式(6)についてしたのと同様の手法で式を展開する。すなわち、レベルF4を求めるために、左から図23の2番目の画素を、レベルF14を求めるために、一番右の画素を周辺画素を、それぞれ空間相関の近い画素として仮定することで、以下の式(18),式(19)を導出する。
【0176】
M(-3)=f1+f0+f(-1)+f(-2)+f(-3)=f(-1)×v(=F(-1))・・・(18)
M17=f21+f20+f19+f18+f17=f19×v(=F19)・・・(19)
【0177】
以上の結果から、式(16),式(17)を変形し、式(18),式(19)の関係をそれぞれ代入すると、以下の式(20),式(21)で示されるように、動きボケのない画像の画素に入射される光のレベルとして、F4、および、F14が求められることになる。
【0178】
F4=(M0−M(-1))×v+M(-3)・・・(20)
F14=(M15−M14)×v+M17・・・(21)
【0179】
以上の結果から、式(5),式(6)を変形し、式(20),式(21)の関係を代入すると、以下の式(22),式(23)で示されるように、動きボケのない画像の画素に入射される光のレベルとしてF9が求められることになる。
【0180】
F9=M(-3)+(M5−M4)×v+(M0−M(-1))×v・・・(22)
F9=M17+(M14−M15)×v+(M9−M10)×v・・・(23)
【0181】
すなわち、画素値演算部12は、例えば、式(11),式(15)の2つのモデルの他に、上述の式(22),式(23)のモデルにより、動きボケのない画像の画素に入射されるレベルF9を求め、これをもって、動きボケが除去された画像の画素値として画像生成部14に出力する。
【0182】
上述した式(22),式(23)のモデルは、画素値がM(-3),M15となる画素について相関が高いことが前提となった式であるが、画素値がM2,M12となる画素における相関の高さは問題とならない。一方、上述の式(11),式(15)のモデルは、画素値がM2,M12となる画素における相関が高いことが前提となったモデルであるので、M2,M12となる画素における相関が低いと正しい画素値を求めることができないことになる。従って、この上述の式(22),式(23)のモデルは、上述の式(11),式(15)のモデルで値が正確に計算できない状態、すなわち、M2,M12となる画素における相関が低いような場合に有効な計算方法であるといえる。
【0183】
さらに、図21、および、図23を参照して説明したように、上述の式(11),式(15)のモデルと、式(22),式(23)のモデルとの関係と同様の関係を持つ、さらなるモデルを設定することも可能であり、左右方向にモデルとなる演算に使用する画素(タップ)を広げていくことが可能となり、事実上、画像上に画素が無限に存在すれば、1つの動きボケのない画素の計算方法は、無限に存在することになる。
【0184】
そこで、図1における画素値演算部12−1乃至12−Nは、N個のモデルを設定し、上述した式(11),式(15),式(22),および式(23)で説明したような関係を持つ、異なるモデルにより画素値を演算して画素生成部14に出力する。
【0185】
次に、図24を参照して、モデル信頼度演算部13について説明する。
【0186】
アクティビティ演算部21−1乃至21−Nは、モデル毎に抽出される画素のうち、画素値の演算において、アクティビティが小さい、すなわち、空間相関が高いと仮定して近似することによって設定される画素のアクティビティを求める。尚、以下において、アクティビティ演算部21−1乃至21−Nを個々に区別する必要がない場合、単に、アクティビティ演算部21と称する。
【0187】
すなわち、例えば、図23において、上述した式(11)のモデルにおいては、画素値がM2として表された画素が、上述した式(15)のモデルにおいては、画素値がM12として表された画素が、上述した式(22)のモデルにおいては、画素値がM(-3)として表された画素が、さらに、上述した式(23)のモデルにおいては、画素値がM17で表された画素が、それぞれ画素値の演算において、アクティビティが小さい、すなわち、空間相関が高いと仮定して近似することによって設定される画素である。
【0188】
アクティビティ演算部21は、それぞれのモデル毎に対応する画素について、上述した式(8)で示されるような演算により、アクティビティを求めて信頼度正規化部22に出力する。
【0189】
信頼度正規化部22は、各アクティビティ検出部21より入力されるモデルごとのアクティビティの逆数を正規化して、信頼度として各モデル毎に画素生成部14に出力する。
【0190】
すなわち、例えば、図23で示した4モデルであった場合(1≦N<4であった場合)、上述した式(11)のモデルにおける画素値がM2として表された画素のアクティビティがA(M2)、上述した式(15)のモデルにおける画素値がM12として表された画素のアクティビティがA(M12)、上述した式(22)のモデルにおける画素値がM(-3)として表された画素のアクティビティがA(M(-3))、さらに、上述した式(23)のモデルにおける画素値がM17で表された画素のアクティビティがA(M17)であった場合、信頼度正規化部22は、以下の式(24)で表されるように各アクティビティの逆数を正規化して、それぞれの信頼度Conf(M2),Conf(M12),Conf(M(-3)),Conf(M17)として、画素生成部22に出力する。
【0191】
Conf(M2)
=(1/A(M2))/((1/A(M2))+(1/A(M12))+(1/A(M(-3)))+(1/A(M17)))
Conf(M12)
=(1/A(M12))/((1/A(M2))+(1/A(M12))+(1/A(M(-3)))+(1/A(M17)))
Conf(M(-3))
=(1/A(M(-3)))/((1/A(M2))+(1/A(M12))+(1/A(M(-3)))+(1/A(M17)))
Conf(M17)
=(1/A(M17))/((1/A(M2))+(1/A(M12))+(1/A(M(-3)))+(1/A(M17)))
・・・(24)
【0192】
式(24)で示されるように、各画素の信頼度が設定されるので、アクティビティの逆数の高い画素ほど信頼度が高く、逆に、アクティビティの逆数が小さい画素であるほど、信頼度が低くなる。すなわち、上述したように、図23における、上述した式(11)のモデルにおける画素値がM2として表された画素、上述した式(15)のモデルにおける画素値がM12として表された画素、上述した式(22)のモデルにおける画素値がM(-3)として表された画素、さらに、上述した式(23)のモデルにおける画素値がM17で表された画素は、それぞれアクティビティが小さく、空間相関の高い画素であることが前提であるので、それらのアクティビティが小さいほど(逆数が大きいほど)、近似に適した画素であり、そのモデルで演算された画素値も信頼性が高い。逆に、アクティビティの逆数が小さい(アクティビティの大きい)画素は、空間相関が低く、近似に適さない画素であるので、そのモデルで演算された画素値も信頼性が低いといえる。
【0193】
尚、アクティビティは、例えば、図22で示されるように、着目画素が画素値M2で示される画素で、その隣接する水平方向、垂直方向、および、斜方向に隣接する合計9画素から、それぞれの水平方向に隣接する画素間の差分のみであってもよい。
【0194】
また、アクティビティは、図25で示されるように、着目画素が画素値M2で示される画素で、その隣接する水平方向、垂直方向、および、斜方向に隣接する合計9画素の各画素値が分布した場合、最大値と最小値の差分、すなわち、ダイナミックレンジとするようにしてもよい。従って、図25の場合、アクティビティは、|M103−M1|、または、|M103−M203|となる。
【0195】
次に、図26を参照して、画素生成部14について説明する。
【0196】
モデル信頼度付加部31は、各画素値生成部21より入力される各画素値にモデル信頼度演算部31より供給されてくる信頼度との積を取り、画素決定部32に出力する。より詳細には、信頼度付加部31の乗算器41−1乃至41−Nは、画素値演算部12−1乃至12−Nのそれぞれから入力される各モデル毎の画素値と、信頼度分配器42より供給される、各モデル毎に演算された信頼度との積を求め、それぞれの演算結果を画素決定部32に出力する。
【0197】
信頼度分配器42は、モデル信頼度演算部13より供給されてくるモデルごとの信頼度を、モデルに対応して、乗算器41−1乃至41−Nに分配して供給する。
【0198】
画素決定部32は、信頼度付加部31より供給されてくる画素値演算部12−1乃至12−Nのそれぞれから入力される各モデル毎の画素値と、信頼度分配器42より供給される、各モデル毎に演算された信頼度との積を全て加算し、加算結果を画素値として決定し、出力する。
【0199】
次に、図27のフローチャートを参照して、動きボケ除去の処理について説明する。
【0200】
ステップS1において、動きベクトル検出部11は、入力画像に基づいて、未処理画素を抽出し、対応する動きベクトルを検出し、その動きベクトルから動き量vを求めて、動きベクトルと共に動き量vの情報を各画素値演算部12に供給する。
【0201】
ステップS2において、画素値演算部12−1乃至12−Nは、それぞれに設定されたモデルに対応する、例えば、上述の式(11),式(15),式(22),式(23)の演算に必要な画素の画素値を抽出し、抽出した画素値を用いて、動きボケが除去された画素値を求める。すなわち、画素値演算部12−1乃至12−Nは、例えば、上述した図23におけるシャッタ成分f9に対応する光のレベルF9をそれぞれのモデルに対応する演算により求め、画素値を決定し、それぞれに演算結果を画素生成部14に出力する。
【0202】
ステップS3において、モデル信頼度演算部13のアクティビティ検出部21−1乃至21−Nは、それぞれのモデルに対応する所定の画素のアクティビティを演算して、信頼度正規化部22に出力する。すなわち、アクティビティ検出部21−1乃至21−Nは、図23における上述した式(11)のモデルにおける画素値がM2として表された画素、上述した式(15)のモデルにおける画素値がM12として表された画素、上述した式(22)のモデルにおける画素値がM(-3)として表された画素、さらに、上述した式(23)のモデルにおける画素値がM17で表された画素のそれぞれについて、図22、および、式(8)参照して説明したように、アクティビティをそれぞれのモデル毎に求めて信頼度正規化部22に出力する。
【0203】
ステップS4において、信頼度正規化部22は、各アクティビティ検出部21−1乃至21−Nより入力されたアクティビティの逆数を求めて、それらを正規化し、モデル毎の信頼度として画素生成部14に出力する。
【0204】
すなわち、信頼度正規化部22は、例えば、図23における上述した式(11)のモデルにおける画素値がM2として表された画素、上述した式(15)のモデルにおける画素値がM12として表された画素、上述した式(22)のモデルにおける画素値がM(-3)として表された画素、さらに、上述した式(23)のモデルにおける画素値がM17で表された画素のそれぞれについて求められたアクティビティを、上述した式(24)の演算を実行して、各モデル毎に求められる画素値の信頼度を求めて画素生成部14に出力する。
【0205】
ステップS5において、画素生成部14の信頼度付加部31における信頼度分配器42は、このタイミングで、ステップS4の処理で、モデル信頼度演算部13より供給されてくるモデルごとの信頼度を、各モデルに対応する乗算器41−1乃至41−Nに供給すると共に、画素生成部14の信頼度付加部31における乗算器41−1乃至41−Nは、それぞれに対応する画素値演算部12−1乃至12−Nより入力されてくる画素値と、信頼度分配器42より供給されてくる信頼度との積を求めて、演算結果をそれぞれ画素決定部32に出力する。
【0206】
ステップS6において、画素決定部32は、乗算器41−1乃至41−Nよりそれぞれ入力されてくる画素値と信頼度の積和を求めて画素値として出力する。
【0207】
すなわち、例えば、画素値演算部12−1乃至12−Nが、上述の図23におけるF9に対応する画素値を演算した結果が、F9(model1),F9(model2),F9(model3)・・・F9(modelN)(第1モデルにより演算された画素値がF9(model1)、第2モデルにより演算された画素値がF9(model2)、・・・第Nモデルにより演算された画素値がF9(modelN))であって、さらに、信頼度分配部42より各乗算器41−1乃至41−Nに対して分配される信頼度がそれぞれConf(model1),Conf(model2)・・・Conf(modelN)である場合、画素値F9は以下の式(25)で示されるように演算されることになる。
【0208】
F9=F9(model1)×Conf(model1)
+F9(model2)×Conf(model2)+・・・+F9(modelN)×Conf(modelN)・・・(25)
【0209】
ステップS7において、画素決定部32は、全ての画素について処理をしたか否かを判定し、全ての画素(注目画素)について処理がなされていないと判定された場合、その処理は、ステップS1に戻り、それ以降の処理が繰り返される。すなわち、全ての画素について処理がなされるまで、ステップS1乃至S7の処理が繰り返される。
【0210】
ステップS7において、全ての画素について、処理がなされたと判定された場合、その処理は終了する。結果として、入力画像の全ての画素について上述の処理がなされたとき、入力画像から動きボケが除去された画像が出力される。
【0211】
すなわち、以上の処理により、動きボケを除去する画素を演算する複数のモデルに対応する全ての手法での画素値を求めると共に、それぞれのモデルの信頼度をアクティビティに基づいて求め、それぞれの積和を求めることにより画素値を決定するようにしたので、結果的に、全てのモデルにおける画素値の演算結果に信頼度による重み付け処理が行われ、より正確に動きボケを除去することが可能となる。
【0212】
図28は、動きボケを含む画像を示す図であり、図29は、図1の画像処理部1による動きボケ除去された処理結果となる画像例を示す図である。図28で示されるように、動きボケにより窓などが原型を留めていない画像が、図29で示されるように動きボケ除去されることにより、窓の形状が鮮明になっているのがわかる。
【0213】
以上によれば、入力された動きベクトルに応じて、それぞれ時間積分効果を有する複数の画素に現実世界の光信号が射影され取得された第1の画像データ内の、第1の画像データの動きボケが除去された第2の画像データの注目画素に対応する複数の画素の画素値を抽出し、抽出された複数の画素の画素値に基づいて、第2の画像データの注目画素の画素値を演算し、第2の画像データの注目画素に対応する第1の画像データのアクティビティに応じて、演算される注目画素の画素値を制御するようにしたので、統計的な処理により、動きボケを含む画像から、正確に動きボケを除去することが可能となる。
【0214】
以上の処理におけるモデル毎に演算された各画素値に、予め学習により求められた係数を画素値に乗じることにより、動きボケを含む画像から、動きボケが除去された画像を予測するようにしてもよい。
【0215】
図30は、学習により動きボケを含む画像から動きボケを除去する画像処理部1を実現させるための構成を示したものである。
【0216】
図30の学習部61は、教師画像となる静止画と、生徒画像となる静止画像に動きボケが付加された画像(図中のボケ付加画)に基づいて学習処理を実行し、この学習により得られる係数、すなわち、上述したモデル毎の信頼度を画像処理部1に供給する。図31Aは、学習に用いられる教師画像を、図31Bは、学習に用いられる生徒画像の例をそれぞれ示している。図31Aの画像に比べて、図31Bの画像は、動きボケが付加される事により、例えば、飛行機のおもちゃの側面部に描かれている窓などが判別できない程度ににじんだ状態となっているのがわかる。
【0217】
画像処理部1は、入力画像となる動きボケを含む画像の画素に対して、予め学習により求められている予測係数との積和を動きボケが除去された画像の各画素の画素値を求めて、最終的に動きボケを除去した画像(図中のボケ除去画)を出力する。
【0218】
次に、図32を参照して、学習処理により動きボケを含む画像から動きボケを除去する画像処理部1の構成について説明する。
【0219】
領域抽出部71は、画素値演算に必要な画素(画素値の予測に必要な予測タップ)の画素値を抽出して、予測演算部73に供給する。すなわち、例えば、上述したモデルのうち、図33で示すように、黒丸で示す着目画素と、着目画素から数えて左右方向に2番目,3番目、および5番目の画素の合計7画素を抽出する。この画素は、図23における画素値M7で示された画素を着目画素とし、画素値M2,M4,M5,M9,M10,M12で示された画素を抽出したのと同様である。つまり、今の場合、領域抽出部71は、上述の式(11),式(15)のモデルを用いて演算する際に使用した画素と同じ画素を予測タップとして抽出する。
【0220】
予測演算部73は、予め学習により係数メモリ72に記憶された予測係数を読み出し、予測タップとして抽出された画素の画素値に、対応する予測係数との積和を求めることにより、これを画素値として出力する。
【0221】
より詳細には、係数メモリ72は、予測係数を予測演算部73に出力する。予測演算部73は、領域抽出部71より供給される入力画像の所定の画素位置の画素値から抽出された予測タップと、係数メモリ72より供給された予測係数とを用いて、次の式(26)で示される積和演算を実行することにより、予測画像を求める(予測推定する)。
【0222】
【数2】
Figure 0004441846
・・・(26)
式(26)において、q'は、予測画像の画素を表している。ci(iは、1乃至nの整数値)のそれぞれは、予測タップのそれぞれを表している。また、diのそれぞれは、予測係数のそれぞれを表している。
【0223】
このように、予測演算部73は、動きボケを含む画像から、それに対する動きボケを除去した画像を予測推定するので、ここでは、予測画像とも称する。
【0224】
次に、図34のフローチャートを参照して、図32の画像処理部1による動きボケ除去処理について説明する。
【0225】
ステップS21において、入力画像が入力される。
【0226】
ステップS22において、予測演算部73は、係数メモリ72に予め学習により記憶されている予測係数を読み出して図示せぬメモリに一時的に記憶する。
【0227】
ステップS23において、領域抽出部71は、入力画像より着目画素に対する予測タップを抽出して予測演算部73に出力する。すなわち、今の場合、領域抽出部71は、図32で示したように、着目画素に対して、着目画素から数えて左右方向に2番目,3番目、および5番目の画素の合計7画素を抽出して、予測演算部73に出力する。
【0228】
ステップS24において、予測演算部73は、領域抽出部73より供給された画素と、係数メモリ72より読み出した、予め学習されている予測係数との積和を求めて、画素値を予測し、図示せぬメモリに記憶する。
【0229】
ステップS25において、予測演算部73は、入力画像の全ての画素に対して上述の予測処理を実行したか否かを判定し、全ての画素を処理していないと判定した場合、その処理は、ステップS22に戻り、それ以降の処理が繰り返される。すなわち、全ての画素が処理されたと判定されるまで、ステップS22乃至S25の処理が繰り返される。
【0230】
ステップS25において、全ての画素について処理がなされたと判定された場合、ステップS26において、予測演算部73は、処理された画素の全てを動きボケの除去処理画像として出力する。
【0231】
このように、予め学習により予め求められた予測係数を信頼度として上述したモデルごとの画素値を統計的に処理することができるので、動きボケの除去処理を高速で実現させることができる。
【0232】
図35は、図32の画像処理部1が、上述した図28で示された動きボケを含む画像から動きボケを除去した画像である。図35においては、おもちゃの飛行機の画像のうち、図28では動きボケで鮮明に見えていない、側面部の窓が鮮明に見えるようになっており、動きボケが除去されていることがわかる。
【0233】
以上の処理により、予め学習により求められている予測係数を用いて、動きボケの除去処理を実行するようにしたので、動きボケの除去に係る処理速度を向上させることが可能となり、さらに、動きボケ除去処理を統計的な処理により正確なものとすることができる。
【0234】
次に、図36を参照して、上述の係数メモリ72に記憶される予測係数を学習により生成する学習部61について説明する。
【0235】
図36の学習部61の生徒画像生成部91は、入力画像である教師画像から動きボケを付加して生徒画像を生成し、領域抽出部92に出力する。より詳細には、学習部61は、ユーザにより任意に設定される動き量v(動きベクトル)に対応して、教師画像に動きボケを付加して生徒画像を生成している。
【0236】
領域抽出部92は、図32の領域抽出部71と同様のものであり、画素生成の演算に使用する着目画素に応じた複数の画素を予測タップとして、生徒画像から抽出し、正規方程式生成部93に出力する。
【0237】
正規方程式生成部93は、領域抽出部92より入力される生徒画像の予測タップと、教師画像の画素とから正規方程式を生成し、係数決定部94に供給する。
【0238】
係数決定部94は、正規方程式生成部93より正規方程式が供給されてきたとき、その正規方程式より予測係数のそれぞれを演算し、係数メモリ94に記憶させる。
【0239】
正規方程式生成部93と、係数決定部94についてさらに詳しく説明する。
【0240】
上述した式(26)において、学習前は予測係数diのそれぞれが未定係数である。学習は、複数の教師画像(静止画像)の画素を入力することによって行う。教師画像の画素がm個存在し、m個の画素のそれぞれを、qk(kは、1乃至mの整数値)と記述する場合、式(26)から、次の式(27)が設定される。
【0241】
【数3】
Figure 0004441846
・・・(27)
【0242】
即ち、式(27)は、右辺の演算をすることで、所定の動きボケが除去された画素qkを予測推定することができることを表している。なお、式(27)において、イコールではなくニアリーイコールとなっているのは誤差を含むからである。即ち、右辺の演算結果である予測画像(動きボケが除去された画像)の画素qk'が、実際の画素qkと厳密には一致せず、所定の誤差を含む。
【0243】
そこで、式(27)において、誤差の自乗和を最小にする予測係数diが学習により求まれば、その予測係数diは、実際の静止画像の画素qkを予測するのに最適な係数であると言える。
【0244】
従って、例えば、学習により集められたm個(ただし、mは、nより大きい整数)の画素qkを用いて、最小自乗法により最適な予測係数diを一意に決定することができる。
【0245】
即ち、式(27)の右辺の予測係数diを最小自乗法で求める場合の正規方程式は、次の式(28)で表される。
【0246】
【数4】
Figure 0004441846
・・・(28)
【0247】
従って、式(28)で示される正規方程式が生成されれば、その正規方程式を解くことで予測係数diが一意に決定されることになる。
【0248】
具体的には、式(28)で示される正規方程式の各行列のそれぞれを、次の式(29)乃至(31)のように定義すると、正規方程式は、次の式(32)のように表される。
【0249】
【数5】
Figure 0004441846
・・・(29)
【0250】
【数6】
Figure 0004441846
・・・(30)
【0251】
【数7】
Figure 0004441846
・・・(31)
【0252】
【数8】
Figure 0004441846
・・・(32)
【0253】
式(32)で示されるように、行列DMATの各成分は、求めたい予測係数diである。従って、式(32)において、左辺の行列CMATと右辺の行列QMATが決定されれば、行列解法によって行列DMAT(即ち、予測係数di)の算出が可能である。
【0254】
より具体的には、式(29)で示されるように、行列CMATの各成分は、予測タップcikが既知であれば演算可能である。予測タップcikは、領域抽出部92により抽出されるので、正規方程式生成部93は、領域抽出部92より供給されてくる予測タップcikのそれぞれを利用して行列CMATの各成分を演算することができる。
【0255】
また、式(31)で示されるように、行列QMATの各成分は、予測タップcikと静止画像の画素qkが既知であれば演算可能である。予測タップcikは、行列CMATの各成分に含まれるものと同一のものであり、また、静止画像の画素qkは、予測タップcikに含まれる着目画素(生徒画像の画素)に対する教師画像の画素である。従って、正規方程式生成部93は、領域抽出部92より供給された予測タップcikと、教師画像を利用して行列QMATの各成分を演算することができる。
【0256】
このようにして、正規方程式生成部93は、行列CMATと行列QMATの各成分を演算し、その演算結果を係数決定部94に供給する。
【0257】
係数決定部94は、供給された所定のクラスコードに対応する正規方程式に基づいて、上述した式(30)の行列DMATの各成分である予測係数diを演算する。
【0258】
具体的には、上述した式(30)の正規方程式は、次の式(33)のように変形できる。
【0259】
【数9】
Figure 0004441846
・・・(33)
【0260】
式(33)において、左辺の行列DMATの各成分が、求めたい予測係数diである。また、行列CMATと行列QMATのそれぞれの各成分は、正規方程式生成部93より供給されるものである。従って、係数決定部94は、正規方程式生成部92より行列CMATと行列QMATのそれぞれの各成分が供給されてきたとき、式(33)の右辺の行列演算を行うことで行列DMATを演算し、その演算結果(予測係数di)をクラスコードに対応付けて係数メモリ95に記憶させる。
【0261】
次に、図37のフローチャートを参照して、画像処理部1に対する学習部61(図36)が実行する学習処理(図32の画像処理部1が使用する予測係数を学習により生成する処理)について説明する。
【0262】
ステップS41において、教師画像(静止画の画像)が領域抽出部71に入力される。
【0263】
ステップS42において、生徒画像生成部91は、入力された教師画像に動きボケを付加して生徒画像(動きボケが付加された画像)を生成し、領域抽出部92に供給する。
【0264】
ステップS43において、領域抽出部92は、生徒画像の中から予測タップを抽出し、正規方程式生成部93に供給する。なお、ステップS43の処理は、上述したステップS23(図34)の処理と基本的に同様の処理である。
【0265】
ステップS44において、正規方程式生成部93は、領域抽出部92より供給された予測タップ(動きボケが付加された画像の画素)、および、教師画像(静止画像)の所定の画素から、上述した式(29)(即ち、式(30))で示される正規方程式を生成し、生成した正規方程式を係数決定部94に供給する。
【0266】
ステップS45において、係数決定部94は、供給された正規方程式を解いて予測係数を決定し、即ち、上述した式(33)の右辺を演算することで予測係数を算出し、係数メモリ95に記憶させる。
【0267】
その後、ステップS46において、全ての画素について処理が施されたか否かが判定され、全ての画素について処理が施されていないと判定された場合、その処理は、ステップS43に戻る。即ち、全ての画素の処理が終了されるまで、ステップS43乃至S46の処理が繰り返される。
【0268】
そして、ステップS46において、全ての画素について処理が施されたと判定された場合、処理は終了となる。
【0269】
以上の処理により、入力画像の各画素について、学習により動きボケを除去するための予測係数が生成されて係数メモリ95に記憶される。この係数メモリ95に記憶された予測係数が、図32の係数メモリ72に記憶させることにより、図34の動きボケの除去処理が実行可能となる。
【0270】
以上によれば、入力された動きベクトルに応じて、それぞれ時間積分効果を有する複数の画素に現実世界の光信号が射影され取得された第1の画像データ内の第1の画像データの動きボケが除去された第2の画像データの注目画素に対応する複数の画素の画素値を抽出し、抽出した複数の画素の画素値から第1の画像データの注目画素の画素値を予測する予測係数を学習するようにしたので、動きボケの除去に係る処理速度を向上させることが可能となり、さらに、動きボケ除去処理を統計的な処理により実現させることが可能となる。
【0271】
図32の画像処理部1は、入力画像の各画素について、常に同一の予測タップを抽出して動きボケの除去を行うようにしていたが、例えば、上述した図1の画像処理部1の処理の説明において、アクティビティの大小、すなわち、空間相関の有無により、着目画素をクラスコードに分類し、クラスコードに対応して予測タップを変更させることで、動きボケ除去の精度を向上させるようにしてもよい。
【0272】
図38は、着目画素毎にクラスコードを設定し、予測タップを変化させて動きボケ除去処理を実現する画像処理部1を示している。
【0273】
領域抽出部111は、入力画像よりクラスタップを抽出し、パターン検出部112に出力する。尚、ここでは、領域抽出部111は、着目画素に対して、図33を参照して説明した7画素のうち、最も左側と最も右側に存在する画素の、それぞれの上下左右斜方向に隣接する9画素(例えば、図22で参照した、画素値がM2として示されている画素が、図33を参照して説明した7画素のうち、最も左側、または、最も右側に存在する画素とした場合の、画素値がM101,M102.M103,M1,M2,M3,M201,M202,M203として示されている、それぞれ9画素)の合計18画素をクラスタップとして抽出し、パターン検出部112に出力するものとするが、クラスタップは、この18画素に限るものではなく、その他の画素をクラスタップとして抽出するようにしてもよい。
【0274】
パターン検出部112は、上述の9画素について、図33を参照して説明した7画素のうち、最も左側と最も右側に存在する画素のそれぞれについて、アクティビティを求めてクラスコード決定部113に出力する。
【0275】
クラスコード決定部113は、入力されたアクティビティの大小関係によりクラスコードを検出し、検出したクラスコードを領域抽出部115、および、係数メモリ114に出力する。すなわち、今の場合、2個のアクティビティがパターン検出部112より入力されることになるので、例えば、図33で説明した7画素のうち、最も左側に存在する画素のアクティビティが、最も右側に存在する画素のアクティビティよりも小さいとき、クラスコードを1として、最も右側に存在する画素のアクティビティが、最も左側に存在する画素のアクティビティよりも小さいとき、クラスコードを2として、それぞれクラスコードを領域抽出部115、および、係数メモリ114に出力する。
【0276】
領域抽出部115は、クラスコード決定部113より入力されたクラスコードに対応して、入力画像の着目画素に対応する予測タップを抽出する。例えば、クラスコードが1であった場合、図39Aで示されるように、着目画素を含めて、着目画素から左に向かって2番目、3番目、および5番目の画素を予測タップとして抽出し、クラスコードが2であった場合、図39Bで示されるように、着目画素を含めて、着目画素から右に向かって2番目、3番目、および5番目の画素を予測タップとして抽出し、予測演算部116に出力する。
【0277】
尚、予測タップのパターンは、これに限るものではないが、このように予測タップを設定することにより、上述した式(11),式(15)のモデルを用いた演算において、定義した関係が少なくとも成立し易くなる画素を、予測タップとして選択することができるようになる。
【0278】
すなわち、図23を参照して説明したように、画素値がM7で示されている画素のシャッタを開いてから3番目のシャッタ成分であるf9を成分とする、レベルF9求める場合、クラスコードが1となるとき、画素値がM2として示されている画素は、少なくとも、画素値がM12として示されている画素よりも空間相関が高い、すなわち、アクティビティが低いことが示されていることになる。
【0279】
一方、式(11)は、画素値がM2として示されている画素のアクティビティが低い、すなわち、空間相関が高いと仮定することにより成立する式であるから、このとき演算に使用した画素、すなわち、図39Aで示されている、着目画素より左側の画素(図23の画素値がM2,M4,M5で示されている画素)を予測タップとして使用することで、少なくとも着目画素の右側の3画素(図23の画素値がM9,M10,M12で示されている画素)を用いて計算するよりも、式(11)の関係を成立させ易い予測タップであるので、動きボケを除去する予測タップとしては、優れていると考えることができるからである。
【0280】
逆に、クラスコードが2となるとき、画素値がM12として示されている画素は、少なくとも、画素値がM2として示されている画素よりも空間相関が高い、すなわち、アクティビティが低いことが示されていることになる。
【0281】
一方、式(15)は、画素値がM12として示されている画素のアクティビティが低い、すなわち、空間相関が高いと仮定することにより成立する式であるから、このとき演算に使用した画素、すなわち、図39Bで示されている、着目画素より右側の3画素(図23の画素値がM9,M10,M12で示されている画素)を予測タップとして使用することで、少なくとも着目画素の左側の画素(図23の画素値がM2,M4,M5で示されている画素)を用いて計算するよりも、式(15)の関係を成立させ易い予測タップであるので、動きボケを除去する予測タップとしては、優れていると考えることができるからである。
【0282】
係数メモリ114は、クラスコードに応じて、予め後述する図42の学習部61が学習により求めた予測係数を記憶しており、クラスコード決定部113より入力されたクラスコードに対応する予測係数を予測演算部116に供給する。
【0283】
予測演算部116は、図32の画像処理部1の予測演算部73と同様なものであり、係数メモリ114より供給される係数と領域抽出部115より供給される予測タップの画素値との積和を求めて、これを動きボケが除去された画素として生成し、画面の全ての画素について処理がなされたところで処理画像として出力する。
【0284】
次に、図40のフローチャートを参照して、図38の画像処理部1による動きボケ除去処理について説明する。尚、図40のステップSS67乃至S69の処理は、図34のフローチャートを参照して説明した処理と同様であるので,その説明は省略する。
【0285】
ステップS61において、領域抽出部111,115のそれぞれに入力画像が入力される。
【0286】
ステップS62において、領域抽出部111は、入力画像の中から、着目画素、および、予め設定された着目画素からの相対位置(1以上の位置)のそれぞれに位置する画素を、クラスタップとして抽出し、パターン検出部112に供給する。今の場合、領域抽出部111は、図33で示したタップのうち最も右側と、最も左側の画素のアクティビティの検出に必要な画素をクラスタップとして抽出する。
【0287】
ステップS63において、パターン検出部112は、供給されたクラスタップのパターンを検出し、クラスコード決定部113に供給する。より詳細には、パターン検出部112は、図33で示したタップのうち最も右側と、最も左側の画素のアクティビティを求めて、これをパターンとしてクラスコード決定部113に出力する。
【0288】
ステップS64において、クラスコード決定部113は、予め設定されている複数のクラスコードの中から、供給されたクラスタップのパターンに適合するクラスコードを決定し、係数メモリ114と領域抽出部115のそれぞれに供給する。すなわち、今の場合、クラスコード決定部113は、入力されたアクティビティのうち、図33のタップの最も右側の画素のアクティビティと、最も左側の画素のアクティビティのいずれが小さいかによりクラスコードを判定し、例えば、最も左側の画素のアクティビティがより小さいときはクラスコードとして1を、最も右側の画素のアクティビティがより小さいときはクラスコードとして2を係数メモリ114と領域抽出部115のそれぞれに供給する。
【0289】
ステップS65において、係数メモリ114は、供給されたクラスコードに基づいて、予め学習処理により決定された複数の予測係数(群)の中から、これから使用する予測係数(群)を読み出し、予測演算部116に供給する。
【0290】
なお、学習処理については、図43のフローチャートを参照して後述する。
【0291】
ステップS66において、領域抽出部115は、供給されたクラスコードに対応して、入力画像の中から、着目画素、および、予め設定された着目画素からの相対位置(1以上の位置であって、クラスタップの位置とは独立して設定された位置。ただし、クラスタップの位置と同一の位置でもよい)のそれぞれに位置する画素を、予測タップとして抽出し、予測演算部116に供給する。
【0292】
すなわち、今の場合、領域抽出部115は、クラスコード決定部113からクラスコードとして1が入力されたとき、図39Aで示されるように、着目画素に対して左側に2番目、3番目、および5番目の画素をクラスタップとして抽出し、クラスコードとして2が入力されたとき、図39Bで示されるように、着目画素に対して右側に2番目、3番目、および5番目の画素を予測タップとして抽出する。
【0293】
図41は、図28で示された動きボケを含む画像を、図38の画像処理部1で動きボケ除去したものである。図41の処理結果では、動きボケにより識別できなかった、おもちゃの飛行機の側面部に描かれた窓が鮮明に表示され、さらに、クラスコードにより予測タップを分類しなかった図35の処理結果と比べると、よりコントラストがはっきりとした画像となっていることがわかる。
【0294】
以上の処理により、アクティビティにより適正な予測タップを用いて、動きボケ除去処理を実行することができるので、より精度の高い動きボケの除去が可能となる。
【0295】
次に、図42を参照して、図38の画像処理部1の係数メモリ114に記憶される予測係数を予め学習により求める学習部61の構成について説明する。
【0296】
生徒画像生成部121、係数決定部121、および、係数メモリ128は、図36の学習部61における生徒画像生成部91、係数決定部94、および、係数メモリ95と基本的に同一のものであるので、その説明は省略する。
【0297】
また、領域抽出部122,125、パターン検出部123、および、クラスコード決定部124は、図38の画像処理部1における領域抽出部111,115、パターン検出部113、および、クラスコード決定部114と同一のものであるので、その説明は省略する。
【0298】
正規方程式生成部126は、基本的に図36の学習部61における正規方程式生成部93と同様のものであるが、クラスコード決定部124より入力されるクラスコード毎に正規方程式を生成し、クラスコード毎に係数決定部127に出力する。従って、係数決定部127は、クラスコード毎に係数を決定し、クラスコード毎に決定した係数を係数メモリ128に記憶させる。
【0299】
次に、図43のフローチャートを参照して、図42の学習部61による学習処理について説明する。
【0300】
尚、図43のフローチャートにおけるステップS81,S82、およびS89の処理については、図37のフローチャートを参照して説明した処理と同様であるので、その説明は省略する。
【0301】
ステップS83において、領域抽出部122は、供給された生徒画像からクラスタップを抽出してパターン検出部123に出力する。なお、ステップS83の処理は、上述したステップS62(図40)の処理と基本的に同様の処理である。すなわち、今の場合、領域抽出部122は、図33で示したタップのうち最も右側と、最も左側の画素のアクティビティの検出に必要な画素をクラスタップとして抽出する。
【0302】
ステップS84において、パターン検出部123は、供給されたクラスタップよりクラスコードを決定するためのパターンを検出し、クラスコード決定部124に供給する。なお、ステップS84の処理は、上述したステップS63(図40)の処理と基本的に同様の処理である。すなわち、パターン検出部123は、図33で示したタップのうち最も右側と、最も左側の画素のアクティビティを求めて、これをパターンとしてクラスコード決定部113に出力する。
【0303】
ステップS85において、クラスコード決定部124は、供給されたクラスタップのパターンに基づいてクラスコードを決定し、領域抽出部125と正規方程式生成部126のそれぞれに供給する。なお、ステップS85の処理は、上述したステップS64(図40)の処理と基本的に同様の処理である。すなわち、今の場合、クラスコード決定部124は、入力されたアクティビティのうち、図33のタップの最も右側の画素のアクティビティと、最も左側の画素のアクティビティのいずれが小さいかによりクラスコードを判定し、例えば、最も左側の画素のアクティビティがより小さいときはクラスコードとして1を、最も右側の画素のアクティビティがより小さいときはクラスコードを2として正規方程式生成部126と領域抽出部125のそれぞれに供給する。
【0304】
ステップS86において、領域抽出部125は、供給されたクラスコードに対応して、生徒画像の中から予測タップを抽出し、正規方程式生成部126に供給する。なお、ステップS86の処理は、上述したステップS66(図40)の処理と基本的に同様の処理である。すなわち、今の場合、領域抽出部125は、クラスコード決定部124からクラスコードとして1が入力されたとき、図39Aで示されるように、着目画素に対して左側に2番目、3番目、および5番目の画素をクラスタップとして抽出し、クラスコードとして2が入力されたとき、図39Bで示されるように、着目画素に対して右側に2番目、3番目、および5番目の画素を予測タップとして抽出する。
【0305】
ステップS87において、正規方程式生成部126は、領域抽出部125より供給された予測タップ、および、教師画像の所定の画素から、上述した式(28)(即ち、式(30))で示される正規方程式を生成し、生成した正規方程式と、クラスコード決定部124より供給されたクラスコードを関連付けて係数決定部127に供給する。
【0306】
ステップS88において、係数決定部127は、供給された正規方程式を解いて予測係数を決定し、即ち、上述した式(32)の右辺を演算することで予測係数を算出し、供給されたクラスコードに対応付けて係数メモリ128に記憶させる。
【0307】
その後、ステップS89において、全ての画素について処理が施されたか否かが判定され、全ての画素について処理が施されていないと判定された場合、その処理は、ステップS83に戻る。即ち、全ての画素の処理が終了されるまで、ステップS83乃至S99の処理が繰り返される。
【0308】
そして、ステップS89において、全ての画素について処理が施されたと判定された場合、処理は終了となる。
【0309】
尚、予測タップ、およひ、クラスタップの構成については、以上の例に限るものではなく、その他の画素を使用するようにしてもよい。また、クラスコードの数についても、以上の例については、2クラスの場合について説明してきたが、それ以上のクラスに分類するようにしてもよい。
【0310】
例えば、入力されたアクティビティのうち、図33のタップの最も右側の画素のアクティビティと、最も左側の画素のアクティビティのいずれが小さいかによりクラスコードを判定し、例えば、最も左側の画素のアクティビティがより小さいときはクラスコードとして1が、最も右側の画素のアクティビティがより小さいときはクラスコードとして2が判定されていたが、さらに、両者のアクティビティを比較し、小さかったアクティビティが所定の閾値よりも大きい場合は、クラスコードとして3が判定されるようにして、クラスコードに応じて、例えば、図44A,B,Cで示されるような予測タップが選択されるようにしてもよい。
【0311】
図44A,Bは、図39A,Bと同様の予測タップであり、図44Cのクラスタップは、それらを両方含めた予測タップである。
【0312】
すなわち、大小比較の結果、小さい方のアクティビティが所定の閾値よりも大きいということは、いずれも空間相関のない画素であったことになり、事実上、上述の式(11),式(15)のいずれにおいても近似が成立しない可能性が高い。そこで、このような場合は、図44Cで示したように、予測タップを多めにすることにより、両者の平均となるような構成にする。
【0313】
図44A,B,Cで示したような、3クラスのクラスコードに応じた予測タップを用いて、上述の図28の動きボケを含む画像から動きボケを除去する処理を施した画像が、図45に示されている。
【0314】
図28の画像に見られるおもちゃの飛行機の側面部に描かれている窓の1つ1つを認識することができないが、図45における処理結果は、図41の処理結果と比べても、より鮮明に動きボケが除去されて、窓の1つ1つを認識することができる。
【0315】
また、図46は、図45の処理において、図28の画像の各画素をクラスコード毎に色分けした画像を示す図である。ここで、黒色の領域は、クラスコード1に分類された領域を示し、灰色の領域は、クラスコード2の領域を示し、白は、クラスコード3の領域を示している。
【0316】
すなわち、クラスコード3の領域は、側面部の窓が描かれた部分に分布しており、図41の処理結果との比較から、クラスコード3を設定し、図44Cで示されている予測タップを使用することで、窓の描かれている領域の動きボケ除去が、より高い精度で行われていることがわかる。
【0317】
以上の処理により、入力画像の各画素について、クラスコードによるクラス分類に基づいた学習により動きボケを除去するための予測係数が生成されて係数メモリ95に記憶される。この係数メモリ95に記憶された予測係数が、図42の係数メモリ128に記憶されることにより、図43の動きボケの除去処理が実行可能となる。
【0318】
結果として、クラス分類により適正な予測タップを使用した正確な動きボケの除去処理を実現することができ、動きボケの除去に係る処理速度を向上させることが可能となり、さらに、動きボケ除去処理を統計的な処理により実現させることが可能となる。
【0319】
なお、センサ2は、固体撮像素子である、例えば、BBD(Bucket Brigade Device)、CID(Charge Injection Device)、またはCPD(Charge Priming Device)などのセンサでもよい。
【0320】
上述した一連の処理は、ハードウェアにより実行させることもできるが、ソフトウェアにより実行させることもできる。一連の処理をソフトウェアにより実行させる場合には、そのソフトウェアを構成するプログラムが、専用のハードウェアに組み込まれているコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行させることが可能な、例えば汎用のパーソナルコンピュータなどに記録媒体からインストールされる。
【0321】
図47は、上述の図1,図32,図38の画像処理部1、または、図36,図42の学習部61をソフトウェアにより実現する場合のパーソナルコンピュータの一実施の形態の構成を示している。パーソナルコンピュータのCPU201は、パーソナルコンピュータの動作の全体を制御する。また、CPU201は、バス204および入出力インタフェース205を介してユーザからキーボードやマウスなどからなる入力部206から指令が入力されると、それに対応してROM(Read Only Memory)202に格納されているプログラムを実行する。あるいはまた、CPU201は、ドライブ210に接続された磁気ディスク211、光ディスク212、光磁気ディスク213、または半導体メモリ214から読み出され、記憶部208にインストールされたプログラムを、RAM(Random Access Memory)203にロードして実行し、出力部207が実行結果を出力する。さらに、CPU201は、通信部209を制御して、外部と通信し、データの授受を実行する。
【0322】
プログラムが記録されている記録媒体は、図47に示すように、コンピュータとは別に、ユーザにプログラムを提供するために配布される、プログラムが記録されている磁気ディスク211(フレキシブルディスクを含む)、光ディスク212(CDROM(Compact Disc-Read Only Memory),DVD(Digital Versatile Disc)を含む)、光磁気ディスク213(MD(Mini-Disc)を含む)、もしくは半導体メモリ214などよりなるパッケージメディアにより構成されるだけでなく、コンピュータに予め組み込まれた状態でユーザに提供される、プログラムが記録されているROM202や、記憶部208に含まれるハードディスクなどで構成される。
【0323】
尚、本明細書において、記録媒体に記録されるプログラムを記述するステップは、記載された順序に沿って時系列的に行われる処理は、もちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理を含むものである。
【0324】
【発明の効果】
以上のように、本発明によれば、正確で、精度の高い処理結果を得ることができるようになる。
【0325】
また、本発明によれば、より正確で、より精度の高い動きボケの除去処理結果を得ることができるようになる。
【図面の簡単な説明】
【図1】本発明を適用した画像処理部の一実施の形態の構成を示すブロック図である。
【図2】センサによる撮像を説明する図である。
【図3】画素の配置を説明する図である。
【図4】検出素子の動作を説明する図である。
【図5】動いている前景に対応するオブジェクトと、静止している背景に対応するオブジェクトとを撮像して得られる画像を説明する図である。
【図6】背景領域、前景領域、混合領域、カバードバックグラウンド領域、およびアンカバードバックグラウンド領域を説明する図である。
【図7】静止している前景に対応するオブジェクトおよび静止している背景に対応するオブジェクトを撮像した画像における、隣接して1列に並んでいる画素の画素値を時間方向に展開したモデル図である。
【図8】画素値を時間方向に展開し、シャッタ時間に対応する期間を分割したモデル図である。
【図9】画素値を時間方向に展開し、シャッタ時間に対応する期間を分割したモデル図である。
【図10】画素値を時間方向に展開し、シャッタ時間に対応する期間を分割したモデル図である。
【図11】前景領域、背景領域、および混合領域の画素を抽出した例を示す図である。
【図12】画素と画素値を時間方向に展開したモデルとの対応を示す図である。
【図13】画素値を時間方向に展開し、シャッタ時間に対応する期間を分割したモデル図である。
【図14】画素値を時間方向に展開し、シャッタ時間に対応する期間を分割したモデル図である。
【図15】画素値を時間方向に展開し、シャッタ時間に対応する期間を分割したモデル図である。
【図16】画素値を時間方向に展開し、シャッタ時間に対応する期間を分割したモデル図である。
【図17】画素値を時間方向に展開し、シャッタ時間に対応する期間を分割したモデル図である。
【図18】センサの検出素子に入射される光のレベルを示す図である。
【図19】図18の光のレベルに対応する画素値を示す図である。
【図20】動きボケの生じた画像の画素値の構成を示す図である。
【図21】動きボケの除去の原理を示す図である。
【図22】アクティビティの求め方を説明する図である。
【図23】動きボケの除去の原理を示す図である。
【図24】図1の画像処理部のモデル信頼度演算部の構成を示すブロック図である。
【図25】アクティビティのその他の求め方を説明する図である。
【図26】図1の画像処理部の画素生成部の構成を示すブロック図である。
【図27】図1の画像処理部による動きボケ除去処理を説明するフローチャートである。
【図28】動きボケを含む画像を示す図である。
【図29】図28の動きボケを含む画像を、図1の画像処理部により動きボケ除去した画像を示す図である。
【図30】学習の原理を説明する図である。
【図31】生徒画像と教師画像の例を示す図である。
【図32】予め学習により得られた予測係数を用いて動きボケを除去する画像処理部を示す図である。
【図33】予測タップの例を示す図である。
【図34】図1の画像処理部による動きボケ除去処理を説明するフローチャートである。
【図35】図28の動きボケを含む画像を、図32の画像処理部により動きボケ除去した画像を示す図である。
【図36】図32の画像処理部の処理に利用される予測係数を学習により求める学習部を示す図である。
【図37】図36の学習部による学習処理を説明するフローチャートである。
【図38】予めクラスコードを分類して学習により得られた予測係数を用いて動きボケを除去する画像処理部を示す図である。
【図39】クラスコードに応じた予測タップの例を示す図である。
【図40】図38の画像処理部による動きボケ除去処理を説明するフローチャートである。
【図41】図28の動きボケを含む画像を、図38の画像処理部により動きボケ除去した画像を示す図である。
【図42】図38の画像処理部の処理に利用される予測係数を学習により求める学習部を示す図である。
【図43】図42の学習部による学習処理を説明するフローチャートである。
【図44】その他の予測タップの例を示す図である。
【図45】図28の動きボケを含む画像を、図38の画像処理部により、図44の予測タップを用いて動きボケ除去した画像を示す図である。
【図46】図28の動きボケを含む画像を、図38の画像処理部により、図44の予測タップを用いて動きボケ除去する際、分類されたクラスコードの分布を示す画像を示す図である。
【図47】記録媒体を説明する図である。
【符号の説明】
1 画像処理部, 11 動きベクトル検出部, 12,12−1乃至12−N 画素値演算部, 13 モデル信頼度演算部, 14 画素生成部, 21アクティビティ検出部21,21−1乃至21−N, 22 信頼度正規化部, 31 信頼度付加部, 32 画素決定部, 41,41−1乃至41−N乗算器, 42 信頼度分配器, 71 領域抽出部, 72 係数メモリ,73 予測演算部, 91 生徒画像生成部, 92 領域抽出部, 93 正規方程式生成部, 94 係数決定部, 95 ブロック抽出部, 111 領域抽出部, 112 パターン検出部, 113 クラスコード決定部, 114 係数メモリ, 115 領域抽出部, 116 予測演算部, 121 生徒画像生成部, 122 領域抽出部, 123 パターン決定部, 124クラスコード決定部, 125 領域抽出部, 126 正規方程式生成部,127 係数決定部, 128 係数決定部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus and method. ,Record RECORDING MEDIUM, AND PROGRAM, IMAGE PROCESSING APPARATUS AND METHOD FOR REMOVING MOTION BLUE IN ACCORDING TO ACTIVITY ,Record The present invention relates to recording media and programs.
[0002]
[Prior art]
A technique for removing motion blur that occurs when a moving image is captured is becoming more popular.
[0003]
When a moving object is imaged using a detection element that generates a pixel value using the integration effect of incident light, such as a CCD (Charge Coupled Device), it enters the detection element according to the movement of the object. Motion blur is a phenomenon in which the generated pixel value blurs due to the continuous change of light that moves in conjunction with the movement of the object.
[0004]
The removal of motion blur in an image is, for example, by detecting a flat portion in the image, that is, a region where the difference in pixel value between adjacent pixels is small, and the pixel values of each pixel in the region are the same. Based on the premise, the pixel value of each pixel is temporally divided into a plurality of elements, the pixel value corresponding to each element is obtained by simultaneous equations, and the element corresponding to the image of the object that is the subject of each element is obtained. In some cases, an image from which motion blur has been removed is generated by extracting and generating pixel values (see, for example, Patent Document 1).
[0005]
[Patent Document 1]
JP 2001-111438 A
[0006]
[Problems to be solved by the invention]
However, when a simultaneous equation is generated by the above method and each element obtained by dividing the pixel value is obtained, the solution of the simultaneous equation is obtained in order from the element at the end of the flat portion. As a result, the error from the part is propagated by being accumulated as it goes to the central part, and as a result, there is a problem that it is impossible to accurately obtain the element of the pixel whose value is finally present in the central part of the flat part. there were.
[0007]
The present invention has been made in view of such a situation, preparing a plurality of pixels to be used for obtaining an element used for generating a pixel, obtaining a weight based on an activity for each pixel, An element is obtained by taking the product sum with the value of the element obtained by each pixel value, and an image from which motion blur is removed can be generated more accurately.
[0008]
[Means for Solving the Problems]
The image processing apparatus of the present invention So Real-world optical signals are projected onto multiple pixels, each with a time integration effect. Component of incident light incident on each pixel for each divided time obtained by equally dividing the shutter time according to the amount of motion of the input motion vector when the first image data is acquired by exposure with a predetermined shutter time. Is a shutter component, Pixel of interest in second image data from which motion blur of first image data has been removed A pixel whose shutter component corresponding to a part of the component is obtained in the central division time in the shutter time is a corresponding pixel of the first image data corresponding to the target pixel, and the corresponding pixel is set in a predetermined first direction. Among the arranged pixels, a pixel value of a pixel obtained by a shutter component corresponding to a part of the component of the pixel of interest in the first division time in the shutter time is extracted as a first calculation target pixel value; The pixel value of the pixel adjacent in the first direction to the pixel from which the first calculation target pixel value is extracted is extracted as the second calculation target pixel value, and the second calculation target pixel value is obtained. Among the pixels arranged in the first direction with respect to the pixel from which the pixel is extracted, the shutter component obtained at each division time of the pixel from which the pixel value of the second calculation target is extracted, and the first calculation target Each division time of the pixel from which the pixel value is extracted First pixel extraction means for extracting a pixel value of a pixel from which a shutter component that does not overlap with the obtained shutter component is obtained as a third calculation target pixel value; and a first pixel extracted by the first pixel extraction means A value obtained by adding the amount of motion vector motion to the value obtained by subtracting the second calculation target pixel value from the calculation target pixel value, and adding the third calculation target pixel value, Pixel value of the pixel of interest in the second image data For seeking First pixel value As First computing means for computing; Among the pixels arranged in the second direction opposite to the first direction with respect to the corresponding pixel, a shutter component corresponding to a part of the component of the target pixel is obtained at the last division time in the shutter time. The pixel value of the obtained pixel is extracted as the pixel value of the fourth calculation target, and the pixel value of the pixel adjacent in the second direction to the pixel from which the fourth calculation target pixel value is extracted is 5 is extracted as the pixel value of the calculation target, and the pixel value of the fifth calculation target is extracted from the pixels arranged in the second direction with respect to the pixel from which the pixel value of the fifth calculation target is extracted. The pixel value of the pixel obtained from the shutter component that is obtained at each division time of the pixel and that does not overlap with the shutter component obtained at each division time of the pixel from which the fourth pixel value to be calculated is extracted is 2nd pixel extraction which extracts as a pixel value of 6 calculation object The motion vector motion amount is added to a value obtained by subtracting the fifth calculation target pixel value from the fourth calculation target pixel value extracted by the second calculation unit, and the sixth calculation target The value obtained by adding the pixel values is Pixel value of the pixel of interest in the second image data For seeking Second pixel value As A second computing means for computing; Pixel from which the pixel value of the third calculation target is extracted and the pixel A first activity computed from a plurality of pixels adjacent to Pixel from which the pixel value of the sixth calculation target is extracted and the pixel Pixel generating means for weighting and adding the first pixel value and the second pixel value in accordance with a second activity calculated from a plurality of pixels adjacent to the pixel.
[0011]
The image processing method of the present invention includes: So Real-world optical signals are projected onto multiple pixels, each with a time integration effect. Component of incident light incident on each pixel for each divided time obtained by equally dividing the shutter time according to the amount of motion of the input motion vector when the first image data is acquired by exposure with a predetermined shutter time. Is a shutter component, Pixel of interest in second image data from which motion blur of first image data has been removed A pixel whose shutter component corresponding to a part of the component is obtained in the central division time in the shutter time is a corresponding pixel of the first image data corresponding to the target pixel, and the corresponding pixel is set in a predetermined first direction. Among the arranged pixels, a pixel value of a pixel obtained by a shutter component corresponding to a part of the component of the pixel of interest in the first division time in the shutter time is extracted as a first calculation target pixel value; The pixel value of the pixel adjacent in the first direction to the pixel from which the first calculation target pixel value is extracted is extracted as the second calculation target pixel value, and the second calculation target pixel value is obtained. Among the pixels arranged in the first direction with respect to the pixel from which the pixel is extracted, the shutter component obtained at each division time of the pixel from which the pixel value of the second calculation target is extracted, and the first calculation target Each division time of the pixel from which the pixel value is extracted A first pixel extraction step for extracting a pixel value of a pixel from which a shutter component that does not overlap with the obtained shutter component is obtained as a third calculation target pixel value, and a first pixel extraction step that is extracted by the processing of the first pixel extraction step. The value obtained by adding the motion amount of the motion vector to the value obtained by subtracting the pixel value of the second calculation target from the pixel value of the first calculation target, and adding the pixel value of the third calculation target, Pixel value of the pixel of interest in the second image data For seeking First pixel value As A first calculation step for calculating; Among the pixels arranged in the second direction opposite to the first direction with respect to the corresponding pixel, a shutter component corresponding to a part of the component of the target pixel is obtained at the last division time in the shutter time. The pixel value of the obtained pixel is extracted as the pixel value of the fourth calculation target, and the pixel value of the pixel adjacent in the second direction to the pixel from which the fourth calculation target pixel value is extracted is 5 is extracted as the pixel value of the calculation target, and the pixel value of the fifth calculation target is extracted from the pixels arranged in the second direction with respect to the pixel from which the pixel value of the fifth calculation target is extracted. The pixel value of the pixel obtained from the shutter component that is obtained at each division time of the pixel and that does not overlap with the shutter component obtained at each division time of the pixel from which the fourth pixel value to be calculated is extracted is 2nd pixel extraction which extracts as a pixel value of 6 calculation object A motion vector motion amount is added to a value obtained by subtracting the fifth calculation target pixel value from the fourth calculation target pixel value extracted in the step and the second pixel extraction step, and a sixth calculation is performed. The value obtained by adding the target pixel values is Pixel value of the pixel of interest in the second image data For seeking Second pixel value As A second calculation step for calculating; Pixel from which the pixel value of the third calculation target is extracted and the pixel A first activity computed from a plurality of pixels adjacent to Pixel from which the pixel value of the sixth calculation target is extracted and the pixel And a pixel generation step of weighting and adding the first pixel value and the second pixel value in accordance with a second activity calculated from a plurality of pixels adjacent to the pixel.
[0012]
The program of the recording medium of the present invention is So Real-world optical signals are projected onto multiple pixels, each with a time integration effect. Component of incident light incident on each pixel for each divided time obtained by equally dividing the shutter time according to the amount of motion of the input motion vector when the first image data is acquired by exposure with a predetermined shutter time. Is a shutter component, Pixel of interest in second image data from which motion blur of first image data has been removed A pixel whose shutter component corresponding to a part of the component is obtained in the central division time in the shutter time is a corresponding pixel of the first image data corresponding to the target pixel, and the corresponding pixel is set in a predetermined first direction. Among the arranged pixels, a pixel value of a pixel obtained by a shutter component corresponding to a part of the component of the pixel of interest in the first division time in the shutter time is extracted as a first calculation target pixel value; The pixel value of the pixel adjacent in the first direction to the pixel from which the first calculation target pixel value is extracted is extracted as the second calculation target pixel value, and the second calculation target pixel value is obtained. Among the pixels arranged in the first direction with respect to the pixel from which the pixel is extracted, the shutter component obtained at each division time of the pixel from which the pixel value of the second calculation target is extracted, and the first calculation target Each division time of the pixel from which the pixel value is extracted A first pixel extraction step for extracting a pixel value of a pixel from which a shutter component that does not overlap with the obtained shutter component is obtained as a third calculation target pixel value, and a first pixel extraction step that is extracted by the processing of the first pixel extraction step. The value obtained by adding the motion amount of the motion vector to the value obtained by subtracting the pixel value of the second calculation target from the pixel value of the first calculation target, and adding the pixel value of the third calculation target, Pixel value of the pixel of interest in the second image data For seeking First pixel value As A first calculation step for calculating; Among the pixels arranged in the second direction opposite to the first direction with respect to the corresponding pixel, a shutter component corresponding to a part of the component of the target pixel is obtained at the last division time in the shutter time. The pixel value of the obtained pixel is extracted as the pixel value of the fourth calculation target, and the pixel value of the pixel adjacent in the second direction to the pixel from which the fourth calculation target pixel value is extracted is 5 is extracted as the pixel value of the calculation target, and the pixel value of the fifth calculation target is extracted from the pixels arranged in the second direction with respect to the pixel from which the pixel value of the fifth calculation target is extracted. The pixel value of the pixel obtained from the shutter component that is obtained at each division time of the pixel and that does not overlap with the shutter component obtained at each division time of the pixel from which the fourth pixel value to be calculated is extracted is 2nd pixel extraction which extracts as a pixel value of 6 calculation object A motion vector motion amount is added to a value obtained by subtracting the fifth calculation target pixel value from the fourth calculation target pixel value extracted in the step and the second pixel extraction step, and a sixth calculation is performed. The value obtained by adding the target pixel values is Pixel value of the pixel of interest in the second image data For seeking Second pixel value As A second calculation step for calculating; Pixel from which the pixel value of the third calculation target is extracted and the pixel A first activity computed from a plurality of pixels adjacent to Pixel from which the pixel value of the sixth calculation target is extracted and the pixel And a pixel generation step of weighting and adding the first pixel value and the second pixel value in accordance with a second activity calculated from a plurality of pixels adjacent to the pixel.
[0013]
The program of the present invention So Real-world optical signals are projected onto multiple pixels, each with a time integration effect. Component of incident light incident on each pixel for each divided time obtained by equally dividing the shutter time according to the amount of motion of the input motion vector when the first image data is acquired by exposure with a predetermined shutter time. Is a shutter component, Pixel of interest in second image data from which motion blur of first image data has been removed A pixel whose shutter component corresponding to a part of the component is obtained in the central division time in the shutter time is a corresponding pixel of the first image data corresponding to the target pixel, and the corresponding pixel is set in a predetermined first direction. Among the arranged pixels, a pixel value of a pixel obtained by a shutter component corresponding to a part of the component of the pixel of interest in the first division time in the shutter time is extracted as a first calculation target pixel value; The pixel value of the pixel adjacent in the first direction to the pixel from which the first calculation target pixel value is extracted is extracted as the second calculation target pixel value, and the second calculation target pixel value is obtained. Among the pixels arranged in the first direction with respect to the pixel from which the pixel is extracted, the shutter component obtained at each division time of the pixel from which the pixel value of the second calculation target is extracted, and the first calculation target Each division time of the pixel from which the pixel value is extracted A first pixel extraction step for extracting a pixel value of a pixel from which a shutter component that does not overlap with the obtained shutter component is obtained as a third calculation target pixel value, and a first pixel extraction step that is extracted by the processing of the first pixel extraction step. The value obtained by adding the motion amount of the motion vector to the value obtained by subtracting the pixel value of the second calculation target from the pixel value of the first calculation target, and adding the pixel value of the third calculation target, Pixel value of the pixel of interest in the second image data For seeking First pixel value As A first calculation step for calculating; Among the pixels arranged in the second direction opposite to the first direction with respect to the corresponding pixel, a shutter component corresponding to a part of the component of the target pixel is obtained at the last division time in the shutter time. The pixel value of the obtained pixel is extracted as the pixel value of the fourth calculation target, and the pixel value of the pixel adjacent in the second direction to the pixel from which the fourth calculation target pixel value is extracted is 5 is extracted as the pixel value of the calculation target, and the pixel value of the fifth calculation target is extracted from the pixels arranged in the second direction with respect to the pixel from which the pixel value of the fifth calculation target is extracted. The pixel value of the pixel obtained from the shutter component that is obtained at each division time of the pixel and that does not overlap with the shutter component obtained at each division time of the pixel from which the fourth pixel value to be calculated is extracted is 2nd pixel extraction which extracts as a pixel value of 6 calculation object A motion vector motion amount is added to a value obtained by subtracting the fifth calculation target pixel value from the fourth calculation target pixel value extracted in the step and the second pixel extraction step, and a sixth calculation is performed. The value obtained by adding the target pixel values is Pixel value of the pixel of interest in the second image data For seeking Second pixel value As A second calculation step for calculating; Pixel from which the pixel value of the third calculation target is extracted and the pixel A first activity computed from a plurality of pixels adjacent to Pixel from which the pixel value of the sixth calculation target is extracted and the pixel In accordance with a second activity calculated from a plurality of pixels adjacent to, the computer is caused to execute processing including a pixel generation step of weighting and adding the first pixel value and the second pixel value. It is characterized by that.
[0019]
In the image processing apparatus and method and the program of the present invention, So Real-world optical signals are projected onto multiple pixels, each with a time integration effect. Component of incident light incident on each pixel for each divided time obtained by equally dividing the shutter time according to the amount of motion of the input motion vector when the first image data is acquired by exposure with a predetermined shutter time. Is a shutter component, Pixel of interest in second image data from which motion blur of first image data has been removed A pixel whose shutter component corresponding to a part of the component is obtained in the central division time in the shutter time is a corresponding pixel of the first image data corresponding to the target pixel, and the corresponding pixel is set in a predetermined first direction. Among the arranged pixels, a pixel value of a pixel obtained from a shutter component corresponding to a part of the component of the target pixel in the first division time in the shutter time is extracted as a first calculation target pixel value, The pixel value of the pixel adjacent in the first direction to the pixel from which the first calculation target pixel value is extracted is extracted as the second calculation target pixel value, and the second calculation target pixel value is obtained. Among the pixels arranged in the first direction with respect to the pixel from which the pixel is extracted, the shutter component obtained at each division time of the pixel from which the pixel value of the second calculation target is extracted, and the first calculation target Each pixel segment from which the pixel value of Pixel values of the pixels shutter components are obtained which does not overlap the shutter component obtained between is extracted as the pixel value of the third operand. Then, the motion vector motion amount is added to a value obtained by subtracting the second calculation target pixel value from the extracted first calculation target pixel value, and a value obtained by adding the third calculation target pixel value is obtained. , Pixel value of the pixel of interest in the second image data For seeking First pixel value Is calculated as Of the pixels arranged in the second direction opposite to the first direction with respect to the corresponding pixel, the shutter component corresponding to a part of the component of the target pixel is the last division time in the shutter time. Is extracted as the pixel value of the fourth calculation target, and the pixel value of the pixel adjacent in the second direction with respect to the pixel from which the fourth calculation target pixel value is extracted is The pixel value of the fifth calculation target among the pixels extracted as the fifth calculation target pixel value and arranged in the second direction with respect to the pixel from which the fifth calculation target pixel value is extracted The pixel value of the pixel from which the shutter component obtained at each division time of the pixel from which the pixel is extracted and which does not overlap with the shutter component obtained at each division time of the pixel from which the fourth pixel value to be calculated is extracted is obtained. , Extracted as the pixel value of the sixth calculation target. Then, the motion vector motion amount is added to a value obtained by subtracting the fifth calculation target pixel value from the extracted fourth calculation target pixel value, and the sixth calculation target pixel value is added. But, Pixel of interest in second image data For seeking Second pixel value Is calculated as Further, the pixel from which the third calculation target pixel value is extracted and the pixel A first activity computed from a plurality of pixels adjacent to A pixel from which the pixel value of the sixth calculation target is extracted; The first pixel value and the second pixel value are weighted and added in accordance with a second activity calculated from a plurality of pixels adjacent to.
[0021]
The image processing device and the learning device of the present invention may be independent devices or blocks that perform image processing.
[0022]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block diagram showing a configuration of an embodiment of an image processing unit 1 of the present invention.
[0023]
The motion vector detection unit 11 detects a motion vector from the input image, and outputs a motion amount to the pixel value calculation units 12-1 to 12-N based on information on the motion vector.
[0024]
Here, motion blur and motion amount will be described together with the input image.
[0025]
FIG. 2 is a diagram for explaining imaging by the sensor 2. The sensor 2 is composed of, for example, a CCD video camera provided with a CCD (Charge-Coupled Device) area sensor which is a solid state detection element. The object corresponding to the foreground in the real world moves horizontally between the object corresponding to the background and the sensor in the real world, for example, from the left side to the right side in the drawing.
[0026]
The sensor 2 images an object corresponding to the foreground together with an object corresponding to the background. The sensor 2 outputs the captured image in units of one frame. For example, the sensor 2 outputs an image composed of 30 frames per second. The exposure time of the sensor 2 can be 1/30 second. The exposure time is a period from when the sensor 2 starts converting the input light into electric charge until the conversion of the input light into electric charge ends. Hereinafter, the exposure time is also referred to as shutter time.
[0027]
FIG. 3 is a diagram illustrating the arrangement of pixels. In FIG. 3, A to I denote individual pixels. The pixels are arranged on a plane corresponding to the image. One detection element corresponding to one pixel is arranged on the sensor 2. When the sensor 2 captures an image, one detection element outputs a pixel value corresponding to one pixel constituting the image. For example, the position of the detection element in the X direction corresponds to the horizontal position on the image, and the position of the detection element in the Y direction corresponds to the vertical position on the image.
[0028]
As shown in FIG. 4, for example, a detection element that is a CCD converts input light into electric charges for a period corresponding to the shutter time, and accumulates the converted electric charges. The amount of charge is approximately proportional to the intensity of input light and the time during which light is input. The detection element adds the electric charge converted from the input light to the already accumulated electric charge in a period corresponding to the shutter time. That is, the detection element integrates the input light for a period corresponding to the shutter time, and accumulates an amount of charge corresponding to the integrated light. It can be said that the detection element has an integration effect with respect to time.
[0029]
The electric charge accumulated in the detection element is converted into a voltage value by a circuit (not shown), and the voltage value is further converted into a pixel value such as digital data and output. Accordingly, each pixel value output from the sensor 2 is a value projected onto a one-dimensional space, which is the result of integrating a part of the object corresponding to the foreground or background having a spatial extent with respect to the shutter time. Have
[0030]
FIG. 5 is a diagram illustrating an image obtained by imaging an object corresponding to a moving foreground and an object corresponding to a stationary background. FIG. 5A shows an image obtained by imaging an object corresponding to a foreground with movement and an object corresponding to a stationary background. In the example shown in FIG. 5A, the object corresponding to the foreground is moving horizontally from the left to the right with respect to the screen.
[0031]
FIG. 5B is a model diagram in which pixel values corresponding to one line of the image shown in FIG. 5A are expanded in the time direction. The horizontal direction in FIG. 5B corresponds to the spatial direction X in FIG. 5A.
[0032]
The pixel value of the background region pixel is composed of only the background component, that is, the image component corresponding to the background object. The pixel value of the foreground region pixel is composed of only the foreground component, that is, the image component corresponding to the foreground object.
[0033]
The pixel value of the pixel in the mixed area is composed of a background component and a foreground component. Since the pixel value is composed of the background component and the foreground component, the mixed region can be said to be a distortion region. The mixed area is further classified into a covered background area and an uncovered background area.
[0034]
The covered background area is a mixed area at a position corresponding to the front end of the foreground object in the advancing direction with respect to the foreground area, and is an area where the background component is covered with the foreground as time passes.
[0035]
On the other hand, the uncovered background area is a mixed area at a position corresponding to the rear end portion of the foreground object in the advancing direction with respect to the foreground area, and an area where a background component appears as time passes. Say.
[0036]
FIG. 6 is a diagram illustrating the background area, the foreground area, the mixed area, the covered background area, and the uncovered background area as described above. In the case of corresponding to the image shown in FIG. 5, the background area is a static part, the foreground area is a moving part, the covered background area of the mixed area is a part that changes from the background to the foreground, The uncovered background area is a portion that changes from the foreground to the background.
[0037]
FIG. 7 is a model diagram in which pixel values of pixels arranged in a row adjacent to each other in an image obtained by capturing an object corresponding to a stationary foreground and an object corresponding to a stationary background are expanded in the time direction. It is. For example, pixels arranged on one line of the screen can be selected as the pixels arranged adjacent to each other in one column.
[0038]
The pixel values F01 to F04 shown in FIG. 7 are pixel values corresponding to the still foreground object. The pixel values B01 to B04 shown in FIG. 7 are pixel values corresponding to the stationary background object.
[0039]
The vertical direction in FIG. 7 corresponds to time, and time elapses from top to bottom in the figure. The position of the upper side of the rectangle in FIG. 7 corresponds to the time when the sensor 2 starts converting the input light into electric charge, and the position of the lower side of the rectangle in FIG. 7 indicates the position of the light input by the sensor 2. Corresponds to the time when the conversion to charge ends. That is, the distance from the upper side to the lower side of the rectangle in FIG. 7 corresponds to the shutter time.
[0040]
Hereinafter, a case where the shutter time and the frame interval are the same will be described as an example.
[0041]
The horizontal direction in FIG. 7 corresponds to the spatial direction X described in FIG. More specifically, in the example shown in FIG. 7, the distance from the left side of the rectangle described as “F01” in FIG. 7 to the right side of the rectangle described as “B04” is 8 times the pixel pitch, That is, it corresponds to the interval between eight consecutive pixels.
[0042]
When the foreground object and the background object are stationary, the light input to the sensor 2 does not change during the period corresponding to the shutter time.
[0043]
Here, the period corresponding to the shutter time is divided into two or more periods having the same length. The virtual division number is set corresponding to the amount of movement v of the object corresponding to the foreground within the shutter time. For example, as shown in FIG. 8, the virtual division number is set to 4 corresponding to the motion amount v being 4, and the period corresponding to the shutter time is divided into four.
[0044]
Here, the motion amount v is a value that represents a change in the position of the image corresponding to the moving object in units of pixel intervals. For example, when the image of the object corresponding to the foreground is moved so as to be displayed at a position separated by four pixels in the next frame with reference to a certain frame, the motion amount v of the image of the object corresponding to the foreground is 4.
[0045]
The top row in FIG. 8 corresponds to the first divided period after the shutter is opened. The second row from the top in the figure corresponds to the second divided period from when the shutter has opened. The third line from the top in the figure corresponds to the third divided period from when the shutter has opened. The fourth row from the top in the figure corresponds to the fourth divided period from when the shutter has opened.
[0046]
Hereinafter, the shutter time divided in accordance with the motion amount v is also referred to as shutter time / v.
[0047]
Since the light input to the sensor 2 does not change when the object corresponding to the foreground is stationary, the foreground component F01 / v is equal to the value obtained by dividing the pixel value F01 by the virtual division number. Similarly, when the object corresponding to the foreground is stationary, the foreground component F02 / v is equal to the value obtained by dividing the pixel value F02 by the number of virtual divisions, and the foreground component F03 / v is the virtual value of the pixel value F03. The foreground component F04 / v is equal to the value obtained by dividing the pixel value F04 by the virtual division number.
[0048]
Since the light input to the sensor 2 does not change when the object corresponding to the background is stationary, the background component B01 / v is equal to the value obtained by dividing the pixel value B01 by the virtual division number. Similarly, when the object corresponding to the background is stationary, the background component B02 / v is equal to the value obtained by dividing the pixel value B02 by the virtual division number, and B03 / v is obtained by dividing the pixel value B03 by the virtual division number. B04 / v is equal to a value obtained by dividing the pixel value B04 by the number of virtual divisions.
[0049]
That is, when the object corresponding to the foreground is stationary, the light corresponding to the foreground object input to the sensor 2 does not change during the period corresponding to the shutter time, so the first shutter time / Corresponds to the foreground component F01 / v corresponding to v, the second foreground component F01 / v corresponding to the shutter time / v, and the third shutter time / v corresponding to the shutter time / v. The foreground component F01 / v and the foreground component F01 / v corresponding to the fourth shutter time / v after the shutter is opened have the same value. F02 / v to F04 / v have the same relationship as F01 / v.
[0050]
When the object corresponding to the background is stationary, the light corresponding to the background object input to the sensor 2 does not change during the period corresponding to the shutter time, so that the first shutter time / v after the shutter opens. The corresponding background component B01 / v, the second background component B01 / v corresponding to the shutter time / v when the shutter is opened, and the third background component corresponding to the shutter time / v corresponding to the shutter time / v The component B01 / v and the background component B01 / v corresponding to the fourth shutter time / v after the shutter is opened have the same value. B02 / v to B04 / v have the same relationship.
[0051]
Next, a case where the object corresponding to the foreground moves and the object corresponding to the background is stationary will be described.
[0052]
FIG. 9 is a model diagram in which pixel values of pixels on one line including the covered background area are expanded in the time direction when the object corresponding to the foreground moves toward the right side in the drawing. In FIG. 9, the foreground motion amount v is 4. Since one frame is a short time, it can be assumed that the object corresponding to the foreground is a rigid body and is moving at a constant speed. In FIG. 9, the image of the object corresponding to the foreground moves so as to be displayed on the right side by four pixels in the next frame with reference to a certain frame.
[0053]
In FIG. 9, the leftmost pixel through the fourth pixel from the left belong to the foreground area. In FIG. 9, the fifth pixel from the left to the seventh pixel from the left belong to the mixed area which is a covered background area. In FIG. 9, the rightmost pixel belongs to the background area.
[0054]
Since the object corresponding to the foreground is moving so as to cover the object corresponding to the background with the passage of time, the component included in the pixel value of the pixel belonging to the covered background area has a period corresponding to the shutter time. At this point, the background component is replaced by the foreground component.
[0055]
For example, the pixel value M with a thick frame in FIG. 9 is expressed by Expression (1).
[0056]
M = B02 / v + B02 / v + F07 / v + F06 / v (1)
[0057]
For example, since the fifth pixel from the left includes a background component corresponding to one shutter time / v and includes a foreground component corresponding to three shutter times / v, the mixture ratio of the fifth pixel from the left α is 1/4. The sixth pixel from the left includes a background component corresponding to two shutter times / v and includes a foreground component corresponding to two shutter times / v. Therefore, the mixture ratio α of the sixth pixel from the left is 1/2. The seventh pixel from the left includes a background component corresponding to three shutter times / v, and includes a foreground component corresponding to one shutter time / v. Therefore, the mixture ratio α of the seventh pixel from the left is 3/4.
[0058]
Since it can be assumed that the object corresponding to the foreground is a rigid body and moves at a constant speed so that the foreground image is displayed on the right side of four pixels in the next frame, for example, the fourth pixel from the left in FIG. The foreground component F07 / v of the first shutter time / v after the shutter is opened is the foreground component of the fifth pixel from the left in FIG. 9 corresponding to the second shutter time / v after the shutter is opened. be equivalent to. Similarly, the foreground component F07 / v corresponds to the foreground component of the sixth pixel from the left in FIG. 9 corresponding to the third shutter time / v from when the shutter has opened, and the seventh pixel from the left in FIG. And the foreground component corresponding to the fourth shutter time / v after the shutter is opened.
[0059]
Since it can be assumed that the object corresponding to the foreground is a rigid body and moves at a constant speed so that the foreground image is displayed on the right side of four pixels in the next frame, for example, the third pixel from the left in FIG. The foreground component F06 / v of the first shutter time / v after the shutter is opened is the foreground component of the fourth pixel from the left in FIG. 9 corresponding to the second shutter time / v after the shutter is opened. equal. Similarly, the foreground component F06 / v is the sixth pixel from the left in FIG. 9 and the foreground component of the fifth pixel from the left in FIG. 9 corresponding to the third shutter time / v from when the shutter has opened. And the foreground component corresponding to the fourth shutter time / v after the shutter is opened.
[0060]
Since it can be assumed that the object corresponding to the foreground is a rigid body and moves at a constant speed so that the foreground image is displayed on the right side of four pixels in the next frame, for example, the second pixel from the left in FIG. The foreground component F05 / v of the first shutter time / v after the shutter is opened is the foreground component of the third pixel from the left in FIG. 9 corresponding to the second shutter time / v after the shutter is opened. equal. Similarly, the foreground component F05 / v is the fourth pixel from the left in FIG. 9 and the foreground component corresponding to the third shutter time / v after the shutter is opened, and the fifth pixel from the left in FIG. And the foreground component corresponding to the fourth shutter time / v after the shutter is opened.
[0061]
Since it can be assumed that the object corresponding to the foreground is a rigid body and moves at a constant speed so that the foreground image is displayed on the right side of four pixels in the next frame, for example, the shutter of the leftmost pixel in FIG. The foreground component F04 / v of the first shutter time / v after opening is equal to the foreground component of the second pixel from the left in FIG. 9 corresponding to the second shutter time / v after the shutter is opened. Similarly, the foreground component F04 / v corresponds to the foreground component of the third pixel from the left in FIG. 9 corresponding to the third shutter time / v from when the shutter has opened, and the fourth pixel from the left in FIG. And the foreground component corresponding to the fourth shutter time / v after the shutter is opened.
[0062]
The state of the foreground area corresponding to such a moving object is motion blur. In addition, the foreground area corresponding to the moving object includes motion blur as described above, and thus can be said to be a distortion area.
[0063]
FIG. 10 is a model diagram in which pixel values of pixels on one line including the uncovered background area are expanded in the time direction when the foreground moves toward the right side in the drawing. In FIG. 10, the foreground motion amount v is 4. Since one frame is a short time, it can be assumed that the object corresponding to the foreground is a rigid body and is moving at a constant speed. In FIG. 10, the image of the object corresponding to the foreground moves to the right by four pixels in the next frame with reference to a certain frame.
[0064]
In FIG. 10, the leftmost pixel through the fourth pixel from the left belong to the background area. In FIG. 10, the fifth through seventh pixels from the left belong to the mixed area that is an uncovered background. In FIG. 10, the rightmost pixel belongs to the foreground area.
[0065]
Since the object corresponding to the foreground that covered the object corresponding to the background is moved so as to be removed from the front of the object corresponding to the background over time, it is included in the pixel value of the pixel belonging to the uncovered background area The component to be changed from the foreground component to the background component at a certain point in time corresponding to the shutter time.
[0066]
For example, a pixel value M ′ with a thick line frame in FIG. 10 is expressed by Expression (2).
[0067]
M '= F02 / v + F01 / v + B26 / v + B26 / v (2)
[0068]
For example, since the fifth pixel from the left includes a background component corresponding to three shutter times / v and includes a foreground component corresponding to one shutter time / v, the mixture ratio of the fifth pixel from the left α is 3/4. The sixth pixel from the left includes a background component corresponding to two shutter times / v, and includes a foreground component corresponding to two shutter times / v. Therefore, the mixture ratio α of the sixth pixel from the left is 1/2. Since the seventh pixel from the left includes a background component corresponding to one shutter time / v and includes a foreground component corresponding to three shutter times / v, the mixture ratio α of the seventh pixel from the left is 1/4.
[0069]
When the expressions (1) and (2) are generalized, the pixel value M is expressed by the expression (3).
[0070]
[Expression 1]
Figure 0004441846
... (3)
Here, α is a mixing ratio. B is a background pixel value, and Fi / v is a foreground component.
[0071]
Since the object corresponding to the foreground is a rigid body and can be assumed to move at a constant speed, and the amount of movement v is 4, for example, the first pixel from the left in FIG. The foreground component F01 / v of the shutter time / v is equal to the foreground component of the sixth pixel from the left in FIG. 10 corresponding to the second shutter time / v after the shutter is opened. Similarly, F01 / v is the foreground component of the seventh pixel from the left in FIG. 10 corresponding to the third shutter time / v after the shutter is opened, and the eighth pixel from the left in FIG. , And the foreground component corresponding to the fourth shutter time / v after the shutter is opened.
[0072]
Since the object corresponding to the foreground is a rigid body and can be assumed to move at a constant speed, and the number of virtual divisions is 4, for example, the first pixel from the left in FIG. The foreground component F02 / v of the shutter time / v is equal to the foreground component of the seventh pixel from the left in FIG. 10 corresponding to the second shutter time / v after the shutter is opened. Similarly, the foreground component F02 / v is equal to the foreground component of the eighth pixel from the left in FIG. 10 corresponding to the third shutter time / v from when the shutter has opened.
[0073]
Since the object corresponding to the foreground is a rigid body and can be assumed to move at a constant speed, and the amount of movement v is 4, for example, the seventh pixel from the left in FIG. The foreground component F03 / v of the shutter time / v is equal to the foreground component of the eighth pixel from the left in FIG. 10 corresponding to the second shutter time / v after the shutter is opened.
[0074]
In the description of FIG. 8 to FIG. 10, it is described that the virtual division number is 4, but the virtual division number corresponds to the motion amount v. The amount of movement v generally corresponds to the moving speed of the object corresponding to the foreground. For example, when the object corresponding to the foreground is moving so as to be displayed to the right by four pixels in the next frame with reference to a certain frame, the amount of movement v is 4. Corresponding to the motion amount v, the number of virtual divisions is 4. Similarly, for example, when the object corresponding to the foreground is moving so that it is displayed on the left by 6 pixels in the next frame with reference to a certain frame, the motion amount v is set to 6, and the number of virtual divisions is , 6.
[0075]
11 and 12, the above-described mixed area composed of the foreground area, the background area, the covered background area, or the uncovered background area, and the foreground component and the background component corresponding to the divided shutter time, The relationship is shown.
[0076]
FIG. 11 shows an example in which pixels in the foreground area, background area, and mixed area are extracted from an image including a foreground corresponding to an object moving in front of a stationary background. In the example shown in FIG. 11, the object corresponding to the foreground is moving horizontally with respect to the screen.
[0077]
Frame # n + 1 is the next frame after frame #n, and frame # n + 2 is the next frame after frame # n + 1.
[0078]
Extract the pixels in the foreground area, background area, and mixed area extracted from any of frame #n to frame # n + 2, set the amount of motion v to 4, and set the pixel values of the extracted pixels in the time direction The developed model is shown in FIG.
[0079]
Since the object corresponding to the foreground moves, the pixel value in the foreground area is composed of four different foreground components corresponding to the shutter time / v period. For example, the leftmost pixel among the pixels in the foreground area shown in FIG. 12 is composed of F01 / v, F02 / v, F03 / v, and F04 / v. That is, the pixels in the foreground area include motion blur.
[0080]
Since the object corresponding to the background is stationary, the light corresponding to the background input to the sensor 2 does not change during the period corresponding to the shutter time. In this case, the pixel value in the background area does not include motion blur.
[0081]
The pixel value of the pixel belonging to the mixed area composed of the covered background area or the uncovered background area is composed of a foreground component and a background component.
[0082]
Next, when the image corresponding to the object is moving, the pixel values of the pixels at the same position on the frame that are adjacent to each other in a plurality of frames are developed in the time direction. The model will be described. For example, when the image corresponding to the object moves horizontally with respect to the screen, the pixels arranged on one line of the screen can be selected as the pixels arranged in a row adjacent to each other.
[0083]
FIG. 13 shows pixels arranged in a row adjacent to three frames of an image obtained by capturing an object corresponding to a stationary background, and the pixel values of the pixels at the same position on the frame are represented by time. It is the model figure developed in the direction. Frame #n is the next frame after frame # n-1, and frame # n + 1 is the next frame after frame #n. Other frames are also referred to in the same manner.
[0084]
The pixel values B01 to B12 shown in FIG. 13 are pixel values corresponding to the stationary background object. Since the object corresponding to the background is stationary, the pixel value of the corresponding pixel does not change in frame # n−1 to frame n + 1. For example, the pixel in frame #n and the pixel in frame # n + 1 corresponding to the position of the pixel having a pixel value of B05 in frame # n−1 each have a pixel value of B05.
[0085]
FIG. 14 shows pixels arranged in a row adjacent to each other in three frames of an image obtained by imaging an object corresponding to the foreground moving to the right side in the drawing together with an object corresponding to the stationary background, FIG. 5 is a model diagram in which pixel values of pixels at the same position on a frame are developed in the time direction. The model shown in FIG. 14 includes a covered background area.
[0086]
In FIG. 14, it can be assumed that the object corresponding to the foreground is a rigid body and moves at a constant speed, and the foreground is moved so that the foreground image is displayed on the right side by four pixels in the next frame. 4 and the number of virtual divisions is 4.
[0087]
For example, the foreground component of the leftmost pixel of frame # n-1 in FIG. 14 for the first shutter time / v after the shutter opens is F12 / v, and the second pixel from the left in FIG. The foreground component of the second shutter time / v after the shutter is opened is also F12 / v. The foreground component of the third pixel from the left in FIG. 14 for the third shutter time / v after the shutter opens, and the fourth shutter time for the fourth pixel from the left in FIG. The foreground component of / v is F12 / v.
[0088]
The foreground component of the leftmost pixel of frame # n−1 in FIG. 14 for the second shutter time / v after the shutter opens is F11 / v, and the second pixel from the left in FIG. The foreground component of the third shutter time / v after the shutter is opened is also F11 / v. The foreground component of the third pixel from the left in FIG. 14 corresponding to the fourth portion of the shutter time / v from when the shutter has opened is F11 / v.
[0089]
The foreground component of the leftmost pixel of frame # n-1 in FIG. 14 for the third shutter time / v after the shutter opens is F10 / v, and the second pixel from the left in FIG. The foreground component of the fourth shutter time / v after the shutter is opened is also F10 / v. The foreground component of the leftmost pixel in frame # n−1 in FIG. 14 corresponding to the fourth shutter time / v from when the shutter has opened is F09 / v.
[0090]
Since the object corresponding to the background is stationary, the background component of the second pixel from the left of frame # n-1 in FIG. 14 corresponding to the first shutter time / v after the shutter is opened is B01 / v Become. The background component of the third pixel from the left of frame # n−1 in FIG. 14 corresponding to the first and second shutter time / v from when the shutter has opened is B02 / v. The background component of the fourth pixel from the left of frame # n−1 in FIG. 14 corresponding to the first through third shutter time / v from when the shutter has opened is B03 / v.
[0091]
In frame # n−1 in FIG. 14, the leftmost pixel belongs to the foreground area, and the second to fourth pixels from the left belong to the mixed area which is a covered background area.
[0092]
The fifth through twelfth pixels from the left of frame # n−1 in FIG. 14 belong to the background area, and the pixel values thereof are B04 through B11, respectively.
[0093]
The first through fifth pixels from the left in frame #n in FIG. 14 belong to the foreground area. The foreground component of the shutter time / v in the foreground area of frame #n is any one of F05 / v to F12 / v.
[0094]
It can be assumed that the object corresponding to the foreground is a rigid body and moves at a constant speed, and the foreground image moves so as to be displayed on the right side of four pixels in the next frame, so from the left of frame #n in FIG. The foreground component of the fifth pixel from the first shutter time / v after the shutter opens is F12 / v, and the sixth pixel from the left in FIG. The foreground component is also F12 / v. The foreground component of the seventh pixel from the left in FIG. 14 corresponding to the third shutter time / v from when the shutter has opened, and the fourth shutter time from the shutter opening of the eighth pixel from the left in FIG. The foreground component of / v is F12 / v.
[0095]
The foreground component of the fifth pixel from the left of frame #n in FIG. 14 corresponding to the second shutter time / v from when the shutter has opened is F11 / v, and the sixth pixel from the left in FIG. The foreground component of the third shutter time / v after the shutter is opened is also F11 / v. The foreground component of the seventh pixel from the left in FIG. 14 corresponding to the fourth portion of the shutter time / v from when the shutter has opened is F11 / v.
[0096]
The foreground component of the fifth pixel from the left in frame #n in FIG. 14 corresponding to the third shutter time / v from when the shutter has opened is F10 / v, and the sixth pixel from the left in FIG. The foreground component of the fourth shutter time / v after the shutter is opened is also F10 / v. The foreground component of the fifth pixel from the left of frame #n in FIG. 14 corresponding to the fourth portion of the shutter time / v from when the shutter has opened is F09 / v.
[0097]
Since the object corresponding to the background is stationary, the background component of the sixth pixel from the left of frame #n in FIG. 14 corresponding to the first shutter time / v after the shutter opens is B05 / v. The background component of the seventh pixel from the left of frame #n in FIG. 14 corresponding to the first and second shutter time / v from when the shutter has opened is B06 / v. The background component of the eighth pixel from the left of frame #n in FIG. 14 corresponding to the first through third shutter time / v from when the shutter has opened is B07 / v.
[0098]
In frame #n in FIG. 14, the sixth through eighth pixels from the left belong to the mixed area, which is a covered background area.
[0099]
The ninth through twelfth pixels from the left of frame #n in FIG. 14 belong to the background area, and the pixel values are B08 through B11, respectively.
[0100]
The first through ninth pixels from the left of frame # n + 1 in FIG. 14 belong to the foreground area. The foreground component of the shutter time / v in the foreground area of frame # n + 1 is any one of F01 / v to F12 / v.
[0101]
It can be assumed that the object corresponding to the foreground is a rigid body and moves at a constant speed, and the foreground image moves so as to be displayed on the right side by four pixels in the next frame, so that the frame # n + 1 in FIG. The foreground component of the ninth pixel from the left when the shutter opens is the first shutter time / v is F12 / v, and the tenth pixel from the left in FIG. The foreground component of / v is also F12 / v. The foreground component of the eleventh pixel from the left in FIG. 14 and the third shutter time / v from when the shutter has opened, and the fourth shutter time from the shutter of the twelfth pixel from the left in FIG. The foreground component of / v is F12 / v.
[0102]
The foreground component of the ninth pixel from the left of frame # n + 1 in FIG. 14 corresponding to the second shutter time / v from when the shutter has opened is F11 / v, which is the tenth from the left in FIG. The foreground component of the third shutter time / v after the shutter opens is also F11 / v. The foreground component of the eleventh pixel from the left in FIG. 14 corresponding to the fourth shutter time / v from when the shutter has opened is F11 / v.
[0103]
The foreground component of the ninth pixel from the left in frame # n + 1 in FIG. 14 corresponding to the third shutter time / v from when the shutter has opened is F10 / v, which is the tenth pixel from the left in FIG. The foreground component of the fourth shutter time / v after the shutter is opened is also F10 / v. The foreground component of the ninth pixel from the left of frame # n + 1 in FIG. 14 corresponding to the fourth portion of the shutter time / v from when the shutter has opened is F09 / v.
[0104]
Since the object corresponding to the background is stationary, the background component of the tenth pixel from the left of frame # n + 1 in FIG. Become. The background component of the eleventh pixel from the left of frame # n + 1 in FIG. 14 corresponding to the first and second shutter time / v from when the shutter has opened is B10 / v. The background component of the twelfth pixel from the left of frame # n + 1 in FIG. 14 corresponding to the first through third shutter time / v from when the shutter has opened is B11 / v.
[0105]
In frame # n + 1 in FIG. 14, the tenth through twelfth pixels from the left correspond to the mixed region, which is a covered background region.
[0106]
FIG. 15 is a model diagram of an image obtained by extracting foreground components from the pixel values shown in FIG.
[0107]
FIG. 16 shows pixels arranged in a row adjacent to each other in three frames of an image obtained by capturing a foreground corresponding to an object moving to the right side in the figure together with a stationary background. It is the model figure which expand | deployed the pixel value of the pixel of the position of the time direction. In FIG. 16, an uncovered background area is included.
[0108]
In FIG. 16, it can be assumed that the object corresponding to the foreground is a rigid body and is moving at a constant speed. Since the object corresponding to the foreground is moved so as to be displayed on the right side by four pixels in the next frame, the motion amount v is 4.
[0109]
For example, the foreground component of the leftmost pixel of frame # n-1 in FIG. 16 for the first time of shutter time / v after the shutter opens is F13 / v, and is the second pixel from the left in FIG. The foreground component of the second shutter time / v after the shutter is opened is also F13 / v. The foreground component of the third pixel from the left in FIG. 16 corresponding to the third shutter time / v from when the shutter has opened, and the fourth shutter time from the shutter opening of the fourth pixel from the left in FIG. The foreground component of / v is F13 / v.
[0110]
The foreground component of the second pixel from the left of frame # n-1 in FIG. 16 corresponding to the first shutter time / v after the shutter opens is F14 / v, and the third pixel from the left in FIG. The foreground component of the second shutter time / v after the shutter is opened is also F14 / v. The foreground component of the third pixel from the left in FIG. 16 corresponding to the first shutter time / v from when the shutter has opened is F15 / v.
[0111]
Since the object corresponding to the background is stationary, the background component of the leftmost pixel of frame # n-1 in FIG. / v. The background components of the second pixel from the left of frame # n−1 in FIG. 16 corresponding to the third and fourth shutter time / v from when the shutter has opened are B26 / v. The background component of the third pixel from the left of frame # n−1 in FIG. 16 corresponding to the fourth portion of the shutter time / v from when the shutter has opened is B27 / v.
[0112]
In frame # n-1 in FIG. 16, the leftmost pixel through the third pixel belong to the mixed area, which is an uncovered background area.
[0113]
The fourth through twelfth pixels from the left of frame # n−1 in FIG. 16 belong to the foreground area. The foreground component of the frame is any one of F13 / v to F24 / v.
[0114]
The leftmost pixel through the fourth pixel from the left in frame #n in FIG. 16 belong to the background area, and the pixel values are B25 through B28, respectively.
[0115]
It can be assumed that the object corresponding to the foreground is a rigid body and moves at a constant speed, and the foreground image moves so as to be displayed on the right side of four pixels in the next frame, so from the left of frame #n in FIG. The foreground component of the fifth pixel at the first shutter time / v after the shutter opens is F13 / v, and the sixth pixel from the left in FIG. 16 opens the shutter at the second shutter time / v. The foreground component is also F13 / v. The foreground component of the seventh pixel from the left in FIG. 16 with the third shutter time / v from when the shutter has opened, and the fourth shutter time from the shutter of the eighth pixel from the left in FIG. The foreground component of / v is F13 / v.
[0116]
The foreground component of the sixth pixel from the left in frame #n in FIG. 16 corresponding to the first shutter time / v from when the shutter has opened is F14 / v, and the seventh pixel from the left in FIG. The foreground component of the second shutter time / v after opening is also F14 / v. The foreground component of the eighth pixel from the left in FIG. 16 corresponding to the first portion of the shutter time / v from when the shutter has opened is F15 / v.
[0117]
Since the object corresponding to the background is stationary, the background component of the fifth pixel from the left of frame #n in FIG. 16 corresponding to the second to fourth shutter time / v from when the shutter has opened is B29 / v. The background component of the sixth pixel from the left of frame #n in FIG. 16 corresponding to the third and fourth shutter time / v from when the shutter has opened is B30 / v. The background component of the seventh pixel from the left of frame #n in FIG. 16 corresponding to the fourth portion of the shutter time / v from when the shutter has opened is B31 / v.
[0118]
In frame #n in FIG. 16, the fifth through seventh pixels from the left belong to the mixed area, which is an uncovered background area.
[0119]
The eighth through twelfth pixels from the left of frame #n in FIG. 16 belong to the foreground area. The value corresponding to the period of the shutter time / v in the foreground area of frame #n is any one of F13 / v to F20 / v.
[0120]
The leftmost pixel through the eighth pixel from the left in frame # n + 1 in FIG. 16 belong to the background area, and the pixel values are B25 through B32, respectively.
[0121]
It can be assumed that the object corresponding to the foreground is a rigid body and moves at a constant speed, and the foreground image moves so as to be displayed on the right side by four pixels in the next frame. Therefore, the frame # n + 1 in FIG. The foreground component of the ninth pixel from the left when the shutter opens is the first shutter time / v is F13 / v, and the tenth pixel from the left in FIG. 16 is the second shutter time after the shutter is opened. The foreground component of / v is also F13 / v. The foreground component of the eleventh pixel from the left in FIG. 16 and the third shutter time / v from when the shutter has opened, and the fourth shutter time from the shutter of the twelfth pixel from the left in FIG. The foreground component of / v is F13 / v.
[0122]
The foreground component of the tenth pixel from the left in frame # n + 1 in FIG. 16 corresponding to the first shutter time / v from when the shutter has opened is F14 / v, and the eleventh pixel from the left in FIG. The foreground component of the second shutter time / v after the shutter is opened is also F14 / v. The foreground component of the twelfth pixel from the left in FIG. 16 corresponding to the first shutter time / v from when the shutter has opened is F15 / v.
[0123]
Since the object corresponding to the background is stationary, the background components of the ninth pixel from the left of frame # n + 1 in FIG. , B33 / v. The background component of the tenth pixel from the left of frame # n + 1 in FIG. 16 corresponding to the third and fourth shutter time / v from when the shutter has opened is B34 / v. The background component of the eleventh pixel from the left of frame # n + 1 in FIG. 16 corresponding to the fourth portion of the shutter time / v from when the shutter has opened is B35 / v.
[0124]
In frame # n + 1 in FIG. 16, the ninth through eleventh pixels from the left belong to the mixed area, which is an uncovered background area.
[0125]
The twelfth pixel from the left of frame # n + 1 in FIG. 16 belongs to the foreground area. The foreground component of the shutter time / v in the foreground area of frame # n + 1 is any one of F13 / v to F16 / v.
[0126]
FIG. 17 is a model diagram of an image obtained by extracting foreground components from the pixel values shown in FIG.
[0127]
As described above, the motion amount v is set. Accordingly, the motion vector detection unit 11 of the image processing unit 1 in FIG. 1 detects the motion vector, obtains the motion amount v from the motion vector, and together with the motion vector, the pixel value calculation units 12-1 to 12-N. Output to.
[0128]
Each of the pixel value calculation units 12-1 to 12-N extracts a plurality of pixels made of different models, which are required for obtaining a pixel value from which motion blur has been removed, from the input image, and for each model. The obtained pixel value is obtained and output to the pixel generation unit 14. Hereinafter, the pixel value calculation units 12-1 to 12-N are also simply referred to as the pixel value calculation unit 12 when it is not necessary to distinguish between them. A model for obtaining the pixel value will be described later.
[0129]
The model reliability calculation unit 13 extracts the pixels affected by the activity for each model from the pixels used for pixel calculation by each pixel value calculation unit 12, obtains the activity of the pixel, A value obtained by normalizing the activity is output to the pixel generation unit 14 as reliability information of the model. Details of the activity and reliability will be described later.
[0130]
The pixel generation unit 14 determines the pixel value and the reliability obtained for each model based on the pixel value information input from each pixel value calculation unit 12 and the reliability input from the model reliability calculation unit 13. Is calculated, a pixel having this as a pixel value is generated, and output as a processed image.
[0131]
Next, models that are individually set for the pixel value calculation units 12-1 to 12-N to obtain pixel values from which motion blur is removed will be described.
[0132]
FIG. 18 shows one row of one pixel width of the detection element, each square indicates a pixel, and F0 to F14 indicate the level of light incident on each pixel. Accordingly, in the case of FIG. 18, the level of light incident on the leftmost pixel is F0, the level of light incident on the second pixel from the left is F1, and incident on the third pixel from the left. The level of the emitted light is F2, and similarly, the level of the light incident on the rightmost pixel is F14.
[0133]
FIG. 19 shows pixel values output from each detection element based on the level of light incident on each pixel shown in FIG. Accordingly, the leftmost pixel has a pixel value M0, the second pixel from the left has a pixel value M1, and so on, and the rightmost pixel has a pixel value M14.
[0134]
Further, FIG. 20 shows a shutter time / v component of the level of light incident on each pixel. In this case, the amount of motion v is 5, and each level shown in FIG. 18 is a component obtained by dividing the shutter time by 5 (in this case, the object is from right to left). ) Thus, for example, in the leftmost pixel, the first shutter time / v component is f4 when the shutter is opened, the second shutter time / v component is f3 when the shutter is opened, and the shutter is opened 3 The component of the fifth shutter time / v is f2, the component of the fourth shutter time / v after the shutter is opened is f1, and the component of the fifth shutter time / v is f0 after the shutter is opened.
[0135]
For each pixel, the result of integrating the light incident at these levels with the shutter time is the pixel value of each pixel. That is, for example, the pixel value of the leftmost pixel is represented by the following formula (4).
[0136]
M0 = f0 + f1 + f2 + f3 + f4 + f5 (4)
[0137]
Accordingly, the same relationship holds for the pixels M1 to M14.
[0138]
Motion blur differs when an object that is a subject moves within the shutter time and different levels of light (shutter time / v components) are incident on one pixel within the shutter time. As described above, the light of the level is generated by mixing.
[0139]
In the first place, motion blur occurs because the shutter time is not sufficiently short. Therefore, if the shutter time is shortened, an image with little motion blur can be acquired. However, since there is no motion blur, an unnatural image may be obtained. Moreover, if the shutter time is too short, the noise may increase.
[0140]
Under these conditions, the shutter time is often determined by the normal frame rate, and as a result, motion blur occurs according to the level of motion of the subject.
[0141]
Therefore, as described above, if each shutter time / v divided by the motion amount v can be obtained, an image from which motion blur is removed can be generated. That is, for example, in the case of FIG. 20, for each pixel, only the third shutter time / v component is obtained and the image with motion blur removed is generated by multiplying each pixel by the motion amount v. It becomes possible to do. Of course, any shutter time / v component may be used when other shutters are opened.
[0142]
The pixel value calculation unit 12 obtains each shutter time / v component as a pixel value. At this time, since there are a plurality of methods for obtaining one shutter time / v component instead of only one, a model is set for each method, and each pixel value calculation unit 12 A component of each shutter time / v is obtained using a different model that is determined individually, and is output to the pixel generation unit 14. Accordingly, the pixel value calculation units 12-1 to N-1 obtain the shutter time / v components corresponding to the same pixel using different models at the same timing.
[0143]
For example, a shutter component consisting of f9 which is a third shutter time / v component after the shutter of the eighth pixel from the left is opened and the pixel value M7 is circled at the center in FIG. A case will be described in which the light level F9 without motion blur input to the pixel is obtained by obtaining the product with the amount of motion.
[0144]
In the following, the shutter time / v is also simply referred to as a shutter component. In the following, a pixel to be processed, which is indicated by a pixel value M7 in FIG. 20, is referred to as a target pixel, and a pixel of an image from which motion blur is removed corresponding to the light level F9 is referred to as a target pixel. . In other words, in this example, the pixel of interest serving as a reference for processing is the eighth pixel from the left in FIG. 20 indicated as the pixel value M7, but the attention required for an image from which motion blur is actually removed. For example, the pixel is the tenth pixel from the left in FIG. That is, the target pixel to be dealt with and the target pixel obtained by the processing are pixels at different positions on the sensor 2.
[0145]
For example, in FIG. 21 (the shutter component is the same as that in FIG. 20), the following expressions (5) and (6) are established.
[0146]
F9−F4 = (M5−M4) × v (= (f9−f4) × v) (5)
F14−F9 = (M10−M9) × v (= (f14−f9) × v) (6)
[0147]
That is, as shown in FIG. 21, the difference between the pixel values of the fifth and sixth pixels from the left is that the shutter of the fifth pixel from the left surrounded by the dotted line is opened and the fourth shutter to the fourth shutter component. Similarly, since the shutter components are f8 to f5, and the shutter components of the sixth pixel from the left surrounded by the dotted line are the second to fifth shutter components after the shutter is opened, f8 to f5. Therefore, the difference (f9−f4) is the difference between the first shutter component after the shutter of the sixth pixel from the left and the fifth shutter component after the shutter of the fifth pixel from the left is opened. By multiplying this difference by the motion amount v, the level difference (F9−F4) between the fifth and sixth pixels from the left is obtained.
[0148]
Similarly, as shown in FIG. 21, the difference between the pixel values of the tenth and eleventh pixels from the left is the fourth difference from the first shutter component when the shutter of the tenth pixel from the left surrounded by the dotted line is opened. The shutter components up to f13 to f10 are similarly f13 to f10 after the shutter of the eleventh pixel from the left surrounded by the dotted line is opened. In effect, this is the difference (f14−f9) between the first shutter component since the shutter of the eleventh pixel from the left opened and the fifth shutter component after the shutter of the tenth pixel from the left opened. By multiplying this difference by the motion amount v, a difference (F14−F9) between the fifth and sixth pixels from the left is obtained.
[0149]
Therefore, if f9 which is the shutter component can be obtained from the equations (5) and (6), the pixel value including f9 can be obtained, and motion blur is eliminated by obtaining all the pixels included in the image. It is possible to generate an image.
[0150]
However, equations (5) and (6) cannot be obtained because there are three unknowns (F4, F9, F14) for the two equations.
[0151]
Therefore, in order to obtain the level F9, the level F4 or F14 is approximately obtained using the spatial correlation.
[0152]
More specifically, for example, if the spatial correlation of the third pixel from the left with the surrounding pixels is high, the approximation shown by the following equation (7) is established.
[0153]
f4 = M2 / v (7)
The spatial correlation here is a relationship expressed by the magnitude of activity of each pixel. That is, the activity is, for example, the sum of difference values between pixels adjacent to the pixel of interest. For example, a difference between 9 pixels in total of 3 pixels × 3 pixels shown in FIG. 22 is an activity, and is represented by the following equation (8). In FIG. 22, each square corresponds to a pixel, and a character written in the square indicates a pixel value of each pixel. Further, the target pixel is a pixel indicated by a pixel value M2.
[0154]
Activity (M2) = | M101-M102 | + | M102-M103 | + | M1-M2 | + | M2-M3 |
+ | M201-M202 | + | M202-M203 | + | M101-M1 | + | M1-M201 |
+ | M102-M2 | + | M2-M202 | + | M103-M3 | + | M3-M203 | ... (8)
[0155]
As for the activity of the pixel represented by the equation (8) whose pixel value is represented by M2, the smaller the value is, the higher the spatial correlation of the pixel represented by M2 is, and the pixel value is M2. Pixels around the represented pixel will be shown to have pixel values closer to each other, and conversely, when this activity is large, the pixel represented by the pixel value M2 There is a high possibility that the pixel value has a low correlation with the pixels and is different from the surrounding pixels.
[0156]
That is, if the spatial correlation is high, it can be assumed that the change in the pixel value in the pixel is small and that there is no change, so the relationship as shown in Expression (9) should be established.
[0157]
f6 = f5 = f4 = f3 = f2 (9)
[0158]
As a result, since the following formula (10) is derived, formula (7) is established.
M2 = f6 + f5 + f4 + f3 + f2 = f4 × v (= F4) (10)
[0159]
From the above results, when the equation (5) is modified and the relationship of the equation (7) is substituted, as shown in the following equation (11), the light level incident on the pixels of the image without motion blur is expressed as F9 will be required.
[0160]
F9 = (M5−M4) × v + M2 (11)
[0161]
Further, for example, if the spatial correlation of the eleventh pixel from the left in FIG. 21 with the surrounding pixels is high, the approximation shown by the following equation (12) is established.
[0162]
f14 = M12 / v (12)
[0163]
That is, if the spatial correlation is high, it can be assumed that the change in the pixel value in the pixel is small and that there is no change, and therefore, the relationship shown in Expression (13) should be established.
[0164]
f16 = f15 = f14 = f13 = f12 (13)
[0165]
As a result, since the following formula (14) is derived, the formula (12) is established.
M12 = f16 + f15 + f14 + f13 + f12 = f14 × v (= F12) (14)
[0166]
From the above results, when the equation (6) is modified and the relationship of the equation (14) is substituted, as shown in the following equation (15), the light level incident on the pixels of the image without motion blur is expressed as F9 will be required.
[0167]
F9 = M12 + (M9−M10) × v (15)
[0168]
That is, the pixel value calculation unit 12 obtains the level F9 incident on the pixel of the image without motion blur by using, for example, the two models (the target pixel) of Expression (11) and Expression (15), It outputs to the image generation part 14 as a pixel value from which the blur was removed.
[0169]
Further, as a model for obtaining a pixel value from which motion blur has been removed, the following may be considered.
[0170]
For example, as shown in FIG. 23, the level F4 is approximately obtained in order to obtain the level F9 described with reference to FIG. 21, but the above-described level F9 is obtained in order to obtain this level F4. Therefore, the level F9 is obtained by the same method as that used for the purpose, and the obtained level F4 is used.
[0171]
That is, in FIG. 23, the relationship as shown by the following formulas (16) and (17) is established, similar to the relationship described above.
[0172]
F4−F (−1) = (M0−M (−1)) × v (= (f4−f (−1)) × v) (16)
F19−F14 = (M15−M14) × v (= (f19−f14) × v) (17)
[0173]
That is, as shown in FIG. 23, the difference between the pixel values of the fourth and fifth pixels from the left is that the shutter of the fourth pixel from the left surrounded by the dotted line is opened to the first shutter component to the fourth shutter component. The shutter components are f3 to f0, and similarly, the second to fifth shutter components after the shutter of the fifth pixel from the left surrounded by the dotted line is f3 to f0, so the difference is substantially Specifically, the difference (f4−f (−1)) between the first shutter component after the shutter of the fifth pixel from the left and the fifth shutter component after the shutter of the fourth pixel from the left opens. Become. By multiplying this difference by the motion amount v, a level difference (F4−F (−1)) between the fourth and fifth pixels from the left is obtained.
[0174]
Similarly, as shown in FIG. 23, the difference between the pixel values of the third and fourth pixels from the right is the first shutter component through the fourth shutter when the shutter of the fourth pixel from the right surrounded by a dotted line is opened. The shutter components up to f18 to f15 are similarly f18 to f15 after the shutter of the third pixel from the right surrounded by the dotted line is opened, so the difference is In effect, this is the difference (f19−f14) between the first shutter component after the shutter of the third pixel from the right opens and the fifth shutter component after the shutter of the fourth pixel from the right opens. By multiplying this difference by the motion amount v, the difference (F19−F14) between the third and fourth pixels from the right is obtained.
[0175]
Therefore, the expressions (16) and (17) are developed by the same method as that for the expressions (5) and (6) described above. That is, assuming that the second pixel in FIG. 23 from the left is used for obtaining the level F4, and that the rightmost pixel is used as a peripheral pixel for obtaining the level F14. Equations (18) and (19) are derived.
[0176]
M (-3) = f1 + f0 + f (-1) + f (-2) + f (-3) = f (-1) × v (= F (-1)) (18)
M17 = f21 + f20 + f19 + f18 + f17 = f19 × v (= F19) (19)
[0177]
From the above results, when the formulas (16) and (17) are modified and the relations of the formulas (18) and (19) are substituted respectively, the following formulas (20) and (21) are obtained. F4 and F14 are obtained as the levels of light incident on the pixels of the image without motion blur.
[0178]
F4 = (M0−M (−1)) × v + M (−3) (20)
F14 = (M15−M14) × v + M17 (21)
[0179]
From the above results, when the formulas (5) and (6) are modified and the relations of the formulas (20) and (21) are substituted, as shown by the following formulas (22) and (23), F9 is obtained as the level of light incident on the pixels of the image without motion blur.
[0180]
F9 = M (−3) + (M5−M4) × v + (M0−M (−1)) × v (22)
F9 = M17 + (M14−M15) × v + (M9−M10) × v (23)
[0181]
That is, the pixel value calculation unit 12 uses, for example, the above-described models of the formulas (22) and (23) in addition to the two models of the formulas (11) and (15). The level F9 incident on the image is obtained and output to the image generation unit 14 as the pixel value of the image from which the motion blur is removed.
[0182]
The models of the above formulas (22) and (23) are based on the premise that the correlation is high for the pixels having pixel values M (−3) and M15, but the pixel values are M2 and M12. The high correlation in the pixel does not matter. On the other hand, the models of the above formulas (11) and (15) are models on the premise that the correlation between the pixels having pixel values M2 and M12 is high. If it is low, the correct pixel value cannot be obtained. Therefore, the models of the above formulas (22) and (23) are in a state in which values cannot be accurately calculated by the models of the above formulas (11) and (15), that is, the correlations in the pixels that are M2 and M12. It can be said that this is an effective calculation method when the value is low.
[0183]
Furthermore, as described with reference to FIG. 21 and FIG. 23, the relationship between the models of the above formulas (11) and (15) and the models of the formulas (22) and (23) is the same. It is also possible to set additional models that have a relationship, and it is possible to expand the pixels (tap) used for the model calculation in the left-right direction, so that there are virtually infinite pixels on the image. For example, there are an infinite number of methods for calculating one pixel without motion blur.
[0184]
Therefore, the pixel value calculation units 12-1 to 12-N in FIG. 1 set N models, and are described by the above-described equations (11), (15), (22), and (23). The pixel value is calculated using a different model having the relationship as described above and is output to the pixel generation unit 14.
[0185]
Next, the model reliability calculation unit 13 will be described with reference to FIG.
[0186]
The activity calculation units 21-1 to 21-N are pixels that are set by approximating the pixel value calculation by assuming that the activity is small, that is, the spatial correlation is high, among the pixels extracted for each model. Ask for activity. In the following, when it is not necessary to individually distinguish the activity calculation units 21-1 to 21-N, they are simply referred to as the activity calculation unit 21.
[0187]
That is, for example, in FIG. 23, the pixel whose pixel value is represented as M2 in the above-described model of Expression (11) is the pixel whose pixel value is represented as M12 in the above-described model of Expression (15). However, the pixel whose pixel value is represented as M (−3) in the above-described model of Expression (22) is further a pixel whose pixel value is represented as M17 in the above-described model of Expression (23). Are pixels set by approximating on the assumption that the activity of the pixel value is small, that is, the spatial correlation is high.
[0188]
The activity calculation unit 21 obtains an activity and outputs the activity to the reliability normalization unit 22 for the pixel corresponding to each model by the calculation shown in the above-described equation (8).
[0189]
The reliability normalization unit 22 normalizes the reciprocal number of the activity for each model input from each activity detection unit 21, and outputs the normalized reliability to the pixel generation unit 14 for each model.
[0190]
That is, for example, in the case of the four models shown in FIG. 23 (when 1 ≦ N <4), the activity of the pixel whose pixel value is expressed as M2 in the model of the above equation (11) is A ( M2), the pixel activity in which the pixel value in the model of the above equation (15) is represented as M12 is A (M12), and the pixel value in the model of the above equation (22) is represented as M (-3). When the pixel activity is A (M (-3)) and the pixel activity represented by the pixel value M17 in the model of the above equation (23) is A (M17), the reliability normalization unit 22 normalizes the reciprocal number of each activity as expressed by the following formula (24), and each reliability Conf (M2), Conf (M12), Conf (M (-3)), Conf (M17) ) To the pixel generator 22.
[0191]
Conf (M2)
= (1 / A (M2)) / ((1 / A (M2)) + (1 / A (M12)) + (1 / A (M (-3))) + (1 / A (M17)) )
Conf (M12)
= (1 / A (M12)) / ((1 / A (M2)) + (1 / A (M12)) + (1 / A (M (-3))) + (1 / A (M17)) )
Conf (M (-3))
= (1 / A (M (-3))) / ((1 / A (M2)) + (1 / A (M12)) + (1 / A (M (-3))) + (1 / A (M17)))
Conf (M17)
= (1 / A (M17)) / ((1 / A (M2)) + (1 / A (M12)) + (1 / A (M (-3))) + (1 / A (M17)) )
... (24)
[0192]
As shown in Expression (24), since the reliability of each pixel is set, the higher the reciprocal of the activity, the higher the reliability, and conversely, the lower the reciprocal of the activity, the lower the reliability. Become. That is, as described above, the pixel in FIG. 23 where the pixel value in the above-described equation (11) model is represented as M2, the pixel in the above-described equation (15) model is represented as M12, The pixel in which the pixel value in the model of Expression (22) is represented as M (-3), and the pixel in which the pixel value in the model of Expression (23) is represented by M17 has a small activity. Since it is a premise that the pixel is highly correlated, the smaller the activity (the larger the reciprocal), the more suitable the pixel for approximation, and the pixel value calculated by the model has high reliability. Conversely, a pixel having a small reciprocal activity (high activity) has a low spatial correlation and is not suitable for approximation, and therefore, it can be said that the pixel value calculated by the model is also low in reliability.
[0193]
For example, as shown in FIG. 22, the activity is a pixel in which the pixel of interest is indicated by a pixel value M2, and each of the activities from a total of 9 pixels adjacent in the horizontal direction, vertical direction, and diagonal direction. Only the difference between pixels adjacent in the horizontal direction may be used.
[0194]
Further, as shown in FIG. 25, the activity is a pixel in which the pixel of interest is indicated by a pixel value M2, and each pixel value of a total of nine pixels adjacent in the adjacent horizontal direction, vertical direction, and diagonal direction is distributed. In this case, the difference between the maximum value and the minimum value, that is, the dynamic range may be used. Therefore, in the case of FIG. 25, the activity is | M103−M1 | or | M103−M203 |.
[0195]
Next, the pixel generation unit 14 will be described with reference to FIG.
[0196]
The model reliability adding unit 31 multiplies each pixel value input from each pixel value generation unit 21 with the reliability supplied from the model reliability calculation unit 31 and outputs the product to the pixel determination unit 32. More specifically, the multipliers 41-1 to 41-N of the reliability adding unit 31 are connected to the pixel values for each model input from the pixel value calculation units 12-1 to 12-N and the reliability distribution. The product of the reliability calculated from each model and supplied for each model is obtained, and each calculation result is output to the pixel determination unit 32.
[0197]
The reliability distributor 42 distributes and supplies the reliability of each model supplied from the model reliability calculation unit 13 to the multipliers 41-1 to 41-N corresponding to the model.
[0198]
The pixel determining unit 32 is supplied from the pixel value calculation unit 12-1 to 12 -N supplied from the reliability adding unit 31 for each model and the reliability distributor 42. All the products with the reliability calculated for each model are added, and the addition result is determined as a pixel value and output.
[0199]
Next, the motion blur removal process will be described with reference to the flowchart of FIG.
[0200]
In step S1, the motion vector detection unit 11 extracts unprocessed pixels based on the input image, detects a corresponding motion vector, obtains a motion amount v from the motion vector, and calculates the motion amount v together with the motion vector. Information is supplied to each pixel value calculation unit 12.
[0201]
In step S <b> 2, the pixel value calculation units 12-1 to 12 -N correspond to the respective models set, for example, the above-described equations (11), (15), (22), and (23). A pixel value of a pixel necessary for the calculation is extracted, and a pixel value from which motion blur is removed is obtained using the extracted pixel value. That is, the pixel value calculation units 12-1 to 12-N determine, for example, the light level F9 corresponding to the shutter component f9 in FIG. 23 described above by calculation corresponding to each model, determine the pixel value, The calculation result is output to the pixel generation unit 14.
[0202]
In step S <b> 3, the activity detection units 21-1 to 21 -N of the model reliability calculation unit 13 calculate activities of predetermined pixels corresponding to the respective models and output the activities to the reliability normalization unit 22. In other words, the activity detection units 21-1 to 21-N set the pixel value in the model of the above-described equation (11) in FIG. 23 as M2 and the pixel value in the above-described equation (15) model as M12. Each of the represented pixel, the pixel in which the pixel value in the above-described equation (22) model is represented as M (-3), and the pixel in which the pixel value in the above-described equation (23) model is represented by M17 As described with reference to FIG. 22 and Expression (8), an activity is obtained for each model and output to the reliability normalization unit 22.
[0203]
In step S4, the reliability normalization unit 22 obtains the reciprocals of the activities input from the activity detection units 21-1 to 21-N, normalizes them, and supplies them to the pixel generation unit 14 as reliability for each model. Output.
[0204]
That is, the reliability normalization unit 22 represents, for example, a pixel in which the pixel value in the above-described equation (11) model in FIG. 23 is represented as M2, and a pixel value in the above-described equation (15) model as M12. Pixels, the pixel value represented by M (−3) in the above-described equation (22) model, and the pixel value represented by M17 in the above-described equation (23) model. The obtained activity is subjected to the calculation of the above formula (24), and the reliability of the pixel value obtained for each model is obtained and output to the pixel generation unit 14.
[0205]
In step S5, the reliability distributor 42 in the reliability addition unit 31 of the pixel generation unit 14 determines the reliability for each model supplied from the model reliability calculation unit 13 in the process of step S4 at this timing. The multipliers 41-1 to 41-N in the reliability adding unit 31 of the pixel generation unit 14 are supplied to the multipliers 41-1 to 41-N corresponding to the respective models, and the pixel value calculation units 12 corresponding to the respective models. The product of the pixel value input from −1 to 12-N and the reliability supplied from the reliability distributor 42 is obtained, and the calculation result is output to the pixel determination unit 32.
[0206]
In step S <b> 6, the pixel determining unit 32 obtains the product sum of the pixel value and the reliability input from the multipliers 41-1 to 41 -N, respectively, and outputs it as a pixel value.
[0207]
That is, for example, the pixel value calculation units 12-1 to 12-N calculate the pixel values corresponding to F9 in FIG. 23 described above, and the results are F9 (model1), F9 (model2), F9 (model3),. F9 (model N) (the pixel value calculated by the first model is F9 (model 1), the pixel value calculated by the second model is F9 (model 2),..., The pixel value calculated by the N model is F9. (modelN)), and the reliability distributed from the reliability distribution unit 42 to the multipliers 41-1 to 41-N is Conf (model1), Conf (model2)... Conf ( In the case of model N), the pixel value F9 is calculated as shown by the following equation (25).
[0208]
F9 = F9 (model1) × Conf (model1)
+ F9 (model 2) x Conf (model 2) + ... + F9 (model N) x Conf (model N) (25)
[0209]
In step S7, the pixel determining unit 32 determines whether or not processing has been performed for all pixels. If it is determined that processing has not been performed for all pixels (target pixel), the processing is performed in step S1. Return, and the subsequent processing is repeated. That is, the processes in steps S1 to S7 are repeated until the process is performed on all the pixels.
[0210]
If it is determined in step S7 that all the pixels have been processed, the processing ends. As a result, when the above-described processing is performed for all the pixels of the input image, an image in which motion blur is removed from the input image is output.
[0211]
That is, by the above processing, pixel values in all methods corresponding to a plurality of models for calculating pixels for removing motion blur are obtained, and the reliability of each model is obtained based on the activity, and each product sum As a result, the pixel value is determined by calculating the pixel value, and as a result, the calculation result of the pixel value in all the models is subjected to the weighting process by the reliability, and the motion blur can be more accurately removed. .
[0212]
FIG. 28 is a diagram illustrating an image including motion blur, and FIG. 29 is a diagram illustrating an example of an image that is a processing result from which motion blur is removed by the image processing unit 1 in FIG. 1. As shown in FIG. 28, it can be seen that the shape of the window is clear by removing the motion blur as shown in FIG. 29 from the image in which the window or the like is not retained due to the motion blur.
[0213]
According to the above, according to the input motion vector, the motion of the first image data in the first image data acquired by projecting the real-world optical signal onto a plurality of pixels each having a time integration effect. Extract pixel values of a plurality of pixels corresponding to the target pixel of the second image data from which the blur is removed, and based on the extracted pixel values of the plurality of pixels, a pixel value of the target pixel of the second image data And the pixel value of the target pixel to be calculated is controlled in accordance with the activity of the first image data corresponding to the target pixel of the second image data. It is possible to accurately remove motion blur from an image including.
[0214]
By multiplying each pixel value calculated for each model in the above processing by a pixel value obtained by learning in advance, an image from which motion blur is removed is predicted from an image including motion blur. Also good.
[0215]
FIG. 30 shows a configuration for realizing the image processing unit 1 that removes motion blur from an image including motion blur by learning.
[0216]
The learning unit 61 in FIG. 30 executes learning processing based on a still image that is a teacher image and an image in which motion blur is added to the still image that is a student image (blur added image in the drawing). The obtained coefficient, that is, the reliability for each model is supplied to the image processing unit 1. FIG. 31A shows an example of a teacher image used for learning, and FIG. 31B shows an example of a student image used for learning. Compared to the image of FIG. 31A, the image of FIG. 31B is blurred to such an extent that, for example, a window drawn on a side surface of an airplane toy cannot be distinguished by adding motion blur. I understand.
[0217]
The image processing unit 1 obtains the pixel value of each pixel of the image from which the motion blur is removed by multiplying the pixel of the image including the motion blur that is the input image by a product sum with a prediction coefficient that is obtained in advance by learning. Finally, an image from which motion blur is removed (blur removal image in the figure) is output.
[0218]
Next, the configuration of the image processing unit 1 that removes motion blur from an image including motion blur by learning processing will be described with reference to FIG.
[0219]
The region extraction unit 71 extracts pixel values of pixels necessary for pixel value calculation (prediction taps necessary for pixel value prediction) and supplies the pixel values to the prediction calculation unit 73. That is, for example, among the above-described models, as shown in FIG. 33, a total of 7 pixels are extracted including the target pixel indicated by a black circle and the second, third, and fifth pixels in the left-right direction counted from the target pixel. . This pixel is the same as extracting the pixels indicated by the pixel values M2, M4, M5, M9, M10, and M12 with the pixel indicated by the pixel value M7 in FIG. 23 as the target pixel. That is, in this case, the region extraction unit 71 extracts the same pixel as the pixel used when performing the calculation using the models of the above formulas (11) and (15) as a prediction tap.
[0220]
The prediction calculation unit 73 reads the prediction coefficient stored in the coefficient memory 72 by learning in advance, and calculates the product sum of the pixel value of the pixel extracted as the prediction tap with the corresponding prediction coefficient, thereby obtaining the pixel value. Output as.
[0221]
More specifically, the coefficient memory 72 outputs the prediction coefficient to the prediction calculation unit 73. The prediction calculation unit 73 uses the prediction tap extracted from the pixel value at the predetermined pixel position of the input image supplied from the region extraction unit 71 and the prediction coefficient supplied from the coefficient memory 72, as follows: A predicted image is obtained (predicted and estimated) by executing the product-sum operation shown in 26).
[0222]
[Expression 2]
Figure 0004441846
... (26)
In Expression (26), q ′ represents a pixel of the predicted image. c i Each (i is an integer value from 1 to n) represents each prediction tap. D i Each represents a prediction coefficient.
[0223]
Thus, since the prediction calculation unit 73 predicts and estimates an image from which motion blur is removed from an image including motion blur, it is also referred to herein as a predicted image.
[0224]
Next, the motion blur removal process by the image processing unit 1 in FIG. 32 will be described with reference to the flowchart in FIG.
[0225]
In step S21, an input image is input.
[0226]
In step S22, the prediction calculation unit 73 reads the prediction coefficient stored in advance in the coefficient memory 72 by learning, and temporarily stores it in a memory (not shown).
[0227]
In step S <b> 23, the region extraction unit 71 extracts a prediction tap for the pixel of interest from the input image and outputs it to the prediction calculation unit 73. That is, in this case, as shown in FIG. 32, the region extraction unit 71 calculates a total of 7 pixels, that is, the second, third, and fifth pixels in the left-right direction from the target pixel. Extracted and output to the prediction calculation unit 73.
[0228]
In step S24, the prediction calculation unit 73 obtains the product sum of the pixel supplied from the region extraction unit 73 and the prediction coefficient learned in advance read from the coefficient memory 72, and predicts the pixel value. Store in a memory not shown.
[0229]
In step S25, the prediction calculation unit 73 determines whether or not the above-described prediction processing has been executed for all the pixels of the input image, and when determining that all the pixels have not been processed, the processing includes: Returning to step S22, the subsequent processing is repeated. That is, the processes in steps S22 to S25 are repeated until it is determined that all the pixels have been processed.
[0230]
If it is determined in step S25 that all pixels have been processed, in step S26, the prediction calculation unit 73 outputs all of the processed pixels as a motion blur removal processing image.
[0231]
As described above, since the pixel value for each model described above can be statistically processed using the prediction coefficient obtained in advance by learning as the reliability, the motion blur removal process can be realized at high speed.
[0232]
FIG. 35 is an image obtained by removing the motion blur from the image including the motion blur shown in FIG. 28 described above by the image processing unit 1 of FIG. In FIG. 35, it can be seen that in the image of the toy airplane, the side window is not clearly visible due to motion blur in FIG. 28, and the motion blur is removed.
[0233]
With the above processing, the motion blur removal process is executed using the prediction coefficient obtained in advance by learning, so the processing speed related to motion blur removal can be improved, and the motion The blur removal processing can be made accurate by statistical processing.
[0234]
Next, the learning unit 61 that generates the prediction coefficient stored in the coefficient memory 72 by learning will be described with reference to FIG.
[0235]
The student image generation unit 91 of the learning unit 61 in FIG. 36 generates a student image by adding motion blur from the teacher image that is an input image, and outputs the student image to the region extraction unit 92. More specifically, the learning unit 61 generates a student image by adding motion blur to a teacher image in accordance with a motion amount v (motion vector) arbitrarily set by the user.
[0236]
The region extraction unit 92 is the same as the region extraction unit 71 in FIG. 32, and extracts a plurality of pixels corresponding to the target pixel used for pixel generation calculation as a prediction tap from the student image, and a normal equation generation unit Output to 93.
[0237]
The normal equation generation unit 93 generates a normal equation from the prediction tap of the student image input from the region extraction unit 92 and the pixel of the teacher image, and supplies the normal equation to the coefficient determination unit 94.
[0238]
When the normal equation is supplied from the normal equation generation unit 93, the coefficient determination unit 94 calculates each prediction coefficient from the normal equation and stores it in the coefficient memory 94.
[0239]
The normal equation generation unit 93 and the coefficient determination unit 94 will be described in more detail.
[0240]
In the above equation (26), before learning, the prediction coefficient d i Each is an undetermined coefficient. Learning is performed by inputting pixels of a plurality of teacher images (still images). There are m pixels in the teacher image, and each of the m pixels k When described as (k is an integer value of 1 to m), the following equation (27) is set from the equation (26).
[0241]
[Equation 3]
Figure 0004441846
... (27)
[0242]
That is, the expression (27) is obtained by calculating the right side to obtain a pixel q from which a predetermined motion blur is removed. k Represents that it is possible to predict and estimate. In equation (27), it is not equal but near equal because it includes an error. That is, the pixel q of the predicted image (image from which motion blur is removed) that is the calculation result on the right side k 'But the actual pixel q k Does not exactly match, and includes a predetermined error.
[0243]
Therefore, in Equation (27), the prediction coefficient d that minimizes the sum of squared errors i Is obtained by learning, its prediction coefficient d i Is the actual still image pixel q k It can be said that this is the optimal coefficient for predicting
[0244]
Therefore, for example, m pixels (where m is an integer greater than n) collected by learning q k Using the least squares method, the optimal prediction coefficient d i Can be uniquely determined.
[0245]
That is, the prediction coefficient d on the right side of Equation (27) i A normal equation in the case of obtaining the value by the method of least squares is expressed by the following equation (28).
[0246]
[Expression 4]
Figure 0004441846
... (28)
[0247]
Therefore, when the normal equation represented by the equation (28) is generated, the prediction coefficient d is solved by solving the normal equation. i Is uniquely determined.
[0248]
Specifically, when each matrix of the normal equation represented by the equation (28) is defined as the following equations (29) to (31), the normal equation is expressed as the following equation (32): expressed.
[0249]
[Equation 5]
Figure 0004441846
... (29)
[0250]
[Formula 6]
Figure 0004441846
... (30)
[0251]
[Expression 7]
Figure 0004441846
... (31)
[0252]
[Equation 8]
Figure 0004441846
... (32)
[0253]
As shown in equation (32), the matrix D MAT Each component of i It is. Therefore, in the equation (32), the left side matrix C MAT And right-hand side matrix Q MAT Is determined, the matrix D is obtained by matrix solution. MAT (Ie, prediction coefficient d i ) Can be calculated.
[0254]
More specifically, as shown in Equation (29), the matrix C MAT Each component of the prediction tap c ik If is known, computation is possible. Prediction tap c ik Is extracted by the region extraction unit 92, the normal equation generation unit 93 is supplied with the prediction tap c supplied from the region extraction unit 92. ik Matrix C using each of MAT Each component of can be calculated.
[0255]
Further, as shown in the equation (31), the matrix Q MAT Each component of the prediction tap c ik And still image pixels q k If is known, computation is possible. Prediction tap c ik Is the matrix C MAT Are the same as those included in each component of k Is the prediction tap c ik Is a pixel of the teacher image with respect to the pixel of interest (student image pixel) included in. Therefore, the normal equation generation unit 93 generates the prediction tap c supplied from the region extraction unit 92. ik And the matrix Q using the teacher image MAT Each component of can be calculated.
[0256]
In this way, the normal equation generation unit 93 performs the matrix C MAT And matrix Q MAT Are calculated, and the calculation result is supplied to the coefficient determination unit 94.
[0257]
The coefficient determination unit 94 is based on the normal equation corresponding to the supplied predetermined class code, and the matrix D of the above equation (30). MAT The prediction coefficient di which is each component of is calculated.
[0258]
Specifically, the normal equation of the above equation (30) can be transformed as the following equation (33).
[0259]
[Equation 9]
Figure 0004441846
... (33)
[0260]
In equation (33), the left-side matrix D MAT Each component of i It is. Matrix C MAT And matrix Q MAT Each of the components is supplied from the normal equation generation unit 93. Therefore, the coefficient determination unit 94 receives the matrix C from the normal equation generation unit 92. MAT And matrix Q MAT When the respective components of are supplied, the matrix D is calculated by performing the matrix operation on the right side of Expression (33). MAT And the calculation result (prediction coefficient d i ) Is stored in the coefficient memory 95 in association with the class code.
[0261]
Next, with reference to the flowchart of FIG. 37, about the learning process (process which produces | generates the prediction coefficient which the image process part 1 of FIG. 32 uses by the learning part 61 (FIG. 36) with respect to the image process part 1 by learning. explain.
[0262]
In step S <b> 41, a teacher image (still image) is input to the region extraction unit 71.
[0263]
In step S <b> 42, the student image generation unit 91 adds a motion blur to the input teacher image to generate a student image (an image with the motion blur added), and supplies the student image to the region extraction unit 92.
[0264]
In step S <b> 43, the region extraction unit 92 extracts a prediction tap from the student image and supplies it to the normal equation generation unit 93. Note that the process of step S43 is basically the same as the process of step S23 (FIG. 34) described above.
[0265]
In step S44, the normal equation generation unit 93 calculates the above-described equation from the prediction tap (the pixel of the image with motion blur added) supplied from the region extraction unit 92 and the predetermined pixel of the teacher image (still image). A normal equation represented by (29) (ie, equation (30)) is generated, and the generated normal equation is supplied to the coefficient determination unit 94.
[0266]
In step S45, the coefficient determination unit 94 determines the prediction coefficient by solving the supplied normal equation, that is, calculates the prediction coefficient by calculating the right side of the above-described equation (33), and stores it in the coefficient memory 95. Let
[0267]
Thereafter, in step S46, it is determined whether or not processing has been performed for all pixels. If it is determined that processing has not been performed for all pixels, the processing returns to step S43. That is, the processes in steps S43 to S46 are repeated until the processes for all the pixels are completed.
[0268]
If it is determined in step S46 that all pixels have been processed, the process ends.
[0269]
Through the above processing, a prediction coefficient for removing motion blur is generated by learning and stored in the coefficient memory 95 for each pixel of the input image. When the prediction coefficient stored in the coefficient memory 95 is stored in the coefficient memory 72 in FIG. 32, the motion blur removal process in FIG. 34 can be executed.
[0270]
According to the above, according to the input motion vector, the motion blur of the first image data in the first image data acquired by projecting the real-world optical signal onto a plurality of pixels each having a time integration effect. Is a prediction coefficient for extracting pixel values of a plurality of pixels corresponding to the target pixel of the second image data from which the image is removed and predicting a pixel value of the target pixel of the first image data from the extracted pixel values of the plurality of pixels Therefore, it is possible to improve the processing speed related to the removal of motion blur, and it is possible to realize the motion blur removal processing by statistical processing.
[0271]
The image processing unit 1 in FIG. 32 always extracts the same prediction tap and removes motion blur for each pixel of the input image. For example, the processing of the image processing unit 1 in FIG. In the description, the target pixel is classified into a class code according to the size of the activity, that is, the presence or absence of spatial correlation, and the prediction tap is changed according to the class code to improve the accuracy of motion blur removal. Also good.
[0272]
FIG. 38 shows the image processing unit 1 that implements motion blur removal processing by setting a class code for each pixel of interest and changing the prediction tap.
[0273]
The area extraction unit 111 extracts class taps from the input image and outputs them to the pattern detection unit 112. Here, the region extraction unit 111 is adjacent to the pixel of interest in the up, down, left, and right diagonal directions of the leftmost and rightmost pixels among the seven pixels described with reference to FIG. 9 pixels (for example, the pixel referred to in FIG. 22 whose pixel value is indicated as M2 is the leftmost or rightmost pixel among the 7 pixels described with reference to FIG. 33) Are extracted as class taps, and output to the pattern detection unit 112. The pixel values of M101, M102.M103, M1, M2, M3, M201, M202, and M203 are extracted as class taps. However, the class tap is not limited to these 18 pixels, and other pixels may be extracted as class taps.
[0274]
The pattern detection unit 112 obtains an activity for each of the leftmost pixel and the rightmost pixel among the seven pixels described with reference to FIG. 33 and outputs the activity to the class code determination unit 113. .
[0275]
The class code determination unit 113 detects a class code based on the magnitude relationship of the input activities, and outputs the detected class code to the region extraction unit 115 and the coefficient memory 114. That is, in this case, since two activities are input from the pattern detection unit 112, for example, among the seven pixels described in FIG. 33, the activity of the pixel present on the leftmost side is present on the rightmost side. When the pixel activity is smaller than the pixel activity, the class code is set to 1. When the activity of the pixel on the rightmost side is smaller than the activity of the pixel on the leftmost side, the class code is set to 2 and the class code is extracted. To the unit 115 and the coefficient memory 114.
[0276]
The region extraction unit 115 extracts a prediction tap corresponding to the target pixel of the input image corresponding to the class code input from the class code determination unit 113. For example, when the class code is 1, as shown in FIG. 39A, the second, third, and fifth pixels from the target pixel to the left including the target pixel are extracted as prediction taps. When the class code is 2, as shown in FIG. 39B, the second, third, and fifth pixels from the target pixel to the right including the target pixel are extracted as prediction taps, and the prediction calculation is performed. To the unit 116.
[0277]
Note that the pattern of the prediction tap is not limited to this, but by setting the prediction tap in this way, the relationship defined in the calculation using the models of Expressions (11) and (15) described above is established. At least a pixel that is likely to be established can be selected as a prediction tap.
[0278]
That is, as described with reference to FIG. 23, when the level F9 is obtained using the third shutter component f9 after opening the shutter of the pixel whose pixel value is indicated by M7, the class code is When 1, the pixel whose pixel value is shown as M2 is at least shown to have a higher spatial correlation, ie less activity than the pixel whose pixel value is shown as M12. .
[0279]
On the other hand, since the equation (11) is established by assuming that the activity of the pixel whose pixel value is indicated as M2 is low, that is, the spatial correlation is high, the pixel used for the calculation at this time, that is, 39A, the pixel on the left side of the pixel of interest (pixels whose pixel values in FIG. 23 are represented by M2, M4, and M5) is used as a prediction tap, so that at least 3 pixels on the right side of the pixel of interest. Since this is a prediction tap that easily establishes the relationship of Expression (11) rather than calculating using pixels (pixels whose pixel values are indicated by M9, M10, and M12 in FIG. 23), prediction that eliminates motion blur This is because it can be considered excellent as a tap.
[0280]
Conversely, when the class code is 2, the pixel whose pixel value is indicated as M12 has at least higher spatial correlation than the pixel whose pixel value is indicated as M2, that is, the activity is low. Will be.
[0281]
On the other hand, since the equation (15) is established by assuming that the activity of the pixel whose pixel value is indicated as M12 is low, that is, the spatial correlation is high, the pixel used for the calculation at this time, that is, 39B, by using the three pixels on the right side of the target pixel (pixels whose pixel values are indicated by M9, M10, and M12 in FIG. 23) as the prediction tap, at least the left side of the target pixel. Since it is a prediction tap that easily establishes the relationship of Expression (15) rather than calculating using pixels (pixels whose pixel values are indicated by M2, M4, and M5 in FIG. 23), prediction that eliminates motion blur This is because it can be considered excellent as a tap.
[0282]
The coefficient memory 114 stores, in advance, a prediction coefficient obtained by learning by a learning unit 61 in FIG. 42, which will be described later, according to the class code, and the prediction coefficient corresponding to the class code input from the class code determination unit 113 is stored. This is supplied to the prediction calculation unit 116.
[0283]
The prediction calculation unit 116 is the same as the prediction calculation unit 73 of the image processing unit 1 in FIG. 32, and is the product of the coefficient supplied from the coefficient memory 114 and the pixel value of the prediction tap supplied from the region extraction unit 115. The sum is obtained and generated as a pixel from which motion blur has been removed, and is output as a processed image when all the pixels on the screen have been processed.
[0284]
Next, the motion blur removal processing by the image processing unit 1 in FIG. 38 will be described with reference to the flowchart in FIG. Note that the processing in steps SS67 to S69 in FIG. 40 is the same as the processing described with reference to the flowchart in FIG.
[0285]
In step S61, input images are input to the area extraction units 111 and 115, respectively.
[0286]
In step S62, the region extraction unit 111 extracts, as class taps, the pixel located at each of the target pixel and the relative position (one or more positions) from the target pixel set in advance from the input image. , And supplied to the pattern detection unit 112. In this case, the region extraction unit 111 extracts the pixels necessary for detecting the activity of the rightmost and leftmost pixels among the taps illustrated in FIG. 33 as class taps.
[0287]
In step S 63, the pattern detection unit 112 detects the supplied class tap pattern and supplies it to the class code determination unit 113. More specifically, the pattern detection unit 112 obtains the activity of the rightmost pixel and the leftmost pixel among the taps shown in FIG. 33, and outputs this to the class code determination unit 113 as a pattern.
[0288]
In step S64, the class code determination unit 113 determines a class code that matches the supplied class tap pattern from among a plurality of preset class codes, and each of the coefficient memory 114 and the region extraction unit 115 To supply. That is, in this case, the class code determination unit 113 determines the class code based on which of the input activities, the activity of the rightmost pixel of the tap in FIG. 33 and the activity of the leftmost pixel is smaller. For example, when the activity of the leftmost pixel is smaller, 1 is supplied as the class code, and when the activity of the rightmost pixel is smaller, 2 is supplied as the class code to the coefficient memory 114 and the region extraction unit 115, respectively.
[0289]
In step S65, the coefficient memory 114 reads a prediction coefficient (group) to be used from among a plurality of prediction coefficients (group) determined in advance by a learning process based on the supplied class code, and performs a prediction calculation unit. 116.
[0290]
The learning process will be described later with reference to the flowchart of FIG.
[0291]
In step S66, the region extraction unit 115 corresponds to the supplied class code from the input image, the target pixel, and a relative position (one or more positions) from the target pixel set in advance, Pixels located at positions set independently of the position of the class tap (which may be the same position as the position of the class tap) are extracted as prediction taps and supplied to the prediction calculation unit 116.
[0292]
That is, in this case, when 1 is input as the class code from the class code determination unit 113, the region extraction unit 115 is second, third, and left on the left side of the pixel of interest, as shown in FIG. 39A. When the fifth pixel is extracted as a class tap and 2 is input as the class code, as shown in FIG. 39B, the second, third, and fifth pixels are predicted taps on the right side of the target pixel. Extract as
[0293]
FIG. 41 is obtained by removing the motion blur from the image including the motion blur shown in FIG. 28 by the image processing unit 1 in FIG. In the processing result of FIG. 41, the window drawn on the side surface of the toy airplane, which could not be identified due to motion blur, is clearly displayed, and furthermore, the processing result of FIG. In comparison, it can be seen that the image has a clearer contrast.
[0294]
With the above processing, motion blur removal processing can be executed using an appropriate prediction tap depending on activity, so motion blur can be removed with higher accuracy.
[0295]
Next, the configuration of the learning unit 61 that obtains the prediction coefficient stored in the coefficient memory 114 of the image processing unit 1 in FIG. 38 by learning in advance will be described with reference to FIG.
[0296]
The student image generation unit 121, the coefficient determination unit 121, and the coefficient memory 128 are basically the same as the student image generation unit 91, the coefficient determination unit 94, and the coefficient memory 95 in the learning unit 61 of FIG. Therefore, the description is omitted.
[0297]
Further, the region extraction units 122 and 125, the pattern detection unit 123, and the class code determination unit 124 are the region extraction units 111 and 115, the pattern detection unit 113, and the class code determination unit 114 in the image processing unit 1 of FIG. The description thereof will be omitted.
[0298]
The normal equation generation unit 126 is basically the same as the normal equation generation unit 93 in the learning unit 61 of FIG. 36, but generates a normal equation for each class code input from the class code determination unit 124, and class It outputs to the coefficient determination part 127 for every code | cord | chord. Therefore, the coefficient determination unit 127 determines a coefficient for each class code, and stores the coefficient determined for each class code in the coefficient memory 128.
[0299]
Next, the learning process by the learning unit 61 in FIG. 42 will be described with reference to the flowchart in FIG.
[0300]
Note that the processing in steps S81, S82, and S89 in the flowchart in FIG. 43 is the same as the processing described with reference to the flowchart in FIG.
[0301]
In step S <b> 83, the region extraction unit 122 extracts class taps from the supplied student images and outputs the class taps to the pattern detection unit 123. Note that the process of step S83 is basically the same as the process of step S62 (FIG. 40) described above. That is, in this case, the region extraction unit 122 extracts the pixels necessary for detecting the activity of the rightmost and leftmost pixels among the taps illustrated in FIG. 33 as class taps.
[0302]
In step S <b> 84, the pattern detection unit 123 detects a pattern for determining a class code from the supplied class tap and supplies the pattern to the class code determination unit 124. Note that the process of step S84 is basically the same as the process of step S63 (FIG. 40) described above. That is, the pattern detection unit 123 obtains the activity of the rightmost pixel and the leftmost pixel among the taps shown in FIG. 33, and outputs this to the class code determination unit 113 as a pattern.
[0303]
In step S85, the class code determination unit 124 determines a class code based on the supplied class tap pattern and supplies the class code to each of the region extraction unit 125 and the normal equation generation unit 126. Note that the process of step S85 is basically the same as the process of step S64 (FIG. 40) described above. That is, in this case, the class code determination unit 124 determines the class code based on which of the input activities, the activity of the rightmost pixel of the tap in FIG. 33 and the activity of the leftmost pixel is smaller. For example, when the activity of the leftmost pixel is smaller, the class code is 1 and when the activity of the rightmost pixel is smaller, the class code is 2 and is supplied to the normal equation generation unit 126 and the region extraction unit 125, respectively. To do.
[0304]
In step S <b> 86, the region extraction unit 125 extracts a prediction tap from the student image corresponding to the supplied class code, and supplies the prediction tap to the normal equation generation unit 126. Note that the process of step S86 is basically the same as the process of step S66 (FIG. 40) described above. That is, in this case, when 1 is input as the class code from the class code determination unit 124, the region extraction unit 125 is second, third, and left on the left side of the pixel of interest as shown in FIG. 39A. When the fifth pixel is extracted as a class tap and 2 is input as the class code, as shown in FIG. 39B, the second, third, and fifth pixels are predicted taps on the right side of the target pixel. Extract as
[0305]
In step S87, the normal equation generation unit 126 uses the prediction tap supplied from the region extraction unit 125 and the predetermined pixel of the teacher image to obtain the normality represented by the above equation (28) (that is, the equation (30)). An equation is generated, and the generated normal equation is associated with the class code supplied from the class code determination unit 124 and supplied to the coefficient determination unit 127.
[0306]
In step S88, the coefficient determination unit 127 determines the prediction coefficient by solving the supplied normal equation, that is, calculates the prediction coefficient by calculating the right side of the above equation (32), and supplies the supplied class code. And stored in the coefficient memory 128.
[0307]
Thereafter, in step S89, it is determined whether or not processing has been performed for all pixels. If it is determined that processing has not been performed for all pixels, the processing returns to step S83. That is, the processes in steps S83 to S99 are repeated until the processing of all pixels is completed.
[0308]
If it is determined in step S89 that all pixels have been processed, the process ends.
[0309]
The configuration of the prediction tap and the class tap is not limited to the above example, and other pixels may be used. Further, regarding the number of class codes, the above example has been described for the case of two classes, but the class codes may be classified into more classes.
[0310]
For example, among the input activities, the class code is determined based on which one of the activity of the rightmost pixel of the tap in FIG. 33 and the activity of the leftmost pixel is smaller. For example, the activity of the leftmost pixel is more When it is small, 1 is determined as the class code, and when the activity of the rightmost pixel is smaller, 2 is determined as the class code. Furthermore, when both activities are compared, the activity that is small is larger than the predetermined threshold value. In this case, 3 may be determined as the class code, and for example, a prediction tap as shown in FIGS. 44A, 44, and C may be selected according to the class code.
[0311]
44A and 44B are prediction taps similar to those in FIGS. 39A and 39B, and the class tap in FIG. 44C is a prediction tap including both of them.
[0312]
That is, as a result of the size comparison, the fact that the smaller activity is larger than the predetermined threshold means that both of the pixels have no spatial correlation, and in fact, the above-described equations (11) and (15). In any of the cases, there is a high possibility that the approximation does not hold. Therefore, in such a case, as shown in FIG. 44C, the number of prediction taps is increased to obtain an average of both.
[0313]
An image that has been subjected to processing for removing motion blur from the image including motion blur in FIG. 28 described above using prediction taps corresponding to class codes of three classes as shown in FIGS. 44A, B, and C is shown in FIG. 45.
[0314]
Although it is not possible to recognize each of the windows drawn on the side portion of the toy airplane seen in the image of FIG. 28, the processing result in FIG. 45 is more than the processing result of FIG. The motion blur is clearly removed, so that each of the windows can be recognized.
[0315]
FIG. 46 is a diagram showing an image in which each pixel of the image of FIG. 28 is color-coded for each class code in the process of FIG. Here, the black area indicates an area classified as class code 1, the gray area indicates the class code 2 area, and white indicates the class code 3 area.
[0316]
That is, the region of class code 3 is distributed in the portion where the window of the side surface portion is drawn. Based on the comparison with the processing result of FIG. 41, class code 3 is set, and the prediction tap shown in FIG. 44C By using, it can be seen that the motion blur removal of the region in which the window is drawn is performed with higher accuracy.
[0317]
With the above processing, a prediction coefficient for removing motion blur is generated and stored in the coefficient memory 95 for each pixel of the input image by learning based on the class classification based on the class code. The prediction coefficient stored in the coefficient memory 95 is stored in the coefficient memory 128 in FIG. 42, so that the motion blur removal process in FIG. 43 can be executed.
[0318]
As a result, accurate motion blur removal processing using an appropriate prediction tap can be realized by class classification, it is possible to improve the processing speed related to motion blur removal, and further motion blur removal processing can be performed. It can be realized by statistical processing.
[0319]
The sensor 2 may be a solid-state imaging device, such as a BBD (Bucket Brigade Device), CID (Charge Injection Device), or CPD (Charge Priming Device).
[0320]
The series of processes described above can be executed by hardware, but can also be executed by software. When a series of processes is executed by software, a program constituting the software may execute various functions by installing a computer incorporated in dedicated hardware or various programs. For example, it is installed from a recording medium in a general-purpose personal computer or the like.
[0321]
FIG. 47 shows a configuration of an embodiment of a personal computer when the image processing unit 1 of FIGS. 1, 32, and 38 described above or the learning unit 61 of FIGS. 36 and 42 is realized by software. Yes. The CPU 201 of the personal computer controls the entire operation of the personal computer. Further, when a command is input from the input unit 206 such as a keyboard or a mouse from the user via the bus 204 and the input / output interface 205, the CPU 201 is stored in a ROM (Read Only Memory) 202 correspondingly. Run the program. Alternatively, the CPU 201 reads a program read from the magnetic disk 211, the optical disk 212, the magneto-optical disk 213, or the semiconductor memory 214 connected to the drive 210 and installed in the storage unit 208 into a RAM (Random Access Memory) 203. The output unit 207 outputs the execution result. Further, the CPU 201 controls the communication unit 209 to communicate with the outside and exchange data.
[0322]
As shown in FIG. 47, the recording medium on which the program is recorded is distributed to provide the program to the user separately from the computer, and a magnetic disk 211 (including a flexible disk) on which the program is recorded, An optical disk 212 (comprising a compact disc-read only memory (CDROM), a DVD (digital versatile disc)), a magneto-optical disk 213 (including an MD (mini-disc)), or a package medium composed of a semiconductor memory 214, etc. In addition, the program is configured by a ROM 202 in which a program is recorded and a hard disk included in the storage unit 208, which is provided to the user in a state of being incorporated in advance in the computer.
[0323]
In this specification, the step of describing the program recorded on the recording medium is not limited to the processing performed in time series in the order described, but of course, it is not necessarily performed in time series. Or the process performed separately is included.
[0324]
【The invention's effect】
As described above, according to the present invention, an accurate and highly accurate processing result can be obtained.
[0325]
Furthermore, according to the present invention, it is possible to obtain a motion blur removal process result that is more accurate and more accurate.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an embodiment of an image processing unit to which the present invention is applied.
FIG. 2 is a diagram illustrating imaging by a sensor.
FIG. 3 is a diagram illustrating an arrangement of pixels.
FIG. 4 is a diagram illustrating the operation of a detection element.
FIG. 5 is a diagram illustrating an image obtained by imaging an object corresponding to a moving foreground and an object corresponding to a stationary background.
FIG. 6 is a diagram illustrating a background area, a foreground area, a mixed area, a covered background area, and an uncovered background area.
FIG. 7 is a model diagram in which pixel values of pixels arranged in a row adjacent to each other in an image obtained by capturing an object corresponding to a stationary foreground and an object corresponding to a stationary background are developed in the time direction. It is.
FIG. 8 is a model diagram in which pixel values are developed in a time direction and a period corresponding to a shutter time is divided.
FIG. 9 is a model diagram in which pixel values are developed in a time direction and a period corresponding to a shutter time is divided.
FIG. 10 is a model diagram in which pixel values are developed in a time direction and a period corresponding to a shutter time is divided.
FIG. 11 is a diagram illustrating an example in which pixels in a foreground area, a background area, and a mixed area are extracted.
FIG. 12 is a diagram illustrating a correspondence between a pixel and a model in which pixel values are expanded in the time direction.
FIG. 13 is a model diagram in which pixel values are developed in a time direction and a period corresponding to a shutter time is divided.
FIG. 14 is a model diagram in which pixel values are developed in a time direction and a period corresponding to a shutter time is divided.
FIG. 15 is a model diagram in which pixel values are developed in a time direction and a period corresponding to a shutter time is divided.
FIG. 16 is a model diagram in which pixel values are developed in a time direction and a period corresponding to a shutter time is divided.
FIG. 17 is a model diagram in which pixel values are developed in a time direction and a period corresponding to a shutter time is divided.
FIG. 18 is a diagram illustrating a level of light incident on a detection element of a sensor.
FIG. 19 is a diagram illustrating pixel values corresponding to the light levels in FIG. 18;
FIG. 20 is a diagram illustrating a configuration of pixel values of an image in which motion blur occurs.
FIG. 21 is a diagram illustrating the principle of motion blur removal.
FIG. 22 is a diagram for explaining how to obtain an activity;
FIG. 23 is a diagram illustrating the principle of motion blur removal.
24 is a block diagram showing a configuration of a model reliability calculation unit of the image processing unit in FIG. 1. FIG.
FIG. 25 is a diagram for explaining another method of obtaining an activity.
26 is a block diagram illustrating a configuration of a pixel generation unit of the image processing unit in FIG. 1. FIG.
FIG. 27 is a flowchart for explaining motion blur removal processing by the image processing unit of FIG. 1;
FIG. 28 is a diagram illustrating an image including motion blur.
29 is a diagram illustrating an image obtained by removing motion blur from the image including motion blur in FIG. 28 by the image processing unit in FIG. 1;
FIG. 30 is a diagram illustrating the principle of learning.
FIG. 31 is a diagram illustrating an example of a student image and a teacher image.
FIG. 32 is a diagram illustrating an image processing unit that removes motion blur using a prediction coefficient obtained in advance by learning.
FIG. 33 is a diagram illustrating an example of a prediction tap.
34 is a flowchart for explaining motion blur removal processing by the image processing unit in FIG. 1; FIG.
35 is a diagram showing an image obtained by removing the motion blur from the image including the motion blur in FIG. 28 by the image processing unit in FIG. 32;
FIG. 36 is a diagram illustrating a learning unit that obtains a prediction coefficient used for processing of the image processing unit of FIG. 32 by learning;
FIG. 37 is a flowchart for describing learning processing by the learning unit in FIG. 36;
FIG. 38 is a diagram illustrating an image processing unit that removes motion blur using a prediction coefficient obtained by learning by classifying class codes in advance.
FIG. 39 is a diagram illustrating an example of a prediction tap according to a class code.
40 is a flowchart illustrating motion blur removal processing by the image processing unit in FIG. 38. FIG.
41 is a diagram showing an image obtained by removing the motion blur from the image including the motion blur in FIG. 28 by the image processing unit in FIG. 38;
42 is a diagram illustrating a learning unit that obtains a prediction coefficient used for processing of the image processing unit in FIG. 38 by learning.
43 is a flowchart for describing learning processing by the learning unit in FIG. 42;
FIG. 44 is a diagram illustrating examples of other prediction taps.
45 is a diagram showing an image obtained by removing the motion blur from the image including the motion blur in FIG. 28 by using the prediction tap in FIG. 44 by the image processing unit in FIG. 38.
46 is a diagram showing an image showing the distribution of classified class codes when the image including the motion blur in FIG. 28 is removed by the image processing unit in FIG. 38 using the prediction tap in FIG. 44; is there.
FIG. 47 is a diagram illustrating a recording medium.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 Image processing part, 11 Motion vector detection part, 12, 12-1 thru | or 12-N Pixel value calculation part, 13 Model reliability calculation part, 14 Pixel generation part, 21 Activity detection part 21, 211-1 thru | or 21-N , 22 reliability normalization unit, 31 reliability addition unit, 32 pixel determination unit, 41, 41-1 to 41-N multiplier, 42 reliability distribution unit, 71 region extraction unit, 72 coefficient memory, 73 prediction calculation unit , 91 Student image generation unit, 92 region extraction unit, 93 normal equation generation unit, 94 coefficient determination unit, 95 block extraction unit, 111 region extraction unit, 112 pattern detection unit, 113 class code determination unit, 114 coefficient memory, 115 region Extraction unit 116 Prediction calculation unit 121 Student image generation unit 122 Region extraction unit 123 Pattern determination unit 124 Class code determination unit 12 Area extracting unit, 126 the normal equation generating unit, 127 the coefficient determining section, 128 coefficient determination section

Claims (4)

第1の画像データから第2の画像データを演算する画像処理装置において、
れぞれ時間積分効果を有する複数の画素に現実世界の光信号が射影されて所定のシャッタ時間の露光で前記第1の画像データを取得する際の、入力された動きベクトルの動き量に応じて前記シャッタ時間を均等に分割した分割時間ごとの各画素に入射する入射光の成分をシャッタ成分とし、前記第1の画像データの動きボケが除去された前記第2の画像データの注目画素の成分の一部に対応する前記シャッタ成分が前記シャッタ時間における中央の前記分割時間で得られる画素を前記注目画素に対応する前記第1の画像データの対応画素として、
前記対応画素に対して所定の第1の方向に配置されている画素のうちの、前記注目画素の成分の一部に対応する前記シャッタ成分が前記シャッタ時間における先頭の前記分割時間で得られる画素の画素値を、第1の演算対象の画素値として抽出し、
前記第1の演算対象の画素値を抽出した画素に対して前記第1の方向に隣接している画素の画素値を、第2の演算対象の画素値として抽出し、
前記第2の演算対象の画素値を抽出した画素に対して前記第1の方向に配置されている画素のうちの、前記第2の演算対象の画素値を抽出した画素の各分割時間で得られる前記シャッタ成分であって前記第1の演算対象の画素値を抽出した画素の各分割時間で得られる前記シャッタ成分と重複しない前記シャッタ成分が得られる画素の画素値を、第3の演算対象の画素値として抽出する
第1の画素抽出手段と、
前記第1の画素抽出手段により抽出された前記第1の演算対象の画素値から前記第2の演算対象の画素値を減算した値に前記動きベクトルの動き量を積算し、前記第3の演算対象の画素値を加算した値を、前記第2の画像データの注目画素の画素値を求めるための第1の画素値として演算する第1の演算手段と、
前記対応画素に対して前記第1の方向とは逆の第2の方向に配置されている画素のうちの、前記注目画素の成分の一部に対応する前記シャッタ成分が前記シャッタ時間における最後尾の前記分割時間で得られる画素の画素値を、第4の演算対象の画素値として抽出し、
前記第4の演算対象の画素値を抽出した画素に対して前記第2の方向に隣接している画素の画素値を、第5の演算対象の画素値として抽出し、
前記第5の演算対象の画素値を抽出した画素に対して前記第2の方向に配置されている画素のうちの、前記第5の演算対象の画素値を抽出した画素の各分割時間で得られる前記シャッタ成分であって前記第4の演算対象の画素値を抽出した画素の各分割時間で得られる前記シャッタ成分と重複しない前記シャッタ成分が得られる画素の画素値を、第6の演算対象の画素値として抽出する
第2の画素抽出手段と、
前記第2の画素抽出手段により抽出された前記第4の演算対象の画素値から前記第5の演算対象の画素値を減算した値に前記動きベクトルの動き量を積算し、前記第6の演算対象の画素値を加算した値を、前記第2の画像データの注目画素の画素値を求めるための第2の画素値として演算する第2の演算手段と、
前記第3の演算対象の画素値を抽出した画素と当該画素に隣接する複数の画素から演算される第1のアクティビティと、前記第6の演算対象の画素値を抽出した画素と当該画素に隣接する複数の画素から演算される第2のアクティビティとに応じて、前記第1の画素値と前記第2の画素値とを重み付け加算して出力する画素生成手段と
を備えることを特徴とする画像処理装置。
In an image processing apparatus that calculates second image data from first image data,
Optical signal of the real world into a plurality of pixels having respective time integration effect Re their is projected at the time of acquiring the first image data with the exposure of a predetermined shutter time, the motion amount of the input motion vector Accordingly, the pixel of interest of the second image data from which the motion blur of the first image data is removed by using a component of incident light incident on each pixel for each divided time obtained by equally dividing the shutter time as a shutter component. As a corresponding pixel of the first image data corresponding to the target pixel, a pixel obtained by the shutter component corresponding to a part of the component is obtained at the central division time in the shutter time,
Among the pixels arranged in a predetermined first direction with respect to the corresponding pixel, the pixel in which the shutter component corresponding to a part of the component of the target pixel is obtained in the first division time in the shutter time Are extracted as the pixel value of the first calculation target,
Extracting a pixel value of a pixel adjacent in the first direction with respect to a pixel from which the pixel value of the first calculation target is extracted, as a second calculation target pixel value;
Among the pixels arranged in the first direction with respect to the pixel from which the second calculation target pixel value is extracted, the pixel value from which the second calculation target pixel value is extracted is obtained at each division time. The pixel value of the pixel from which the shutter component that does not overlap with the shutter component obtained at each division time of the pixel from which the pixel value from which the first calculation target pixel value is extracted is obtained is the third calculation target. Extract as pixel value of
First pixel extraction means;
The amount of motion of the motion vector is added to a value obtained by subtracting the pixel value of the second calculation target from the pixel value of the first calculation target extracted by the first pixel extraction means, and the third calculation the value obtained by adding the pixel value of the target, a first calculating means for calculating a first pixel value for determining the pixel value of the target pixel of the second image data,
Of the pixels arranged in the second direction opposite to the first direction with respect to the corresponding pixel, the shutter component corresponding to a part of the component of the target pixel is the last in the shutter time. The pixel value of the pixel obtained in the division time is extracted as a pixel value to be calculated,
Extracting a pixel value of a pixel adjacent in the second direction with respect to a pixel from which the fourth calculation target pixel value is extracted, as a fifth calculation target pixel value;
Among the pixels arranged in the second direction with respect to the pixel from which the fifth calculation target pixel value is extracted, the pixel value obtained from the fifth calculation target pixel value is obtained at each division time. The pixel value of the pixel from which the shutter component that does not overlap with the shutter component obtained at each division time of the pixel from which the pixel value of the fourth calculation target is extracted is obtained as the sixth calculation target. Extract as pixel value of
Second pixel extraction means;
The amount of motion of the motion vector is added to a value obtained by subtracting the pixel value of the fifth calculation target from the pixel value of the fourth calculation target extracted by the second pixel extraction means, and the sixth calculation the value obtained by adding the pixel value of the target, second calculating means for calculating a second pixel value for determining the pixel value of the target pixel of the second image data,
The first activity calculated from the pixel from which the third calculation target pixel value is extracted and the plurality of pixels adjacent to the pixel, the pixel from which the sixth calculation target pixel value is extracted, and the adjacent pixel And a pixel generation means for weighting and adding the first pixel value and the second pixel value in accordance with a second activity calculated from the plurality of pixels. Processing equipment.
第1の画像データから第2の画像データを演算する画像処理装置の画像処理方法において、
れぞれ時間積分効果を有する複数の画素に現実世界の光信号が射影されて所定のシャッタ時間の露光で前記第1の画像データを取得する際の、入力された動きベクトルの動き量に応じて前記シャッタ時間を均等に分割した分割時間ごとの各画素に入射する入射光の成分をシャッタ成分とし、前記第1の画像データの動きボケが除去された前記第2の画像データの注目画素の成分の一部に対応する前記シャッタ成分が前記シャッタ時間における中央の前記分割時間で得られる画素を前記注目画素に対応する前記第1の画像データの対応画素として、
前記対応画素に対して所定の第1の方向に配置されている画素のうちの、前記注目画素の成分の一部に対応する前記シャッタ成分が前記シャッタ時間における先頭の前記分割時間で得られる画素の画素値を、第1の演算対象の画素値として抽出し、
前記第1の演算対象の画素値を抽出した画素に対して前記第1の方向に隣接している画素の画素値を、第2の演算対象の画素値として抽出し、
前記第2の演算対象の画素値を抽出した画素に対して前記第1の方向に配置されている画素のうちの、前記第2の演算対象の画素値を抽出した画素の各分割時間で得られる前記シャッタ成分であって前記第1の演算対象の画素値を抽出した画素の各分割時間で得られる前記シャッタ成分と重複しない前記シャッタ成分が得られる画素の画素値を、第3の演算対象の画素値として抽出する
第1の画素抽出ステップと、
前記第1の画素抽出ステップの処理で抽出された前記第1の演算対象の画素値から前記第2の演算対象の画素値を減算した値に前記動きベクトルの動き量を積算し、前記第3の演算対象の画素値を加算した値を、前記第2の画像データの注目画素の画素値を求めるための第1の画素値として演算する第1の演算ステップと、
前記対応画素に対して前記第1の方向とは逆の第2の方向に配置されている画素のうちの、前記注目画素の成分の一部に対応する前記シャッタ成分が前記シャッタ時間における最後尾の前記分割時間で得られる画素の画素値を、第4の演算対象の画素値として抽出し、
前記第4の演算対象の画素値を抽出した画素に対して前記第2の方向に隣接している画素の画素値を、第5の演算対象の画素値として抽出し、
前記第5の演算対象の画素値を抽出した画素に対して前記第2の方向に配置されている画素のうちの、前記第5の演算対象の画素値を抽出した画素の各分割時間で得られる前記シャッタ成分であって前記第4の演算対象の画素値を抽出した画素の各分割時間で得られる前記シャッタ成分と重複しない前記シャッタ成分が得られる画素の画素値を、第6の演算対象の画素値として抽出する
第2の画素抽出ステップと、
前記第2の画素抽出ステップの処理で抽出された前記第4の演算対象の画素値から前記第5の演算対象の画素値を減算した値に前記動きベクトルの動き量を積算し、前記第6の演算対象の画素値を加算した値を、前記第2の画像データの注目画素の画素値を求めるための第2の画素値として演算する第2の演算ステップと、
前記第3の演算対象の画素値を抽出した画素と当該画素に隣接する複数の画素から演算される第1のアクティビティと、前記第6の演算対象の画素値を抽出した画素と当該画素に隣接する複数の画素から演算される第2のアクティビティとに応じて、前記第1の画素値と前記第2の画素値とを重み付け加算して出力する画素生成ステップと
を含むことを特徴とする画像処理方法。
In an image processing method of an image processing apparatus for calculating second image data from first image data,
Optical signal of the real world into a plurality of pixels having respective time integration effect Re their is projected at the time of acquiring the first image data with the exposure of a predetermined shutter time, the motion amount of the input motion vector Accordingly, the pixel of interest of the second image data from which the motion blur of the first image data is removed by using a component of incident light incident on each pixel for each divided time obtained by equally dividing the shutter time as a shutter component. As a corresponding pixel of the first image data corresponding to the target pixel, a pixel obtained by the shutter component corresponding to a part of the component is obtained at the central division time in the shutter time,
Among the pixels arranged in a predetermined first direction with respect to the corresponding pixel, the pixel in which the shutter component corresponding to a part of the component of the target pixel is obtained in the first division time in the shutter time Are extracted as the pixel value of the first calculation target,
Extracting a pixel value of a pixel adjacent in the first direction with respect to a pixel from which the pixel value of the first calculation target is extracted, as a second calculation target pixel value;
Among the pixels arranged in the first direction with respect to the pixel from which the second calculation target pixel value is extracted, the pixel value from which the second calculation target pixel value is extracted is obtained at each division time. The pixel value of the pixel from which the shutter component that does not overlap with the shutter component obtained at each division time of the pixel from which the pixel value from which the first calculation target pixel value is extracted is obtained is the third calculation target. Extract as pixel value of
A first pixel extraction step;
The amount of motion of the motion vector is added to a value obtained by subtracting the pixel value of the second calculation target from the pixel value of the first calculation target extracted in the processing of the first pixel extraction step, and the third the value obtained by adding the pixel value of the calculation target, the first calculation step of calculating a first pixel value for determining the pixel value of the target pixel of the second image data,
Of the pixels arranged in the second direction opposite to the first direction with respect to the corresponding pixel, the shutter component corresponding to a part of the component of the target pixel is the last in the shutter time. The pixel value of the pixel obtained in the division time is extracted as a pixel value to be calculated,
Extracting a pixel value of a pixel adjacent in the second direction with respect to a pixel from which the fourth calculation target pixel value is extracted, as a fifth calculation target pixel value;
Among the pixels arranged in the second direction with respect to the pixel from which the fifth calculation target pixel value is extracted, the pixel value obtained from the fifth calculation target pixel value is obtained at each division time. The pixel value of the pixel from which the shutter component that does not overlap with the shutter component obtained at each division time of the pixel from which the pixel value of the fourth calculation target is extracted is obtained as the sixth calculation target. Extract as pixel value of
A second pixel extraction step;
A motion amount of the motion vector is added to a value obtained by subtracting the pixel value of the fifth calculation target from the pixel value of the fourth calculation target extracted in the processing of the second pixel extraction step; the value obtained by adding the pixel value of the calculation target, and a second calculation step of calculating a second pixel value for determining the pixel value of the target pixel of the second image data,
The first activity calculated from the pixel from which the third calculation target pixel value is extracted and the plurality of pixels adjacent to the pixel, the pixel from which the sixth calculation target pixel value is extracted, and the adjacent pixel A pixel generation step of weighting and adding the first pixel value and the second pixel value in accordance with a second activity calculated from a plurality of pixels to be output. Processing method.
第1の画像データから第2の画像データを演算する画像処理をコンピュータに実行させるプログラムであって、
れぞれ時間積分効果を有する複数の画素に現実世界の光信号が射影されて所定のシャッタ時間の露光で前記第1の画像データを取得する際の、入力された動きベクトルの動き量に応じて前記シャッタ時間を均等に分割した分割時間ごとの各画素に入射する入射光の成分をシャッタ成分とし、前記第1の画像データの動きボケが除去された前記第2の画像データの注目画素の成分の一部に対応する前記シャッタ成分が前記シャッタ時間における中央の前記分割時間で得られる画素を前記注目画素に対応する前記第1の画像データの対応画素として、
前記対応画素に対して所定の第1の方向に配置されている画素のうちの、前記注目画素の成分の一部に対応する前記シャッタ成分が前記シャッタ時間における先頭の前記分割時間で得られる画素の画素値を、第1の演算対象の画素値として抽出し、
前記第1の演算対象の画素値を抽出した画素に対して前記第1の方向に隣接している画素の画素値を、第2の演算対象の画素値として抽出し、
前記第2の演算対象の画素値を抽出した画素に対して前記第1の方向に配置されている画素のうちの、前記第2の演算対象の画素値を抽出した画素の各分割時間で得られる前記シャッタ成分であって前記第1の演算対象の画素値を抽出した画素の各分割時間で得られる前記シャッタ成分と重複しない前記シャッタ成分が得られる画素の画素値を、第3の演算対象の画素値として抽出する
第1の画素抽出ステップと、
前記第1の画素抽出ステップの処理で抽出された前記第1の演算対象の画素値から前記第2の演算対象の画素値を減算した値に前記動きベクトルの動き量を積算し、前記第3の演算対象の画素値を加算した値を、前記第2の画像データの注目画素の画素値を求めるための第1の画素値として演算する第1の演算ステップと、
前記対応画素に対して前記第1の方向とは逆の第2の方向に配置されている画素のうちの、前記注目画素の成分の一部に対応する前記シャッタ成分が前記シャッタ時間における最後尾の前記分割時間で得られる画素の画素値を、第4の演算対象の画素値として抽出し、
前記第4の演算対象の画素値を抽出した画素に対して前記第2の方向に隣接している画素の画素値を、第5の演算対象の画素値として抽出し、
前記第5の演算対象の画素値を抽出した画素に対して前記第2の方向に配置されている画素のうちの、前記第5の演算対象の画素値を抽出した画素の各分割時間で得られる前記シャッタ成分であって前記第4の演算対象の画素値を抽出した画素の各分割時間で得られる前記シャッタ成分と重複しない前記シャッタ成分が得られる画素の画素値を、第6の演算対象の画素値として抽出する
第2の画素抽出ステップと、
前記第2の画素抽出ステップの処理で抽出された前記第4の演算対象の画素値から前記第5の演算対象の画素値を減算した値に前記動きベクトルの動き量を積算し、前記第6の演算対象の画素値を加算した値を、前記第2の画像データの注目画素の画素値を求めるための第2の画素値として演算する第2の演算ステップと、
前記第3の演算対象の画素値を抽出した画素と当該画素に隣接する複数の画素から演算される第1のアクティビティと、前記第6の演算対象の画素値を抽出した画素と当該画素に隣接する複数の画素から演算される第2のアクティビティとに応じて、前記第1の画素値と前記第2の画素値とを重み付け加算して出力する画素生成ステップと
を含むことを特徴とするコンピュータが読み取り可能なプログラムが記録されている記録媒体。
A program for causing a computer to execute image processing for calculating second image data from first image data,
Optical signal of the real world into a plurality of pixels having respective time integration effect Re their is projected at the time of acquiring the first image data with the exposure of a predetermined shutter time, the motion amount of the input motion vector Accordingly, the pixel of interest of the second image data from which the motion blur of the first image data is removed by using a component of incident light incident on each pixel for each divided time obtained by equally dividing the shutter time as a shutter component. As a corresponding pixel of the first image data corresponding to the target pixel, a pixel obtained by the shutter component corresponding to a part of the component is obtained at the central division time in the shutter time,
Among the pixels arranged in a predetermined first direction with respect to the corresponding pixel, the pixel in which the shutter component corresponding to a part of the component of the target pixel is obtained in the first division time in the shutter time Are extracted as the pixel value of the first calculation target,
Extracting a pixel value of a pixel adjacent in the first direction with respect to a pixel from which the pixel value of the first calculation target is extracted, as a second calculation target pixel value;
Among the pixels arranged in the first direction with respect to the pixel from which the second calculation target pixel value is extracted, the pixel value from which the second calculation target pixel value is extracted is obtained at each division time. The pixel value of the pixel from which the shutter component that does not overlap with the shutter component obtained at each division time of the pixel from which the pixel value from which the first calculation target pixel value is extracted is obtained is the third calculation target. Extract as pixel value of
A first pixel extraction step;
The amount of motion of the motion vector is added to a value obtained by subtracting the pixel value of the second calculation target from the pixel value of the first calculation target extracted in the processing of the first pixel extraction step, and the third the value obtained by adding the pixel value of the calculation target, the first calculation step of calculating a first pixel value for determining the pixel value of the target pixel of the second image data,
Of the pixels arranged in the second direction opposite to the first direction with respect to the corresponding pixel, the shutter component corresponding to a part of the component of the target pixel is the last in the shutter time. The pixel value of the pixel obtained in the division time is extracted as a pixel value to be calculated,
Extracting a pixel value of a pixel adjacent in the second direction with respect to a pixel from which the fourth calculation target pixel value is extracted, as a fifth calculation target pixel value;
Among the pixels arranged in the second direction with respect to the pixel from which the fifth calculation target pixel value is extracted, the pixel value obtained from the fifth calculation target pixel value is obtained at each division time. The pixel value of the pixel from which the shutter component that does not overlap with the shutter component obtained at each division time of the pixel from which the pixel value of the fourth calculation target is extracted is obtained as the sixth calculation target. Extract as pixel value of
A second pixel extraction step;
A motion amount of the motion vector is added to a value obtained by subtracting the pixel value of the fifth calculation target from the pixel value of the fourth calculation target extracted in the processing of the second pixel extraction step; the value obtained by adding the pixel value of the calculation target, and a second calculation step of calculating a second pixel value for determining the pixel value of the target pixel of the second image data,
The first activity calculated from the pixel from which the third calculation target pixel value is extracted and the plurality of pixels adjacent to the pixel, the pixel from which the sixth calculation target pixel value is extracted, and the adjacent pixel And a pixel generation step of weighting and adding the first pixel value and the second pixel value in accordance with a second activity calculated from a plurality of pixels. Is a recording medium on which a readable program is recorded.
第1の画像データから第2の画像データを演算する画像処理をコンピュータに実行させるプログラムであって、
れぞれ時間積分効果を有する複数の画素に現実世界の光信号が射影されて所定のシャッタ時間の露光で前記第1の画像データを取得する際の、入力された動きベクトルの動き量に応じて前記シャッタ時間を均等に分割した分割時間ごとの各画素に入射する入射光の成分をシャッタ成分とし、前記第1の画像データの動きボケが除去された前記第2の画像データの注目画素の成分の一部に対応する前記シャッタ成分が前記シャッタ時間における中央の前記分割時間で得られる画素を前記注目画素に対応する前記第1の画像データの対応画素として、
前記対応画素に対して所定の第1の方向に配置されている画素のうちの、前記注目画素の成分の一部に対応する前記シャッタ成分が前記シャッタ時間における先頭の前記分割時間で得られる画素の画素値を、第1の演算対象の画素値として抽出し、
前記第1の演算対象の画素値を抽出した画素に対して前記第1の方向に隣接している画素の画素値を、第2の演算対象の画素値として抽出し、
前記第2の演算対象の画素値を抽出した画素に対して前記第1の方向に配置されている画素のうちの、前記第2の演算対象の画素値を抽出した画素の各分割時間で得られる前記シャッタ成分であって前記第1の演算対象の画素値を抽出した画素の各分割時間で得られる前記シャッタ成分と重複しない前記シャッタ成分が得られる画素の画素値を、第3の演算対象の画素値として抽出する
第1の画素抽出ステップと、
前記第1の画素抽出ステップの処理で抽出された前記第1の演算対象の画素値から前記第2の演算対象の画素値を減算した値に前記動きベクトルの動き量を積算し、前記第3の演算対象の画素値を加算した値を、前記第2の画像データの注目画素の画素値を求めるための第1の画素値として演算する第1の演算ステップと、
前記対応画素に対して前記第1の方向とは逆の第2の方向に配置されている画素のうちの、前記注目画素の成分の一部に対応する前記シャッタ成分が前記シャッタ時間における最後尾の前記分割時間で得られる画素の画素値を、第4の演算対象の画素値として抽出し、
前記第4の演算対象の画素値を抽出した画素に対して前記第2の方向に隣接している画素の画素値を、第5の演算対象の画素値として抽出し、
前記第5の演算対象の画素値を抽出した画素に対して前記第2の方向に配置されている画素のうちの、前記第5の演算対象の画素値を抽出した画素の各分割時間で得られる前記シャッタ成分であって前記第4の演算対象の画素値を抽出した画素の各分割時間で得られる前記シャッタ成分と重複しない前記シャッタ成分が得られる画素の画素値を、第6の演算対象の画素値として抽出する
第2の画素抽出ステップと、
前記第2の画素抽出ステップの処理で抽出された前記第4の演算対象の画素値から前記第5の演算対象の画素値を減算した値に前記動きベクトルの動き量を積算し、前記第6の演算対象の画素値を加算した値を、前記第2の画像データの注目画素の画素値を求めるための第2の画素値として演算する第2の演算ステップと、
前記第3の演算対象の画素値を抽出した画素と当該画素に隣接する複数の画素から演算される第1のアクティビティと、前記第6の演算対象の画素値を抽出した画素と当該画素に隣接する複数の画素から演算される第2のアクティビティとに応じて、前記第1の画素値と前記第2の画素値とを重み付け加算して出力する画素生成ステップと
を含む処理をコンピュータに実行させることを特徴とするプログラム。
A program for causing a computer to execute image processing for calculating second image data from first image data,
Optical signal of the real world into a plurality of pixels having respective time integration effect Re their is projected at the time of acquiring the first image data with the exposure of a predetermined shutter time, the motion amount of the input motion vector Accordingly, the pixel of interest of the second image data from which the motion blur of the first image data is removed by using a component of incident light incident on each pixel for each divided time obtained by equally dividing the shutter time as a shutter component. As a corresponding pixel of the first image data corresponding to the target pixel, a pixel obtained by the shutter component corresponding to a part of the component is obtained at the central division time in the shutter time,
Among the pixels arranged in a predetermined first direction with respect to the corresponding pixel, the pixel in which the shutter component corresponding to a part of the component of the target pixel is obtained in the first division time in the shutter time Are extracted as the pixel value of the first calculation target,
Extracting a pixel value of a pixel adjacent in the first direction with respect to a pixel from which the pixel value of the first calculation target is extracted, as a second calculation target pixel value;
Among the pixels arranged in the first direction with respect to the pixel from which the second calculation target pixel value is extracted, the pixel value from which the second calculation target pixel value is extracted is obtained at each division time. The pixel value of the pixel from which the shutter component that does not overlap with the shutter component obtained at each division time of the pixel from which the pixel value from which the first calculation target pixel value is extracted is obtained is the third calculation target. Extract as pixel value of
A first pixel extraction step;
The amount of motion of the motion vector is added to a value obtained by subtracting the pixel value of the second calculation target from the pixel value of the first calculation target extracted in the processing of the first pixel extraction step, and the third the value obtained by adding the pixel value of the calculation target, the first calculation step of calculating a first pixel value for determining the pixel value of the target pixel of the second image data,
Of the pixels arranged in the second direction opposite to the first direction with respect to the corresponding pixel, the shutter component corresponding to a part of the component of the target pixel is the last in the shutter time. The pixel value of the pixel obtained in the division time is extracted as a pixel value to be calculated,
Extracting a pixel value of a pixel adjacent in the second direction with respect to a pixel from which the fourth calculation target pixel value is extracted, as a fifth calculation target pixel value;
Among the pixels arranged in the second direction with respect to the pixel from which the fifth calculation target pixel value is extracted, the pixel value obtained from the fifth calculation target pixel value is obtained at each division time. The pixel value of the pixel from which the shutter component that does not overlap with the shutter component obtained at each division time of the pixel from which the pixel value of the fourth calculation target is extracted is obtained as the sixth calculation target. Extract as pixel value of
A second pixel extraction step;
A motion amount of the motion vector is added to a value obtained by subtracting the pixel value of the fifth calculation target from the pixel value of the fourth calculation target extracted in the processing of the second pixel extraction step; the value obtained by adding the pixel value of the calculation target, and a second calculation step of calculating a second pixel value for determining the pixel value of the target pixel of the second image data,
The first activity calculated from the pixel from which the third calculation target pixel value is extracted and the plurality of pixels adjacent to the pixel, the pixel from which the sixth calculation target pixel value is extracted, and the adjacent pixel And a pixel generation step of weighting and adding the first pixel value and the second pixel value in accordance with a second activity calculated from a plurality of pixels to be executed. A program characterized by that.
JP2003052101A 2003-02-28 2003-02-28 Image processing apparatus and method, recording medium, and program Expired - Fee Related JP4441846B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003052101A JP4441846B2 (en) 2003-02-28 2003-02-28 Image processing apparatus and method, recording medium, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003052101A JP4441846B2 (en) 2003-02-28 2003-02-28 Image processing apparatus and method, recording medium, and program

Publications (2)

Publication Number Publication Date
JP2004259218A JP2004259218A (en) 2004-09-16
JP4441846B2 true JP4441846B2 (en) 2010-03-31

Family

ID=33117044

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003052101A Expired - Fee Related JP4441846B2 (en) 2003-02-28 2003-02-28 Image processing apparatus and method, recording medium, and program

Country Status (1)

Country Link
JP (1) JP4441846B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1830563A4 (en) * 2004-12-21 2012-08-01 Sony Corp Image processing device, learning device, and coefficient generating device and method
EP1830562A4 (en) * 2004-12-21 2012-08-01 Sony Corp Learning device, learning method, and learning program
WO2023042432A1 (en) * 2021-09-17 2023-03-23 ソニーセミコンダクタソリューションズ株式会社 Imaging system, processing device, and machine learning device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4164912B2 (en) * 1998-09-30 2008-10-15 ソニー株式会社 Signal processing apparatus and signal processing method
JP2001222702A (en) * 2000-02-07 2001-08-17 Sony Corp Device and method for image processing and recording medium
JP4596205B2 (en) * 2001-04-10 2010-12-08 ソニー株式会社 Image processing apparatus and method, and program

Also Published As

Publication number Publication date
JP2004259218A (en) 2004-09-16

Similar Documents

Publication Publication Date Title
Xu et al. Deep image matting
KR101830804B1 (en) Digital image stabilization method with adaptive filtering
CN103262119B (en) For the method and system that image is split
US7139019B2 (en) Image processing device
US7154541B2 (en) Image processing device
US7260260B2 (en) Image processing apparatus and method
US7336818B2 (en) Image processing device and method, and image-taking device
KR100859382B1 (en) Image processing apparatus and method, and image pickup apparatus
US7221778B2 (en) Image processing apparatus and method, and image pickup apparatus
Yuan et al. UG $^{2+} $ Track 2: A Collective Benchmark Effort for Evaluating and Advancing Image Understanding in Poor Visibility Environments
CN104685538A (en) Systems and methods for reducing noise in video streams
US20050259870A1 (en) Image processing apparatus and method, and image pickup apparatus
CN101605209A (en) Camera head and image-reproducing apparatus
Abiko et al. Single image reflection removal based on GAN with gradient constraint
Gu et al. Eventdrop: Data augmentation for event-based learning
KR100894923B1 (en) Image processing apparatus and method, and image pickup apparatus
Guo et al. Reinforced depth-aware deep learning for single image dehazing
Laugraud et al. Is a memoryless motion detection truly relevant for background generation with LaBGen?
Gökcen et al. Real-time impulse noise removal
JP4441846B2 (en) Image processing apparatus and method, recording medium, and program
US7409074B2 (en) Information processing apparatus and system using pixel data
US20070098289A1 (en) Signal processing device, and signal processing method, and program, and recording medium
JP4660979B2 (en) Image processing apparatus and method, recording medium, and program
KR101886246B1 (en) Image processing device of searching and controlling an motion blur included in an image data and method thereof
Xue et al. Bwin: A bilateral warping method for video frame interpolation

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060221

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090202

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090205

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090403

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090430

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090730

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20090810

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090929

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091125

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091230

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

Free format text: PAYMENT UNTIL: 20130122

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140122

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees