JP2009244944A - Image-recovering apparatus and photographing apparatus - Google Patents

Image-recovering apparatus and photographing apparatus Download PDF

Info

Publication number
JP2009244944A
JP2009244944A JP2008087550A JP2008087550A JP2009244944A JP 2009244944 A JP2009244944 A JP 2009244944A JP 2008087550 A JP2008087550 A JP 2008087550A JP 2008087550 A JP2008087550 A JP 2008087550A JP 2009244944 A JP2009244944 A JP 2009244944A
Authority
JP
Japan
Prior art keywords
image
subject
unit
psf
specific
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.)
Pending
Application number
JP2008087550A
Other languages
Japanese (ja)
Inventor
Hideshi Mikamoto
英志 三家本
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.)
Nikon Corp
Original Assignee
Nikon 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 Nikon Corp filed Critical Nikon Corp
Priority to JP2008087550A priority Critical patent/JP2009244944A/en
Publication of JP2009244944A publication Critical patent/JP2009244944A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image-recovering apparatus capable of recovering a beautiful image regarding a specified object, and to provide a photographing apparatus which has the image-recovering apparatus. <P>SOLUTION: The image-recovering apparatus has an object recognizing unit 15 for recognizing the specified object 18 from an image, a calculation unit 14 for acquiring a point image distribution function in an area within the image, including at least a part of the specified object 18 recognized by the object recognizing unit 15, and a recovery processing unit 2 for processing recovery of the image based on data acquired at the calculation unit 14. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、画像回復装置および撮影装置に関する。   The present invention relates to an image recovery device and a photographing device.

撮影画像から点像分布関数(PSF)を算出して、画像回復を行う技術が提案されている(特許文献1参照)。従来の画像回復技術では、一枚の撮影画像に対して一つのPSFデータが存在することを前提にして、画像回復を行っている。   A technique has been proposed in which a point spread function (PSF) is calculated from a captured image and image restoration is performed (see Patent Document 1). In the conventional image restoration technique, image restoration is performed on the premise that there is one PSF data for one photographed image.

しかしながら、実際には、一枚の撮影画像に対して、複数のPSFデータが存在する場合もある。たとえば被写体ブレが生じた撮影画像であれば、背景と被写体とでは、PSFが異なっており、複数の被写体がそれぞれ別の動きをしている場合には、各被写体のPSFは異なる。   However, in practice, there may be a plurality of PSF data for one photographed image. For example, in the case of a photographed image with subject blurring, the PSF is different between the background and the subject, and when a plurality of subjects are moving in different ways, the PSF of each subject is different.

このような場合に、従来の画像回復装置では、一枚の撮影画像に対して一つのPSFデータが存在することを前提にして、画像回復を行っていたために、必ずしも目的とする被写体をきれいに画像回復することができるとは限らなかった。
特開平11−134481号公報
In such a case, the conventional image restoration apparatus performs image restoration on the premise that there is one PSF data for one photographed image. It was not always possible to recover.
Japanese Patent Application Laid-Open No. 11-134481

本発明は、このような実状に鑑みてなされ、その目的は、特定の被写体を、きれいに画像回復することができる画像回復装置と、その画像回復装置を有する撮影装置とを提供することである。   The present invention has been made in view of such a situation, and an object of the present invention is to provide an image restoration apparatus capable of neatly restoring an image of a specific subject and an imaging apparatus having the image restoration apparatus.

上記目的を達成するために、本発明に係る画像回復装置は、
画像から特定被写体(18,20,20a)を認識する被写体認識部(15)と、
前記被写体認識部(15)で認識された前記特定被写体(18,20,20a)の少なくとも一部を含む前記画像内の領域で、点像分布関数を求める演算部(14)と、
前記演算部(14)で求められたデータに基づき、前記画像を回復処理する回復処理部(2,S7)とを有する。
In order to achieve the above object, an image restoration apparatus according to the present invention provides:
A subject recognition unit (15) for recognizing a specific subject (18, 20, 20a) from the image;
A calculation unit (14) for obtaining a point spread function in a region in the image including at least a part of the specific subject (18, 20, 20a) recognized by the subject recognition unit (15);
A recovery processing unit (2, S7) for recovering the image based on the data obtained by the calculation unit (14);

本発明に係る画像回復装置によれば、被写体認識部(15)で求められた特定被写体(18,20,20a)の少なくとも一部を含む領域で、PSFを求め、そのデータに基づき、画像を回復処理する。そのため、特定の被写体を、きれいに画像回復することができる。   According to the image restoration device of the present invention, the PSF is obtained in an area including at least a part of the specific subject (18, 20, 20a) obtained by the subject recognition unit (15), and an image is obtained based on the data. Recovery process. Therefore, it is possible to restore the image of a specific subject in a clean manner.

画像回復装置は、前記被写体認識部(15)で認識された複数の前記特定被写体(20a〜20d)の内の少なくとも一つを選択する選択部(2,S5)をさらに有してもよい。その際に、前記選択部(2,S5)では、複数の前記特定被写体(20a〜20d)の内の前記画像内で面積が一番大きい特定被写体(20a)が選択されてもよい。一番大きい特定被写体(20a)が、目的とする特定被写体であると推定できるからである。   The image restoration apparatus may further include a selection unit (2, S5) that selects at least one of the plurality of specific subjects (20a to 20d) recognized by the subject recognition unit (15). At that time, the selection unit (2, S5) may select the specific subject (20a) having the largest area in the image among the plurality of specific subjects (20a to 20d). This is because it can be estimated that the largest specific subject (20a) is the target specific subject.

