JP2012100000A - Image pickup device, image processing device, and computer program product - Google Patents

Image pickup device, image processing device, and computer program product Download PDF

Info

Publication number
JP2012100000A
JP2012100000A JP2010245090A JP2010245090A JP2012100000A JP 2012100000 A JP2012100000 A JP 2012100000A JP 2010245090 A JP2010245090 A JP 2010245090A JP 2010245090 A JP2010245090 A JP 2010245090A JP 2012100000 A JP2012100000 A JP 2012100000A
Authority
JP
Japan
Prior art keywords
image
shift
unit
blur
deviation
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.)
Withdrawn
Application number
JP2010245090A
Other languages
Japanese (ja)
Inventor
Takahiro Yano
高宏 矢野
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.)
Olympus Corp
Original Assignee
Olympus 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 Olympus Corp filed Critical Olympus Corp
Priority to JP2010245090A priority Critical patent/JP2012100000A/en
Publication of JP2012100000A publication Critical patent/JP2012100000A/en
Withdrawn legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide an image pickup device that reduces burden on a user in capturing a moving object and burden on image processing.SOLUTION: An image pickup device includes: an image pickup part 10; a composition part 50 that creates a composite image using at least two images captured by the image pickup part 10; a deviation detection part 60 that detects deviation between the composite images created by the composition part 50; a deviation correction part 70 that corrects the deviation between the images detected by the deviation detection part 60; and a blur creation part 80 that creates blur on all or a part of the composite image after deviation correction for correcting the deviation between the images, based on the deviation detected by the deviation detection part 60.

Description

本発明は、撮像装置、画像処理装置およびコンピュータプログラムプロダクト等に関する。   The present invention relates to an imaging apparatus, an image processing apparatus, a computer program product, and the like.

動いている被写体(動体)の動きに合わせてカメラを移動して、1枚の静止画を撮影する流し撮りの方法が知られている。このような流し撮りをデジタルカメラで実現する方法は、例えば、特許文献1に記載されている。特許文献1に記載される技術では、連続して撮影された複数枚の画像から、メインの動体部分の相対的なずれ量とずれ方向を検出して、動体部分が同じ位置に重なるように合成する技術が検討されている。   A panning method is known in which a camera is moved in accordance with the movement of a moving subject (moving body) to shoot a single still image. A method for realizing such a panning shot with a digital camera is described in Patent Document 1, for example. In the technique described in Patent Document 1, a relative displacement amount and a displacement direction of a main moving body part are detected from a plurality of images taken continuously, and the moving body parts are combined so that they overlap at the same position. Technology to do is being studied.

特開2006−339903号公報JP 2006-339903 A

流し撮りを行うためには、例えば、1枚の画像を、上半身の軸を動かさずに体をねじりながら撮影する、といったかなり難解な撮影テクニックが必要であり、カメラユーザの負担が大きい。   In order to perform panning, for example, it is necessary to use a rather difficult shooting technique such as shooting a single image while twisting the body without moving the upper body axis, which is a heavy burden on the camera user.

また、ユーザの負担を軽減するために、画像合成処理によって、流し撮り画像を形成することも提案されている(特許文献1)。但し、背景等が、滑らかに流れている自然な流し撮り画像を合成するためには、多数枚の連続画像が必要であり、この点で、ユーザの負担が発生する。また、使用する画像の枚数が増えれば、画像合成処理も複雑化し、画像処理(信号処理)に伴う負担も増大することは否めない。   In order to reduce the burden on the user, it has also been proposed to form a panning image by image composition processing (Patent Document 1). However, in order to synthesize a natural panning image in which the background or the like flows smoothly, a large number of continuous images are required, and this imposes a burden on the user. Further, if the number of images to be used increases, the image composition processing becomes complicated, and the burden associated with image processing (signal processing) cannot be denied.

本発明の少なくとも一つの態様によれば、例えば、ユーザの負担ならびに画像処理の負担を軽減することができる。   According to at least one aspect of the present invention, for example, the burden on the user and the burden on image processing can be reduced.

(1)本発明の撮像装置の一態様は、撮像部と、前記撮像部で撮影された、少なくとも2枚の画像を用いて合成画像を生成する合成部と、前記合成部で合成された前記合成画像の像間のずれを検出するずれ検出部と、前記ずれ検出部で検出された、前記像間のずれを補正するずれ補正部と、前記ずれ検出部で検出されたずれに基づいて、前記像間のずれが補正された、ずれ補正後の合成画像の全部または一部にブレを発生させるブレ生成部と、を含む。   (1) One aspect of the imaging apparatus of the present invention is an imaging unit, a synthesis unit that generates a composite image using at least two images photographed by the imaging unit, and the synthesis unit Based on the shift detected by the shift detector, the shift detector for correcting the shift between the images detected by the shift detector, and the shift detected by the shift detector. And a blur generation unit that generates blur in all or part of the composite image after the shift correction in which the shift between the images is corrected.

本態様によれば、少なくとも2枚の撮像画像に基づき、画像のブレ(画像の流し)を生じさせたい領域にブレを生じさせることができる。ブレを生じさせる対象は、画像の全部であってもよく、また、その一部(例えば、主要被写体に対する背景)であってもよい。本態様によれば、より少ない枚数の画像に基づいて、容易に、自然な流し撮り画像を合成することができる。   According to this aspect, based on at least two captured images, it is possible to cause blurring in a region where it is desired to cause blurring of the image (image flow). The subject that causes blurring may be the entire image, or a part thereof (for example, the background with respect to the main subject). According to this aspect, a natural panning image can be easily synthesized based on a smaller number of images.

(2)本発明の撮像装置の他の態様では、前記主要被写体を設定する主要被写体設定部を有し、前記ブレ生成部は、前記主要被写体設定部によって設定された主要被写体領域以外の領域の全部または一部にブレを発生させる。   (2) In another aspect of the imaging apparatus of the present invention, the imaging apparatus includes a main subject setting unit that sets the main subject, and the blur generation unit includes a region other than the main subject region set by the main subject setting unit. Blur all or part.

本態様によれば、主要被写体についてはブレのない状態とし、一方、主要被写体領域以外の領域(例えば背景領域)においては、所望のブレを確実に生じさせることができる。   According to this aspect, the main subject is not shaken, and desired blur can be reliably generated in a region other than the main subject region (for example, the background region).

(3)本発明の撮像装置の他の態様では、前記ブレ生成部は、前記ずれ検出部で検出されたずれ量に基づいて、所定サイズの画像パッチ毎に線ブレの範囲を決定し、前記画像パッチに対して点像分布関数によるフィルタリングを実行して、前記主要被写体領域以外の領域の全部または一部に線ブレを発生させる。   (3) In another aspect of the imaging apparatus of the present invention, the blur generation unit determines a range of line blur for each image patch of a predetermined size based on the shift amount detected by the shift detection unit, Filtering is performed on the image patch using a point spread function to generate line blurring in all or part of the area other than the main subject area.

本態様では、ブレ生成部は、例えば、所定の点像分布関数(Point Spread Function:PSF)を用いて、線ブレを生じさせる範囲(2点間の距離)を指定して画像をフィルタリングする。したがって、信号処理によって、画像のブレ(画像の流し)を生じさせたい領域のみに、所望のブレを生じさせることができる。   In this aspect, the blur generation unit filters an image by designating a range (distance between two points) that causes line blurring using, for example, a predetermined point spread function (PSF). Therefore, a desired blur can be generated only in an area where it is desired to generate an image blur (an image sink) by signal processing.

(4)本発明の撮像装置の他の態様では、前記ずれ検出部では、前記主要被写体領域における第1ずれ量と、前記主要被写体領域以外の領域における第2ずれ量とを検出し、前記ブレ生成部は、前記第2ずれ量、あるいは、前記第2ずれ量から前記第1ずれ量を減算して得られるずれ量に基づいて、前記線ブレの範囲を決定する。   (4) In another aspect of the imaging apparatus of the present invention, the shift detection unit detects a first shift amount in the main subject region and a second shift amount in a region other than the main subject region, and the blur is detected. The generation unit determines the range of the line blur based on the second shift amount or a shift amount obtained by subtracting the first shift amount from the second shift amount.

線ブレの範囲の決定方法としては、例えば、ずれ検出部で求められた、主要被写体以外の領域(背景部分等)に含まれる各パッチのずれ量(第2ずれ量)を用いることができる。また、例えば、第2ずれ量が、所定の閾値(例えば、異常判定用の閾値)よりも大きい場合には、主要被写体が一致しておらず、その主要被写体のずれ量が加わっている場合があり得ることから、第2ずれ量から、ずれ検出部で取得されている主要被写体のずれ量(第1ずれ量)を差し引いた値をずれ量として用いることができる。これによって、自然な流し画像を形成することができる。   As a method of determining the range of line blurring, for example, the shift amount (second shift amount) of each patch included in a region (background portion or the like) other than the main subject obtained by the shift detection unit can be used. Further, for example, when the second shift amount is larger than a predetermined threshold (for example, a threshold for abnormality determination), the main subjects are not matched, and the shift amount of the main subject may be added. Therefore, it is possible to use a value obtained by subtracting the shift amount (first shift amount) of the main subject acquired by the shift detection unit from the second shift amount as the shift amount. As a result, a natural sink image can be formed.

(5)本発明の撮像装置の他の態様では、前記ブレ生成部は、主要被写体領域とブレ発生の対象領域との境界線上の画像領域については、前記ずれ検出部で検出されたずれ量に、境界画像補正用の調整値を加算して得られるずれ量に基づいて、前記線ブレの範囲を決定する。   (5) In another aspect of the imaging apparatus of the present invention, the blur generation unit is configured to detect a shift amount detected by the shift detection unit for an image region on a boundary line between a main subject region and a target region where a blur occurs. Then, the range of the line blur is determined based on the shift amount obtained by adding the adjustment value for boundary image correction.

本態様では、例えば、ブレ発生の対象領域(背景等)のブレ量を、通常より多めに設定し、ブレ発生の対象領域(背景等)のブレによって、主要被写体領域とブレ発生の対象領域との境界線のブレ部分、すなわち、主要被写体の輪郭のブレ部分を覆うことができる。これによって、主要被写体の輪郭を、よりシャープに見せることが可能である。   In this aspect, for example, the amount of blur in a target area (background, etc.) for occurrence of blur is set to be larger than usual, and the main subject area and the target area for occurrence of blur are determined by the blur in the target area (background, etc.) for occurrence of blur. The blur portion of the boundary line, that is, the blur portion of the contour of the main subject can be covered. As a result, the outline of the main subject can be made sharper.

(6)本発明の撮像装置の他の態様では、前記ずれ検出部は、前記ブレ発生の対象領域に含まれる、フィルタリング対象の画像パッチのテクスチャの特徴量が所定値以下であるときは、前記フィルタリング対象の画像パッチの周囲に位置する、複数の画像パッチのずれ量に基づいて前記フィルタリング対象の画像パッチのずれ量を推定し、前記ブレ生成部は、前記推定されたずれ量に基づいて、前記線ブレの範囲を決定する。   (6) In another aspect of the imaging apparatus of the present invention, the shift detection unit includes the feature amount of the texture of the image patch to be filtered, which is included in the blur target region, and is equal to or less than a predetermined value. The shift amount of the image patch to be filtered is estimated based on the shift amount of the plurality of image patches located around the image patch to be filtered, and the blur generation unit is based on the estimated shift amount, The range of the line blur is determined.

本態様では、対象とする画像パッチの周囲に位置する、複数の画像パッチのずれ量を利用して、画像のずれ量を推定する。例えば、主要被写体領域と背景領域との境界付近では、自己相関値に明確なピークが得られない場合がある。このような場合であっても、本態様のずれ検出の手法によって、ずれ検出の精度を高めることができる。具体的には、例えば、対象となるパッチの近傍に位置する8個の周辺パッチのずれ量の平均値を、その対象となるパッチのずれ量とすることができる。   In this aspect, the image shift amount is estimated using the shift amounts of the plurality of image patches located around the target image patch. For example, a clear peak may not be obtained in the autocorrelation value near the boundary between the main subject region and the background region. Even in such a case, the accuracy of deviation detection can be improved by the deviation detection method of this aspect. Specifically, for example, an average value of deviation amounts of eight peripheral patches positioned in the vicinity of the target patch can be set as the deviation amount of the target patch.

(7)本発明の撮像装置の他の態様では、ユーザ設定部を有し、前記ブレ生成部は、前記ユーザ設定部から入力されるブレ量の増減情報に基づいて、前記先ブレの範囲を増減させる。   (7) In another aspect of the imaging apparatus of the present invention, the image pickup apparatus includes a user setting unit, and the blur generation unit calculates the range of the previous blur based on blur amount increase / decrease information input from the user setting unit. Increase or decrease.

本態様によれば、例えば、ユーザの好みに応じて、ブレ量を微調整すること、すなわち、ブレ量を適宜、増減することが可能である。例えば、ずれ検出部で検出されたずれ量に、ブレ量の増減情報によって定まる微調整用の調整値を加えることによって得られるずれ量に基づいて、線ブレの範囲を決定することができる。   According to this aspect, for example, it is possible to finely adjust the shake amount according to the user's preference, that is, to increase or decrease the shake amount appropriately. For example, the range of line blur can be determined based on a shift amount obtained by adding an adjustment value for fine adjustment determined by the blur amount increase / decrease information to the shift amount detected by the shift detection unit.

(8)本発明の撮像装置の他の態様では、前記合成部は、2枚の画像に基づいて重み付け合成を実行して、前記ずれ検出部によるずれ検出用の第1合成画像と、前記ずれ補正部によるずれ補正用の第2合成画像と、を形成し、前記第1合成画像を形成する場合には、均等の重み付けを採用し、前記第2合成画像を形成する場合には、落差のある重み付けを採用する。   (8) In another aspect of the imaging apparatus of the present invention, the combining unit performs weighted combining based on two images, the first composite image for shift detection by the shift detection unit, and the shift When the first composite image is formed with the second composite image for correction of deviation by the correction unit, equal weighting is adopted, and when the second composite image is formed, the drop of the head Adopt a certain weighting.

本態様では、第1合成画像の合成に際しては、均等重み付けによる合成を行う。その理由としては、第1合成画像中に含まれる物体(例えば主要被写体)の自己相関によるピークの検出が容易であることがあげられる。自己相関は、すなわち、画像のテクスチャを示す信号が、それ自身を時間シフトした信号とどれだけ良く整合するかを示す尺度であることから、2枚の画像の同じ対象については、画像値に差がない方がパターンのマッチングがしやすい。   In this aspect, when the first synthesized image is synthesized, synthesis by equal weighting is performed. The reason is that it is easy to detect a peak by autocorrelation of an object (for example, main subject) included in the first composite image. Autocorrelation is a measure of how well a signal representing the texture of an image matches the time-shifted signal itself, so for the same object in two images, the difference in image values It is easier to match the pattern if there is no.

また、本態様では、第2合成画像を合成する場合には、落差のある重み付け(不均等重み付け)による合成を行う。例えば、均等合成した場合、点像分布関数の、周波数に対する振幅値(振幅スペクトル)の零点が多くなり、零点では、振幅値が無限大となって、ブレ補正が不可能となる(ブレ補正処理の破綻)。一方、落差のある重み付け(不均等重み付けによる合成)を行って、2像間の振幅に差を大きくしていくと、零点の数は減少し、やがて零点は発生しなくなる。零点の数が少なくなる(あるいは零点が無くなる)ことによって、ブレ補正処理の破綻の可能性を低減することができる。   Further, in this aspect, when the second synthesized image is synthesized, the composition is performed by weighting with a drop (uneven weighting). For example, in the case of equal composition, the zero value of the amplitude value (amplitude spectrum) of the point spread function with respect to the frequency increases, and at the zero point, the amplitude value becomes infinite and blur correction is impossible (blur correction processing). Bankruptcy). On the other hand, if weighting with a drop (combination by non-uniform weighting) is performed to increase the difference between the amplitudes of the two images, the number of zeros decreases and eventually no zeros are generated. By reducing the number of zeros (or eliminating the zeros), it is possible to reduce the possibility of the blur correction process failing.

(9)本発明の画像処理装置の一態様は、画像の入力処理を行う画像入力部と、前記画像入力部によって入力された、少なくとも2枚の画像を用いて合成画像を生成する合成部と、前記合成部で合成された前記合成画像の像間のずれを検出するずれ検出部と、前記ずれ検出部で検出された、前記像間のずれを補正するずれ補正部と、前記ずれ検出部で検出されたずれに基づいて、前記像間のずれが補正された、ずれ補正後の合成画像の全部または一部にブレを発生させるブレ生成部と、を含む。   (9) An aspect of the image processing apparatus of the present invention includes an image input unit that performs image input processing, and a combining unit that generates a combined image using at least two images input by the image input unit. A deviation detection unit that detects a deviation between images of the composite image synthesized by the synthesis unit, a deviation correction unit that detects a deviation between the images detected by the deviation detection unit, and the deviation detection unit And a blur generation unit that generates a blur in all or part of the composite image after the shift correction, in which the shift between the images is corrected based on the shift detected in step (b).

本態様によれば、少なくとも2枚の入力画像に基づき、画像のブレ(画像の流し)を生じさせたい領域にブレを生じさせることができる。よって、例えば、より少ない枚数の画像に基づいて、容易に、自然な流し撮り画像を合成することができる。   According to this aspect, based on at least two input images, it is possible to cause blurring in an area where it is desired to cause blurring of the image (image flow). Therefore, for example, a natural panning image can be easily synthesized based on a smaller number of images.

(10)本発明のコンピュータプログラムプロダクトの一態様は、画像入力部から入力された複数枚の画像に基づいて、画像の全部または一部にブレが生じている流し撮り画像を生成する処理を、コンピュータに実行させるプログラムコードが記録されたコンピュータプログラムプロダクトであって、前記プログラムコードは、前記画像入力部によって入力された、少なくとも2枚の画像を用いて合成画像を生成するモジュールと、前記合成部で合成された前記合成画像の像間のずれを検出するモジュールと、前記ずれ検出部で検出された、前記像間のずれを補正するモジュールと、前記ずれ検出部で検出されたずれに基づいて、前記像間のずれが補正された、ずれ補正後の合成画像の全部または一部にブレを発生させるモジュールと、を含む。   (10) One aspect of the computer program product of the present invention is a process for generating a panning image in which blurring occurs in all or part of an image based on a plurality of images input from the image input unit. A computer program product in which a program code to be executed by a computer is recorded, wherein the program code is a module that generates a composite image using at least two images input by the image input unit, and the synthesis unit A module for detecting a shift between the images of the composite image synthesized in step S1, a module for correcting a shift between the images detected by the shift detection unit, and a shift detected by the shift detection unit. And a module that generates blurring in all or part of the composite image after the shift correction in which the shift between the images is corrected. .

上述した各構成要素や各処理プロセスの任意の組合せや表現を、コンピュータプログラムプロダクトに変換することもできる。コンピュータプログラムプロダクトとは、プログラムコードが記録された記録媒体(DVD媒体,ハードディスク媒体、メモリ媒体など)、プログラムコードが記録されたコンピュータ、プログラムコードが記録されたインターネットシステム(例えば、サーバとクライアント端末を含むシステム)など、プログラムコードが組み込まれた記録媒体、装置、機器やシステムをいう。上述した各構成要素や各処理プロセスは各モジュールで実装され、その実装されたモジュールからなるプログラムコードはコンピュータプログラムプロダクト内に記録される。   Arbitrary combinations and expressions of the above-described components and processing processes can be converted into computer program products. A computer program product includes a recording medium (DVD medium, hard disk medium, memory medium, etc.) on which a program code is recorded, a computer on which the program code is recorded, and an Internet system (for example, a server and a client terminal) on which the program code is recorded. A recording medium, a device, a device, or a system in which a program code is incorporated. Each component and each processing process described above are implemented in each module, and program code including the installed module is recorded in a computer program product.

このように、本発明の少なくとも一つの態様によれば、例えば、少ない枚数(少なくとも2枚)の静止画像に基づいて、背景等にブレを生じさせた、いわゆる流し撮り画像を形成可能とすることができる。また、例えば、ユーザの負担ならびに画像処理の負担を軽減することができる。   As described above, according to at least one aspect of the present invention, for example, based on a small number of still images (at least two), it is possible to form a so-called panning image in which the background is blurred. Can do. Further, for example, it is possible to reduce the burden on the user and the burden on the image processing.

撮像装置の構成の一例を示す図1 is a diagram illustrating an example of a configuration of an imaging device 図2(A)〜図2(D)は、2枚の画像を用いた、画像合成処理(画像加算処理)の一例を示す図2A to 2D are diagrams illustrating an example of image synthesis processing (image addition processing) using two images. 図3(A)〜図3(D)は、合成された画像に基づいて、主要被写体にブレを生じさせる処理の一例を示す図FIG. 3A to FIG. 3D are diagrams illustrating an example of processing that causes blurring of a main subject based on a synthesized image. ずれ補正部用の合成画像(第2合成画像)のモデルとなる2重像を生成するフィルタ関数の一例を示す図The figure which shows an example of the filter function which produces | generates the double image used as the model of the synthesized image (2nd synthesized image) for deviation correction parts フィルタ関数をフーリエ変換した後の振幅スペクトルの例を示す図The figure which shows the example of the amplitude spectrum after Fourier-transforming a filter function ずれ量τと、ずれ量τの位置の自己相関関数値R(τ)との関係の一例を示す図The figure which shows an example of the relationship between deviation | shift amount (tau) and the autocorrelation function value R ((tau)) of the position of deviation | shift amount (tau). 2枚の画像に基づいて流し撮り画像を形成する場合における、処理の手順の一例を示すフローチャートThe flowchart which shows an example of the procedure of a process in the case of forming a panning image based on two images. 図8(A)および図8(B)は、背景の一部のみにブレを生じさせる例を示す図FIG. 8A and FIG. 8B are diagrams showing an example in which blurring occurs only in a part of the background. 図9(A)〜図9(F)は、3枚の画像に基づいて流し撮り画像を作成する場合における、線ブレの量の決定方法の一例を説明するための図9A to 9F are diagrams for explaining an example of a method for determining the amount of line blurring when a panning image is created based on three images. 3枚以上の画像に基づいて流し撮り画像を形成する場合における、処理の手順の一例を示すフローチャートThe flowchart which shows an example of the procedure of a process in the case of forming a panning image based on three or more images

以下、本実施形態について説明する。なお、以下に説明する本実施形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また本実施形態で説明される構成の全てが、本発明の必須構成要件であるとは限らない。   Hereinafter, this embodiment will be described. In addition, this embodiment demonstrated below does not unduly limit the content of this invention described in the claim. In addition, all the configurations described in the present embodiment are not necessarily essential configuration requirements of the present invention.

(第1の実施形態)
図1は、撮像装置の構成の一例を示す図である。図1に示される撮像装置は、撮像部10と、記録部20と、主要被写体設定部30と、信号処理部40と、各部の動作を統括的に制御する制御部(CPU等)90と、入出力部(操作ボタン等)100と、表示部110と、外部インターフェース(外部I/F)120と、を有する。
(First embodiment)
FIG. 1 is a diagram illustrating an example of a configuration of an imaging apparatus. An imaging apparatus shown in FIG. 1 includes an imaging unit 10, a recording unit 20, a main subject setting unit 30, a signal processing unit 40, and a control unit (CPU or the like) 90 that comprehensively controls the operation of each unit. An input / output unit (such as operation buttons) 100, a display unit 110, and an external interface (external I / F) 120 are included.

撮像部10は、レンズ12と、絞り14と、シャッター16と、撮像素子18と、を有する。また、信号処理部40は、画像合成部50(重み付け合成部52を有するのが好ましい)と、ずれ検出部60と、ずれ補正部70と、ブレ生成部80と、を有する。   The imaging unit 10 includes a lens 12, a diaphragm 14, a shutter 16, and an imaging element 18. The signal processing unit 40 includes an image synthesis unit 50 (preferably including a weighting synthesis unit 52), a deviation detection unit 60, a deviation correction unit 70, and a shake generation unit 80.

以下、図1に示される撮像装置の構成、ならびに動作の概要を説明する(なお、各部の詳細な動作等は、後述する)。   Hereinafter, the configuration of the imaging apparatus shown in FIG. 1 and the outline of the operation will be described (detailed operations and the like of each part will be described later).

撮像部10により撮影された複数枚の画像は、記録部20に保存される。撮像部10での撮影時におけるシャッター速は、主要被写体がぶれないシャッター速のうち最もスピードの速いシャッター速が好ましい。但し、ユーザは、入出力部(操作ボタン等)100や外部インターフェース(外部I/F)120を介して、任意のシャッター速を設定することができる。また、ユーザは、複数枚の画像を撮影する際の撮影間隔も、入出力部(操作ボタン等)100や外部インターフェース(外部I/F)120を介して、自由に調整することができる。   A plurality of images captured by the imaging unit 10 are stored in the recording unit 20. The shutter speed at the time of shooting by the imaging unit 10 is preferably the fastest shutter speed among the shutter speeds at which the main subject does not blur. However, the user can set an arbitrary shutter speed via the input / output unit (operation button or the like) 100 or the external interface (external I / F) 120. In addition, the user can freely adjust the shooting interval when shooting a plurality of images via the input / output unit (operation button or the like) 100 or the external interface (external I / F) 120.

また、複数枚の撮影の際には、ユーザは、流し撮り撮影を行う場合のように、主要被写体を追尾するように撮像装置を動かしながら撮影を行ってもよく、通常撮影時のように撮像装置を動かさずに撮影を行ってもよい。   In addition, when shooting a plurality of images, the user may perform shooting while moving the imaging device so as to track the main subject as in the case of panning shooting. You may image | photograph, without moving an apparatus.

また、ユーザは、主要被写体設定部30によって、主要被写体を自由に設定することができる。例えば、カメラのファインダーに主要被写体を設定するための枠が表示され、その枠に囲まれた部分を主要被写体とすることができる。但し、この方法は一例であり、この方法に限定されるものではない。   Further, the user can freely set the main subject by the main subject setting unit 30. For example, a frame for setting a main subject is displayed on the camera finder, and a portion surrounded by the frame can be set as the main subject. However, this method is an example and is not limited to this method.

記録部120に記録された複数枚の画像は、信号処理部40内の画像合成部50に供給される。画像合成部50は、例えば、複数枚の画像の画像合成処理を実行する。画像合成部50に含まれる重み付け合成部52は、各画像の合成に際して、重み付け係数に差を設けない均等合成と、重み付け係数に差を設けた、いわゆる落差のある重み付け合成(図中、不均等合成と表記されており、以下、不均等合成という場合がある)を実行することができる。均等合成された合成画像は、例えば、ずれ検出部60に供給される。また、不均等合成された合成画像は、ずれ補正部70に供給される。   The plurality of images recorded in the recording unit 120 are supplied to the image synthesis unit 50 in the signal processing unit 40. For example, the image composition unit 50 performs image composition processing of a plurality of images. A weighting composition unit 52 included in the image composition unit 50, when composing each image, performs equal composition without a difference in weighting coefficients, and so-called weighted composition with a difference in weighting coefficients (in the figure, non-uniformity). (Hereinafter, referred to as non-uniform composition). The synthesized image that has been uniformly synthesized is supplied to the deviation detection unit 60, for example. Further, the composite image that has been non-uniformly combined is supplied to the shift correction unit 70.