また、前記選択部(2,S5)では、外部からの入力信号に基づき、複数の前記特定被写体(20a〜20d)の内の少なくとも一つが選択されてもよい。その場合には、操作者が特定の被写体を選択することができる。   The selection unit (2, S5) may select at least one of the plurality of specific subjects (20a to 20d) based on an external input signal. In that case, the operator can select a specific subject.

前記演算部(14)では、前記選択部(2,S5)で選択された一つの特定被写体(18,20,20a)の少なくとも一部を含む前記画像内の領域で、点像分布関数を求め、
前記回復処理部(2,S7)では、求められた点像分布関数を用いて、前記画像を回復処理してもよい。
The calculation unit (14) obtains a point spread function in a region in the image including at least a part of one specific subject (18, 20, 20a) selected by the selection unit (2, S5). ,
In the recovery processing unit (2, S7), the image may be recovered using the obtained point spread function.

前記演算部(14)では、前記被写体認識部(15)で求められた複数の特定被写体(18,20,20a)のそれぞれの少なくとも一部を含む領域で、点像分布関数をそれぞれ求め、
前記回復処理部(2,S7)では、求められた複数の点像分布関数の平均値を用いて、前記画像を回復処理してもよい。その場合には、複数の特定被写体(20a〜20d)が平均的に高品質で画像回復される。
In the calculation unit (14), a point spread function is respectively obtained in a region including at least a part of each of the plurality of specific subjects (18, 20, 20a) obtained by the subject recognition unit (15).
In the recovery processing unit (2, S7), the image may be recovered using an average value of a plurality of obtained point spread functions. In that case, a plurality of specific subjects (20a to 20d) are averagely restored with high quality.

前記被写体認識部(15)では、前記特定被写体として、人間の顔あるいは顔の一部が認識されてもよい。   The subject recognition unit (15) may recognize a human face or a part of the face as the specific subject.

本発明に係る撮影装置は、被写体の画像を取得する撮像部(3)と、上記のいずれかに記載の画像回復装置とを有する。   An imaging device according to the present invention includes an imaging unit (3) that acquires an image of a subject, and the image restoration device described above.

なお、上述の説明では、本発明をわかりやすく説明するために、実施形態を示す図面の符号に対応つけて説明したが、本発明は、これに限定されるものでない。後述の実施形態の構成を適宜改良してもよく、また、少なくとも一部を他の構成物に代替させてもよい。更に、その配置について特に限定のない構成要件は、実施形態で開示した配置に限らず、その機能を達成できる位置に配置することができる。   In the above description, in order to explain the present invention in an easy-to-understand manner, the description has been made in association with the reference numerals of the drawings showing the embodiments, but the present invention is not limited to this. The configuration of the embodiment described later may be improved as appropriate, or at least a part of the configuration may be replaced with another component. Further, the configuration requirements that are not particularly limited with respect to the arrangement are not limited to the arrangement disclosed in the embodiment, and can be arranged at a position where the function can be achieved.

以下、本発明を、図面に示す実施形態に基づき説明する。
図1は本発明の一実施形態に係る画像回復装置を有するカメラの全体構成図、
図2は画像回復装置の制御の一例を示すフローチャート図、
図3は図2に示す顔認識工程の詳細なフローチャート図、
図4は顔認識のためのテンプレートの一例を示す概略図、
図5(A)は単一の被写体の撮影画像の例を示す図、図5(B)は複数の被写体の撮影画像の例を示す図、
図6はPSFの概念を示す概略図、
図7は図2に示すPSF演算処理の詳細を示すフローチャート図、
図8はPSF演算処理におけるブロック分割の概略図、
図9は図8の続きの工程を示す概略図、
図10は図9の続きの工程を示す概略図、
図11は図10の続きの工程を示す概略図である。
Hereinafter, the present invention will be described based on embodiments shown in the drawings.
FIG. 1 is an overall configuration diagram of a camera having an image restoration device according to an embodiment of the present invention
FIG. 2 is a flowchart showing an example of the control of the image restoration apparatus.
FIG. 3 is a detailed flowchart of the face recognition process shown in FIG.
FIG. 4 is a schematic diagram showing an example of a template for face recognition.
FIG. 5A is a diagram illustrating an example of a captured image of a single subject, and FIG. 5B is a diagram illustrating an example of a captured image of a plurality of subjects.
FIG. 6 is a schematic diagram showing the concept of PSF.
FIG. 7 is a flowchart showing details of the PSF calculation process shown in FIG.
FIG. 8 is a schematic diagram of block division in PSF calculation processing.
FIG. 9 is a schematic diagram showing a continuation process of FIG.
FIG. 10 is a schematic diagram showing a continuation process of FIG.
FIG. 11 is a schematic view showing a step subsequent to FIG.

図1に示すように、本発明の一実施形態に係る一眼レフカメラ1は、カメラボディ1aと、レンズ鏡筒1bとから構成してあり、カメラボディ1aに内蔵してある制御部としてのCPU2を有する。CPU2には、信号処理回路12を介して撮像素子3が接続してある。信号処理回路12は、ノイズ処理やA/D変換等を行う。   As shown in FIG. 1, a single-lens reflex camera 1 according to an embodiment of the present invention includes a camera body 1a and a lens barrel 1b, and a CPU 2 as a control unit built in the camera body 1a. Have The image sensor 3 is connected to the CPU 2 via the signal processing circuit 12. The signal processing circuit 12 performs noise processing, A / D conversion, and the like.