ずれ検出部60は、例えば、主要被写体領域ついてのずれ量と、主要被写体以外の領域(背景領域)についてのずれ量とを、自己相関ピークに基づいて検出することができる。ずれ検出部60によって検出されたずれ情報(例えば、主要被写体ならびに背景の双方のずれ量の情報)は、ブレ生成部80に供給される。   The deviation detection unit 60 can detect, for example, a deviation amount for the main subject region and a deviation amount for a region (background region) other than the main subject based on the autocorrelation peak. Deviation information detected by the deviation detection unit 60 (for example, information on the deviation amounts of both the main subject and the background) is supplied to the blur generation unit 80.

ずれ補正部70は、例えば、補正アルゴリズムに従って、ブレが生じる前の画像を復元する処理(ずれ補正処理)を実行することができる。なお、ブレを表す点像分布関数h(x,y)として、2重像生成関数(例えば、1次関数)を使用することができる。ずれ補正された画像は、ブレ生成部80に供給される。   The deviation correction unit 70 can execute, for example, a process of restoring an image before blurring (deviation correction process) according to a correction algorithm. A double image generation function (for example, a linear function) can be used as the point spread function h (x, y) representing blur. The image subjected to the shift correction is supplied to the blur generation unit 80.

ブレ生成部80は、ブレを生じさせたい領域(ブレ発生の対象領域)のみに、所望のブレを生じさせることができる。ブレの生成には、例えば、点像分布関数(Point Spread Function:PSF)を利用することができる。例えば、所定の点像分布関数(PSF)を用意し、線ブレを生じさせる範囲(2点間の距離)を指定して、画像をフィルタリングすることによって、所望のブレを生じさせることができる。   The blur generation unit 80 can generate a desired blur only in an area where blur is desired to occur (target area where blur occurs). For example, a point spread function (PSF) can be used to generate the blur. For example, by preparing a predetermined point spread function (PSF), specifying a range (distance between two points) that causes line blurring, and filtering the image, a desired blurring can be generated.

線ブレの範囲の決定方法としては、例えば、ずれ検出部で求められた、主要被写体以外の領域(背景部分等)に含まれる各パッチのずれ量を用いることができる。また、例えば、背景のずれ量が、所定の閾値(例えば、異常判定用の閾値)よりも大きい場合には、ずれ補正後の主要被写体が一致しておらず、その主要被写体のずれ量が加わっている場合があり得る。このような場合には、背景のずれ量から、ずれ検出部60で取得されている主要被写体のずれ量を差し引いた値をずれ量として用いることができる。これによって、自然な流し画像を形成することができる。   As a method for determining the range of line blurring, for example, the shift amount of each patch included in a region (background portion or the like) other than the main subject obtained by the shift detection unit can be used. Further, for example, when the amount of background deviation is larger than a predetermined threshold (for example, a threshold for abnormality determination), the main subjects after deviation correction do not match, and the amount of deviation of the main subject is added. It may be. In such a case, a value obtained by subtracting the shift amount of the main subject acquired by the shift detection unit 60 from the shift amount of the background can be used as the shift amount. As a result, a natural sink image can be formed.

また、生成するブレの量等は、制御部90から供給されるブレ調整情報(ずれを微調整するための調整値等)を用いて、適宜、調整することができる。すなわち、ユーザの好みに応じて、ブレ量を、微調整して増減可能とすることもできる。例えば、ずれ検出部60によって検出されたずれ量に、微調整用の調整値を加えて得られるずれ量に基づいて、線ブレの範囲を定めることができる。   The amount of blur to be generated can be adjusted as appropriate using blur adjustment information (an adjustment value for finely adjusting the deviation) supplied from the control unit 90. That is, according to the user's preference, the amount of blur can be finely adjusted to be increased or decreased. For example, the range of line blur can be determined based on the amount of deviation obtained by adding an adjustment value for fine adjustment to the amount of deviation detected by the deviation detector 60.

このように、本実施形態では、ブレ生成部80が、画像のブレ(画像の流し)を生じさせたい領域のみに、例えば、点像分布関数(PSF)を用いて、意図的にブレを生じさせることができる。例えば、主要被写体についてはブレのない状態とし、背景においては、所望のブレを確実に生じさせることができる。   As described above, in this embodiment, the blur generation unit 80 intentionally generates a blur only in an area where an image blur (an image stream) is to be generated, for example, using a point spread function (PSF). Can be made. For example, it is possible to make the main subject free from blurring, and to reliably produce desired blurring in the background.

上述の処理は、例えば、少なくとも2枚の画像間の、主要被写体のずれ情報と、主要被写体以外の背景(画像のブレを生じさせたい領域)のずれ情報と、を得ることで実行可能である。つまり、主要被写体をブレのない状態とすることは、時間軸上で隣接する2枚の画像(連続して撮影された、2枚の連続する画像)を画像合成し、各画像のずれ量を検出し、ずれ補正を実行することによって実現できる。   The above-described processing can be executed by obtaining, for example, shift information of the main subject between at least two images and shift information of the background (an area where image blurring is desired) other than the main subject. . That is, to make the main subject free from blurring, two adjacent images on the time axis (two consecutive images taken consecutively) are combined and the amount of shift between the images is determined. It can be realized by detecting and executing deviation correction.

したがって、本実施形態の撮像装置を用いることによって、少なくとも2枚の撮像画像に基づき、画像のブレ(画像の流し)を生じさせたい領域のみに、所望のブレを生じさせることができる。よって、より少ない枚数の画像に基づいて、容易に、自然な流し撮り画像を合成することができ、ユーザの負担ならびに画像処理の負担が軽減される。   Therefore, by using the imaging apparatus of the present embodiment, it is possible to generate a desired blur only in an area where it is desired to cause a blur of an image (an image flow) based on at least two captured images. Therefore, a natural panning image can be easily synthesized based on a smaller number of images, and the burden on the user and the image processing are reduced.

次に、連続して撮影された、連続する2枚の画像に基づいて、主要被写体にブレを生じさせるための処理手順の概要について、図2および図3を用いて説明する。まず、図2を参照する。   Next, an outline of a processing procedure for causing blurring in the main subject based on two consecutive images that have been continuously captured will be described with reference to FIGS. 2 and 3. First, referring to FIG.

図2(A)〜図2(D)は、2枚の画像を用いた、画像合成処理(画像加算処理)の一例を示す図である。図2(A)には第1画像が示され、図2(B)には第2画像が示されている。第1画像と第2画像は、連続して撮影された画像である。第1画像は、主要被写体である貨物自動車(トラック)200aと、背景である木(樹木)202aと、を含む。また、第2画像は、主要被写体である貨物自動車(トラック)200bと、背景である木(樹木)202bと、を含む。なお、主要被写体設定部30(図1)によって、貨物自動車200が主要被写体として選択されているものとする。   2A to 2D are diagrams illustrating an example of an image synthesis process (image addition process) using two images. 2A shows a first image, and FIG. 2B shows a second image. A 1st image and a 2nd image are the images image | photographed continuously. The first image includes a lorry (truck) 200a that is a main subject and a tree (tree) 202a that is a background. Further, the second image includes a truck (truck) 200b as a main subject and a tree (tree) 202b as a background. It is assumed that the lorry 200 is selected as the main subject by the main subject setting unit 30 (FIG. 1).

画像合成部50(図1)は、図2(A)に示される第1画像(200a,202a)と、図2(B)に示される第2画像(200b,202b)と、を合成する。画像合成方法としては、特別な位置合わせを行わずに、単純に2枚の画像を加算する方法(単純加算合成)と、例えば、主要被写体の位置合わせを行った後に2枚の画像を加算する方法(位置合わせ加算合成)とがある。   The image composition unit 50 (FIG. 1) composes the first image (200a, 202a) shown in FIG. 2 (A) and the second image (200b, 202b) shown in FIG. 2 (B). As an image composition method, a method of simply adding two images without performing special alignment (simple addition composition), for example, adding two images after aligning a main subject. There is a method (positioning addition synthesis).

図2(C)は、単純加算による合成画像を示す図であり、図2(D)は、位置合わせ加算による合成画像を示す図である。図2(C)の例では、主要被写体(200a,200b)ならびに背景(202a,202b)が、単純に重ね合わされている。図2(D)の例では、主要被写体について位置合わせがなされていることから、位置合わせ後の主要被写体200には、ずれは生じていない。   FIG. 2C is a diagram showing a composite image by simple addition, and FIG. 2D is a diagram showing a composite image by alignment addition. In the example of FIG. 2C, the main subject (200a, 200b) and the background (202a, 202b) are simply superimposed. In the example of FIG. 2D, since the main subject is aligned, there is no deviation in the main subject 200 after alignment.

次に、図3を参照する。図3(A)〜図3(D)は、合成された画像に基づいて、主要被写体にブレを生じさせる処理の一例を示す図である。図3(A)および図3(B)は、図2(A)および図2(B)に示した合成画像を再掲したものである。図3(C)は、ずれ補正部70によって、ずれ補正処理が行われた後の画像を示している。ずれ補正によって、主要被写体のずれ、ならびに背景である木(樹木)のずれが補正されて、ずれが解消される。したがって、貨物自動車(トラック)200ならびに背景である木(樹木)202を含む画像が得られる。   Reference is now made to FIG. FIG. 3A to FIG. 3D are diagrams illustrating an example of processing for causing blurring of the main subject based on the synthesized image. 3 (A) and 3 (B) show the composite image shown in FIGS. 2 (A) and 2 (B) again. FIG. 3C shows an image after the shift correction processing is performed by the shift correction unit 70. The shift correction corrects the shift of the main subject and the shift of the background tree (tree), thereby eliminating the shift. Accordingly, an image including the lorry 200 (truck) and the background tree (tree) 202 is obtained.

図3(D)は、ブレ生成部80によって、ブレ生成処理が行われた後の画像を示している。主要被写体200についてのブレ量はゼロ(図中、点で表されている)であり、背景である木(樹木)202には、所定量(図中、線分で示されている)のブレが生じている。このように、ブレ生成の対象である背景(木)のみに、所望のブレを意図的に生じさせることによって、信号処理によって、ユーザが好む撮り画像(流し画像)を得ることができる。   FIG. 3D illustrates an image after the blur generation process is performed by the blur generation unit 80. The blur amount for the main subject 200 is zero (represented by a dot in the figure), and a predetermined amount (represented by a line segment in the figure) of the background tree (tree) 202 is present. Has occurred. As described above, by intentionally generating a desired blur only in the background (tree) that is the target of blur generation, a captured image (a sink image) preferred by the user can be obtained by signal processing.

次に、信号処理部40における各部の動作(処理内容)の具体例について、図4〜図7を参照して説明する。まず、画像合成部50が行う画像合成処理について説明する。   Next, specific examples of the operation (processing contents) of each unit in the signal processing unit 40 will be described with reference to FIGS. First, image composition processing performed by the image composition unit 50 will be described.

(画像合成の概要)
画像合成方法としては、上述のとおり、特別な位置合わせを行わずに、単純に2枚の画像を加算する方法(単純加算合成:図2(C))と、例えば、主要被写体の位置合わせを行った後に2枚の画像を加算する方法(位置合わせ加算合成:図2(D))とがある。図2(C)の例では、主要被写体(200a,200b)ならびに背景(202a,202b)が、単純に重ね合わされている。図2(D)の例では、主要被写体について位置合わせがなされていることから、位置合わせ後の主要被写体200には、ずれは生じていない。
(Outline of image composition)
As described above, as described above, as described above, a method of simply adding two images without performing special alignment (simple addition synthesis: FIG. 2C), for example, alignment of a main subject is performed. There is a method of adding two images after registration (position addition synthesis: FIG. 2D). In the example of FIG. 2C, the main subject (200a, 200b) and the background (202a, 202b) are simply superimposed. In the example of FIG. 2D, since the main subject is aligned, there is no deviation in the main subject 200 after alignment.

(被写体領域の設定)
位置合わせ加算による合成画像を実行する場合、その前提として、主要被写体が設定されている必要がある。ユーザは、まず、図1に示される撮像装置の入出力部100や外部インターフェース(外部I/F)120を介して、主要被写体の選択や設定のための情報を入力する。入力された情報は、主要被写体設定部30に送られる。主要被写体設定部30は、受信した情報に基づいて、画像中に、主要被写体(ここでは貨物自動車200(200a,200b))の領域を設定する。なお、その他の主要被写体の設定方法としては、複数枚の画像の部分領域毎の動きベクトルの推定処理を行い、その動きベクトルのセグメンテーション処理から主要被写体領域の設定を行う方法がある。
(Subject area setting)
When executing a composite image by registration and addition, it is necessary to set a main subject as a precondition. First, the user inputs information for selecting and setting a main subject via the input / output unit 100 and the external interface (external I / F) 120 of the imaging apparatus shown in FIG. The input information is sent to the main subject setting unit 30. The main subject setting unit 30 sets an area of the main subject (here, the truck 200 (200a, 200b)) in the image based on the received information. As another main subject setting method, there is a method of performing motion vector estimation processing for each partial region of a plurality of images and setting the main subject region from the motion vector segmentation processing.

例えば、ユーザが主要被写体を追尾するように撮像装置を動かしながら撮影を行った場合、主要被写体の複数枚画像間の動きベクトルは、背景領域に比較し短いものになっていることが予測される。よって、動きベクトルの短い領域を、主要被写体領域とすることができる。但し、この例は一例である。任意の長さの動きベクトルを持つ領域を主要被写体領域としてもよい。   For example, when the user performs shooting while moving the imaging device so as to track the main subject, the motion vector between the multiple images of the main subject is predicted to be shorter than the background region. . Therefore, a region having a short motion vector can be set as a main subject region. However, this example is an example. An area having a motion vector of an arbitrary length may be used as the main subject area.