撮像素子3は、レンズ鏡筒1bの内部に装着してあるズームレンズ群4、フォーカスレンズ群5および振れ補正レンズ群6を通して入射してくる被写体18の画像を撮像して取得するようになっている。すなわち、撮像素子3は、光電変換素子であり、撮像素子駆動回路からの入力信号を受けて,信号処理回路12に画像データを出力する。   The image pickup device 3 picks up and acquires an image of the subject 18 incident through the zoom lens group 4, the focus lens group 5, and the shake correction lens group 6 mounted in the lens barrel 1b. Yes. That is, the image sensor 3 is a photoelectric conversion element, receives an input signal from the image sensor drive circuit, and outputs image data to the signal processing circuit 12.

ズームレンズ群4は、レンズ鏡筒1bの内部に装着してあるズーム群駆動機構7により光軸Ax方向に移動可能に装着してある。フォーカスレンズ群5は、レンズ鏡筒1bの内部に装着してあるフォーカス群駆動機構8により光軸Ax方向に移動可能に装着してある。   The zoom lens group 4 is mounted so as to be movable in the direction of the optical axis Ax by a zoom group driving mechanism 7 mounted inside the lens barrel 1b. The focus lens group 5 is mounted so as to be movable in the direction of the optical axis Ax by a focus group driving mechanism 8 mounted in the lens barrel 1b.

また、振れ補正レンズ群6は、レンズ鏡筒1bの内部に装着してある振れ補正群駆動機構9により光軸Axに対して垂直な平面方向に移動可能に装着してある。振れ補正レンズ群6が、手振れの動作に対応して、光軸Axに対して垂直な平面方向に移動することで、手振れ補正効果を奏するようになっている。   The shake correction lens group 6 is mounted so as to be movable in a plane direction perpendicular to the optical axis Ax by a shake correction group drive mechanism 9 mounted inside the lens barrel 1b. The shake correction lens group 6 moves in a plane direction perpendicular to the optical axis Ax in response to a shake operation, thereby providing a shake correction effect.

これらの駆動機構7〜9は、CPU2により制御される。CPU2には、ジャイロセンサ16が接続してある。ジャイロセンサ16は、カメラ1の角速度を検出することにより、カメラ1の振れを検出するセンサである。   These drive mechanisms 7 to 9 are controlled by the CPU 2. A gyro sensor 16 is connected to the CPU 2. The gyro sensor 16 is a sensor that detects the shake of the camera 1 by detecting the angular velocity of the camera 1.

また、CPU2には、顔認識演算部15が接続してある。なお、図1に示す実施形態では、CPU2とは別に、顔認識演算部15およびPSF演算部14が表示してあるが、実際には、CPU2自体が、これらの演算を処理しても良い。PSF演算部14の機能については後述する。   The CPU 2 is connected to a face recognition calculation unit 15. In the embodiment shown in FIG. 1, the face recognition calculation unit 15 and the PSF calculation unit 14 are displayed separately from the CPU 2, but actually, the CPU 2 itself may process these calculations. The function of the PSF calculation unit 14 will be described later.

また、CPU2には、撮像素子3の前面に配置してあるシャッタ10の駆動機構が接続してある。CPU2はシャッタ10を開閉制御する。さらにCPU2には、表示装置11が接続してある。CPU2は撮像素子3にて取得された被写体18の画像を表示装置11の画面に表示させることができる。また、表示装置11には、メニューなどを表示することもできる。   The CPU 2 is connected to a driving mechanism for the shutter 10 disposed on the front surface of the image sensor 3. The CPU 2 controls the opening and closing of the shutter 10. Further, a display device 11 is connected to the CPU 2. The CPU 2 can display the image of the subject 18 acquired by the image sensor 3 on the screen of the display device 11. The display device 11 can also display a menu or the like.

CPU2には、記録媒体13が接続してあるのでCPU2は記録媒体13に保存してある画像データなどを、表示装置11に表示させることも可能である。記録媒体13としては、特に限定されないが、SDカード、CFカードなどが例示される。CPU2による制御のスタートは、カメラボディ1aに装着してある電源スイッチやレリーフスイッチなどの操作部材17を操作することで行うことができる。   Since the recording medium 13 is connected to the CPU 2, the CPU 2 can display image data stored in the recording medium 13 on the display device 11. Although it does not specifically limit as the recording medium 13, SD card, CF card, etc. are illustrated. The control by the CPU 2 can be started by operating an operation member 17 such as a power switch or a relief switch mounted on the camera body 1a.

CPU2は、カメラにおける撮影画像取得などの通常制御を行うと共に、図2に示すように、画像回復制御も行う。図2に示す画像回復制御では、ステップS1にて、画像回復処理が開始されると、ステップS2にて、選択された画像に対して顔認識処理(詳細は後述)を行う。次に、ステップS3では、認識された顔の数を判断し、もし顔が検出できなければ、ステップS9にて画像回復処理制御が終了する。   The CPU 2 performs normal control such as acquisition of a captured image in the camera, and also performs image restoration control as shown in FIG. In the image restoration control shown in FIG. 2, when the image restoration process is started in step S1, a face recognition process (details will be described later) is performed on the selected image in step S2. Next, in step S3, the number of recognized faces is determined. If no face can be detected, the image restoration processing control ends in step S9.

ステップS3にて1つ以上の顔が検出されれば、ステップS4では、認識された顔が1つか、または、それ以上かを判定し、認識された顔が二つ以上の場合には、ステップS5にて、後述するPSF演算領域を選択し、ステップS6にて、PSF演算を行う。ステップS4には、認識された顔が1つであると判定された場合には、ステップS5を飛ばしてステップS6へ行きPSF(Point Spread Function)演算を行う。PSF演算の詳細に関しては後述する。   If one or more faces are detected in step S3, it is determined in step S4 whether the number of recognized faces is one or more. If there are two or more recognized faces, step S4 is performed. In S5, a PSF calculation area to be described later is selected, and in step S6, PSF calculation is performed. If it is determined in step S4 that the number of recognized faces is one, step S5 is skipped and the process goes to step S6 to perform PSF (Point Spread Function) calculation. Details of the PSF calculation will be described later.

次に、ステップS7では、ステップS6にて算出されたPSFを用いて、画像回復処理(後述)を行い、ステップS8にて、回復画像を記録媒体13に書き込み、ステップS9にて処理を終了する。   Next, in step S7, image restoration processing (described later) is performed using the PSF calculated in step S6, the restored image is written in the recording medium 13 in step S8, and the processing ends in step S9. .

本実施形態では、図2に示すステップS2における顔の認識動作は、図3に示すフローチャートに基づき行われる。すなわち、ステップS2がスタートすると、ステップS21にて、図1に示すCPU2は、被写体画像を読み込む。被写体画像の読み込みは、図1に示す撮像素子3から読み込んでも良いし、記録媒体13に記憶してある被写体画像を読み込んでも良い。   In the present embodiment, the face recognition operation in step S2 shown in FIG. 2 is performed based on the flowchart shown in FIG. That is, when step S2 starts, in step S21, the CPU 2 shown in FIG. 1 reads a subject image. The subject image may be read from the image sensor 3 shown in FIG. 1 or the subject image stored in the recording medium 13 may be read.

次に、図3に示すステップS22およびステップS23では、テンプレートマッチング処理を行うと共に顔の検出判定を行う。ステップS22およびS23では、たとえば図1に示す顔認識演算部15に予め記憶してある図4に示す正面テンプレートと同様な画像が、読み込まれた被写体画像中に含まれるか否かをCPU2が判断する。   Next, in step S22 and step S23 shown in FIG. 3, template matching processing is performed and face detection determination is performed. In steps S22 and S23, for example, the CPU 2 determines whether an image similar to the front template shown in FIG. 4 stored in advance in the face recognition calculation unit 15 shown in FIG. 1 is included in the read subject image. To do.

図4は、人の顔を正面から見た図であり、図4中の点線部をテンプレートとする。人が正面を向いていることを前提としているテンプレートの場合、点線部に示すようなテンプレートとなる。すなわち、目、鼻、口、耳といった物理的な形状の特徴のある部位がテンプレートとなる。   FIG. 4 is a view of a human face as seen from the front, and the dotted line portion in FIG. 4 is used as a template. In the case of a template on the premise that a person is facing the front, the template is as shown by a dotted line portion. That is, a part having physical shape features such as eyes, nose, mouth, and ear is a template.

テンプレートと合う形状が得られれば顔と認識できる。テンプレートマッチングが得られれば、顔の数や位置、大きさなどの情報がわかる。なお、テンプレートは、図1に示す顔認識演算部15に記憶してあっても良いし、記録媒体13に記憶してあっても良い。   If a shape that matches the template is obtained, it can be recognized as a face. If template matching is obtained, information such as the number, position, and size of faces can be obtained. Note that the template may be stored in the face recognition calculation unit 15 illustrated in FIG. 1 or may be stored in the recording medium 13.

ステップS23にて、正面から見た人の顔を認識することができたら、次にステップS24へ行き、顔の数、位置および大きさを特定し、それらの情報を、顔認識演算部15にて演算して記憶し、顔認識処理の工程は終了する(ステップS25)。   If the face of the person viewed from the front can be recognized in step S23, then the process goes to step S24 to specify the number, position, and size of the face, and to send the information to the face recognition calculation unit 15. Are calculated and stored, and the face recognition process ends (step S25).

ステップS24にて求められた顔の数、位置および大きさなどの情報に基づき、図1に示すCPU2は、図2に示すステップS3以降の処理を行う。ステップS3およびステップS4では、前述したように、認識された顔の数が一つか、それ以上であるかを判断する。認識された顔の数が一つである場合とは、たとえば図5(A)に示す場合であり、そのような場合には、図2に示すステップS6へ行き、図5(A)に示す認識された顔を含む領域20の一部または全部について、図2に示すPSF演算を行う。   Based on the information such as the number, position, and size of the face obtained in step S24, the CPU 2 shown in FIG. 1 performs the processing after step S3 shown in FIG. In steps S3 and S4, as described above, it is determined whether the number of recognized faces is one or more. The case where the number of recognized faces is one is, for example, the case shown in FIG. 5 (A). In such a case, the process goes to step S6 shown in FIG. 2 and shown in FIG. 5 (A). The PSF calculation shown in FIG. 2 is performed on a part or all of the region 20 including the recognized face.

また、認識された顔の数が複数である場合とは、たとえば図5(B)に示す場合である。そのような場合には、図2に示すステップS5に行き、図5(B)に示す認識された顔をそれぞれ含む領域20a〜20dのうちで、たとえば一番面積が大きな領域20aをCPU2が判断する。その後に、図2に示すステップS6へ行き、図5(B)に示す認識された顔を含む領域20aの一部または全部について、図2に示すステップS5におけるPSF演算を行う。   The case where the number of recognized faces is plural is, for example, the case shown in FIG. In such a case, the process goes to step S5 shown in FIG. 2, and the CPU 2 determines, for example, the area 20a having the largest area among the areas 20a to 20d each including the recognized face shown in FIG. To do. Thereafter, the process goes to step S6 shown in FIG. 2, and the PSF calculation in step S5 shown in FIG. 2 is performed on part or all of the region 20a including the recognized face shown in FIG.

次に、図2に示すステップS5におけるPSF演算の詳細について説明する。まず、PSFの概略について説明する。   Next, details of the PSF calculation in step S5 shown in FIG. 2 will be described. First, an outline of PSF will be described.