また、このユーザによる主要被写体領域の選択と、動きベクトルに基づく、主要被写体領域の検出とを組み合わせることもできる。例えば、主要被写体設定部30は、ユーザが選択した画像領域における動きベクトルの値と、実質的に同等の動きベクトルの値をもつ領域を探索し、その結果として検出された領域を、主要被写体領域とすることもできる。   Further, the selection of the main subject region by the user and the detection of the main subject region based on the motion vector can be combined. For example, the main subject setting unit 30 searches for a region having a motion vector value substantially equivalent to the value of the motion vector in the image region selected by the user, and uses the detected region as the main subject region. It can also be.

また、画像の中心(中央)の領域を主要被写体領域にしたり、あるいは、ユーザが選択した領域を参考に、グラフカットなどのセグメンテーション技術を用いて主要被写体領域を抽出するなどの処理を行って、主要被写体を設定したりすることもできる。   In addition, the center (center) area of the image is set as the main subject area, or the main subject area is extracted by using a segmentation technique such as graph cut with reference to the area selected by the user, You can also set the main subject.

(重み付け処理)
次に、画像合成部50が画像合成を行う際に必要となる重み付け処理について説明する。先に説明したように、画像合成部50は、重み付け合成部52を有している。したがって、画像合成部50は、複数枚の画像の加算処理時において、各画像に重み付け処理を行いながら画像を加算することができる。例えば、2枚の画像を加算する場合、例えば、一方の画像の重みを0.66とし、もう一方の画像の重みを0.34にすることができる。
(Weighting process)
Next, the weighting process required when the image composition unit 50 performs image composition will be described. As described above, the image composition unit 50 includes the weighting composition unit 52. Therefore, the image composition unit 50 can add images while performing weighting processing on each image during the addition processing of a plurality of images. For example, when two images are added, for example, the weight of one image can be 0.66 and the weight of the other image can be 0.34.

画像合成部50は、複数枚の合成画像を生成することができ、このとき、合成画像毎に、重み付けの比を異ならせることができる。例えば、2枚の合成画像を作成し、1枚を、ずれ検出用の合成画像(第1合成画像)とし、他の1枚は、ずれ補正用の合成画像(第2合成画像)とすることができる。   The image composition unit 50 can generate a plurality of composite images. At this time, the weighting ratio can be varied for each composite image. For example, two composite images are created, one is used as a composite image for detecting displacement (first composite image), and the other is used as a composite image for correcting displacement (second composite image). Can do.

ここで、ずれ検出用の第1合成画像の合成に際しては、均等合成が好ましい。すなわち、2つの画像にそれぞれ0.5、0.5の重み付けをして、各画像を合成することが好ましい。これは、ずれ検出部において自己相関関数値による合成画像内の像のずれ量の検出を行う際に、合成画像の像のずれ量の位置の自己相関値のピークを明確に求めることができるからである。   Here, in the synthesis of the first composite image for displacement detection, equal composition is preferable. That is, it is preferable to weight the two images by 0.5 and 0.5, respectively, and combine the images. This is because the peak of the autocorrelation value at the position of the image shift amount of the composite image can be clearly obtained when the shift detection unit detects the image shift amount in the composite image by the autocorrelation function value. It is.

自己相関は、すなわち、画像のテクスチャを示す信号が、それ自身を時間シフトした信号とどれだけ良く整合するかを示す尺度であることから、2枚の画像の同じ対象については、画像値に差がない方がパターンのマッチングがしやすい。   Autocorrelation is a measure of how well a signal representing the texture of an image matches the time-shifted signal itself, so for the same object in two images, the difference in image values It is easier to match the pattern if there is no.

一方、ずれ補正用の第2合成画像の合成に際しては、重み付けを変えて、不均等合成(落差のある重み付けを用いた画像合成)をするのが好ましい。ずれ補正部用の合成画像としては、複数の画像の重み付けの際に、重みに落差を付けて割り振ることが好ましい。例えば、2つの画像にそれぞれ、0.66、0.34などの重み付けをして、各画像を合成することが好ましい。これは、ずれ補正部70において、合成画像のずれ補正を行う際に、良好にずれ補正処理を行うことができる点を考慮したものである。以下、図3および図4を参照して説明する。   On the other hand, when synthesizing the second composite image for deviation correction, it is preferable to perform non-uniform composition (image composition using weight with a drop) by changing the weight. The composite image for the shift correction unit is preferably assigned with a drop in weight when weighting a plurality of images. For example, it is preferable to weight each of the two images with a weighting of 0.66, 0.34, etc. to synthesize each image. This is because the shift correction unit 70 can perform a shift correction process satisfactorily when correcting the shift of the composite image. Hereinafter, a description will be given with reference to FIGS. 3 and 4.

図4は、ずれ補正部用の合成画像(第2合成画像)のモデルとなる2重像を生成するフィルタ関数h(x)の一例を示す図である。図5は、フィルタ関数h(x)をフーリエ変換した後の振幅スペクトルの例を示す図である。   FIG. 4 is a diagram illustrating an example of a filter function h (x) that generates a double image serving as a model of a composite image (second composite image) for the shift correction unit. FIG. 5 is a diagram illustrating an example of an amplitude spectrum after the Fourier transform of the filter function h (x).

ずれ補正部用の合成画像は、画像の部分領域ごとにその性質を調べるとその画像は像が2重に重なっている2重像とみなせる。この2枚の画像が重なっている2重画像を生成するフィルタ関数h(x)を、以下のように定義する。ここで、説明を簡単にするために1次元の関数とする。この関数を、図に示したものが図4である。
ここで、δはデルタ関数、pは2重像の重像間変位、aは重像間の信号の強度比を表している。このフィルタ関数を原画像に施すことで、2重像である合成画像を生成できる。
この関数をフーリエ変換すると、以下のような関数になる。
このフーリエ変換後の関数の、振幅スペクトルを表したものが図4である。図5は、2重像間の信号強度比aを変化させたとき(a=0,a=0.15,a=0.30)の、フーリエ変換後の関数H(u)の振幅スペクトルをあらわしている。グラフから、a=0の場合(すなわち、2つの像の信号強度が等しい場合)、H(u)の逆フィルタはゼロ点を持つために復元処理は不安定になることが分かる。
When the properties of the composite image for the shift correction unit are examined for each partial region of the image, the image can be regarded as a double image in which the images are doubled. A filter function h (x) that generates a double image in which the two images overlap is defined as follows. Here, in order to simplify the description, it is assumed to be a one-dimensional function. This function is shown in FIG.
Here, δ is a delta function, p is a displacement between double images of a double image, and a is an intensity ratio of signals between the multiple images. By applying this filter function to the original image, a composite image that is a double image can be generated.
When this function is Fourier transformed, the following function is obtained.
FIG. 4 shows the amplitude spectrum of the function after the Fourier transform. FIG. 5 shows the amplitude spectrum of the function H (u) after Fourier transform when the signal intensity ratio a between the double images is changed (a = 0, a = 0.15, a = 0.30). Appears. From the graph, it can be seen that when a = 0 (that is, when the signal strengths of the two images are equal), since the inverse filter of H (u) has a zero point, the restoration process becomes unstable.

すなわち、ずれ補正部70は、以下の式を用いてずれ補正を行うことになる。
f(x,y)={1/h(x,y)}・g(x,y)
g(x,y)=h(x,y)*f(x,y)(ここで、記号*は畳み込み積分を表す)。
f(x,y)は、ブレる前の画像であり、h(x,y)は、ブレを表す点像分布関数であり、g(x,y)は、ブレ後の画像である。
均等合成を用いた場合、点像分布関数h(x,y)の、周波数に対する振幅値(振幅スペクトル)の零点が多くなり、零点では、1/h(x,y)の項が無限大となって、ブレ補正が不可能となる(ブレ補正処理の破綻)。これに対して、不均等合成(落差のある重み付けを用いた画像合成)を用いて、2像間の振幅に差を大きくしていくと、零点の数は減少し、やがて零点は発生しなくなる(図5)。つまり、零点の数が少なくなる(あるいは零点が無くなる)ことによって、ブレ補正処理の破綻の可能性を低減できる。よって、画像合成部50において、複数の画像に重み付けをする際に、重みに落差を付けて割り振ることが好ましい。
That is, the deviation correction unit 70 performs deviation correction using the following formula.
f (x, y) = {1 / h (x, y)} · g (x, y)
g (x, y) = h (x, y) * f (x, y) (here, the symbol * represents a convolution integral).
f (x, y) is an image before blurring, h (x, y) is a point spread function representing blurring, and g (x, y) is an image after blurring.
When uniform synthesis is used, the zero point of the amplitude value (amplitude spectrum) with respect to the frequency of the point spread function h (x, y) increases, and the term of 1 / h (x, y) is infinite at the zero point. As a result, the blur correction is impossible (failure of the blur correction process). On the other hand, if the difference between the amplitudes of two images is increased by using non-uniform composition (image composition using weighting with a drop), the number of zeros decreases and eventually no zeros are generated. (FIG. 5). That is, by reducing the number of zeros (or eliminating the zeros), it is possible to reduce the possibility of failure of the blur correction process. Therefore, when weighting a plurality of images in the image composition unit 50, it is preferable to assign the weights with a drop.

(ずれ検出処理)
上述のとおり、画像合成部50において合成された合成画像は、ずれ検出部60に供給され、合成画像に含まれる多重化された像のずれの検出処理が行われる。ずれ検出部60は、例えば、画像の部分領域毎に、自己相関関数による自己相関関数値の探索を行い、多重化されたずれの検出を行う。
(Shift detection processing)
As described above, the synthesized image synthesized by the image synthesizing unit 50 is supplied to the deviation detecting unit 60, and detection processing of deviation of multiplexed images included in the synthesized image is performed. For example, the shift detection unit 60 searches for an autocorrelation function value using an autocorrelation function for each partial region of the image, and detects a multiplexed shift.

具体的には、主要被写体についてのずれ量、背景についてのずれ量の各々を、自己相関ピークに基づいて検出するのが好ましい。画像合成時に主要被写体の位置合わせを行った場合でも、必ずしもずれが零とは限らない。ブレ補正やブレ生成の精度を担保するために、主要被写体のずれ量も得ておく方がよいからである。但し、主要被写体についてのずれ量が所定値以下なら、ずれ量は零とみなすのがよい。   Specifically, it is preferable to detect each of the shift amount for the main subject and the shift amount for the background based on the autocorrelation peak. Even when the main subject is aligned during image composition, the deviation is not always zero. This is because it is better to obtain the deviation amount of the main subject in order to ensure the accuracy of blur correction and blur generation. However, if the deviation amount for the main subject is equal to or less than a predetermined value, the deviation amount should be regarded as zero.

また、自己相関ピーク検出は、例えば、画像の部分領域(画像パッチ:20画素×20画素〜100画素×100画素程度)を基本単位として実行することができる。但し、ずれが正確に検出できない例も有り得るため、この場合の対応策を、あらかじめ講じておくのが望ましい。   Further, the autocorrelation peak detection can be executed with, for example, a partial region of an image (image patch: about 20 pixels × 20 pixels to about 100 pixels × 100 pixels) as a basic unit. However, since there may be an example in which the deviation cannot be detected accurately, it is desirable to take measures in this case in advance.

(ずれが正確に検出できない場合の例1)
例えば、主要被写体領域と背景領域等との物体境界上では、両者のテクスチャ(画像の特徴)が明確ではない場合が多く、ずれ検出量に誤差を含みやすい。よって、このずれ量に基づいてずれ補正を行うと、例えば、主要被写体と背景の境界部分で、輪郭にぶれが生じやすい。この場合の対策としては、以下の方法が考えられる。
(Example 1 when deviation cannot be detected accurately)
For example, on the object boundary between the main subject area and the background area or the like, the texture (image characteristics) of the two is often not clear, and the deviation detection amount easily includes an error. Therefore, if deviation correction is performed based on this deviation amount, for example, the outline tends to blur at the boundary between the main subject and the background. In this case, the following method can be considered.

すなわち、後述するブレ生成処理の際、背景のブレ量を少し多めに設定して、背景のブレで、主要被写体の輪郭のブレ部分を覆うことによって、主要被写体の輪郭を、よりシャープに見せることが可能である。   In other words, during the blur generation process described later, the background blur amount is set slightly larger, and the blur of the main subject is covered with the background blur to make the main subject outline sharper. Is possible.

また、画像パッチを単位とした検出ではなく、対象とする画像パッチの周囲の画像パッチのずれ量を利用する(例えば、対象となるパッチの近傍に位置する8個の周辺パッチのずれ量の平均値を、その対象となるパッチのずれ量とする)。周辺の複数のパッチのずれ量から、一つのパッチのずれ量を推定することによって、ずれ量の検出精度の向上が期待できる。   Also, instead of detection in units of image patches, the shift amount of the image patches around the target image patch is used (for example, the average of shift amounts of eight peripheral patches located in the vicinity of the target patch) The value is the amount of deviation of the target patch). By estimating the shift amount of one patch from the shift amounts of a plurality of neighboring patches, improvement in detection accuracy of the shift amount can be expected.

(ずれが正確に検出できない場合の例2)
画像パッチのテクスチャ(パッチ内の画素の変化をパッチ全体から見た場合の特徴点)が不明確である場合には、ずれが正確に検出できない。例えば、自己相関検出の対象である画像パッチに有効なテクスチャ領域が少ない場合、つまり、画像パッチ全体における画素値の分布に変化が乏しい場合に、ずれ検出が正確に行えない可能性が高い。なお、テクスチャの特徴量としては、パッチの画素値の分散量を使用することができる。
(Example 2 when the deviation cannot be detected accurately)
When the texture of the image patch (the feature point when the change of the pixel in the patch is viewed from the entire patch) is unclear, the shift cannot be accurately detected. For example, when there are few effective texture regions in the image patch that is the target of autocorrelation detection, that is, when the change in the distribution of pixel values in the entire image patch is poor, there is a high possibility that shift detection cannot be performed accurately. As the texture feature amount, the dispersion amount of the pixel value of the patch can be used.