ブレやぼけを含む劣化画像を復元する公知の方法として、ブレやぼけを点像の広がり関数(PSF:Point Spread Function)として推定し、劣化画像を復元する手法が一般的に知られている。(x、y)を画像上の座標とし、ブレ、ぼけを含む劣化画像をg(x、y)、ブレ、ぼけのない理想画像をh(x、y)、ブレやぼけによって広がった点像の情報(PSF)をp(x、y)とすると、この3つの式は、次の関係式1を満たす。   As a known method for restoring a deteriorated image including blurring and blurring, there is generally known a method for estimating the blurring and blurring as a point spread function (PSF) and restoring the deteriorated image. (X, y) as coordinates on the image, degraded image including blurring and blurring is g (x, y), ideal image without blurring and blurring is h (x, y), point image spread by blurring and blurring If the information (PSF) is p (x, y), these three expressions satisfy the following relational expression 1.

Figure 2009244944
Figure 2009244944

ここで、*は、コンボリューション(畳み込み積分)演算を表すものである。図6は、この関係式1を、模式的に表した図である。ここで、関係式1をフーリエ変換して、空間周波数(u,v)領域2にすると、式1は、以下の式2になる。   Here, * represents a convolution (convolution integration) operation. FIG. 6 is a diagram schematically showing the relational expression 1. Here, when the relational expression 1 is Fourier-transformed into the spatial frequency (u, v) region 2, the expression 1 becomes the following expression 2.

Figure 2009244944
Figure 2009244944

ここで、劣化画像g(x,y)に加えて、何らかの方法によりPSF関数p(x,y)を知ることができれば、それぞれのスペクトルを算出し、式2を変形した以下の式3により、理想画像のスペクトルH(u,v)を算出することができる。   Here, in addition to the deteriorated image g (x, y), if the PSF function p (x, y) can be known by some method, each spectrum is calculated and The spectrum H (u, v) of the ideal image can be calculated.

Figure 2009244944
Figure 2009244944

そして、H(u,v)を逆フーリエ変換すれば、理想画像h(x、y)を算出することができる。すなわち、撮像された画像から、何らかの方法によりPSF関数p(x,y)を求めることができれば、理想画像への画像回復が可能となる。   If H (u, v) is subjected to inverse Fourier transform, an ideal image h (x, y) can be calculated. That is, if the PSF function p (x, y) can be obtained from the captured image by any method, the image can be restored to the ideal image.

PSFの算出方法として公知なものとしては、劣化画像のフーリエ変換の振幅スペクトルがゼロになる周期と方向を検出してブレの大きさと方向を検出する方法(特開2006−221347)や、動きベクトルを利用して算出する方法(特開2007−6045)などが挙げられる。ここでは、画像の自己相関に基づきPSFを算出する方法について説明する。図7は、図1に示すPSF演算部14(CPU2)が行うPSF算出のフローを示す。   Known methods for calculating PSF include a method of detecting the period and direction in which the amplitude spectrum of the Fourier transform of a degraded image becomes zero to detect the magnitude and direction of blur (Japanese Patent Laid-Open No. 2006-221347), a motion vector, and the like. And a method of calculating by using JP-A-2007-6045. Here, a method for calculating the PSF based on the autocorrelation of the image will be described. FIG. 7 shows a flow of PSF calculation performed by the PSF calculation unit 14 (CPU 2) shown in FIG.

図7に示すように、ステップS5におけるPSF演算では、まず、ステップS51にて、図2に示すステップS5にて選択されたPSF演算領域を、図1に示すCPU2が読み込み、その画像を内部メモリに取り込む。演算領域は、図5(A)に示すように顔が一つの場合には、領域20であり、図5(B)に示すように顔が複数の場合には、選択された領域20aである。   As shown in FIG. 7, in the PSF calculation in step S5, first, in step S51, the CPU 2 shown in FIG. 1 reads the PSF calculation area selected in step S5 shown in FIG. Into. The calculation area is the area 20 when there is one face as shown in FIG. 5 (A), and is the selected area 20a when there are a plurality of faces as shown in FIG. 5 (B). .

次に、図7に示すステップS52では、CPU2は、選択された領域について、カラーのRGB信号の内のG成分を抽出する。G成分のデータが、R成分、B成分のデータよりも多く、PSF算出には、色成分は不要であるため、画像のRGB成分中のG成分を抽出する。   Next, in step S <b> 52 shown in FIG. 7, the CPU 2 extracts the G component in the color RGB signal for the selected region. Since the G component data is larger than the R component and B component data, and no color component is required for PSF calculation, the G component in the RGB component of the image is extracted.

次に、図7に示すステップS53では、演算量を小さくするため、ダウンサンプリングして画像サイズを小さくする。この画像を、図8に示す画像gとする。   Next, in step S53 shown in FIG. 7, the image size is reduced by down-sampling in order to reduce the calculation amount. This image is an image g shown in FIG.

次に、図7に示すステップS54では、図8に示すように、画像gを、たとえば7×7の領域にブロック分割する。なお、分割するブロックの数は特に限定されない。   Next, in step S54 shown in FIG. 7, as shown in FIG. 8, the image g is divided into blocks of, for example, 7 × 7 areas. The number of blocks to be divided is not particularly limited.

次に、図7に示すステップS55では、全ブロック中、画素値が飽和している画素を有するブロックを演算から除外する。また、ステップS56では、ラプラシアン処理によって輪郭を強調させる。さらに、ステップS57では、全ブロック中、テクスチャ(模様)の無いブロックは、ブレ、ぼけを検出できないので除外する。   Next, in step S55 shown in FIG. 7, blocks having pixels with saturated pixel values are excluded from the calculation. In step S56, the contour is emphasized by Laplacian processing. Further, in step S57, blocks having no texture (pattern) among all the blocks are excluded because blur and blur cannot be detected.