この場合の対策としては、例えば、以下の方法を採ることができる。すなわち、画像パッチを単位とした検出ではなく、対象とする画像パッチの周囲の画像パッチのずれ量を利用する。例えば、対象となるパッチの近傍に位置する8個の周辺パッチのずれ量の平均値を、その対象となるパッチのずれ量とする。周辺の複数のパッチのずれ量から、一つのパッチのずれ量を推定することによって、ずれ量の検出精度の向上が期待できる。   As a countermeasure in this case, for example, the following method can be adopted. That is, instead of detection in units of image patches, the shift amount of the image patches around the target image patch is used. For example, an average value of the shift amounts of eight peripheral patches located in the vicinity of the target patch is set as the shift amount of the target patch. By estimating the shift amount of one patch from the shift amounts of a plurality of neighboring patches, improvement in detection accuracy of the shift amount can be expected.

(ずれ検出処理に用いる自己相関関数の具体例)
ずれ検出処理に用いる自己相関関数の具体例を以下に示す。
(Specific example of autocorrelation function used for deviation detection processing)
A specific example of the autocorrelation function used for the deviation detection process is shown below.

このR(τ)の第2のピーク(2番目のピーク)の時のずれ量τを、ずれ検出部60における合成画像に含まれる多重化された像のずれ量とする(図6参照)。図6は、ずれ量τと、ずれ量τの位置の自己相関関数値R(τ)との関係の一例を示す図である。図3の例では、τ1において、第2のピークが生じている。   The shift amount τ at the time of the second peak (second peak) of R (τ) is set as the shift amount of the multiplexed image included in the composite image in the shift detection unit 60 (see FIG. 6). FIG. 6 is a diagram illustrating an example of the relationship between the shift amount τ and the autocorrelation function value R (τ) at the position of the shift amount τ. In the example of FIG. 3, a second peak occurs at τ1.

なお、ずれ検出処理は、主要被写体領域、背景領域の両方の領域においてずれ量の検出を行う。画像合成部において、主要被写体に合わせた位置合わせを行った場合でも、位置合わせ処理に失敗する場合があるので、主要被写体のずれ量の検出を行うことが好ましい。この場合、主要被写体領域において、自己相関関数の第2のピークがある一定の閾値よりも小さい場合は、位置合わせが正しく行われているとみなし、ずれ量を0とする。   In the shift detection process, the shift amount is detected in both the main subject area and the background area. Even in the case where the image composition unit performs alignment according to the main subject, the alignment processing may fail, so it is preferable to detect the amount of deviation of the main subject. In this case, if the second peak of the autocorrelation function is smaller than a certain threshold value in the main subject region, it is considered that the alignment is correctly performed, and the deviation amount is set to zero.

なお、自己相関関数値を求める前の前処理として、画像にフィルタリング処理を施してもよい。フィルタリング処理は、例えば、ラプラシアンフィルタなどのハイパスフィルタ、LOGフィルタなどのバンドパスフィルタなどを用いる。このような前処理を行うことによって、自己相関値を高精度に検出することが可能となる。   Note that filtering processing may be performed on the image as preprocessing before obtaining the autocorrelation function value. For the filtering process, for example, a high-pass filter such as a Laplacian filter, a band-pass filter such as a LOG filter, or the like is used. By performing such preprocessing, the autocorrelation value can be detected with high accuracy.

(ずれ補正処理)
ずれ補正部70は、ずれ補正用の合成画像(不均等合成された第2合成画像)と、ずれ検出部60において検出された、合成画像に含まれる多重化(上記の例では2重化)された像のずれ量の情報と、に基づいて、画像のずれを補正する。
(Displacement correction processing)
The shift correction unit 70 includes a composite image for shift correction (a second composite image that is non-uniformly combined) and multiplexing included in the composite image detected by the shift detection unit 60 (duplication in the above example). The image shift is corrected based on the information on the image shift amount.

先に図4を用いて説明したように、ずれ補正用の合成画像(第2合成画像)は、画像の部分領域ごとにその性質を調べるとその画像は像が2重に重なっている2重像とみなせる。そこで、ずれ補正用の合成画像(第2合成画像)を画像の部分領域ごとに2重像画像であるとみなし、2重像を1重像(2重像のずれが補正された画像)へと変換する処理を、合成画像の部分領域に施す。   As described above with reference to FIG. 4, the composite image (second composite image) for misalignment correction is a double image in which the image is doubled when its properties are examined for each partial region of the image. It can be regarded as a statue. Therefore, the composite image (second composite image) for shift correction is regarded as a double image for each partial region of the image, and the double image is converted to a single image (an image in which the shift of the double image is corrected). To the partial area of the composite image.

すなわち、上述のとおり、ブレ後の画像は、ブレを表す点像分布関数h(x,y)を用いて表すことができる。点像分布関数h(x,y)としては、2重像生成関数(例えば、1次関数)を用いることができる。したがって、ずれ補正部70は、先に説明したように、以下の式を用いてずれ補正を行うことができる。
f(x,y)={1/h(x,y)}・g(x,y)
g(x,y)=h(x,y)*f(x,y)(ここで、記号*は畳み込み積分を表す)。
f(x,y)は、ブレる前の画像であり、h(x,y)は、ブレを表す点像分布関数であり、g(x,y)は、ブレ後の画像である。
That is, as described above, an image after blur can be represented using a point spread function h (x, y) representing blur. As the point image distribution function h (x, y), a double image generation function (for example, a linear function) can be used. Accordingly, as described above, the deviation correction unit 70 can perform deviation correction using the following equation.
f (x, y) = {1 / h (x, y)} · g (x, y)
g (x, y) = h (x, y) * f (x, y) (here, the symbol * represents a convolution integral).
f (x, y) is an image before blurring, h (x, y) is a point spread function representing blurring, and g (x, y) is an image after blurring.

具体的には、2重像画像を1重像へと補正するための処理は、例えば、以下の式によって表すことができる。
Specifically, the process for correcting a double image to a single image can be expressed by the following equation, for example.

ここで、xは画像座標、gは合成画像、fは補正画像、pはずれ検出部から送信された多重化された像間のずれ量、A(P)は重像間の変形量pで画像を変形するための行列、γは多重化された像間の重みの比、βは像の明るさを正規化させる正規化変数である。nは復元処理の精度を制御する変数である。g(x)は、画像座標x周辺の合成画像パッチ、p(x)は画像座標xにおける多重化された像間のずれ量、f(x,p)はp(x)を用いて補正された画像座標x周辺の補正画像パッチを表す。この補正画像パッチf(x,p)を複数の画像座標xにおいてパッチの重複領域を許しながら求め、その補正パッチを重み付け加算平均などの処理で統合することにより補正画像を得る。なお、βは、任意の値をとることが可能であるが、γに応じて決定される変数とすることもできる。例えば、β=1/(1+γ)としてもよい。   Here, x is an image coordinate, g is a composite image, f is a corrected image, p is a shift amount between multiplexed images transmitted from the shift detection unit, and A (P) is a deformation amount p between multiple images. Γ is a weight ratio between the multiplexed images, and β is a normalization variable that normalizes the brightness of the image. n is a variable that controls the accuracy of the restoration process. g (x) is a composite image patch around the image coordinate x, p (x) is a shift amount between multiplexed images at the image coordinate x, and f (x, p) is corrected using p (x). Represents a corrected image patch around the image coordinate x. The corrected image patch f (x, p) is obtained while allowing an overlapping area of patches at a plurality of image coordinates x, and the corrected patch is integrated by a process such as weighted addition averaging to obtain a corrected image. Note that β can take an arbitrary value, but may be a variable determined according to γ. For example, β = 1 / (1 + γ) may be set.

また、補正アルゴリズムとしては、例えば、特開2009−134357号公報)に記載の方法(2重像のモデルに対して逆フィルタを実行して、ブレ前の画像を復元する方法)のアルゴリズムを用いることができる。   Further, as a correction algorithm, for example, an algorithm of a method described in Japanese Patent Application Laid-Open No. 2009-134357 (a method of performing an inverse filter on a double image model to restore an image before blurring) is used. be able to.

(ブレ生成処理)
ここでは、図3(D)に示されるような、主要被写体領域以外の背景領域の全部にブレを生じさせる例について説明する。但し、この例は一例であり、これに限定されるものではない。例えば、背景のうちの一部にブレを生じさせてもよい。例えば、主要被写体(地面を歩いている鳥の足を除く部分)に対する背景(鳥の足、地面)のうちの「鳥の足」のみにブレを生じさせることもできる。なお、背景の一部のみにブレを生じさせる例は、第2の実施形態において説明する。
(Blur generation processing)
Here, an example in which blurring occurs in the entire background area other than the main subject area as shown in FIG. 3D will be described. However, this example is an example, and the present invention is not limited to this. For example, blur may be caused in a part of the background. For example, it is possible to cause blurring only on the “bird's foot” in the background (bird's foot, ground) with respect to the main subject (the part excluding the bird's foot walking on the ground). Note that an example in which only a part of the background is blurred will be described in the second embodiment.

また、例外的な処理ではあるが、例えば、ユーザが、遊び感覚で、画像全部に強制的にブレを与えるというような場合もあり得る。したがって、「ずれ補正がされた画像の全部または一部」を、「画像のブレ(画像の流し)を生じさせたい領域」とすることが可能である。   Further, although it is an exceptional process, for example, there may be a case where the user forcibly blurs the entire image in a playful manner. Therefore, “all or part of the image subjected to the shift correction” can be set as “an area where image blur (image flow) is desired to occur”.

例えば、背景領域の全部に対してブレを生じさせる場合(図3(D)の例)、背景領域に含まれる各画像パッチに対して、点像分布関数(Point Spread Function:PSF)によるフィルタリングを実行して、線ブレを生じさせる。ここで、線ブレを生じさせる範囲の決定方法としては、例えば、以下の方法がある。
(1)ずれ検出部で求められた、背景領域に含まれる各パッチのずれ量を用いる。
(2)ずれ検出部において、対象とする画像パッチの周囲の画像パッチのずれ量を利用して求められたずれ量(例えば、対象となるパッチの近傍に位置する8個の周辺パッチのずれ量の平均値を、その対象となるパッチのずれ量とする)を用いる。
(3)但し、ずれ量が、異常判定用の閾値よりも大きい場合には、主要被写体が一致しておらず、その主要被写体のずれ量が加わっている場合があり得ることから、異常のずれ量から、ずれ検出部で取得されている主要被写体のずれ量を差し引いた値をずれ量として用いることができる。
(4)さらに、上記(1)の例の場合、背景等のブレ量を少し多めに設定して、背景等のブレで、主要被写体の輪郭のブレ部分を覆うことによって、主要被写体の輪郭を、よりシャープに見せることが可能である(ブレ生成による画像補正)。
(5)ユーザ設定に対応して微調整用の調整値を生成し、ずれ検出部で検出されたずれ量に、その調整値を加えてずれ範囲を定める。すなわち、より大きいブレ量を設定したり、少ないブレ量を設定したりすることにより、ユーザの好みにあった流し撮り画像とすることもできる。例えば、ユーザが、入出力部100や外部インターフェース(外部I/F)120を介して、流し量多め、少なめの設定を行うことができる。
For example, when blurring occurs in the entire background area (example in FIG. 3D), filtering with a point spread function (PSF) is performed on each image patch included in the background area. Run to cause line blurring. Here, as a method for determining a range that causes line blurring, for example, there are the following methods.
(1) The shift amount of each patch included in the background area obtained by the shift detection unit is used.
(2) A shift amount obtained by using a shift amount of an image patch around the target image patch in the shift detection unit (for example, shift amounts of eight peripheral patches positioned in the vicinity of the target patch) Is used as a deviation amount of the target patch).
(3) However, when the amount of deviation is larger than the threshold value for abnormality determination, the main subject does not match and the amount of deviation of the main subject may be added. A value obtained by subtracting the deviation amount of the main subject acquired by the deviation detection unit from the amount can be used as the deviation amount.
(4) Furthermore, in the case of the above example (1), the outline of the main subject is defined by setting the blur amount of the background or the like a little larger and covering the blur portion of the outline of the main subject with the blur of the background or the like. It is possible to look sharper (image correction by blur generation).
(5) An adjustment value for fine adjustment is generated corresponding to the user setting, and the deviation range is determined by adding the adjustment value to the deviation amount detected by the deviation detection unit. That is, by setting a larger blur amount or setting a smaller blur amount, it is possible to obtain a panning image suitable for the user's preference. For example, the user can set a larger amount of flow and a smaller amount via the input / output unit 100 or the external interface (external I / F) 120.

ブレ生成部80においてブレが生成された画像は、例えば、記録部20に記憶される。記憶された画像は、例えば、観賞用またはその他の用途に利用することができる。   The image in which the blur is generated in the blur generation unit 80 is stored in the recording unit 20, for example. The stored image can be used, for example, for ornamental purposes or other purposes.

(ブレ生成による画像補正、ずれ補正の失敗低減のための処理について)
上述の(4)の例で示したように、ブレ生成を画像補正に応用することもできる。例えば、ずれ補正部70によるずれ補正処理が行えなかった領域(ずれ補正に失敗した領域)に関して、ブレ生成部80によるブレ生成の量を、通常よりも少し多めに設定して、ずれ補正処理の失敗を補うようにしてもよい。
(Processing for reducing failure in image correction and shift correction by blur generation)
As shown in the above example (4), blur generation can also be applied to image correction. For example, with respect to an area where the deviation correction process by the deviation correction unit 70 cannot be performed (an area where the deviation correction has failed), the blur generation amount by the blur generation unit 80 is set slightly larger than usual, and the deviation correction process is performed. You may make up for failure.

なお、このような対策を採ることと並行して、ずれ補正の失敗自体を低減するのが好ましい。ずれ補正の失敗低減のために、例えば、以下のような対策を採ることができる。   In parallel with taking such measures, it is preferable to reduce the misalignment failure itself. For example, the following measures can be taken to reduce misalignment correction failures.

ずれ補正部70において、ずれ補正処理に失敗する理由の一つとしては、ずれ検出部60において検出されたずれ量に誤りがあった場合があげられる。このようなずれ検出部60におけるずれ量の誤りは、検出に用いている自己相関値に明確なピークが得られない場合に起こる。このような明確なピークが得られない場合は、例えば、主要被写体領域と背景領域との境界上、すなわち物体境界上でたびたび発生する。   One reason why the shift correction unit 70 fails in the shift correction process is that there is an error in the shift amount detected by the shift detection unit 60. Such an error in the amount of deviation in the deviation detector 60 occurs when a clear peak cannot be obtained in the autocorrelation value used for detection. When such a clear peak cannot be obtained, for example, it frequently occurs on the boundary between the main subject area and the background area, that is, on the object boundary.

そこで、自己相関値がある閾値以下の場合は、ブレの生成を通常よりも多めに施すなどしてもよい。もしくは、自己相関値がある閾値以下の場合は、対象パッチ周辺のパッチにおいて検出されたずれ量を利用するなどしてもよい。具体的には、対象パッチの8近傍のパッチで検出されたずれ量の平均値を対象パッチのずれ量にするなどする。   Therefore, when the autocorrelation value is equal to or smaller than a certain threshold value, blur generation may be performed more than usual. Alternatively, when the autocorrelation value is equal to or smaller than a certain threshold value, a deviation amount detected in a patch around the target patch may be used. Specifically, an average value of the deviation amounts detected by the patches in the vicinity of 8 of the target patch is set as the deviation amount of the target patch.

また、ずれ量検出部における、ずれ量検出の誤りは、ずれ量検出に用いた画像パッチ(y1)に有効なテクスチャ領域が少なく、画像パッチが全体的に平坦に近い場合にも起こり得る。そのような場合に備えて、ずれ検出部60において、ずれ検出処理を行う場合に、予め対象パッチ(y1)のテクスチャの量を計測し、テクスチャ量がある閾値以下の場合は、対象パッチ周辺のパッチにおいて検出されたずれ量を利用するなどしてもよい。具体的には、対象パッチの8近傍のパッチで検出されたずれ量の平均値を対象パッチのずれ量にするなどしてもよい。テクスチャの量の検出には、対象パッチの画素値の分散量などの値を用いることができる。   In addition, a misregistration amount detection error in the misregistration amount detection unit may also occur when there are few effective texture areas in the image patch (y1) used for the misregistration amount detection and the image patch is almost flat as a whole. In preparation for such a case, when the deviation detection process is performed in the deviation detection unit 60, the texture amount of the target patch (y1) is measured in advance. The amount of deviation detected in the patch may be used. Specifically, an average value of the deviation amounts detected by the patches in the vicinity of 8 of the target patch may be used as the deviation amount of the target patch. For the detection of the texture amount, a value such as the amount of dispersion of the pixel value of the target patch can be used.

本発明の実施形態における処理手順の一例が、図7に示される。図7は、2枚の画像に基づいて流し撮り画像を形成する場合における、処理の手順の一例を示すフローチャートである。   An example of the processing procedure in the embodiment of the present invention is shown in FIG. FIG. 7 is a flowchart illustrating an example of a processing procedure when a panning image is formed based on two images.

ステップST1では、ユーザが撮像装置の撮影モードを流し撮りモードに設定する。ステップST2では、被写体の画像を2枚撮影する。ここでシャッター速および撮影の間隔は、ユーザが自由に設定できるものとする。ステップST3では、撮影された画像2枚の記録を行う。ステップST4では、撮影された画像2枚のうちの1枚を基準画像と設定する。ステップST5では、基準画像における、主要被写体領域の設定を行う。   In step ST1, the user sets the shooting mode of the imaging apparatus to the panning mode. In step ST2, two images of the subject are taken. Here, it is assumed that the user can freely set the shutter speed and the shooting interval. In step ST3, two shot images are recorded. In step ST4, one of the two captured images is set as a reference image. In step ST5, the main subject area in the reference image is set.

ステップST6では、2枚の画像の合成を行う。主要被写体領域の位置あわせを行い、2枚画像の合成を行う。もしくは、単純加算を行って画像を合成する。合成画像は2枚、作成する。1枚は、ずれ検出用の第1合成画像とし、他の1枚は、ずれ補正用の第2合成画像とする。ずれ量検出用の第1合成画像を作成する際には、均等の重み付けを行った(例えば0.5、0.5)画像合成を実施する。また、ずれ補正用の第2合成画像を作成する際には、不均等合成(落差のある重み付けを用いた画像合成)を使用する。例えば、0.66、0.34の重み付けとすることができる。   In step ST6, two images are combined. The main subject area is aligned, and two images are synthesized. Alternatively, the image is synthesized by performing simple addition. Two composite images are created. One sheet is a first composite image for displacement detection, and the other sheet is a second composite image for displacement correction. When creating the first composite image for detecting the shift amount, image synthesis is performed with equal weighting (for example, 0.5, 0.5). Further, when creating the second composite image for correcting the deviation, non-uniform composition (image composition using weighting with a drop) is used. For example, the weights can be set to 0.66 and 0.34.

ステップST7では、ステップ6で合成された合成画像のずれ量を部分領域毎に検出する。ずれ量の検出は合成画像の部分領域(パッチ)ごとに、自己相関関数を用いて算出し、その自己相関関数値の最大値の位置のずれ量を求めるずれ量とし、合成画像の全領域において、ずれ量を検出する。   In step ST7, the shift amount of the synthesized image synthesized in step 6 is detected for each partial region. The amount of deviation is detected by using an autocorrelation function for each partial area (patch) of the composite image, and the amount of deviation of the position of the maximum value of the autocorrelation function value is obtained. The amount of deviation is detected.

ステップST8では、ステップST6で合成された合成画像およびステップST7で検出された合成画像のずれ量を用いて、合成画像に含まれる像のずれの補正を行う。ずれの補正方法としては、例えば、特開2009−134357号公報に記載される方法を使用することができる。   In step ST8, the deviation of the image included in the synthesized image is corrected using the deviation amount of the synthesized image synthesized in step ST6 and the synthesized image detected in step ST7. As a deviation correction method, for example, a method described in JP2009-134357A can be used.

ステップST9では、補正された合成画像に部分領域毎にブレを生成することで流し撮り画像を作成する。ここで、ステップST5で設定した主要被写体領域にはブレを生成しない。ステップST9で生成するブレ量は、ステップST7で検出されたずれ量とすることができる。また、ステップST7で検出されたブレ量が、例えば閾値と比較して異常であった場合には、生成するブレ量を、ステップST7で検出されたずれ量から、ステップST7で検出された主要被写体のずれ量を差し引いたずれ量とすることができる。   In step ST9, a panning image is created by generating blur for each partial region in the corrected composite image. Here, no blur is generated in the main subject area set in step ST5. The blur amount generated in step ST9 can be the shift amount detected in step ST7. Further, when the amount of blur detected in step ST7 is abnormal as compared with, for example, a threshold, the amount of blur to be generated is changed from the amount of deviation detected in step ST7 to the main subject detected in step ST7. The amount of deviation can be obtained by subtracting the amount of deviation.

ステップST10では、ステップST9で生成された流し撮り画像において、ユーザの好みにより、多めのブレ量、少なめのブレ量などの設定を行え、ユーザの指定があった場合には、ユーザの指定を加味し、再度ステップST8で補正された合成画像に、部分領域毎にブレを生成する。   In step ST10, in the panning image generated in step ST9, a larger blur amount, a smaller blur amount and the like can be set according to the user's preference, and if the user designates, the user's designation is taken into account. Then, blur is generated for each partial region in the composite image corrected again in step ST8.

ステップST11では、生成された流し撮り画像の出力処理(信号出力処理)を行う。出力された画像は、記録部に記録される。   In step ST11, output processing (signal output processing) of the generated panning shot image is performed. The output image is recorded in the recording unit.

(第2の実施形態)
本実施形態では、背景の一部のみにブレを生じさせる例について説明する。例えば、主要被写体以外の背景領域であって、2枚の画像間のずれ量が所定範囲(ある程度大きなずれが認められる範囲)の領域のみを、画像流しの形成対象とすることができる。すなわち、ずれ量の大きさに基づいて、ブレ発生対象を決定することができる。例えば、背景領域のズレ量の大きい領域の特定方法としては、ズレ量を所定の閾値と比較するという方法を採用することができる。
(Second Embodiment)
In the present embodiment, an example in which blurring occurs only in a part of the background will be described. For example, only the background area other than the main subject and the deviation amount between the two images within a predetermined range (a range in which a certain amount of deviation is recognized) can be set as an image sink formation target. That is, it is possible to determine the blur occurrence target based on the magnitude of the deviation amount. For example, as a method for specifying a region having a large amount of deviation of the background region, a method of comparing the amount of deviation with a predetermined threshold can be employed.

図8(A)および図8(B)は、背景の一部のみにブレを生じさせる例を示す図である。図8(A)に示される画像は、画像合成部50によって、主要被写体についての位置合わせを行った後に、流し撮りされた2枚の画像を合成して得られた合成画像である。図8(A)に示される画像には、戸外でフェンシングの練習をする選手(主要被写体)204と、背景である貨物自動車(トラック)200a,200bと、背景である木(樹木)202a,202bとが含まれている。   FIG. 8A and FIG. 8B are diagrams illustrating an example in which blurring occurs only in a part of the background. The image shown in FIG. 8A is a synthesized image obtained by synthesizing two images that have been panned after the image synthesizing unit 50 has aligned the main subject. The image shown in FIG. 8A includes a player (main subject) 204 who practice fencing outdoors, a truck (truck) 200a, 200b as a background, and trees (trees) 202a, 202b as a background. And are included.

図8(A)から明らかなように、背景である貨物自動車(トラック)200a,200bについてのずれ量の方が、背景である木(樹木)202a,202bについてのずれ量よりも大きい。ずれ検出部60は、背景領域の各々のズレ量を、所定の閾値と比較する。このとき、例えば、貨物自動車(トラック)200a,200bについてのずれ量は、その閾値を超え、一方、木(樹木)202a,202bについてのずれ量は、その閾値を下回ったとする。各部のずれ量を閾値と比較した結果を示す情報(閾値比較結果情報)は、ずれ検出部60からブレ生成部80に供給される。   As is clear from FIG. 8A, the amount of deviation for the background trucks 200a and 200b is larger than the amount of deviation for the background trees (trees) 202a and 202b. The deviation detection unit 60 compares the amount of deviation of each background region with a predetermined threshold value. At this time, for example, it is assumed that the deviation amount for the trucks 200a and 200b exceeds the threshold value, while the deviation amount for the trees (trees) 202a and 202b falls below the threshold value. Information (threshold comparison result information) indicating the result of comparing the shift amount of each unit with a threshold value is supplied from the shift detection unit 60 to the blur generation unit 80.

また、ずれ補正部70は、背景である貨物自動車(トラック)200a,200bのずれ、ならびに、背景である木(樹木)202a,202bのずれを補正した画像を作成する。ずれが補正された画像は、ブレ生成部80に供給される。   Further, the deviation correction unit 70 creates an image in which the deviation of the background trucks 200a and 200b and the deviation of the background trees (trees) 202a and 202b are corrected. The image whose deviation has been corrected is supplied to the blur generation unit 80.

ブレ生成部80は、閾値比較結果情報に基づいて、ブレ生成の対象として、背景である貨物自動車(トラック)200a,200bを選択する。木(樹木)202a,202bについては、ずれ量が、閾値を超えていないことから、ブレ生成の対象とはしない。すなわち、ブレ生成部80は、貨物自動車(トラック)200についてのみ、第1の実施形態で説明した方法(点像分布関数(PSF)を使用する方法)によって、線ブレを発生させる。この結果、図8(B)に示すような流し撮り画像が得られる。   Based on the threshold comparison result information, the blur generation unit 80 selects the background trucks 200a and 200b as blur generation targets. The trees (trees) 202a and 202b are not subject to blur generation because the amount of deviation does not exceed the threshold. That is, the blur generation unit 80 generates line blur only for the truck 200 by the method described in the first embodiment (method using the point spread function (PSF)). As a result, a panning image as shown in FIG. 8B is obtained.

(第3の実施形態)
本実施形態では、3枚の画像に基づいて流し撮り画像を作成する場合について説明する。3枚の画像を使用する場合も、基本的な処理手順は、前掲の実施形態と同様である。
(Third embodiment)
In the present embodiment, a case where a panning image is created based on three images will be described. Even when three images are used, the basic processing procedure is the same as in the above-described embodiment.