次に、ステップS58では、除外されず残っているブロックについて自己相関値を演算する。図9の例では、画像gの内太線の4つのブロックが残っているブロックであり、それぞれのブロックについて演算を行う。2次元の自己相関関数値Rffは次式4で定義される。   Next, in step S58, an autocorrelation value is calculated for the remaining blocks that are not excluded. In the example of FIG. 9, four blocks with thick inner lines of the image g remain, and the calculation is performed for each block. The two-dimensional autocorrelation function value Rff is defined by the following equation 4.

Figure 2009244944
Figure 2009244944

ここで、画像Bをブロック化された画像(5×5pixel)として、aおよびbを、X、Y方向の画素間距離、Nは自己相関を演算する領域のX方向の長さ、MはY方向の長さを示す。自己相関値の演算は、図9に示すように、画像Bをずらしながら重なり合っている領域の画素同士の積の結果を加算し、領域の面積で割った値である。   Here, image B is a blocked image (5 × 5 pixels), a and b are the inter-pixel distances in the X and Y directions, N is the length in the X direction of the region where autocorrelation is calculated, and M is Y Indicates the length of the direction. As shown in FIG. 9, the calculation of the autocorrelation value is a value obtained by adding the product of the pixels in the overlapping region while shifting the image B and dividing the result by the area of the region.

次に図7に示すステップS59では、ステップS58にて計算された自己相関値の演算結果を基に、自己相関画像を作成する。自己相関値は、a=0およびb=0の時、つまり画素が完全に重なっている時に最大となる。Rff(0,0)を基に正規化を行い、グレースケール0〜255に対応させ画像を作成する。図10に、算出された自己相関画像の例を示す。この例では、4つのブロックにおいて、それぞれ斜め方向への自己相関が高く、ブレが斜め方向に生じていると推定される。   Next, in step S59 shown in FIG. 7, an autocorrelation image is created based on the calculation result of the autocorrelation value calculated in step S58. The autocorrelation value becomes maximum when a = 0 and b = 0, that is, when the pixels are completely overlapped. Normalization is performed based on Rff (0, 0), and an image is created in correspondence with gray scales 0 to 255. FIG. 10 shows an example of the calculated autocorrelation image. In this example, the autocorrelation in the diagonal direction is high in each of the four blocks, and it is estimated that blurring occurs in the diagonal direction.

次に、図7に示すステップS60では、求めた自己相関画像を平均化した画像(この例では4つの画像の平均)を、PSF推定結果として算出する。図11に、PSFの算出結果例を示す。PSF算出結果から直線的なブレの長さ、方向、ぼけの幅が判る。   Next, in step S60 shown in FIG. 7, an image obtained by averaging the obtained autocorrelation images (an average of four images in this example) is calculated as a PSF estimation result. FIG. 11 shows an example of PSF calculation results. From the PSF calculation result, the length, direction, and blur width of the linear blur are known.

PSF算出結果から直線的なブレの長さ、方向、ぼけの幅が分かれば、そのデータに基づき、図1に示すCPU2は、図2に示すステップS7における画像回復処理を行う。その後に、ステップS8にて、図1に示すCPU2は、その回復画像を記録媒体13に書き込み、ステップS9にて処理を終了する。回復された画像は、たとえば図5(A)では、撮影された人の顔を、像ブレすることなく、鮮明な画像として見ることができる。また、たとえば図5(B)では、撮影された複数の人のうちでも、特に特定の人の顔を、像ブレすることなく、鮮明な画像として見ることができる。   If the straight blur length, direction, and blur width are known from the PSF calculation result, based on the data, the CPU 2 shown in FIG. 1 performs the image restoration process in step S7 shown in FIG. Thereafter, in step S8, the CPU 2 shown in FIG. 1 writes the recovered image on the recording medium 13, and the process ends in step S9. For example, in FIG. 5A, the recovered image can be viewed as a clear image without blurring the face of the photographed person. For example, in FIG. 5B, among a plurality of photographed people, a particular person's face can be seen as a clear image without blurring.

なお、上述した実施形態は、種々に改変することができる。   The embodiment described above can be variously modified.

たとえば、上述した実施形態では、図5(B)に示すように、一番に面積が大きい顔の認識領域20aからPSFを演算したが、いずれの領域20a〜20dからPSFを算出して画像を回復するかは、カメラ1を操作する人に選択できるようにしても良い。たとえばタッチパネル式に、いずれの領域20a〜20dを選択するかを、操作者が選択できるようにしても良い。そして、上述した実施形態と同様にして、選択された顔認識領域からPSFを算出し、これを用いて画像回復を行っても良い。   For example, in the above-described embodiment, as shown in FIG. 5B, the PSF is calculated from the recognition area 20a of the face having the largest area. However, the PSF is calculated from any of the areas 20a to 20d, and an image is obtained. Whether to recover may be selected by a person operating the camera 1. For example, the operator may be able to select which region 20a to 20d to select on the touch panel type. Then, similarly to the above-described embodiment, PSF may be calculated from the selected face recognition area, and image restoration may be performed using the PSF.

あるいは、操作者が選択できる領域20a〜20d、あるいは、図1に示す顔認識演算部15が自動的に選択する領域20a〜20dは、複数(全数を含む)であっても良い。その場合においては、選択された複数の領域でPSFを演算し、その平均値を用いて、画像を回復処理するようにしても良い。   Alternatively, the areas 20a to 20d that can be selected by the operator or the areas 20a to 20d that are automatically selected by the face recognition calculation unit 15 shown in FIG. 1 may be plural (including the total number). In that case, the PSF may be calculated in a plurality of selected areas, and the average value may be used to restore the image.