例えば、3枚のうちの連続する2枚の画像について、前掲の実施形態における処理を行って、第1画像合成、第1ずれ量の検出ならびに第1ずれ補正を実行する。次に、第1ずれ補正された第1画像と、3枚のうちの残りの画像とを合成し、上記と同様に、第2ずれ量の検出と、第2ずれ補正を実行する。そして、第1ずれ検出ならびに第2ずれ検出にて検出されたずれ量に基づいて線ブレの量を決定し、第2ずれ補正された画像中の、ブレを生じさせたい領域にのみ線ブレを生じさせる。3枚以上の画像を使用する場合も同様である。基礎となる画像枚数を増やせば、基礎データ量が増えることから、画質を向上させることが可能である。   For example, the process in the above-described embodiment is performed on two consecutive images of the three, and the first image composition, the detection of the first shift amount, and the first shift correction are executed. Next, the first image subjected to the first deviation correction and the remaining three of the three images are combined, and the detection of the second deviation amount and the second deviation correction are executed in the same manner as described above. Then, the amount of line blur is determined based on the amount of shift detected by the first shift detection and the second shift detection, and the line blur is applied only to the region where the blur is to occur in the second shift corrected image. Cause it to occur. The same applies when three or more images are used. If the number of basic images is increased, the amount of basic data increases, so that the image quality can be improved.

3枚の画像を使用する場合、線ブレの量をどのように決定するかが問題となるが、例えば、図9に示す方法によって、適切な線ブレの量を決定することができる。図9(A)〜図9(F)は、3枚の画像に基づいて流し撮り画像を作成する場合における、線ブレの量の決定方法の一例を説明するための図である。   When three images are used, how to determine the amount of line blur is a problem. For example, an appropriate amount of line blur can be determined by the method shown in FIG. FIG. 9A to FIG. 9F are diagrams for explaining an example of a method for determining the amount of line blur when a panning image is created based on three images.

図9(A)は、連続して撮影された、連続する3枚の画像(第1画像〜第3画像)を単純に加算して得られる合成画像(単純加算による合成画像)を示している。第1画像は、主要被写体である貨物自動車(トラック)200aと、背景である木(樹木)202aと、を含む。第2画像は、主要被写体である貨物自動車(トラック)200bと、背景である木(樹木)202bと、を含む。第3画像は、主要被写体である貨物自動車(トラック)200cと、背景である木(樹木)202cと、を含む。図9(B)に示されるように、第1画像は、時刻t1に撮影された画像であり、第2画像は時刻t2に撮影された画像であり、第3画像は時刻t3に撮影された画像である。なお、主要被写体設定部30(図1)によって、貨物自動車200が主要被写体として選択されているものとする。   FIG. 9A shows a synthesized image (synthesized image obtained by simple addition) obtained by simply adding three consecutive images (first image to third image) that are taken consecutively. . The first image includes a lorry (truck) 200a that is a main subject and a tree (tree) 202a that is a background. The second image includes a lorry (truck) 200b as a main subject and a tree (tree) 202b as a background. The third image includes a lorry (truck) 200c, which is a main subject, and a tree (tree) 202c, which is a background. As shown in FIG. 9B, the first image is an image taken at time t1, the second image is an image taken at time t2, and the third image is taken at time t3. It is an image. It is assumed that the lorry 200 is selected as the main subject by the main subject setting unit 30 (FIG. 1).

ずれ量を検出するためには、検出の基準となる画像が必要である。図9(B)の例では、第1画像(200a,202a)を基準画像としている。ずれ検出部60は、この基準画像(第1画像)に含まれる主要被写体200aならびに背景202aの各々を基準として、第2画像ならびに第3画像における主要被写体と背景の各々についてのずれ量を検出する。第2画像の主要被写体200bについてのずれ量はV1であり、第2画像の背景202bについてのずれ量はV2である。同様に、第3画像の主要被写体200cについてのずれ量はV3であり、第3画像の背景202cについてのずれ量はV4である。   In order to detect the amount of deviation, an image serving as a reference for detection is required. In the example of FIG. 9B, the first image (200a, 202a) is the reference image. The shift detection unit 60 detects the shift amount of each of the main subject and the background in the second image and the third image with reference to each of the main subject 200a and the background 202a included in the reference image (first image). . The shift amount of the second image with respect to the main subject 200b is V1, and the shift amount of the second image with respect to the background 202b is V2. Similarly, the shift amount of the third image with respect to the main subject 200c is V3, and the shift amount of the third image with respect to the background 202c is V4.

主要被写体200についての、トータル(合計)のずれ量は(V1+V3)であり、背景202についての、トータルのずれ量は(V2+V4)である。ブレ生成部80は、主要被写体200についてブレを生じさせる場合には、図9(E)に示すように、トータルのずれ量(V1+V3)をブレ量とすることができ、また、背景202についてブレを生じさせる場合には、図9(F)に示すように、トータルのずれ量(V2+V4)をブレ量とすることができる。   The total (total) deviation amount for the main subject 200 is (V1 + V3), and the total deviation amount for the background 202 is (V2 + V4). When blurring occurs in the main subject 200, the blur generation unit 80 can set the total shift amount (V1 + V3) as the blur amount as shown in FIG. In the case of generating the difference, as shown in FIG. 9F, the total deviation amount (V2 + V4) can be set as the blur amount.

但し、主要被写体200についてのトータルのずれ量(V1+V3)、あるいは背景202についてのトータルのずれ量(V2+V4)が大きすぎると、ブレを生じさせたときに、不自然な画像となるおそれがある。そこで、例えば、所定の閾値と、ブレを生じさせる対象領域におけるトータルのずれ量とを比較し、トータルのずれ量が所定の閾値を超えている場合には、ブレを生じさせる対象領域(200および202の少なくとも一方)のトータルのずれ量(上記の例では、(V1+V3)あるいは(V2+V4))から、主要被写体200についてのトータルのずれ量(V1+V3)を差し引いて得られるずれ量を、生成する線ブレの量とすることができる。このようにすれば、線ブレの量を、適切な範囲内に収めることができる。   However, if the total shift amount (V1 + V3) for the main subject 200 or the total shift amount (V2 + V4) for the background 202 is too large, an unnatural image may be produced when blurring occurs. Therefore, for example, a predetermined threshold value is compared with the total shift amount in the target region that causes blurring. When the total shift amount exceeds the predetermined threshold value, the target region (200 and A line for generating a shift amount obtained by subtracting the total shift amount (V1 + V3) for the main subject 200 from the total shift amount (at least one of 202) (in the above example, (V1 + V3) or (V2 + V4)). It can be the amount of blur. In this way, it is possible to keep the amount of linear blur within an appropriate range.

すなわち、この場合、主要被写体200については、図9(E)に示すように、線ブレの量はゼロ(=(V1+V3)−(V1+V3))となる。一方、背景202については、図9(F)に示すように、線ブレの量はVx(=(V2+V4)−(V1+V3))となる。   That is, in this case, for the main subject 200, as shown in FIG. 9E, the amount of line blur is zero (= (V1 + V3) − (V1 + V3)). On the other hand, for the background 202, as shown in FIG. 9F, the amount of linear blur is Vx (= (V2 + V4) − (V1 + V3)).

次に、3枚以上の画像に基づいて、流し撮り画像を作成する場合の処理手順について説明する。図10は、3枚以上の画像に基づいて流し撮り画像を形成する場合における、処理の手順の一例を示すフローチャートである。   Next, a processing procedure for creating a panning image based on three or more images will be described. FIG. 10 is a flowchart illustrating an example of a processing procedure when a panning image is formed based on three or more images.

ステップST1では、ユーザが撮像装置の撮影モードを流し撮りモードに設定する。ステップST2では、ユーザが、画像を複数枚撮影する。ここでシャッター速および撮影の間隔は、ユーザが自由に設定できるものとする。ステップST3では、撮影された複数枚の画像が記憶部20に記録される。   In step ST1, the user sets the shooting mode of the imaging apparatus to the panning mode. In step ST2, the user takes a plurality of images. Here, it is assumed that the user can freely set the shutter speed and the shooting interval. In step ST3, a plurality of photographed images are recorded in the storage unit 20.

ステップST4では、ステップで記録された複数枚画像うちの2枚を選択する。この2枚は、複数枚の画像のうちの、撮影時間的に連続する2枚の画像とする。ステップST5では、ステップST4で選択された画像2枚のうちの1枚を基準画像と設定する。ステップST6では、主要被写体設定部30が、基準画像における主要被写体領域の設定を実行する。ユーザは、入出力部100や外部インターフェース(外部I/F)120を介して、自由に主要被写体を設定することができる。   In step ST4, two of the plurality of images recorded in step are selected. The two images are two images that are continuous in shooting time among a plurality of images. In step ST5, one of the two images selected in step ST4 is set as a reference image. In step ST6, the main subject setting unit 30 executes setting of the main subject region in the reference image. The user can freely set the main subject via the input / output unit 100 or the external interface (external I / F) 120.

ステップST7では、複数枚のうちの2枚(連続する2枚)の画像の合成を行う。このとき、主要被写体領域の位置あわせを行って各画像を合成することができ、あるいは、単純に加算を行って画像を合成することもできる。先に説明したように、2枚の合成画像を作成する。ずれ量の検出用の合成画像(第1合成画像)の合成の際には、均等の重み付け(0.5、0.5)による画像合成を行うのが好ましい。また、ずれ補正用の合成画像(第2合成画像)の合成の際には、重みに落差を付けた重み付け(例えば0.66、0.34など)による画像合成を行うのが好ましい。   In step ST7, two (two consecutive) images among a plurality of images are combined. At this time, the images can be synthesized by aligning the main subject areas, or can be simply added to synthesize the images. As described above, two composite images are created. When compositing the composite image for detecting the shift amount (first composite image), it is preferable to perform image composite with equal weighting (0.5, 0.5). In addition, when compositing a composite image for correcting displacement (second composite image), it is preferable to perform image compositing by weighting with a drop in weight (for example, 0.66, 0.34, etc.).

ステップST8では、ステップST6で合成された合成画像のずれ量を、部分領域毎に検出する。ずれ量の検出は、合成画像の部分領域(パッチ)ごとに、自己相関関数を用いて算出し、その自己相関関数値の最大値の位置のずれ量を求めてずれ量とし、また、合成画像の全領域において、ずれ量を検出する。   In step ST8, the shift amount of the synthesized image synthesized in step ST6 is detected for each partial area. The amount of deviation is detected by using an autocorrelation function for each partial area (patch) of the composite image, and the amount of deviation of the position of the maximum value of the autocorrelation function value is obtained as the amount of deviation. The shift amount is detected in all the areas.

ステップST9では、ステップST6で合成された合成画像、およびステップST7で検出された合成画像のずれ量を用いて、合成画像に含まれる像のずれの補正が行われる。ずれの補正方法としては、例えば、特開2009−134357号公報に記載されている方法を用いることができる。   In step ST9, the shift of the image included in the composite image is corrected using the shift amount of the composite image combined in step ST6 and the composite image detected in step ST7. As a deviation correction method, for example, a method described in JP 2009-134357 A can be used.

ステップST10では、撮影された画像のうち選択されていない画像があるかないかを判断する。選択されていない画像がある場合は、ステップST4に戻り、選択されていない画像がない場合は、ステップST11に移行する。ステップST10から、ステップST4に移行した場合、ステップST4にて使用される2枚の画像は、複数枚の画像のうちの未選択の画像と、ステップST9で補正された画像である。これらの2枚の画像は、撮影時間的に連続する2枚の画像であることが好ましい。   In step ST10, it is determined whether there is an unselected image among the captured images. If there is an unselected image, the process returns to step ST4. If there is no unselected image, the process proceeds to step ST11. When the process proceeds from step ST10 to step ST4, the two images used in step ST4 are an unselected image among the plurality of images and an image corrected in step ST9. These two images are preferably two images that are continuous in photographing time.

ステップST11では、ステップST9でずれが補正された画像に、部分領域毎にブレを生成することによって、流し撮り画像を作成する。ここでは、ステップST5で設定した主要被写体領域にはブレを生成しないものとする。   In step ST11, a panning image is created by generating blur for each partial region in the image in which the deviation is corrected in step ST9. Here, it is assumed that no blur is generated in the main subject area set in step ST5.

また、ステップST9で生成するブレ量は、図9(E)および図9(F)を用いて説明したように、「複数の2枚の画像の組において、ステップST7で検出された、各ずれ量を統合したずれ量」とすることができる。また、ステップST7で検出されたブレ量が異常であった場合には、複数の2枚の画像の組において、ステップST7で検出された、背景についてのずれ量の合計から、ステップST7で検出された主要被写体のずれ量の合計分を差し引いたずれ量」とすることができる。   In addition, as described with reference to FIGS. 9E and 9F, the amount of blur generated in step ST9 is “each deviation detected in step ST7 in a set of a plurality of two images. The amount of deviation obtained by integrating the quantities ”. Further, when the amount of blur detected in step ST7 is abnormal, it is detected in step ST7 from the total amount of deviation of the background detected in step ST7 in a set of a plurality of two images. The amount of deviation obtained by subtracting the total amount of deviation of the main subject ”.

ステップST12では、ステップST11で生成された流し撮り画像において、ユーザの好みにより、多めのブレ量、少なめのブレ量などの設定を行え、ユーザの指定があった場合、ユーザの指定を加味し、再度、ステップST8でずれ補正された画像に対して、部分領域毎にブレを生成させる。ステップST13では、生成された流し撮り画像の出力処理を行う。生成された流し撮り画像は、撮像装置の記録部20に記録する。   In step ST12, in the panning image generated in step ST11, a larger blur amount, a smaller blur amount and the like can be set according to the user's preference. Again, a blur is generated for each partial region in the image corrected for deviation in step ST8. In step ST13, output processing of the generated panning image is performed. The generated panning image is recorded in the recording unit 20 of the imaging apparatus.

このように、本発明の少なくとも一つの実施形態によれば、例えば、少なくとも2枚の撮像画像に基づき、画像のブレ(画像の流し)を生じさせたい領域にブレを生じさせることができる。よって、例えば、より少ない枚数の画像に基づいて、容易に、自然な流し撮り画像を合成することができる。また、例えば、流し撮り撮影における、ユーザの負担ならびに画像処理の負担を軽減することができる。   As described above, according to at least one embodiment of the present invention, for example, based on at least two captured images, it is possible to cause blur in an area where it is desired to cause image blur (an image flow). Therefore, for example, a natural panning image can be easily synthesized based on a smaller number of images. Further, for example, it is possible to reduce the burden on the user and the burden on the image processing in the panning shooting.

以上、いくつかの実施形態について説明したが、本発明の新規事項および効果から実体的に逸脱しない多くの変形が可能であることは当業者には容易に理解できるものである。従って、このような変形例はすべて本発明の範囲に含まれるものとする。例えば、明細書又は図面において、少なくとも一度、より広義または同義な異なる用語と共に記載された用語は、明細書又は図面のいかなる箇所においても、その異なる用語に置き換えることができる。   Although several embodiments have been described above, it is easily understood by those skilled in the art that many modifications can be made without substantially departing from the novel matters and effects of the present invention. Accordingly, all such modifications are intended to be included in the scope of the present invention. For example, a term described at least once together with a different term having a broader meaning or the same meaning in the specification or the drawings can be replaced with the different term in any part of the specification or the drawings.

10 撮像部、20 記録部、30 主要被写体設定部、40 信号処理部、
50 画像合成部、60 ずれ検出部、70 ずれ補正部、80 ブレ生成部、
90 制御部、100 入出力部、110 表示部、
120 外部インターフェース(外部I/F)、
200(200a〜200c) 主要被写体(主要被写体領域)、
202(202a〜202c) 背景(背景領域)
10 imaging unit, 20 recording unit, 30 main subject setting unit, 40 signal processing unit,
50 image composition unit, 60 shift detection unit, 70 shift correction unit, 80 blur generation unit,
90 control unit, 100 input / output unit, 110 display unit,
120 External interface (external I / F),
200 (200a to 200c) main subject (main subject region),
202 (202a to 202c) Background (background region)

Claims (10)

撮像部と、
前記撮像部で撮影された、少なくとも2枚の画像を用いて合成画像を生成する合成部と、
前記合成部で合成された前記合成画像の像間のずれを検出するずれ検出部と、
前記ずれ検出部で検出された、前記像間のずれを補正するずれ補正部と、
前記ずれ検出部で検出されたずれに基づいて、前記像間のずれが補正された、ずれ補正後の合成画像の全部または一部にブレを発生させるブレ生成部と、
を含むことを特徴とする撮像装置。
An imaging unit;
A combining unit that generates a combined image using at least two images captured by the imaging unit;
A shift detection unit that detects a shift between images of the combined image combined by the combining unit;
A deviation correction unit that corrects a deviation between the images detected by the deviation detection unit;
A blur generation unit that generates a blur in all or part of the composite image after the correction of the shift, in which the shift between the images is corrected based on the shift detected by the shift detection unit;
An imaging apparatus comprising:
請求項1記載の撮像装置であって、
前記主要被写体を設定する主要被写体設定部を有し、
前記ブレ生成部は、
前記主要被写体設定部によって設定された主要被写体領域以外の領域の全部または一部にブレを発生させることを特徴とする撮像装置。
The imaging apparatus according to claim 1,
A main subject setting unit for setting the main subject;
The blur generating unit is
An imaging apparatus characterized by causing blurring in all or part of an area other than the main subject area set by the main subject setting unit.
請求項2記載の撮像装置であって、
前記ブレ生成部は、
前記ずれ検出部で検出されたずれ量に基づいて、所定サイズの画像パッチ毎に線ブレの範囲を決定し、前記画像パッチに対して点像分布関数によるフィルタリングを実行して、前記主要被写体領域以外の領域の全部または一部に線ブレを発生させることを特徴とする撮像装置。
The imaging apparatus according to claim 2,
The blur generating unit is
Based on the amount of deviation detected by the deviation detection unit, a range of line blur is determined for each image patch of a predetermined size, and filtering by a point spread function is performed on the image patch, and the main subject region An image pickup apparatus that causes line blurring in all or part of a region other than the above.
請求項3記載の撮像装置であって、
前記ずれ検出部では、前記主要被写体領域における第1ずれ量と、前記主要被写体領域以外の領域における第2ずれ量とを検出し、
前記ブレ生成部は、
前記第2ずれ量、あるいは、前記第2ずれ量から前記第1ずれ量を減算して得られるずれ量に基づいて、前記線ブレの範囲を決定することを特徴とする撮像装置。
The imaging apparatus according to claim 3,
The shift detection unit detects a first shift amount in the main subject region and a second shift amount in a region other than the main subject region,
The blur generating unit is
An image pickup apparatus that determines the range of line blur based on the second shift amount or a shift amount obtained by subtracting the first shift amount from the second shift amount.
請求項3記載の撮像装置であって、
前記ブレ生成部は、
主要被写体領域とブレ発生の対象領域との境界線上の画像領域については、前記ずれ検出部で検出されたずれ量に、境界画像補正用の調整値を加算して得られるずれ量に基づいて、前記線ブレの範囲を決定することを特徴とする撮像装置。
The imaging apparatus according to claim 3,
The blur generating unit is
For the image area on the boundary line between the main subject area and the target area where blurring occurs, based on the deviation amount obtained by adding the adjustment value for boundary image correction to the deviation amount detected by the deviation detection unit, An image pickup apparatus that determines a range of the line blur.
請求項3記載の撮像装置であって、
前記ずれ検出部は、
前記ブレ発生の対象領域に含まれる、フィルタリング対象の画像パッチのテクスチャの特徴量が所定値以下であるときは、前記フィルタリング対象の画像パッチの周囲に位置する、複数の画像パッチのずれ量に基づいて前記フィルタリング対象の画像パッチのずれ量を推定し、
前記ブレ生成部は、
前記推定されたずれ量に基づいて、前記線ブレの範囲を決定することを特徴とする撮像装置。
The imaging apparatus according to claim 3,
The deviation detector is
When the feature amount of the texture of the image patch to be filtered included in the blur generation target area is equal to or less than a predetermined value, it is based on a shift amount of a plurality of image patches located around the image patch to be filtered. To estimate the amount of deviation of the image patch to be filtered,
The blur generating unit is
An image pickup apparatus that determines a range of the line blur based on the estimated shift amount.
請求項3〜請求項6のいずれかに記載の撮像装置であって、
ユーザ設定部を有し、
前記ブレ生成部は、
前記ユーザ設定部から入力されるブレ量の増減情報に基づいて、前記先ブレの範囲を増減させることを特徴とする撮像装置。
The imaging apparatus according to any one of claims 3 to 6,
A user setting section,
The blur generating unit is
An image pickup apparatus that increases or decreases a range of the previous blur based on blur amount increase / decrease information input from the user setting unit.
請求項1〜請求項7のいずれかに記載の撮像装置であって、
前記合成部は、
2枚の画像に基づいて重み付け合成を実行して、前記ずれ検出部によるずれ検出用の第1合成画像と、前記ずれ補正部によるずれ補正用の第2合成画像と、を形成し、
前記第1合成画像を形成する場合には、均等の重み付けを採用し、前記第2合成画像を形成する場合には、落差のある重み付けを採用することを特徴とする撮像装置。
It is an imaging device in any one of Claims 1-7,
The synthesis unit is
Performing weighted synthesis based on the two images to form a first composite image for shift detection by the shift detection unit and a second composite image for shift correction by the shift correction unit;
An imaging apparatus, wherein equal weighting is employed when forming the first composite image, and weighting with a drop is employed when forming the second composite image.
画像の入力処理を行う画像入力部と、
前記画像入力部によって入力された、少なくとも2枚の画像を用いて合成画像を生成する合成部と、
前記合成部で合成された前記合成画像の像間のずれを検出するずれ検出部と、
前記ずれ検出部で検出された、前記像間のずれを補正するずれ補正部と、
前記ずれ検出部で検出されたずれに基づいて、前記像間のずれが補正された、ずれ補正後の合成画像の全部または一部にブレを発生させるブレ生成部と、
を含むことを特徴とする画像処理装置。
An image input unit for performing image input processing;
A combining unit that generates a combined image using at least two images input by the image input unit;
A shift detection unit that detects a shift between images of the combined image combined by the combining unit;
A deviation correction unit that corrects a deviation between the images detected by the deviation detection unit;
A blur generation unit that generates a blur in all or part of the composite image after the correction of the shift, in which the shift between the images is corrected based on the shift detected by the shift detection unit;
An image processing apparatus comprising:
画像入力部から入力された複数枚の画像に基づいて、画像の全部または一部にブレが生じている流し撮り画像を生成する処理を、コンピュータに実行させるプログラムコードが記録されたコンピュータプログラムプロダクトであって、
前記プログラムコードは、
前記画像入力部によって入力された、少なくとも2枚の画像を用いて合成画像を生成するモジュールと、
前記合成部で合成された前記合成画像の像間のずれを検出するモジュールと、
前記ずれ検出部で検出された、前記像間のずれを補正するモジュールと、
前記ずれ検出部で検出されたずれに基づいて、前記像間のずれが補正された、ずれ補正後の合成画像の全部または一部にブレを発生させるモジュールと、
を含むことを特徴とするコンピュータプログラムプロダクト。
A computer program product in which a program code for causing a computer to execute a process of generating a panning image in which all or part of the image is blurred based on a plurality of images input from an image input unit is recorded. There,
The program code is
A module that generates a composite image using at least two images input by the image input unit;
A module for detecting a shift between images of the synthesized image synthesized by the synthesis unit;
A module for correcting a shift between the images detected by the shift detection unit;
A module that generates a blur in all or a part of the composite image after the shift correction, in which the shift between the images is corrected based on the shift detected by the shift detection unit;
A computer program product characterized by comprising:
JP2010245090A 2010-11-01 2010-11-01 Image pickup device, image processing device, and computer program product Withdrawn JP2012100000A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010245090A JP2012100000A (en) 2010-11-01 2010-11-01 Image pickup device, image processing device, and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010245090A JP2012100000A (en) 2010-11-01 2010-11-01 Image pickup device, image processing device, and computer program product

Publications (1)

Publication Number Publication Date
JP2012100000A true JP2012100000A (en) 2012-05-24

Family

ID=46391438

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010245090A Withdrawn JP2012100000A (en) 2010-11-01 2010-11-01 Image pickup device, image processing device, and computer program product

Country Status (1)

Country Link
JP (1) JP2012100000A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017013871A1 (en) * 2015-07-22 2017-01-26 パナソニックIpマネジメント株式会社 Image processing device
JP2017028687A (en) * 2015-07-22 2017-02-02 パナソニックIpマネジメント株式会社 Image processing device
JP2017520135A (en) * 2014-04-14 2017-07-20 アルカテル−ルーセント Method and apparatus for acquiring images with motion blur
CN113360804A (en) * 2021-06-03 2021-09-07 北京百度网讯科技有限公司 Interface display method and device, electronic equipment and storage medium
US20220318958A1 (en) * 2018-09-14 2022-10-06 Canon Kabushiki Kaisha Image processing apparatus and image processing method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017520135A (en) * 2014-04-14 2017-07-20 アルカテル−ルーセント Method and apparatus for acquiring images with motion blur
US10116879B2 (en) 2014-04-14 2018-10-30 Alcatel Lucent Method and apparatus for obtaining an image with motion blur
WO2017013871A1 (en) * 2015-07-22 2017-01-26 パナソニックIpマネジメント株式会社 Image processing device
JP2017028687A (en) * 2015-07-22 2017-02-02 パナソニックIpマネジメント株式会社 Image processing device
US20220318958A1 (en) * 2018-09-14 2022-10-06 Canon Kabushiki Kaisha Image processing apparatus and image processing method
US11972546B2 (en) * 2018-09-14 2024-04-30 Canon Kabushiki Kaisha Image processing apparatus and image processing method
CN113360804A (en) * 2021-06-03 2021-09-07 北京百度网讯科技有限公司 Interface display method and device, electronic equipment and storage medium
CN113360804B (en) * 2021-06-03 2024-02-27 北京百度网讯科技有限公司 Interface display method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
JP4480760B2 (en) Image data processing method and image processing apparatus
JP2007072573A (en) Image processor and image processing method
US20110128422A1 (en) Image capturing apparatus and image processing method
US20080025628A1 (en) Enhancement of Blurred Image Portions
JP2012100000A (en) Image pickup device, image processing device, and computer program product
US10142541B2 (en) Image processing apparatus, imaging apparatus, and control method of image processing apparatus
JP2012208553A (en) Image processing device, image processing method, and program
JP5885384B2 (en) Image processing device
WO2019008693A1 (en) Image processing device, imaging device, image processing method, image processing program and storage medium
JP6017279B2 (en) Image processing apparatus, image processing method, and program
JP5528028B2 (en) Image processing apparatus and method
JP5211589B2 (en) Image processing apparatus, electronic camera, and image processing program
WO2017187691A1 (en) Image processing device, imaging device, image processing method and program
JP6075835B2 (en) Distance information acquisition device, imaging device, distance information acquisition method, and program
WO2011004427A1 (en) Image processing apparatus
JP2007179211A (en) Image processing device, image processing method, and program for it
JP6730423B2 (en) Image processing apparatus, image processing method, and image processing program
JP2005182232A (en) Luminance correcting device and method
CN112073603B (en) Image processing apparatus, image capturing apparatus, image processing method, and storage medium
JP5055571B2 (en) Image processing apparatus, electronic camera, and image processing program
JP6378496B2 (en) Image processing apparatus, control method, and recording medium
JP2011239266A (en) Image data processor and image data processing method
JP5284195B2 (en) Image processing apparatus, image processing method, program, and recording medium
JP5511403B2 (en) Image processing apparatus and control method thereof
JP6742823B2 (en) Image processing apparatus, image processing method, and program

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140107