また、顔などの特定の被写体を認識する方法としては、上述したテンプレートを用いる方法に代えて、あるいは、テンプレートを用いる方法に組み合わせて、肌の色や目の形といった画像特徴量を検出し統計的解析を用いる方法、ニューラルネットワークに代表される学習を用いた方法などを用いても良い。   In addition, as a method for recognizing a specific subject such as a face, instead of using the template described above, or in combination with a method using a template, image feature quantities such as skin color and eye shape are detected and statistically used. For example, a method using statistical analysis or a method using learning typified by a neural network may be used.

また、上述した実施形態では、顔認識用のテンプレートとして、正面テンプレートを用いたが、それ以外に、横向きテンプレートを用いても良いし、それ以外のテンプレートを用いても良い。またテンプレートとしては、顔の一部のみであっても良く、さらには、人の顔以外、動物や、植物、あるいは自動車などの機械のテンプレートであっても良い。   In the above-described embodiment, the front template is used as the face recognition template. Alternatively, a horizontal template or another template may be used. Further, the template may be only a part of the face, and may be a template of a machine such as an animal, a plant, or an automobile other than a human face.

さらに、本発明の画像回復装置は、スチルカメラに限らず、ビデオカメラに搭載されても良く、さらには、カメラ以外の画像処理機器に搭載されていても良い。   Furthermore, the image recovery apparatus of the present invention is not limited to a still camera, and may be mounted on a video camera, and may be mounted on an image processing device other than the camera.

図1は本発明の一実施形態に係る画像回復装置を有するカメラの全体構成図である。FIG. 1 is an overall configuration diagram of a camera having an image restoration apparatus according to an embodiment of the present invention. 図2は画像回復装置の制御の一例を示すフローチャート図である。FIG. 2 is a flowchart showing an example of control of the image restoration apparatus. 図3は図2に示す顔認識工程の詳細なフローチャート図である。FIG. 3 is a detailed flowchart of the face recognition process shown in FIG. 図4は顔認識のためのテンプレートの一例を示す概略図である。FIG. 4 is a schematic view showing an example of a template for face recognition. 図5(A)は単一の被写体の撮影画像の例を示す図、図5(B)は複数の被写体の撮影画像の例を示す図である。FIG. 5A is a diagram illustrating an example of a captured image of a single subject, and FIG. 5B is a diagram illustrating an example of a captured image of a plurality of subjects. 図6はPSFの概念を示す概略図である。FIG. 6 is a schematic diagram showing the concept of PSF. 図7は図2に示すPSF演算処理の詳細を示すフローチャート図である。FIG. 7 is a flowchart showing details of the PSF calculation process shown in FIG. 図8はPSF演算処理におけるブロック分割の概略図である。FIG. 8 is a schematic diagram of block division in the PSF calculation process. 図9は図8の続きの工程を示す概略図である。FIG. 9 is a schematic view showing a step subsequent to FIG. 図10は図9の続きの工程を示す概略図である。FIG. 10 is a schematic view showing a step subsequent to FIG. 図11は図10の続きの工程を示す概略図である。FIG. 11 is a schematic view showing a step subsequent to FIG.

符号の説明Explanation of symbols

1… カメラ
1a… カメラボディ
1b… レンズ鏡筒
2… CPU
3… 撮像素子
13… 記憶媒体
14… PSF演算部
15… 顔認識演算部
18… 被写体
20,20a〜20d… 領域
DESCRIPTION OF SYMBOLS 1 ... Camera 1a ... Camera body 1b ... Lens barrel 2 ... CPU
DESCRIPTION OF SYMBOLS 3 ... Imaging device 13 ... Storage medium 14 ... PSF calculating part 15 ... Face recognition calculating part 18 ... Subject 20, 20a-20d ... Area

Claims (8)

画像から特定被写体を認識する被写体認識部と、
前記被写体認識部で認識された前記特定被写体の少なくとも一部を含む前記画像内の領域で、点像分布関数を求める演算部と、
前記演算部で求められたデータに基づき、前記画像を回復処理する回復処理部とを有する画像回復装置。
A subject recognition unit for recognizing a specific subject from an image;
A calculation unit for obtaining a point spread function in an area in the image including at least a part of the specific subject recognized by the subject recognition unit;
An image recovery apparatus comprising: a recovery processing unit that recovers the image based on data obtained by the arithmetic unit.
前記被写体認識部で認識された複数の前記特定被写体の内の少なくとも一つを選択する選択部をさらに有する請求項1に記載の画像回復装置。   The image restoration apparatus according to claim 1, further comprising a selection unit that selects at least one of the plurality of specific subjects recognized by the subject recognition unit. 前記選択部では、複数の前記特定被写体の内の前記画像内で面積が一番大きい特定被写体が選択される請求項2に記載の画像回復装置。   The image restoration device according to claim 2, wherein the selection unit selects a specific subject having the largest area in the image among a plurality of the specific subjects. 前記選択部では、外部からの入力信号に基づき、複数の前記特定被写体の内の少なくとも一つが選択される請求項2に記載の画像回復装置。   The image restoration device according to claim 2, wherein the selection unit selects at least one of the plurality of specific subjects based on an input signal from the outside. 前記演算部では、前記選択部で選択された一つの特定被写体の少なくとも一部を含む前記画像内の領域で、点像分布関数を求め、
前記回復処理部では、求められた点像分布関数を用いて、前記画像を回復処理する請求項2〜4のいずれかに記載の画像回復装置。
The calculation unit obtains a point spread function in a region in the image including at least a part of one specific subject selected by the selection unit,
The image recovery apparatus according to claim 2, wherein the recovery processing unit recovers the image using the obtained point spread function.
前記演算部では、前記被写体認識部で認識された複数の特定被写体のそれぞれの少なくとも一部を含む領域で、点像分布関数をそれぞれ求め、
前記回復処理部では、求められた複数の点像分布関数の平均値を用いて、前記画像を回復処理する請求項1に記載の画像回復装置。
The calculation unit obtains a point spread function in an area including at least a part of each of the plurality of specific subjects recognized by the subject recognition unit,
The image recovery apparatus according to claim 1, wherein the recovery processing unit recovers the image using an average value of a plurality of obtained point spread functions.
前記被写体認識部では、前記特定被写体として、人間の顔あるいは顔の一部が認識される請求項1〜6のいずれかに記載の画像回復装置。   The image recovery device according to claim 1, wherein the subject recognition unit recognizes a human face or a part of the face as the specific subject. 被写体の画像を取得する撮像部と、
請求項1〜7のいずれかに記載の画像回復装置とを有する撮影装置。
An imaging unit for acquiring an image of a subject;
An imaging device comprising the image recovery device according to claim 1.
JP2008087550A 2008-03-28 2008-03-28 Image-recovering apparatus and photographing apparatus Pending JP2009244944A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008087550A JP2009244944A (en) 2008-03-28 2008-03-28 Image-recovering apparatus and photographing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008087550A JP2009244944A (en) 2008-03-28 2008-03-28 Image-recovering apparatus and photographing apparatus

Publications (1)

Publication Number Publication Date
JP2009244944A true JP2009244944A (en) 2009-10-22

Family

ID=41306795

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008087550A Pending JP2009244944A (en) 2008-03-28 2008-03-28 Image-recovering apparatus and photographing apparatus

Country Status (1)

Country Link
JP (1) JP2009244944A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011099244A1 (en) * 2010-02-10 2011-08-18 パナソニック株式会社 Image processing device and method
JP2011193338A (en) * 2010-03-16 2011-09-29 Canon Inc Image processing apparatus, imaging apparatus, and image processing program
JP2012109826A (en) * 2010-11-18 2012-06-07 Fujitsu Ltd Imaging apparatus, image processing apparatus, and imaging method
CN104915937A (en) * 2015-07-02 2015-09-16 中国人民解放军国防科学技术大学 Quick single-lens calculating imaging method based on frequency domain matrix decomposition
WO2015186511A1 (en) * 2014-06-03 2015-12-10 ソニー株式会社 Image processing apparatus and image processing method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011099244A1 (en) * 2010-02-10 2011-08-18 パナソニック株式会社 Image processing device and method
US8803984B2 (en) 2010-02-10 2014-08-12 Dolby International Ab Image processing device and method for producing a restored image using a candidate point spread function
JP5651118B2 (en) * 2010-02-10 2015-01-07 ドルビー・インターナショナル・アーベー Image processing apparatus and image processing method
JP2015064890A (en) * 2010-02-10 2015-04-09 ドルビー・インターナショナル・アーベー Image processor and image processing method
JP2011193338A (en) * 2010-03-16 2011-09-29 Canon Inc Image processing apparatus, imaging apparatus, and image processing program
US8780222B2 (en) 2010-03-16 2014-07-15 Canon Kabushiki Kaisha Image processing apparatus that produces a higher resolution image, image pickup apparatus and image processing program
JP2012109826A (en) * 2010-11-18 2012-06-07 Fujitsu Ltd Imaging apparatus, image processing apparatus, and imaging method
WO2015186511A1 (en) * 2014-06-03 2015-12-10 ソニー株式会社 Image processing apparatus and image processing method
CN104915937A (en) * 2015-07-02 2015-09-16 中国人民解放军国防科学技术大学 Quick single-lens calculating imaging method based on frequency domain matrix decomposition
CN104915937B (en) * 2015-07-02 2017-10-20 中国人民解放军国防科学技术大学 Quick simple lens based on frequency domain matrix decomposition calculates imaging method

Similar Documents

Publication Publication Date Title
KR102574141B1 (en) Image display method and device
US8134604B2 (en) Camera shake correction device, camera shake correction method and imaging device
JP5704905B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP6564271B2 (en) Imaging apparatus, image processing method, program, and storage medium
JP5803467B2 (en) Image processing apparatus, imaging apparatus, and image processing method
US20170323465A1 (en) Image processing apparatus, image processing method, and storage medium
JP6577703B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP6049448B2 (en) Subject area tracking device, control method thereof, and program
JP5959923B2 (en) Detection device, control method thereof, control program, imaging device and display device
US10013632B2 (en) Object tracking apparatus, control method therefor and storage medium
KR20090062881A (en) A moving robot and a moving object detecting method thereof
JP4290164B2 (en) Display method for displaying display showing identification area together with image, program executed by computer apparatus, and imaging apparatus
JP2010114752A (en) Device and method of imaging and program
JP2008171108A (en) Face condition determining device and imaging device
JP2020053774A (en) Imaging apparatus and image recording method
JP2009244944A (en) Image-recovering apparatus and photographing apparatus
JP2009123081A (en) Face detection method and photographing apparatus
JP2019185556A (en) Image analysis device, method, and program
JP6087615B2 (en) Image processing apparatus and control method therefor, imaging apparatus, and display apparatus
JP2021128537A (en) Image processing device, image processing method, program and storage medium
JP5118590B2 (en) Subject tracking method and imaging apparatus
WO2020263277A1 (en) Landmark temporal smoothing
JP5539565B2 (en) Imaging apparatus and subject tracking method
KR101643724B1 (en) Method and Apparatus for identifying eyeball position, Method and Apparatus for tracking eyeball position
JP2009009206A (en) Extraction method of outline inside image and image processor therefor