JP2011066827A - Image processing apparatus, image processing method and program - Google Patents
Image processing apparatus, image processing method and program Download PDFInfo
- Publication number
- JP2011066827A JP2011066827A JP2009217609A JP2009217609A JP2011066827A JP 2011066827 A JP2011066827 A JP 2011066827A JP 2009217609 A JP2009217609 A JP 2009217609A JP 2009217609 A JP2009217609 A JP 2009217609A JP 2011066827 A JP2011066827 A JP 2011066827A
- Authority
- JP
- Japan
- Prior art keywords
- image
- difference
- images
- unit
- image processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Exposure Control For Cameras (AREA)
- Details Of Cameras Including Film Mechanisms (AREA)
- Studio Devices (AREA)
Abstract
【課題】主要被写体以外の領域をぼかした画像の生成を適正に行う。
【解決手段】撮像装置100であって、略等しい画角で撮像された被写界深度の異なる少なくとも二つの画像を取得する画像取得部5aと、少なくとも二つの画像の間で対応する各画素の差分を生成する差分生成部6aと、生成された各画素の差分に基づいて、少なくとも二つの画像のうち、何れか一の画像に対してぼかし処理を施してぼかし画像を生成するぼかし画像生成部6bとを備えている。
【選択図】図1An image in which a region other than a main subject is blurred is appropriately generated.
An image capturing apparatus includes an image acquisition unit that acquires at least two images with different depths of field captured at substantially the same angle of view, and each pixel corresponding to at least two images. A difference generation unit 6a that generates a difference, and a blurred image generation unit that generates a blurred image by performing a blurring process on any one of at least two images based on the generated difference between pixels. 6b.
[Selection] Figure 1
Description
本発明は、画像処理装置、画像処理方法及びプログラムに関する。 The present invention relates to an image processing apparatus, an image processing method, and a program.
従来、主要被写体の合焦位置と、その前後の焦点位置でフォーカスブラケット撮影を行って、撮影された複数の画像から基準画像の各画素のぼかし量を算出し、当該基準画像にぼかし処理を施すことでボケ強調画像を生成する撮像装置が知られている(例えば、特許文献1参照)。 Conventionally, focus bracket shooting is performed at the in-focus position of the main subject and the focal positions before and after that, and the blur amount of each pixel of the reference image is calculated from a plurality of captured images, and the reference image is subjected to blur processing. There is known an imaging apparatus that generates a blur-emphasized image (see, for example, Patent Document 1).
ところで、上記特許文献1の場合、フォーカスブラケット撮影におけるフォーカスレンズの位置変化により、主要被写体とその背景のバランスにずれが生じてしまい、複数の撮像画像間で対応する画素が存在しない座標が発生してしまうといった問題がある。
ここで、フォーカスレンズの位置変化が被写体の合焦状態に影響を及ぼさない撮影条件として被写界深度を深くする設定が考えられるが、被写界深度の深い画像に対しフォーカスブラケット撮影を行ったとしても背景のボケ量の差がわずかとなってしまい、複数の撮像画像間での差分の抽出が困難となる。
By the way, in the case of the above-mentioned patent document 1, a change in the position of the focus lens in focus bracket shooting causes a shift in the balance between the main subject and its background, resulting in coordinates where there are no corresponding pixels among a plurality of captured images. There is a problem such as.
Here, as a shooting condition where the focus lens position change does not affect the in-focus state of the subject, it may be set to increase the depth of field, but focus bracket shooting was performed for images with a deep depth of field. However, the difference in the amount of background blur becomes small, and it becomes difficult to extract differences between a plurality of captured images.
そこで、本発明の課題は、主要被写体以外の領域をぼかした画像の生成を適正に行うことができる画像処理装置、画像処理方法及びプログラムを提供することである。 Accordingly, an object of the present invention is to provide an image processing apparatus, an image processing method, and a program capable of appropriately generating an image in which an area other than the main subject is blurred.
上記課題を解決するため、請求項1に記載の発明の画像処理装置は、
略等しい画角で撮像された被写界深度の異なる少なくとも二つの画像を取得する取得手段と、この取得手段により取得された前記少なくとも二つの画像の間で対応する各画素の差分を生成する差分生成手段と、この差分生成手段により生成された前記各画素の差分に基づいて、前記少なくとも二つの画像のうち、何れか一の画像に対してぼかし処理を施してぼかし画像を生成する画像生成手段と、を備えることを特徴としている。
In order to solve the above problem, an image processing apparatus according to claim 1 is provided.
An acquisition unit that acquires at least two images with different depths of field captured at substantially the same angle of view, and a difference that generates a difference between corresponding pixels between the at least two images acquired by the acquisition unit A generation unit that generates a blurred image by performing a blurring process on any one of the at least two images based on the difference between the pixels generated by the difference generation unit; It is characterized by providing these.
請求項2に記載の発明は、請求項1に記載の画像処理装置において、
前記画像生成手段は、前記少なくとも二つの画像のうち、被写界深度のより浅い方の画像の非合焦領域に対して前記ぼかし処理を施すことを特徴としている。
The invention according to claim 2 is the image processing apparatus according to claim 1,
The image generating means performs the blurring process on an out-of-focus region of an image having a shallower depth of field among the at least two images.
請求項3に記載の発明は、請求項2に記載の画像処理装置において、
前記差分生成手段により生成された前記各画素の差分に基づいて、前記ぼかし処理のぼかし度合いを調整する調整手段を更に備え、前記画像生成手段は、前記調整手段により調整された前記ぼかし度合いに基づいて、前記ぼかし処理を施すことを特徴としている。
The invention according to claim 3 is the image processing apparatus according to claim 2,
The image processing unit further includes an adjusting unit that adjusts a blurring degree of the blurring process based on a difference between the pixels generated by the difference generating unit, and the image generating unit is based on the blurring degree adjusted by the adjusting unit. The blurring process is performed.
請求項4に記載の発明は、請求項3に記載の画像処理装置において、
前記取得手段により取得された前記少なくとも二つの画像の各画素の周波数成分情報を取得する情報取得手段を更に備え、前記差分生成手段は、前記情報取得手段により取得された前記少なくとも二つの画像の間で対応する各画素の周波数成分情報の差分を生成することを特徴としている。
The invention according to claim 4 is the image processing apparatus according to claim 3,
The apparatus further comprises information acquisition means for acquiring frequency component information of each pixel of the at least two images acquired by the acquisition means, and the difference generation means is between the at least two images acquired by the information acquisition means. A difference between frequency component information of each corresponding pixel is generated.
請求項5に記載の発明は、請求項4に記載の画像処理装置において、
前記調整手段は、前記差分生成手段により生成された前記各画素の周波数成分情報の差分に基づいて、当該差分が大きくなるほど遮断周波数がより小さくなるようにローパスフィルタを設定する設定手段を備え、前記画像生成手段は、前記設定手段により設定された前記ローパスフィルタを用いて、前記ぼかし処理を施すことを特徴としている。
The invention according to claim 5 is the image processing apparatus according to claim 4,
The adjustment unit includes a setting unit that sets a low-pass filter based on the difference between the frequency component information of the pixels generated by the difference generation unit so that the cutoff frequency becomes smaller as the difference increases. The image generation means performs the blurring process using the low-pass filter set by the setting means.
請求項6に記載の発明は、請求項3に記載の画像処理装置において、
前記取得手段は、前記被写界深度が所定の一方向に変化する三つ以上の画像を取得し、前記差分生成手段は、前記取得手段により取得された前記三つ以上の画像のうち、取得順が連続する画像どうしの間で対応する各画素の差分をそれぞれ生成し、前記調整手段は、前記取得手段により取得された前記三つ以上の画像における、前記差分生成手段により生成された前記各画素の差分の変化に基づいて、前記ぼかし処理のぼかし度合いを調整することを特徴としている。
The invention according to claim 6 is the image processing apparatus according to claim 3,
The acquisition unit acquires three or more images in which the depth of field changes in a predetermined direction, and the difference generation unit acquires the three or more images acquired by the acquisition unit. A difference between the pixels corresponding to each other in the order of the images is generated, and the adjustment unit is configured to generate the difference between the three or more images acquired by the acquisition unit. The blurring degree of the blurring process is adjusted based on a change in pixel difference.
請求項7に記載の発明は、請求項1〜6の何れか一項に記載の画像処理装置において、
前記被写界深度の異なる少なくとも二つの画像は、明るさを略等しくするとともに、絞り値を互いに異ならせて撮像された画像であることを特徴としている。
The invention according to claim 7 is the image processing apparatus according to any one of claims 1 to 6,
The at least two images having different depths of field are images picked up with substantially the same brightness and different aperture values.
請求項8に記載の発明は、請求項1〜7の何れか一項に記載の画像処理装置において、
前記少なくとも二つの画像どうしの位置合わせを行う位置合わせ手段を更に備え、前記調整手段は、前記位置合わせ手段により位置合わせされた少なくとも二つの画像の間で対応する各画素の差分を生成することを特徴としている。
The invention according to claim 8 is the image processing apparatus according to any one of claims 1 to 7,
The image processing apparatus further comprises alignment means for aligning the at least two images, and the adjustment means generates a difference between corresponding pixels between the at least two images aligned by the alignment means. It is a feature.
請求項9に記載の発明の画像処理方法は、
画像処理装置を用いた画像処理方法であって、略等しい画角で撮像された被写界深度の異なる少なくとも二つの画像を取得するステップと、取得された前記少なくとも二つの画像の間で対応する各画素の差分を生成するステップと、生成された前記各画素の差分に基づいて、前記少なくとも二つの画像のうち、何れか一の画像に対してぼかし処理を施してぼかし画像を生成するステップと、を実行させることを特徴としている。
The image processing method of the invention according to claim 9
An image processing method using an image processing apparatus, wherein a step of acquiring at least two images with different depths of field captured at substantially the same angle of view corresponds to the acquired at least two images Generating a difference between the pixels, and generating a blurred image by performing a blurring process on any one of the at least two images based on the generated difference between the pixels. , Is executed.
請求項10に記載の発明のプログラムは、
画像処理装置のコンピュータを、略等しい画角で撮像された被写界深度の異なる少なくとも二つの画像を取得する取得手段、この取得手段により取得された前記少なくとも二つの画像の間で対応する各画素の差分を生成する差分生成手段、この差分生成手段により生成された前記各画素の差分に基づいて、前記少なくとも二つの画像のうち、何れか一の画像に対してぼかし処理を施してぼかし画像を生成する画像生成手段、として機能させることを特徴としている。
The program of the invention according to claim 10 is:
An acquisition means for acquiring at least two images with different depths of field, which are imaged at substantially the same angle of view, and each pixel corresponding between the at least two images acquired by the acquisition means. A difference generation means for generating a difference between the pixels, and based on the difference between the pixels generated by the difference generation means, blurring processing is performed on any one of the at least two images to obtain a blurred image. It is characterized by functioning as image generation means for generating.
本発明によれば、主要被写体以外の領域をぼかしてぼかし画像の生成を適正に行うことができる。 According to the present invention, it is possible to appropriately generate a blurred image by blurring an area other than the main subject.
以下に、本発明について、図面を用いて具体的な態様を説明する。ただし、発明の範囲は、図示例に限定されない。
図1は、本発明を適用した一実施形態の撮像装置100の概略構成を示すブロック図である。
Hereinafter, specific embodiments of the present invention will be described with reference to the drawings. However, the scope of the invention is not limited to the illustrated examples.
FIG. 1 is a block diagram illustrating a schematic configuration of an imaging apparatus 100 according to an embodiment to which the present invention is applied.
本実施形態の撮像装置100は、略等しい画角で撮像された被写界深度の異なる少なくとも二枚の画像P1、P2の間で対応する各画素の差分を生成し、当該各画素の差分に基づいて、少なくとも二枚の画像P1、P2のうち、何れか一の画像(例えば、一枚目の画像P1)に対してぼかし処理を施してぼかし画像Bを生成する。
具体的には、図1に示すように、撮像装置100は、撮像部1と、撮像制御部2と、画像データ生成部3と、メモリ4と、位置合わせ部5と、画像処理部6と、表示制御部7と、表示部8と、記録媒体9と、操作入力部10と、中央制御部11とを備えている。
The imaging apparatus 100 according to the present embodiment generates a difference between corresponding pixels between at least two images P1 and P2 having different depths of field captured at substantially the same angle of view, and calculates the difference between the pixels. Based on this, the blurred image B is generated by performing the blurring process on any one of the images P1 and P2 (for example, the first image P1).
Specifically, as illustrated in FIG. 1, the imaging apparatus 100 includes an imaging unit 1, an imaging control unit 2, an image data generation unit 3, a memory 4, an alignment unit 5, and an image processing unit 6. A display control unit 7, a display unit 8, a recording medium 9, an operation input unit 10, and a central control unit 11.
撮像部1は、撮像手段として、被写体を連続して撮像する。具体的には、撮像部1は、レンズ部1aと、絞り1bと、電子撮像部1cを備えている。 The imaging unit 1 continuously images a subject as an imaging unit. Specifically, the imaging unit 1 includes a lens unit 1a, a diaphragm 1b, and an electronic imaging unit 1c.
レンズ部1aは、複数のレンズから構成され、ズームレンズやフォーカスレンズ等を備えている。
また、レンズ部1aは、図示は省略するが、被写体の撮像の際に、ズームレンズを光軸方向に移動させるズーム駆動部、フォーカスレンズを光軸方向に移動させる合焦駆動部等を備えていても良い。
The lens unit 1a includes a plurality of lenses and includes a zoom lens, a focus lens, and the like.
Although not shown, the lens unit 1a includes a zoom drive unit that moves the zoom lens in the optical axis direction and a focus drive unit that moves the focus lens in the optical axis direction when imaging a subject. May be.
絞り1bは、レンズ部1aを通過する光の量を調整するものである。
また、絞り1bは、図示は省略するが、露出制御部2aからの所定の制御信号に従って、当該絞り1bの拡径や縮径を行う絞り駆動部を備えていても良い。
The diaphragm 1b adjusts the amount of light passing through the lens unit 1a.
In addition, although not shown, the diaphragm 1b may include a diaphragm driving unit that increases or decreases the diameter of the diaphragm 1b in accordance with a predetermined control signal from the exposure control unit 2a.
電子撮像部1cは、例えば、CCD(Charge Coupled Device)やCMOS(Complementary Metal-oxide Semiconductor)等のイメージセンサから構成され、レンズ部1aの各種レンズを通過した光学像を二次元の画像信号に変換する。 The electronic imaging unit 1c is composed of, for example, an image sensor such as a charge coupled device (CCD) or a complementary metal-oxide semiconductor (CMOS), and converts an optical image that has passed through various lenses of the lens unit 1a into a two-dimensional image signal. To do.
撮像制御部2は、図示は省略するが、タイミング発生器、ドライバなどを備えている。そして、撮像制御部2は、タイミング発生器、ドライバにより電子撮像部1cを走査駆動して、所定周期毎に光学像を電子撮像部1cにより二次元の画像信号に変換させ、当該電子撮像部1cの撮像領域から1画面分ずつ画像フレームを読み出して画像データ生成部3に出力させる。 Although not shown, the imaging control unit 2 includes a timing generator, a driver, and the like. Then, the imaging control unit 2 scans and drives the electronic imaging unit 1c with a timing generator and a driver, and converts the optical image into a two-dimensional image signal with the electronic imaging unit 1c every predetermined period, and the electronic imaging unit 1c. The image frame is read out from the imaging area for each screen and is output to the image data generation unit 3.
また、撮像制御部2は、AE(自動露出処理)の実行を制御する露出制御部2aを具備している。
露出制御部2aは、撮像部1及び撮像制御部2による被写体の撮像の際の露出条件を逐次設定する。即ち、露出制御部2aは、所定のプログラム線図に基づいて、電子撮像部1cのシャッター速度(露光時間)や信号増幅率(ISO感度)、絞り1bの絞り値等を調整して、所定の制御信号を電子撮像部1cや絞り1bに出力する。具体的には、露出制御部2aは、撮像部1及び撮像制御部2により撮像された画像の明るさ(BV値)が、所定の値となるように、絞り値(AV値)、露光時間(TV値)、ISO感度(SV値)を下記のAPEX値の一般式に従って決定する。
画像の明るさ(BV値)=絞り値(AV値)+露光時間(TV値)−ISO感度(SV値)
Further, the imaging control unit 2 includes an exposure control unit 2a that controls execution of AE (automatic exposure processing).
The exposure control unit 2a sequentially sets exposure conditions when the imaging unit 1 and the imaging control unit 2 capture an object. That is, the exposure control unit 2a adjusts the shutter speed (exposure time) and signal amplification factor (ISO sensitivity) of the electronic imaging unit 1c, the aperture value of the aperture 1b, and the like based on a predetermined program diagram. The control signal is output to the electronic imaging unit 1c and the diaphragm 1b. Specifically, the exposure control unit 2a determines the aperture value (AV value) and the exposure time so that the brightness (BV value) of the images captured by the imaging unit 1 and the imaging control unit 2 becomes a predetermined value. (TV value) and ISO sensitivity (SV value) are determined according to the following general formula of APEX value.
Image brightness (BV value) = Aperture value (AV value) + Exposure time (TV value)-ISO sensitivity (SV value)
また、絞りブラケット撮像モードにて、電子撮像部1cにより主要被写体Sを所定の撮像フレームレートで連続して撮像する際に、露出制御部2aは、撮像順が連続する二枚の連写画像P1、P2の被写界深度を互いに異ならせるように、明るさ(BV値)を略等しくするとともに絞り値(AV値)を互いに異ならせるように制御する。具体的には、露出制御部2aは、一枚目の画像P1(図3(a)参照)の被写界深度が最も浅くなるように絞り値(AV値)を最も開放側に設定し、二枚目以降の画像(図3(b)参照)の連写が進むにつれて被写界深度が次第に深くなるように絞り値(AV値)を次第に絞っていく。このとき、露出制御部2aは、連写される画像の明るさ(BV値)が所定の値に固定されるように、絞り値(AV値)の変化に応じて、TV値(露光時間)を小さく(長く)したり、SV値(ISO感度)を大きくする(上げる)ように変化させる。
このように、撮像制御部2は、露出制御部2aにより電子撮像部1cや絞り1bを駆動制御して、撮像部1に略等しい画角で被写界深度の異なる画像を少なくとも二枚連続して撮像させる。
In addition, when the electronic imaging unit 1c continuously captures the main subject S at a predetermined imaging frame rate in the aperture bracket imaging mode, the exposure control unit 2a has two continuous shot images P1 in which the imaging order is continuous. , P2 is controlled so that the brightness (BV value) is substantially equal and the aperture value (AV value) is different from each other so that the depths of field of P2 are different from each other. Specifically, the exposure control unit 2a sets the aperture value (AV value) to the most open side so that the depth of field of the first image P1 (see FIG. 3A) is the smallest, As the continuous shooting of the second and subsequent images (see FIG. 3B) proceeds, the aperture value (AV value) is gradually reduced so that the depth of field gradually increases. At this time, the exposure control unit 2a determines the TV value (exposure time) according to the change of the aperture value (AV value) so that the brightness (BV value) of the continuously shot images is fixed to a predetermined value. Is changed (decreased) (longer) or the SV value (ISO sensitivity) is increased (increased).
As described above, the imaging control unit 2 drives and controls the electronic imaging unit 1c and the aperture stop 1b by the exposure control unit 2a, and continuously includes at least two images having substantially the same angle of view as the imaging unit 1 and having different depths of field. To capture.
画像データ生成部3は、電子撮像部1cから転送された画像データのアナログ値の信号に対してRGBの各色成分毎に適宜ゲイン調整した後に、サンプルホールド回路(図示略)でサンプルホールドしてA/D変換器(図示略)でデジタルデータに変換し、カラープロセス回路(図示略)で画素補間処理及びγ補正処理を含むカラープロセス処理を行った後、デジタル値の輝度信号Y及び色差信号Cb,Cr(YUVデータ)を生成する。
カラープロセス回路から出力される輝度信号Y及び色差信号Cb,Crは、図示しないDMAコントローラを介して、バッファメモリとして使用されるメモリ4にDMA転送される。
The image data generation unit 3 appropriately adjusts the gain for each of the RGB color components with respect to the analog value signal of the image data transferred from the electronic imaging unit 1c, and then performs sample holding by a sample hold circuit (not shown). The digital signal is converted into digital data by a / D converter (not shown), color processing including pixel interpolation processing and γ correction processing is performed by a color process circuit (not shown), and then a digital luminance signal Y and color difference signal Cb , Cr (YUV data).
The luminance signal Y and the color difference signals Cb and Cr output from the color process circuit are DMA-transferred to a memory 4 used as a buffer memory via a DMA controller (not shown).
メモリ4は、例えば、DRAM等により構成され、画像処理部6や中央制御部11等によって処理されるデータ等を一時記憶する。 The memory 4 is composed of, for example, a DRAM or the like, and temporarily stores data processed by the image processing unit 6, the central control unit 11, and the like.
位置合わせ部5は、撮像部1により連続して撮像された画像を取得する画像取得部5aを具備している。
画像取得部5aは、絞りブラケット撮像モードにて、撮像部1により撮像され画像データ生成部3により生成された連写画像、即ち、被写界深度の異なる二枚の連写画像(例えば、一枚目の画像P1、二枚目の画像P2等)の輝度信号Yをメモリ4から取得する。
なお、画像取得部5aは、被写界深度の異なる連写画像を二枚取得するようにしたが、これに限られるものではなく、例えば、三枚以上であっても良い。
ここで、画像取得部5aは、連続して撮像された被写界深度の異なる少なくとも二枚の画像を取得する取得手段を構成している。
The alignment unit 5 includes an image acquisition unit 5 a that acquires images continuously captured by the imaging unit 1.
The image acquisition unit 5a is a continuous-shot image captured by the imaging unit 1 and generated by the image data generation unit 3 in the aperture bracket imaging mode, that is, two continuous-shot images with different depths of field (for example, one The luminance signal Y of the first image P1, the second image P2, etc.) is acquired from the memory 4.
Although the image acquisition unit 5a acquires two continuous shot images having different depths of field, the image acquisition unit 5a is not limited to this, and may be, for example, three or more.
Here, the image acquisition unit 5a constitutes acquisition means for acquiring at least two images with different depths of field that are successively captured.
また、位置合わせ部5は、連写画像から特徴点を抽出する特徴抽出処理を行う特徴量演算部5bを具備している。
特徴量演算部5bは、例えば、一枚目の画像P1の輝度信号Yを所定の複数(例えば、横×縦:4×3等)のエリアに分割した後、各エリアを所定の複数(例えば、横×縦:3×3等)のブロック(例えば、16×16画素の正方形等)に分割する。そして、特徴量演算部5bは、各エリア毎に複数のブロックの中から高周波成分の多い特徴の高いブロック(特徴点)をテンプレートとして抽出する。ここで、特徴抽出処理とは、多数の候補ブロックから追跡に都合の良い特徴性の高いものを選択する処理である。
なお、エリアやブロックの分割数、並びに各ブロックの画素数は、一例であって、これらに限られるものではない。
Further, the alignment unit 5 includes a feature amount calculation unit 5b that performs a feature extraction process for extracting feature points from the continuous shot image.
For example, the feature amount calculation unit 5b divides the luminance signal Y of the first image P1 into a predetermined plurality of areas (for example, horizontal × vertical: 4 × 3, etc.), and then each area is divided into a predetermined plurality (for example, , Horizontal x vertical: 3 x 3 etc.) (for example, a square of 16 x 16 pixels). And the feature-value calculating part 5b extracts the block (feature point) with a high feature with many high frequency components from several blocks for every area as a template. Here, the feature extraction process is a process of selecting a feature having a high characteristic convenient for tracking from a large number of candidate blocks.
Note that the number of divided areas and blocks, and the number of pixels in each block are examples, and are not limited to these.
また、位置合わせ部5は、連写画像どうしの位置合わせのためのブロックマッチング処理を行うブロックマッチング部5cを具備している。
ブロックマッチング部5cは、例えば、連写画像P1、P2のうち、一枚目の画像P1を基準画像とするとともに、二枚目の画像P2を対象画像として位置合わせを行う。具体的には、ブロックマッチング部5cは、特徴抽出処理にて抽出された一枚目の画像P1のテンプレート(例えば、16×16画素の正方形)が二枚目の画像P2内のどこに対応するか、つまり、二枚目の画像P2内にてテンプレートの画素値が最適にマッチする位置(対応領域)を探索する。そして、画素値の相違度の評価値(例えば、差分二乗和(SSD)や差分絶対値和(SAD)等)が最も良かった一枚目の画像P1と二枚目の画像P2間の最適なオフセットを当該テンプレートの動きベクトルとして算出する。
In addition, the alignment unit 5 includes a block matching unit 5c that performs block matching processing for alignment of continuous shot images.
For example, the block matching unit 5c performs alignment with the first image P1 of the continuous shot images P1 and P2 as a reference image and the second image P2 as a target image. Specifically, the block matching unit 5c determines where in the second image P2 the template (for example, a square of 16 × 16 pixels) of the first image P1 extracted by the feature extraction processing corresponds. That is, a position (corresponding region) where the template pixel value optimally matches is searched for in the second image P2. Then, an optimal evaluation value between the first image P1 and the second image P2 having the best evaluation value (for example, difference sum of squares (SSD), difference sum of absolute values (SAD), etc.) of pixel values is obtained. The offset is calculated as the motion vector of the template.
そして、位置合わせ部5は、一枚目の画像P1から抽出した特徴点に基づいて、一枚目の画像P1と二枚目の画像P2との位置合わせを行う。即ち、位置合わせ部5は、一枚目の画像P1から抽出した特徴点に基づいて、一枚目の画像P1(基準画像)に対する二枚目の画像P2(対象画像)の各画素の座標変換式(射影変換行列)を算出し、当該座標変換式に従って二枚目の画像P2を座標変換して一枚目の画像P1と位置合わせを行う。
具体的には、位置合わせ部5は、ブロックマッチング部5cにより算出された複数のテンプレートの動きベクトルを多数決により演算して、統計的に所定%(例えば、50%)以上となると判断された動きベクトルを全体の動きベクトルとして、当該動きベクトルに係る特徴点対応を用いて二枚目の画像P2の射影変換行列を算出する。そして、位置合わせ部5は、射影変換行列に従って二枚目の画像P2のYUVデータを座標変換して一枚目の画像P1のYUVデータと位置合わせを行う。
ここで、位置合わせ部5は、被写界深度の異なる少なくとも二枚の画像P1、P2どうしの位置合わせを行う位置合わせ手段を構成している。
Then, the alignment unit 5 aligns the first image P1 and the second image P2 based on the feature points extracted from the first image P1. That is, the alignment unit 5 performs coordinate conversion of each pixel of the second image P2 (target image) with respect to the first image P1 (reference image) based on the feature points extracted from the first image P1. An equation (projection transformation matrix) is calculated, and the second image P2 is coordinate-transformed according to the coordinate transformation equation to align with the first image P1.
Specifically, the alignment unit 5 calculates the motion vectors of a plurality of templates calculated by the block matching unit 5c by majority, and the motion determined to be statistically greater than or equal to a predetermined percentage (for example, 50%). Using the vector as the entire motion vector, the projection transformation matrix of the second image P2 is calculated using the feature point correspondences related to the motion vector. Then, the alignment unit 5 performs coordinate conversion on the YUV data of the second image P2 according to the projective transformation matrix and performs alignment with the YUV data of the first image P1.
Here, the alignment unit 5 constitutes an alignment unit that aligns at least two images P1 and P2 having different depths of field.
なお、上記した位置合わせの手法は、一例であってこれに限られるものではない。即ち、例えば、全体の動きベクトルの算出の際に、各テンプレートの追跡結果(特徴点対応)の有効性を判定する処理を行うことで全体の動きベクトルの信頼度を向上させるようにしても良い。 The above-described alignment method is an example and is not limited to this. That is, for example, when calculating the entire motion vector, the reliability of the entire motion vector may be improved by performing processing for determining the validity of the tracking result (corresponding to the feature point) of each template. .
画像処理部6は、連写画像どうしの間で対応する各画素の画素値の差分を生成する差分生成部6aを具備している。
差分生成部6aは、具体的には、位置合わせ部5により射影変換行列に従って各画素が座標変換された二枚目の画像P2のYUVデータと一枚目の画像P1のYUVデータの間で対応する各画素の画素値の差分を算出してボケデータマップMを生成する。即ち、これら二枚の画像P1、P2のYUVデータは、明るさ(BV値)をそろえ、且つ、絞り値(AV値)を変化させた状態で連写撮像された画像であるので、絞り1bの径の変化(被写界深度の差)に由来するボケ量以外の差は、非常に小さい値となる。即ち、一枚目の画像P1を主要被写体Sに合焦させて撮像し、二枚目以降の画像を被写界深度がより深くなるように設定して連写すると、連写画像P1、P2における主要被写体S部分の差は、非常に小さい値となる。そこで、これら二枚の連写画像P1、P2のYUVデータどうしで対応する各画素の画素値の差分が所定の閾値よりも小さい画素からなる領域を主要被写体S部分として除き、所定の閾値以上となる画素からなる領域を一枚目の画像P1におけるボケ領域(非合焦領域N1)として、当該非合焦領域N1の各画素の画素値の差分を記録したボケデータマップM(図4(a)参照)を生成する。
ここで、差分生成部6aは、被写界深度の異なる少なくとも二枚の画像P1、P2の間で対応する各画素の画素値の差分情報を生成する差分生成手段を構成している。
The image processing unit 6 includes a difference generation unit 6a that generates a difference between pixel values of corresponding pixels between continuous shot images.
Specifically, the difference generation unit 6a corresponds between the YUV data of the second image P2 and the YUV data of the first image P1 in which each pixel is coordinate-converted by the alignment unit 5 according to the projective transformation matrix. A blur data map M is generated by calculating a difference between pixel values of the pixels to be processed. That is, since the YUV data of these two images P1 and P2 are images that are continuously shot with the brightness (BV value) being matched and the aperture value (AV value) being changed, the aperture 1b Differences other than the blur amount derived from a change in the diameter of the image (difference in depth of field) are very small values. That is, when the first image P1 is captured while focusing on the main subject S, and the second and subsequent images are set so that the depth of field is deeper, continuous shooting images P1, P2 are taken. The difference of the main subject S portion at is very small. Therefore, except for the main subject S portion, an area composed of pixels in which the difference between the pixel values of the corresponding pixels between the YUV data of the two continuous shot images P1 and P2 is smaller than the predetermined threshold is set to be equal to or higher than the predetermined threshold. A blur data map M (FIG. 4A) in which a pixel area is defined as a blur area (non-focus area N1) in the first image P1, and a difference between pixel values of each pixel in the non-focus area N1 is recorded. ))).
Here, the difference generation unit 6a constitutes difference generation means for generating difference information of pixel values of corresponding pixels between at least two images P1 and P2 having different depths of field.
また、画像処理部6は、差分生成部6aにより生成された各画素の画素値の差分に基づいて、一枚目の画像P1の非合焦領域N1に対してぼかし処理を施してぼかし画像Bを生成するぼかし画像生成部6bを具備している。
ぼかし画像生成部6bは、具体的には、一枚目の画像P1の非合焦領域N1に対するぼかし処理のぼかし度合いを調整するぼかし度調整部6cを有している。ぼかし度調整部6cは、例えば、ユーザによる操作入力部10の所定操作に基づいて入力されるか、或いは、デフォルトで設定されている所定の係数を、差分生成部6aにより生成されたボケデータマップMの各画素の画素値の差分に乗算することで、ぼかし処理の各画素毎のぼかし度合い(ボケ量)を調整して付加ボケデータマップを生成する。
そして、ぼかし画像生成部6bは、ぼかし度調整部6cにより生成された付加ボケデータマップの各画素毎のぼかし度合いに基づいて、一枚目の画像P1、即ち、二枚の連写画像P1、P2のうちの被写界深度のより浅い方の画像P1の非合焦領域N1に対してぼかし処理を施すことでぼかし画像Bを生成する。具体的には、ぼかし画像生成部6bは、一枚目の画像P1のYUVデータに基づいて、当該画像P1の非合焦領域N1の各画素の画素値を付加ボケデータマップの対応する画素のぼかし度合いに応じて補正して、主要被写体S以外の領域N2(非合焦領域N1)に新たなボケが加算されたぼかし画像BのYUVデータを生成する。
なお、一枚目の画像P1の主要被写体S以外の領域N2のぼかし処理の方法としては、例えば、処理対象画素の周辺画素の画素値に所定の重み付けをした量を足し合わせて平均化したものを当該処理対象画素の画素値とする処理が挙げられる。このとき、処理対象画素のぼかし度合いに応じて平均化する範囲(平均を算出する近傍点の数)を変更することで、ぼかし画像Bのボケ(ぼかし)の大きさを調整する。
Further, the image processing unit 6 performs a blurring process on the non-focused region N1 of the first image P1 based on the difference between the pixel values of the respective pixels generated by the difference generation unit 6a, thereby blurring the image B. Is provided with a blurred image generation unit 6b.
Specifically, the blurred image generation unit 6b includes a blur level adjustment unit 6c that adjusts the blur level of the blur processing for the non-focused region N1 of the first image P1. The blurring degree adjustment unit 6c is, for example, input based on a predetermined operation of the operation input unit 10 by the user, or a predetermined coefficient set by default is generated by the difference generation unit 6a. By multiplying the difference between the pixel values of each pixel of M, the degree of blurring (blur amount) for each pixel in the blurring process is adjusted to generate an additional blur data map.
Then, the blurred image generation unit 6b, based on the blurring degree for each pixel of the additional blur data map generated by the blurring degree adjustment unit 6c, the first image P1, that is, the two continuous shot images P1, A blurred image B is generated by performing a blurring process on the non-focused region N1 of the image P1 having a shallower depth of field of P2. Specifically, based on the YUV data of the first image P1, the blurred image generation unit 6b calculates the pixel value of each pixel in the out-of-focus area N1 of the image P1 for the corresponding pixel in the additional blur data map. Correction is made according to the degree of blurring, and YUV data of the blurred image B in which new blur is added to the area N2 (non-focused area N1) other than the main subject S is generated.
In addition, as a method of blurring processing of the region N2 other than the main subject S of the first image P1, for example, an average obtained by adding a predetermined weight to the pixel values of the peripheral pixels of the processing target pixel Is a process of setting the pixel value of the pixel to be processed. At this time, the size of blurring (blurring) of the blurred image B is adjusted by changing the range to be averaged (the number of neighboring points for calculating the average) according to the blurring degree of the processing target pixel.
このように、ぼかし画像生成部6bは、差分生成部6aにより生成された各画素の画素値の差分に基づいて、少なくとも二枚の連写画像P1、P2のうち、何れか一の画像に対してぼかし処理を施してぼかし画像Bを生成する画像生成手段を構成している。また、ぼかし度調整部6cは、差分生成部6aにより生成された各画素の画素値の差分に基づいて、ぼかし処理のぼかし度合いを調整する調整手段を構成している。 As described above, the blurred image generation unit 6b applies to any one of at least two continuous shot images P1 and P2 based on the difference between the pixel values of the pixels generated by the difference generation unit 6a. Thus, an image generating means for generating a blurred image B by performing a blurring process is configured. Moreover, the blurring degree adjusting unit 6c constitutes an adjusting unit that adjusts the blurring degree of the blurring process based on the difference between the pixel values of each pixel generated by the difference generating unit 6a.
表示制御部7は、メモリ4に一時的に記憶されている表示用の画像データを読み出して表示部8に表示させる制御を行う。
具体的には、表示制御部7は、VRAM、VRAMコントローラ、デジタルビデオエンコーダなどを備えている。そして、デジタルビデオエンコーダは、中央制御部11の制御下にてメモリ4から読み出されてVRAM(図示略)に記憶されている輝度信号Y及び色差信号Cb,Crを、VRAMコントローラを介してVRAMから定期的に読み出して、これらのデータを元にビデオ信号を発生して表示部8に出力する。
The display control unit 7 performs control for reading display image data temporarily stored in the memory 4 and displaying the read image data on the display unit 8.
Specifically, the display control unit 7 includes a VRAM, a VRAM controller, a digital video encoder, and the like. The digital video encoder reads the luminance signal Y and the color difference signals Cb and Cr read from the memory 4 and stored in the VRAM (not shown) under the control of the central control unit 11 via the VRAM controller. Are periodically read out, and a video signal is generated based on these data and output to the display unit 8.
表示部8は、例えば、液晶表示装置であり、表示制御部7からのビデオ信号に基づいて電子撮像部1cにより撮像された画像などを表示画面に表示する。具体的には、表示部8は、静止画撮像モードや動画撮像モードにて、撮像部1及び撮像制御部2による被写体の撮像により生成された複数の画像フレームを所定の表示フレームレートで逐次更新しながらライブビュー画像を表示する。また、表示部8は、静止画として記録される画像(レックビュー画像)を表示したり、動画として記録中の画像を表示する。 The display unit 8 is, for example, a liquid crystal display device, and displays an image captured by the electronic imaging unit 1c on the display screen based on a video signal from the display control unit 7. Specifically, the display unit 8 sequentially updates a plurality of image frames generated by imaging the subject by the imaging unit 1 and the imaging control unit 2 at a predetermined display frame rate in the still image capturing mode and the moving image capturing mode. While displaying the live view image. The display unit 8 displays an image (rec view image) recorded as a still image or an image being recorded as a moving image.
記録媒体9は、例えば、不揮発性メモリ(フラッシュメモリ)等により構成され、画像処理部6の符号化部(図示略)により所定の圧縮形式で符号化された記録用の静止画像データや複数の画像フレームからなる動画像データを記憶する。 The recording medium 9 is composed of, for example, a non-volatile memory (flash memory) or the like, and recording still image data encoded in a predetermined compression format by an encoding unit (not shown) of the image processing unit 6 or a plurality of recording media 9 The moving image data composed of image frames is stored.
操作入力部10は、当該撮像装置100の所定操作を行うためのものである。具体的には、操作入力部10は、被写体の撮像指示に係るシャッタボタン、撮像モードや機能等の選択指示に係る選択決定ボタン、ズーム量の調整指示に係るズームボタン等を備え(いずれも図示略)、これらのボタンの操作に応じて所定の操作信号を中央制御部11に出力する。 The operation input unit 10 is for performing a predetermined operation of the imaging apparatus 100. Specifically, the operation input unit 10 includes a shutter button related to an imaging instruction of a subject, a selection determination button related to an instruction to select an imaging mode and a function, a zoom button related to an instruction to adjust the zoom amount, and the like (all illustrated). Abbreviation), a predetermined operation signal is output to the central control unit 11 in accordance with the operation of these buttons.
中央制御部11は、撮像装置100の各部を制御するものである。具体的には、中央制御部11は、CPU(図示略)を備え、撮像装置100用の各種処理プログラム(図示略)に従って各種の制御動作を行う。 The central control unit 11 controls each unit of the imaging device 100. Specifically, the central control unit 11 includes a CPU (not shown) and performs various control operations in accordance with various processing programs (not shown) for the imaging apparatus 100.
次に、撮像装置100によるぼかし画像生成処理について、図2〜図4を参照して説明する。
図2は、ぼかし画像生成処理に係る動作の一例を示すフローチャートである。また、図3(a)〜図4(b)は、ぼかし画像生成処理に係る画像の一例を模式的に示す図である。
Next, the blurred image generation processing by the imaging apparatus 100 will be described with reference to FIGS.
FIG. 2 is a flowchart illustrating an example of an operation related to the blurred image generation process. FIGS. 3A to 4B are diagrams schematically illustrating an example of an image related to a blurred image generation process.
ぼかし画像生成処理は、ユーザによる操作入力部10の選択決定ボタンの所定操作に基づいて、メニュー画面に表示された複数の撮像モードの中から絞りブラケット撮像モードが選択指示された場合に実行される処理である。
図2に示すように、先ず、表示制御部7は、撮像部1による被写体の撮像により生成された複数の画像フレームに基づいてライブビュー画像を表示部8の表示画面に表示させる(ステップS1)。
The blurred image generation process is executed when an instruction to select an aperture bracket imaging mode is selected from a plurality of imaging modes displayed on the menu screen based on a predetermined operation of the selection determination button of the operation input unit 10 by the user. It is processing.
As shown in FIG. 2, first, the display control unit 7 displays a live view image on the display screen of the display unit 8 based on a plurality of image frames generated by imaging the subject by the imaging unit 1 (step S1). .
次に、撮像制御部2の露出制御部2aは、被写界深度が最も浅くなるように絞り値(AV値)を最も開放側に設定するとともに、露光時間(TV値)及びISO感度(SV値)をAPEX値の一般式に従って決定した後、所定の制御信号を電子撮像部1c及び絞り1bに出力する(ステップS2)。これにより、絞り1bは、最も開放した状態となる。
続けて、中央制御部11は、ユーザによる操作入力部10のシャッタボタンの所定操作に基づいて連写撮像指示が入力されたか否かを判定する(ステップS3)。ここで、連写撮像指示が入力されたと判定されると(ステップS3;YES)、撮像制御部2は、レンズ部1aを主要被写体Sに合焦させ、一枚目の画像P1(図3(a)参照)の光学像を電子撮像部1cにより撮像させて、画像データ生成部3は、電子撮像部1cから転送された一枚目の画像P1のYUVデータを生成する(ステップS4)。なお、当該一枚目の画像P1のYUVデータは、メモリ4に一時記憶される。
Next, the exposure control unit 2a of the imaging control unit 2 sets the aperture value (AV value) to the most open side so that the depth of field becomes the shallowest, and also sets the exposure time (TV value) and ISO sensitivity (SV). Value) is determined in accordance with the general formula of the APEX value, and then a predetermined control signal is output to the electronic imaging unit 1c and the aperture 1b (step S2). Thereby, the aperture stop 1b is in the most open state.
Subsequently, the central control unit 11 determines whether or not a continuous shooting instruction is input based on a predetermined operation of the shutter button of the operation input unit 10 by the user (step S3). Here, if it is determined that a continuous shooting instruction has been input (step S3; YES), the imaging control unit 2 focuses the lens unit 1a on the main subject S, and the first image P1 (FIG. 3 (FIG. 3)). The optical image of (a) is captured by the electronic imaging unit 1c, and the image data generation unit 3 generates YUV data of the first image P1 transferred from the electronic imaging unit 1c (step S4). The YUV data of the first image P1 is temporarily stored in the memory 4.
次に、撮像制御部2の露出制御部2aは、一枚目の画像P1の明るさから変化させず、且つ、当該一枚目の画像P1よりも被写界深度が深くなるように絞り値(AV値)を所定量(例えば、一段階)絞るとともに、露光時間(TV値)及びISO感度(SV値)をAPEX値の一般式に従って決定した後、所定の制御信号を電子撮像部1c及び絞り1bに出力する(ステップS5)。これにより、絞り1bは、所定量絞られた状態となる。
続けて、撮像制御部2は、一枚目の画像P1よりも被写界深度の深い二枚目の画像P2(図3(b)参照)の光学像を所定の撮像条件で電子撮像部1cにより撮像させて、画像データ生成部3は、電子撮像部1cから転送された二枚目の画像P2のYUVデータを生成する(ステップS6)。これにより、一枚目の画像P1と二枚目の画像P2が、略等しい画角で連続して撮像される。なお、当該二枚目の画像P2のYUVデータは、メモリ4に一時記憶される。
Next, the exposure control unit 2a of the imaging control unit 2 does not change the brightness of the first image P1, and the aperture value so that the depth of field is deeper than that of the first image P1. (AV value) is reduced by a predetermined amount (for example, one step), exposure time (TV value) and ISO sensitivity (SV value) are determined according to the general formula of APEX value, and then a predetermined control signal is sent to electronic imaging unit 1c and Output to the diaphragm 1b (step S5). As a result, the diaphragm 1b is in a state of being squeezed by a predetermined amount.
Subsequently, the imaging control unit 2 uses the electronic imaging unit 1c for an optical image of the second image P2 (see FIG. 3B) having a depth of field deeper than the first image P1 under a predetermined imaging condition. The image data generation unit 3 generates YUV data of the second image P2 transferred from the electronic imaging unit 1c (step S6). As a result, the first image P1 and the second image P2 are continuously captured at substantially the same angle of view. The YUV data of the second image P2 is temporarily stored in the memory 4.
次に、位置合わせ部5は、メモリ4に一時記憶されている一枚目の画像P1のYUVデータを基準として、二枚目の画像P2のYUVデータを射影変換させるための射影変換行列を所定の画像変換モデル(例えば、相似変換モデル、或いは合同変換モデル)で算出する(ステップS7)。
具体的には、位置合わせ部5の画像取得部5aは、二枚の連写画像P1、P2のうち、一枚目の画像P1の輝度信号Yをメモリ4から取得する。次に、位置合わせ部5の特徴量演算部5bは、一枚目の画像P1の輝度信号に基づいて、所定数(或いは、所定数以上)の特徴の高いブロック(特徴点)を選択して、当該ブロックの内容をテンプレートとして抽出する。そして、位置合わせ部5のブロックマッチング部5cは、特徴抽出処理にて抽出されたテンプレートの画素値が最適にマッチする位置を二枚目の画像P2内にて探索して、画素値の相違度の評価値が最も良かった一枚目の画像P1と二枚目の画像P2間の最適なオフセットを当該テンプレートの動きベクトルとして算出する。そして、位置合わせ部5は、ブロックマッチング部5cにより算出された複数のテンプレートの動きベクトルに基づいて全体の動きベクトルを統計的に算出し、当該動きベクトルに係る特徴点対応を用いて二枚目の画像P2の射影変換行列を算出する。
Next, the alignment unit 5 predetermines a projective transformation matrix for projectively transforming the YUV data of the second image P2 with reference to the YUV data of the first image P1 temporarily stored in the memory 4. The image conversion model (for example, a similarity conversion model or a joint conversion model) is used (step S7).
Specifically, the image acquisition unit 5a of the alignment unit 5 acquires the luminance signal Y of the first image P1 from the memory 4 out of the two continuous shot images P1 and P2. Next, the feature amount calculation unit 5b of the alignment unit 5 selects a predetermined number (or a predetermined number or more) of high feature blocks (feature points) based on the luminance signal of the first image P1. The contents of the block are extracted as a template. Then, the block matching unit 5c of the alignment unit 5 searches the second image P2 for a position where the pixel value of the template extracted by the feature extraction process optimally matches, and the degree of difference between the pixel values The optimal offset between the first image P1 and the second image P2 having the best evaluation value is calculated as a motion vector of the template. Then, the alignment unit 5 statistically calculates the entire motion vector based on the motion vectors of the plurality of templates calculated by the block matching unit 5c, and uses the feature point correspondence related to the motion vector to obtain the second image. The projection transformation matrix of the image P2 is calculated.
次に、位置合わせ部5は、算出された射影変換行例に基づいて二枚目の画像P2を射影変換させることで、一枚目の画像P1のYUVデータと二枚目の画像P2のYUVデータとを位置合わせする処理を行う(ステップS8)。 Next, the alignment unit 5 performs projective transformation on the second image P2 based on the calculated projective transformation example, so that the YUV data of the first image P1 and the YUV of the second image P2 are converted. A process of aligning the data is performed (step S8).
そして、画像処理部6の差分生成部6aは、位置合わせ部5により座標変換された二枚目の画像P2のYUVデータと一枚目の画像P1のYUVデータの間で対応する各画素の画素値の差分を算出する(ステップS9)。続けて、差分生成部6aは、各画素の画素値の差分が所定の閾値以上となる画素を特定して、当該差分が所定の閾値以上となる画素からなる領域を一枚目の画像P1におけるボケ領域(非合焦領域N1)として、当該非合焦領域N1の各画素の画素値の差分を記録したボケデータマップM(図4(a)参照)を生成する(ステップS10)。 Then, the difference generation unit 6a of the image processing unit 6 is a pixel of each pixel corresponding between the YUV data of the second image P2 and the YUV data of the first image P1 whose coordinates are converted by the positioning unit 5. A value difference is calculated (step S9). Subsequently, the difference generation unit 6a specifies a pixel in which the difference between the pixel values of each pixel is equal to or greater than a predetermined threshold, and sets an area including pixels in which the difference is equal to or greater than the predetermined threshold in the first image P1. As a blur area (non-focus area N1), a blur data map M (see FIG. 4A) in which a difference between pixel values of each pixel in the non-focus area N1 is recorded is generated (step S10).
次に、画像処理部6のぼかし画像生成部6bは、ボケデータマップMの各画素の差分に所定の係数を乗算することで、一枚目の画像P1における主要被写体S以外の領域N2の各画素毎のぼかし度合い(ボケ量)を調整して付加ボケデータマップを生成する(ステップS11)。
続けて、ぼかし画像生成部6bは、付加ボケデータマップの各画素毎のぼかし度合いに応じて、一枚目の画像P1の主要被写体S以外の領域N2に対してぼかし処理を施すことでぼかし画像BのYUVデータを生成する(ステップS12)。
Next, the blurred image generation unit 6b of the image processing unit 6 multiplies each pixel difference in the blur data map M by a predetermined coefficient, thereby each region N2 other than the main subject S in the first image P1. An additional blur data map is generated by adjusting the blurring degree (blur amount) for each pixel (step S11).
Subsequently, the blurred image generation unit 6b performs a blurring process on the region N2 other than the main subject S of the first image P1 according to the degree of blurring for each pixel of the additional blur data map, thereby blurring the image. B YUV data is generated (step S12).
その後、中央制御部11は、記録媒体9の所定の記憶領域に、ぼかし画像生成部6bにより生成されたぼかし画像BのYUVデータを記憶させる(ステップS13)。
これにより、ぼかし画像生成処理を終了する。
Thereafter, the central control unit 11 stores the YUV data of the blurred image B generated by the blurred image generating unit 6b in a predetermined storage area of the recording medium 9 (step S13).
Thus, the blurred image generation process is completed.
以上のように、本実施形態の撮像装置100によれば、略等しい画角で連続して撮像された被写界深度の異なる二枚の連写画像P1、P2の間で対応する各画素の画素値の差分を生成し、当該各画素の画素値の差分に基づいて、被写界深度のより浅い方の一枚目の画像P1に対してぼかし処理を施すことにより、例えば、電子撮像部1cに搭載されたイメージセンサが小さかったり、画像の周辺部が光量落ちするために絞り1bを大きく開放できなかったり、ズームレンズを搭載していない構成の撮像装置であっても、主要被写体S以外の領域N2を一枚目の画像P1の非合焦領域N1のボケよりも大きくぼかした画像Bを適正に生成することができる。
即ち、絞りブラケット撮像にて、画像の明るさを略等しくするとともに絞り値を互いに異ならせて撮像することで被写界深度の異なる二枚の連写画像P1、P2を取得し、これら二枚の連写画像P1、P2の間で対応する各画素の画素値の差分に基づいて、被写界深度のより浅い方の一枚目の画像P1における主要被写体S以外を主として含む非合焦領域N1を特定し、当該非合焦領域N1に対してぼかし処理を施すことで、主要被写体S以外の領域N2をぼかした画像Bの生成を適正に行うことができる。
また、二枚の連写画像P1、P2は、絞り値が互いに異なるだけなので、従来のフォーカスブラケット撮影を利用したボケ画像の生成のように、主要被写体Sとその背景のバランスにずれが生じることがなくなり、複数の撮像画像間で対応する画素が存在しない座標が発生してしまうといった問題も生じることがない。
As described above, according to the imaging apparatus 100 of the present embodiment, each pixel corresponding between two continuous shot images P1 and P2 having different depths of field that are continuously captured at substantially the same angle of view. A difference between pixel values is generated, and a blurring process is performed on the first image P1 having a shallower depth of field based on the difference between the pixel values of the respective pixels. Even if the image sensor mounted on 1c is small, the aperture 1b cannot be opened largely because the amount of light in the peripheral portion of the image is reduced, or an imaging apparatus having no zoom lens is installed, it is not the main subject S. The image B in which the area N2 of the first image P1 is blurred more greatly than the blur of the non-focused area N1 of the first image P1 can be appropriately generated.
That is, in the aperture bracket imaging, two continuous shot images P1 and P2 having different depths of field are obtained by capturing images with substantially the same brightness and different aperture values. Based on the difference between the pixel values of the corresponding pixels between the continuous shot images P1 and P2, the out-of-focus region mainly including other than the main subject S in the first image P1 having the shallower depth of field. By specifying N1 and performing blurring processing on the out-of-focus area N1, it is possible to appropriately generate the image B in which the area N2 other than the main subject S is blurred.
Further, since the two continuous shot images P1 and P2 are different only in the aperture value, there is a deviation in the balance between the main subject S and its background as in the case of generating a blurred image using conventional focus bracket photography. Thus, there is no problem that coordinates in which corresponding pixels do not exist between a plurality of captured images are generated.
また、二枚の連写画像P1、P2の間で対応する各画素の画素値の差分に基づいて、一枚目の画像P1に対するぼかし処理のぼかし度合いを調整することで、主要被写体Sの種類やユーザの好み等に応じて主要被写体S以外の領域N2に所定量のボケを付与することができ、より興趣性の高いぼかし画像Bを生成することができる。 Further, the type of main subject S is adjusted by adjusting the blurring degree of the blurring process for the first image P1 based on the difference in pixel value of each corresponding pixel between the two continuous shot images P1 and P2. A predetermined amount of blur can be given to the area N2 other than the main subject S according to the user's preference and the like, and a more interesting blurred image B can be generated.
さらに、二枚の連写画像P1、P2どうしの位置合わせを行って、これら連写画像P1、P2の間で対応する各画素の画素値の差分を生成するので、従来のように複数の撮像画像間で対応する画素が存在しない座標を生じさせることなく、二枚の連写画像P1、P2の間で対応する各画素の画素値の差分の生成を適正に行うことができる。 Further, the two continuous shot images P1 and P2 are aligned, and a difference between the pixel values of corresponding pixels between the continuous shot images P1 and P2 is generated. It is possible to appropriately generate the difference between the pixel values of the corresponding pixels between the two continuous shot images P1 and P2, without generating coordinates where the corresponding pixels do not exist between the images.
なお、本発明は、上記実施形態に限定されることなく、本発明の趣旨を逸脱しない範囲において、種々の改良並びに設計の変更を行っても良い。
以下に、撮像装置100の変形例について説明する。
The present invention is not limited to the above-described embodiment, and various improvements and design changes may be made without departing from the spirit of the present invention.
Below, the modification of the imaging device 100 is demonstrated.
<変形例1>
変形例1の撮像装置100は、二枚の連写画像P1、P2の間で対応する各画素の周波数特性の差分に基づいて、当該差分が大きくなるほど遮断周波数がより小さくなるようにローパスフィルタを設定し、当該ローパスフィルタを用いてぼかし処理を施す。
なお、変形例1の撮像装置100にあっては、ローパスフィルタを用いたぼかし処理以外は略同様であり、その詳細な説明は省略する。
<Modification 1>
The imaging apparatus 100 according to the first modification uses a low-pass filter based on the difference between the frequency characteristics of the corresponding pixels between the two continuous shot images P1 and P2 so that the cutoff frequency becomes smaller as the difference becomes larger. Set and perform blurring using the low-pass filter.
Note that the imaging apparatus 100 according to the first modification is substantially the same except for the blurring process using the low-pass filter, and the detailed description thereof is omitted.
図5は、変形例1の撮像装置100の概略構成を示すブロック図である。
図5に示すように、画像処理部6は、二枚の連写画像P1、P2の各画素の周波数特性を取得する周波数特性取得部6dを具備している。
周波数特性取得部6dは、情報取得手段として、少なくとも二枚の連写画像P1、P2の各々について、各画素の周波数特性(周波数成分情報)を算出して取得する。
そして、画像処理部6の差分生成部6aは、周波数特性取得部6dにより取得された二枚の連写画像P1、P2の間で対応する各画素の周波数特性どうしの差分を算出する。そして、差分生成部6aは、これら二枚の連写画像P1、P2のYUVデータどうしで対応する各画素の周波数特性の差分が所定の閾値よりも小さい画素からなる領域を主要被写体S部分として除き、所定の閾値以上となる画素からなる領域を一枚目の画像P1におけるボケ領域(非合焦領域N1)として、当該非合焦領域N1の各画素の周波数特性の差分を記録したボケデータマップMを生成する。
FIG. 5 is a block diagram illustrating a schematic configuration of the imaging apparatus 100 according to the first modification.
As shown in FIG. 5, the image processing unit 6 includes a frequency characteristic acquisition unit 6d that acquires the frequency characteristics of each pixel of the two continuous shot images P1 and P2.
The frequency characteristic acquisition unit 6d calculates and acquires the frequency characteristic (frequency component information) of each pixel for each of at least two continuous shot images P1 and P2 as information acquisition means.
Then, the difference generation unit 6a of the image processing unit 6 calculates the difference between the frequency characteristics of the corresponding pixels between the two continuous shot images P1 and P2 acquired by the frequency characteristic acquisition unit 6d. Then, the difference generation unit 6a excludes, as the main subject S portion, an area composed of pixels in which the frequency characteristic difference between the pixels corresponding to the YUV data of the two continuous shot images P1 and P2 is smaller than a predetermined threshold value. A blur data map that records a difference in frequency characteristics of each pixel in the non-focused region N1 with a region composed of pixels that are equal to or greater than a predetermined threshold as a blur region (non-focused region N1) in the first image P1. M is generated.
ぼかし画像生成部6bのぼかし度調整部6cは、差分生成部6aにより生成されたボケデータマップMの各画素の周波数特性の差分に基づいて、所定の遮断周波数のローパスフィルタを各画素毎に設定することでぼかし処理のぼかし度合いを調整する。具体的には、ぼかし度調整部6cは、処理対象画素の周波数特性の差分が大きくなるほど遮断周波数がより小さくなるように各画素毎にローパスフィルタを設定する。
そして、ぼかし画像生成部6bは、ぼかし度調整部6cにより設定された所定のローパスフィルタを用いて、一枚目の画像P1の非合焦領域N1(主要被写体S以外の領域N2)の各画素に対してフィルタリング処理を行うことで、遮断周波数よりも高い高周波成分を除去するぼかし処理を施す。
ここで、ぼかし度調整部6cは、差分生成部6aにより生成された二枚の連写画像P1、P2の各画素の周波数特性の差分に基づいて、当該差分が大きくなるほど遮断周波数がより小さくなるようにローパスフィルタを設定する設定手段を構成している。
The blur adjustment unit 6c of the blurred image generation unit 6b sets a low-pass filter having a predetermined cutoff frequency for each pixel based on the difference in frequency characteristics of each pixel of the blur data map M generated by the difference generation unit 6a. To adjust the blurring degree of the blurring process. Specifically, the blurring degree adjustment unit 6c sets a low-pass filter for each pixel so that the cutoff frequency becomes smaller as the difference between the frequency characteristics of the processing target pixels becomes larger.
Then, the blurred image generation unit 6b uses the predetermined low-pass filter set by the blurring degree adjustment unit 6c to each pixel of the non-focused region N1 (region N2 other than the main subject S) of the first image P1. Is subjected to a filtering process to perform a blurring process for removing high frequency components higher than the cutoff frequency.
Here, based on the difference between the frequency characteristics of the pixels of the two continuous shot images P1 and P2 generated by the difference generation unit 6a, the blurring degree adjustment unit 6c has a lower cutoff frequency as the difference increases. Thus, the setting means for setting the low-pass filter is configured.
次に、変形例1の撮像装置100によるぼかし画像生成処理について、図6を参照して説明する。
図6は、ぼかし画像生成処理に係る動作の一例を示すフローチャートである。
以下に説明するぼかし画像生成処理にあっては、ローパスフィルタを用いたぼかし処理以外は、上記実施形態のぼかし画像生成処理と略同様であり、その詳細な説明は省略する。
Next, a blurred image generation process performed by the imaging apparatus 100 according to the first modification will be described with reference to FIG.
FIG. 6 is a flowchart illustrating an example of an operation related to the blurred image generation process.
The blurred image generation processing described below is substantially the same as the blurred image generation processing of the above embodiment except for the blur processing using a low-pass filter, and detailed description thereof is omitted.
図6に示すように、先ず、上記実施形態と略同様に、表示制御部7は、ライブビュー画像を表示部8の表示画面に表示させる(ステップS1)。
次に、上記実施形態と略同様に、露出制御部2aは、被写界深度が最も浅くなるように絞り値(AV値)を最も開放側に設定するとともに、露光時間(TV値)及びISO感度(SV値)をAPEX値の一般式に従って決定する(ステップS2)。
As shown in FIG. 6, first, the display control unit 7 displays a live view image on the display screen of the display unit 8 in substantially the same manner as in the above embodiment (step S1).
Next, in substantially the same manner as in the above embodiment, the exposure control unit 2a sets the aperture value (AV value) to the most open side so that the depth of field is the shallowest, as well as the exposure time (TV value) and ISO. Sensitivity (SV value) is determined according to the general formula of APEX value (step S2).
続けて、上記実施形態と略同様に、中央制御部11は、連写撮像指示が入力されたか否かを判定する(ステップS3)。ここで、連写撮像指示が入力されたと判定されると(ステップS3;YES)、撮像制御部2は、一枚目の画像P1(図3(a)参照)の光学像を所定の撮像条件で電子撮像部1cにより撮像させる(ステップS4)。 Subsequently, in substantially the same manner as in the above embodiment, the central control unit 11 determines whether or not a continuous shooting imaging instruction has been input (step S3). If it is determined that a continuous shooting instruction has been input (step S3; YES), the imaging control unit 2 uses the optical image of the first image P1 (see FIG. 3A) as a predetermined imaging condition. The image is picked up by the electronic image pickup unit 1c (step S4).
次に、上記実施形態と略同様に、撮像制御部2の露出制御部2aは、一枚目の画像P1の明るさから変化させず、且つ、当該一枚目の画像P1よりも被写界深度が深くなるように絞り値(AV値)を所定量(例えば、一段階)絞るとともに、露光時間(TV値)及びISO感度(SV値)をAPEX値の一般式に従って決定する(ステップS5)。
続けて、上記実施形態と略同様に、撮像制御部2は、一枚目の画像P1よりも被写界深度の深い二枚目の画像P2(図3(b)参照)の光学像を所定の撮像条件で電子撮像部1cにより撮像させる(ステップS6)。
Next, in substantially the same manner as in the above embodiment, the exposure control unit 2a of the imaging control unit 2 does not change the brightness of the first image P1, and the field of view is greater than that of the first image P1. The aperture value (AV value) is reduced by a predetermined amount (for example, one step) so that the depth becomes deeper, and the exposure time (TV value) and ISO sensitivity (SV value) are determined according to the general formula of the APEX value (step S5). .
Subsequently, in substantially the same manner as in the above-described embodiment, the imaging control unit 2 predetermines the optical image of the second image P2 (see FIG. 3B) having a deeper depth of field than the first image P1. The image is picked up by the electronic image pickup unit 1c under the image pickup conditions (step S6).
次に、上記実施形態と略同様に、位置合わせ部5は、メモリ4に一時記憶されている一枚目の画像P1のYUVデータを基準として、二枚目の画像P2のYUVデータを射影変換させるための射影変換行列を所定の画像変換モデルで算出する(ステップS7)。その後、上記実施形態と略同様に、位置合わせ部5は、算出された射影変換行例に基づいて二枚目の画像P2を射影変換させることで、一枚目の画像P1のYUVデータと二枚目の画像P2のYUVデータとを位置合わせする処理を行う(ステップS8)。 Next, as in the above embodiment, the alignment unit 5 performs projective conversion on the YUV data of the second image P2 with reference to the YUV data of the first image P1 temporarily stored in the memory 4. A projective transformation matrix is calculated using a predetermined image transformation model (step S7). Thereafter, in substantially the same manner as in the above-described embodiment, the alignment unit 5 performs projective transformation on the second image P2 based on the calculated projective transformation example, so that the YUV data of the first image P1 and the second image P2 are transformed. A process of aligning the YUV data of the first image P2 is performed (step S8).
次に、画像処理部6の周波数特性取得部6dは、二枚の連写画像P1、P2の各々について、各画素の周波数特性を算出して取得する(ステップS21)。
その後、画像処理部6の差分生成部6aは、位置合わせ部5により座標変換された二枚目の画像P2のYUVデータと一枚目の画像P1のYUVデータの間で対応する各画素の周波数特性どうしの差分を算出する(ステップS22)。続けて、差分生成部6aは、各画素の周波数特性の差分が所定の閾値以上となる画素を特定して、当該差分が所定の閾値以上となる画素からなる領域を一枚目の画像P1におけるボケ領域(非合焦領域N1)として、当該非合焦領域N1の各画素の周波数特性の差分を記録したボケデータマップM(図4(a)参照)を生成する(ステップS23)。
Next, the frequency characteristic acquisition unit 6d of the image processing unit 6 calculates and acquires the frequency characteristic of each pixel for each of the two continuous shot images P1 and P2 (step S21).
After that, the difference generation unit 6a of the image processing unit 6 performs the frequency of each pixel corresponding between the YUV data of the second image P2 and the YUV data of the first image P1 whose coordinates are converted by the alignment unit 5. A difference between the characteristics is calculated (step S22). Subsequently, the difference generation unit 6a identifies pixels in which the difference in frequency characteristics of each pixel is equal to or greater than a predetermined threshold, and sets an area composed of pixels in which the difference is equal to or greater than the predetermined threshold in the first image P1. As a blur area (non-focus area N1), a blur data map M (see FIG. 4A) in which a difference in frequency characteristics of each pixel in the non-focus area N1 is recorded is generated (step S23).
次に、ぼかし画像生成部6bのぼかし度調整部6cは、ボケデータマップMの各画素の周波数特性の差分に応じて所定の遮断周波数のローパスフィルタを各画素毎に設定することでぼかし処理のぼかし度合いを調整する(ステップS24)。
そして、ぼかし画像生成部6bは、ぼかし度調整部6cにより設定された所定のローパスフィルタを用いて、一枚目の画像P1の非合焦領域N1(主要被写体S以外の領域N2)の各画素に対してフィルタリング処理を行うことで、遮断周波数よりも高い高周波成分を除去するぼかし処理を施して、ぼかし画像BのYUVデータを生成する(ステップS25)。
Next, the blurring degree adjustment unit 6c of the blurred image generation unit 6b performs blurring processing by setting a low-pass filter having a predetermined cutoff frequency for each pixel according to the difference in frequency characteristics of each pixel in the blur data map M. The degree of blur is adjusted (step S24).
Then, the blurred image generation unit 6b uses the predetermined low-pass filter set by the blurring degree adjustment unit 6c to each pixel of the non-focused region N1 (region N2 other than the main subject S) of the first image P1. By performing a filtering process on the image, a blurring process for removing high frequency components higher than the cutoff frequency is performed to generate YUV data of the blurred image B (step S25).
その後、上記実施形態と略同様に、中央制御部11は、記録媒体9の所定の記憶領域に、ぼかし画像生成部6bにより生成されたぼかし画像BのYUVデータを記憶させる(ステップS13)。
これにより、ぼかし画像生成処理を終了する。
Thereafter, in substantially the same manner as in the above embodiment, the central control unit 11 stores the YUV data of the blurred image B generated by the blurred image generation unit 6b in a predetermined storage area of the recording medium 9 (step S13).
Thus, the blurred image generation process is completed.
従って、変形例1の撮像装置100によれば、二枚の連写画像P1、P2どうしの間で対応する各画素の周波数特性の差分に基づいて、当該差分が大きくなるほど遮断周波数がより小さくなるようにローパスフィルタを設定して、一枚目の画像P1の非合焦領域N1に対してぼかし処理を施すことで、連写画像P1、P2の各画素の周波数特性を考慮したぼかし処理を施すことができ、主要被写体S以外の領域N2をぼかした画像Bの生成を適正に行うことができる。 Therefore, according to the imaging apparatus 100 of the first modification, based on the difference in the frequency characteristics of the corresponding pixels between the two continuous shot images P1 and P2, the cutoff frequency becomes smaller as the difference becomes larger. By setting the low-pass filter in this manner and performing blurring processing on the out-of-focus area N1 of the first image P1, blurring processing considering the frequency characteristics of each pixel of the continuous shot images P1 and P2 is performed. Therefore, it is possible to appropriately generate the image B in which the region N2 other than the main subject S is blurred.
また、上記実施形態にあっては、ぼかし処理の対象画像として、一枚目の画像P1を例示したが、これに限られるものではなく、二枚目の画像P2、即ち、二枚の画像P1、P2のうちの被写界深度のより深い方の画像であっても良い。つまり、連写画像P1、P2の各画素の画素値の差分に基づいて、二枚目の画像P2における主要被写体S以外を主として含む非合焦領域N1を特定してぼかし処理を施しても良い。
例えば、二枚目の画像P2とボケデータマップMを保存しておき、二枚目の画像P2における主要被写体S以外を主として含む非合焦領域N1を特定してぼかし処理を施すことで、二枚目の画像P2と同程度の被写界深度の深い状態から、一枚目の画像P1と同程度の被写界深度の浅い状態、更にはそれを越えたボケ状態まで、任意の程度の背景ボケを撮像終了後に生成することができる。
In the above embodiment, the first image P1 is exemplified as the target image for the blurring process. However, the present invention is not limited to this, and the second image P2, that is, the two images P1 is used. , P2 may be an image having a deeper depth of field. That is, based on the difference between the pixel values of the pixels of the continuous shot images P1 and P2, the unfocused region N1 mainly including the main subject S in the second image P2 may be identified and blurred. .
For example, the second image P2 and the blur data map M are saved, and the non-focused region N1 mainly including the main subject S in the second image P2 is specified and subjected to the blurring process. From a state with a depth of field as deep as that of the first image P2, to a state with a depth of field as shallow as that of the first image P1, and further to a blurred state beyond that, an arbitrary degree Background blur can be generated after the imaging is completed.
また、絞りブラケット撮像における画像の連続撮像枚数を二枚としたが、これに限られるものではなく、例えば、三枚以上であっても良い。
このとき、差分生成部6aが、被写界深度が互いに異なる三枚以上の連写画像のうち、連写順が連続する画像どうしの間で対応する各画素の画素値の差分をそれぞれ生成して、ぼかし度調整部6cが、三枚以上の連写画像についての対応する各画素どうしの画素値の差分の変化に基づいて、ぼかし処理のぼかし度合いを調整するようにしても良い。
即ち、連写画像は、連写枚数が増加するに従って被写界深度が次第に深くなっていくことから、被写界深度の最も浅い一枚目の画像P1にてボケの小さい領域は被写界深度を少し深くするだけで二枚目や三枚目の画像でピントが合うことになる。一方、一枚目の画像P1にてボケの大きい領域は、連写枚数をより多くして被写界深度をより深くしないとピントが合わない。
そして、一枚目の画像P1にてぼけている領域(非合焦領域N1)であっても、一旦ピントが合った後は、連写枚数が増加するに従って被写界深度がより深くなり、今後ピントが外れることはないため、連写順が連続する画像どうしの間で対応する画素の画素値の差分の変化は小さくなる。つまり、画素値の差分の変化が小さくなるまでに必要な連写枚数は、一枚目の画像P1にてボケのより小さい領域ほど少なく、一枚目の画像P1にてボケのより大きい領域ほど多くなる。
In addition, although the number of images continuously captured in aperture bracket imaging is two, the number is not limited to this, and may be three or more, for example.
At this time, the difference generation unit 6a generates a difference between pixel values of corresponding pixels between images having consecutive sequential shooting sequences among three or more continuous shooting images having different depths of field. Thus, the blurring degree adjustment unit 6c may adjust the blurring degree of the blurring process based on the change in the difference in pixel value between corresponding pixels for three or more continuous shot images.
That is, since the depth of field gradually increases as the number of continuous shots increases in the continuous shot image, the area where the blur is small in the first image P1 with the shallowest depth of field is the field of view. You can focus on the second and third images by increasing the depth slightly. On the other hand, an area with large blur in the first image P1 cannot be focused unless the number of continuous shots is increased to increase the depth of field.
And even if it is a region (out-of-focus region N1) that is blurred in the first image P1, once it is in focus, the depth of field becomes deeper as the number of continuous shots increases, Since the focus will not be lost in the future, the change in the difference in the pixel value of the corresponding pixel between the images in which the continuous shooting order is continuous becomes small. That is, the number of continuous shots required until the change in the difference in pixel value becomes smaller is smaller in the area where blur is smaller in the first image P1, and is larger in the area where blur is larger in the first image P1. Become more.
従って、連写枚数の増加に応じた各画素どうしの画素値の差分の変化に基づいて、一枚目の画像P1の非合焦領域N1におけるボケの大きさを特定することができ、当該ボケの大きさに応じてぼかし処理のぼかし度合いを調整することで、一枚目の画像P1における非合焦領域N1のボケを考慮して当該非合焦領域N1(主要被写体S以外の領域N2)をより自然にぼかしたぼかし画像Bを適正に生成することができる。
なお、ぼかし処理のぼかし度合いの調整は、三枚以上の連写画像間で対応する各画素の画素値の差分の変化に基づいて行うのではなく、当該連写画像間で対応する各画素の画素値の変化に基づいて行っても良い。
Therefore, the blur size in the non-focused area N1 of the first image P1 can be specified based on the change in the pixel value difference between the pixels in accordance with the increase in the number of continuous shots. By adjusting the degree of blurring in the blurring process according to the size of the image, the out-of-focus area N1 (area N2 other than the main subject S) is considered in consideration of the blur of the out-of-focus area N1 in the first image P1. Can be appropriately generated.
Note that the adjustment of the blurring degree of the blurring process is not performed based on the change in the pixel value difference of each pixel corresponding between three or more continuous shot images, but instead of each corresponding pixel between the continuous shot images. You may perform based on the change of a pixel value.
なお、上記実施形態にあっては、露出制御部2aは、一枚目の画像P1(図3(a)参照)の被写界深度が最も浅くなるように絞り値(AV値)を最も開放側に設定し、二枚目以降の画像(図3(b)参照)の連写が進むにつれて被写界深度が次第に深くなるように絞り値(AV値)を次第に絞っていくようにしたが、これに限られるものではない。例えば、露出制御部2aは、一枚目の画像P1の被写界深度が最も深くなるように絞り値(AV値)を設定し、二枚目以降の画像の連写が進むにつれて被写界深度が次第に浅くなるように絞り値(AV値)を次第に開放していくようにしても良い。 In the above-described embodiment, the exposure control unit 2a opens the aperture value (AV value) the most so that the depth of field of the first image P1 (see FIG. 3A) is the smallest. The aperture value (AV value) is gradually reduced so that the depth of field gradually increases as the continuous shooting of the second and subsequent images (see FIG. 3B) progresses. However, it is not limited to this. For example, the exposure control unit 2a sets the aperture value (AV value) so that the depth of field of the first image P1 is the deepest, and the field of view is increased as continuous shooting of the second and subsequent images proceeds. The aperture value (AV value) may be gradually opened so that the depth becomes gradually shallower.
また、二枚の連写画像P1、P2の撮像にて、画像の明るさを略等しくするとともに絞り値を互いに異ならせるようにしたが、これらの画像P1、P2の被写界深度を異ならせるために少なくとも絞り値を異ならせるようにすれば良く、必ずしも明るさを略等しくする必要はない。
即ち、絞り値を絞る方向に変化させ、且つ、連写画像P1、P2の明るさを所定の値に固定しようとすると、露光時間を長くするか、或いはISO感度を上げる必要があるが、露光時間を長くすると、手ぶれが生じ易くなってしまい、また、ISO感度を上げると、ノイズ量が増加してしまう虞がある。そこで、例えば、晴天の下で撮像する場合のように十分に明るい環境下では、絞り値を絞る方向に変化させても露光時間やISO感度を変化させないようにしても良い。
Further, in capturing the two continuous shot images P1 and P2, the brightness of the images is made substantially equal and the aperture values are made different from each other, but the depths of field of these images P1 and P2 are made different. Therefore, at least the aperture value may be changed, and the brightness does not necessarily have to be substantially equal.
That is, if the aperture value is changed in the direction of aperture reduction and the brightness of the continuous shot images P1 and P2 is fixed to a predetermined value, it is necessary to lengthen the exposure time or increase the ISO sensitivity. If the time is increased, camera shake tends to occur, and if the ISO sensitivity is increased, the amount of noise may increase. Therefore, for example, in a sufficiently bright environment as in the case of imaging in fine weather, the exposure time and ISO sensitivity may not be changed even if the aperture value is changed in the direction in which the aperture value is reduced.
さらに、上記実施形態にあっては、撮像装置100から主要被写体Sまでの距離を測距して、当該距離に応じてぼかし度合いを調整しても良い。即ち、主要被写体Sに合焦した状態で、フォーカスレンズの光軸方向の位置から主要被写体Sまでの距離を所定の換算手段(例えば、換算プログラムや換算テーブル等)を用いて算出して被写体距離情報を取得する。そして、当該被写体距離が近い程、主要被写体S以外の領域N2(非合焦領域N1)のぼかし度合いをより大きくするように調整することで、主要被写体S以外の領域N2をより自然にぼかしたぼかし画像Bを適正に生成することができる。 Furthermore, in the above embodiment, the distance from the imaging device 100 to the main subject S may be measured, and the blurring degree may be adjusted according to the distance. That is, in a state where the main subject S is in focus, the distance from the position in the optical axis direction of the focus lens to the main subject S is calculated using a predetermined conversion means (for example, a conversion program or a conversion table), and the subject distance Get information. Then, the region N2 other than the main subject S is more naturally blurred by adjusting the degree of blurring of the region N2 other than the main subject S (the out-of-focus region N1) to be larger as the subject distance is shorter. The blurred image B can be generated appropriately.
また、上記実施形態にあっては、二枚の連写画像P1、P2どうしの位置合わせを行うようにしたが、これら画像どうしP1、P2の位置合わせを行うか否かは適宜任意に変更することができる。即ち、例えば、三脚等を用いて撮像装置100を所定位置に固定した状態で撮像した場合のように二枚の連写画像P1、P2にぶれがほぼ生じない場合には、必ずしもこれら連写画像P1、P2の位置合わせを行う必要はない。 In the above embodiment, the two continuous shot images P1 and P2 are aligned. However, whether or not the images P1 and P2 are aligned is arbitrarily changed as appropriate. be able to. That is, for example, when there is almost no blurring in the two continuous shot images P1 and P2 as in the case where the imaging apparatus 100 is imaged in a fixed position using a tripod or the like, these continuous shot images are not necessarily provided. There is no need to align P1 and P2.
さらに、上記実施形態にあっては、二枚の連写画像P1、P2を処理対象としたが、これに限られるものではなく、少なくとも略等しい画角で撮像された被写界深度の異なる画像であれば、一枚目の画像P1と三枚目以降の画像とを処理対象としても良い。 Furthermore, in the above-described embodiment, the two continuous shot images P1 and P2 are targeted for processing. However, the present invention is not limited to this, and images with different depths of field captured at least at substantially the same angle of view. If so, the first image P1 and the third and subsequent images may be processed.
また、撮像装置100の構成は、上記実施形態に例示したものは一例であり、これに限られるものではない。
さらに、連写画像P1、P2の撮像は、当該撮像装置100とは異なる撮像装置にて行い、この撮像装置から転送された処理対象画像の画像データを取得して、ぼかし画像Bの生成を行う構成の画像処理装置(撮像装置100)であっても良い。
In addition, the configuration of the imaging apparatus 100 is merely an example illustrated in the above embodiment, and is not limited thereto.
Further, the continuous shot images P1 and P2 are picked up by an image pickup device different from the image pickup device 100, the image data of the processing target image transferred from the image pickup device is acquired, and the blurred image B is generated. An image processing apparatus (imaging apparatus 100) having a configuration may be used.
加えて、上記実施形態にあっては、取得手段、差分生成手段、画像生成手段としての機能を、位置合わせ部5の画像取得部5a、画像処理部6の差分生成部6a、ぼかし画像生成部6bが駆動することにより実現される構成としたが、これに限られるものではなく、中央制御部11のCPUによって所定のプログラム等が実行されることにより実現される構成としても良い。
即ち、プログラムを記憶するプログラムメモリ(図示略)に、取得処理ルーチン、差分生成処理ルーチン、画像生成処理ルーチンを含むプログラムを記憶しておく。そして、取得処理ルーチンにより中央制御部11のCPUを、略等しい画角で撮像された被写界深度の異なる少なくとも二つの画像P1、P2を取得する取得手段として機能させるようにしても良い。また、差分生成処理ルーチンにより中央制御部11のCPUを、取得手段により取得された少なくとも二つの画像P1、P2の間で対応する各画素の差分を生成する差分生成手段として機能させるようにしても良い。また、画像生成処理ルーチンにより中央制御部11のCPUを、差分生成手段により生成された各画素の差分に基づいて、少なくとも二つの画像P1、P2のうち、何れか一の画像に対してぼかし処理を施してぼかし画像Bを生成する画像生成手段として機能させるようにしても良い。
In addition, in the above-described embodiment, functions as an acquisition unit, a difference generation unit, and an image generation unit include an image acquisition unit 5a of the alignment unit 5, a difference generation unit 6a of the image processing unit 6, and a blurred image generation unit. The configuration realized by driving 6b is not limited to this, but may be realized by executing a predetermined program or the like by the CPU of the central control unit 11.
That is, a program including an acquisition processing routine, a difference generation processing routine, and an image generation processing routine is stored in a program memory (not shown) that stores the program. Then, the CPU of the central control unit 11 may function as an acquisition unit that acquires at least two images P1 and P2 with different depths of field, which are imaged at substantially the same angle of view, by an acquisition process routine. Further, the CPU of the central control unit 11 may function as a difference generation unit that generates a difference between corresponding pixels between at least two images P1 and P2 acquired by the acquisition unit by the difference generation processing routine. good. In addition, the CPU of the central control unit 11 performs the blurring process on any one of the at least two images P1 and P2 based on the difference of each pixel generated by the difference generation unit by the image generation processing routine. May be made to function as image generation means for generating the blurred image B.
100 撮像装置
1 撮像部
2 撮像制御部
5 位置合わせ部
5a 画像取得部
6 画像処理部
6a 差分生成部
6b ぼかし画像生成部
6c ぼかし度調整部
6d 周波数特性取得部
11 中央制御部
DESCRIPTION OF SYMBOLS 100 Imaging device 1 Imaging part 2 Imaging control part 5 Positioning part 5a Image acquisition part 6 Image processing part 6a Difference generation part 6b Blur image generation part 6c Blur degree adjustment part 6d Frequency characteristic acquisition part 11 Central control part
Claims (10)
この取得手段により取得された前記少なくとも二つの画像の間で対応する各画素の差分を生成する差分生成手段と、
この差分生成手段により生成された前記各画素の差分に基づいて、前記少なくとも二つの画像のうち、何れか一の画像に対してぼかし処理を施してぼかし画像を生成する画像生成手段と、
を備えることを特徴とする画像処理装置。 Obtaining means for obtaining at least two images with different depths of field, which are imaged at substantially the same angle of view;
A difference generating unit that generates a difference between corresponding pixels between the at least two images acquired by the acquiring unit;
Based on the difference between the pixels generated by the difference generation means, an image generation means for performing a blurring process on any one of the at least two images to generate a blurred image;
An image processing apparatus comprising:
前記少なくとも二つの画像のうち、被写界深度のより浅い方の画像の非合焦領域に対して前記ぼかし処理を施すことを特徴とする請求項1に記載の画像処理装置。 The image generating means includes
The image processing apparatus according to claim 1, wherein the blurring process is performed on an out-of-focus region of an image having a shallower depth of field among the at least two images.
前記画像生成手段は、
前記調整手段により調整された前記ぼかし度合いに基づいて、前記ぼかし処理を施すことを特徴とする請求項2に記載の画像処理装置。 An adjustment unit for adjusting a blurring degree of the blurring process based on the difference between the pixels generated by the difference generation unit;
The image generating means includes
The image processing apparatus according to claim 2, wherein the blurring process is performed based on the blurring degree adjusted by the adjusting unit.
前記差分生成手段は、
前記情報取得手段により取得された前記少なくとも二つの画像の間で対応する各画素の周波数成分情報の差分を生成することを特徴とする請求項3に記載の画像処理装置。 Further comprising information acquisition means for acquiring frequency component information of each pixel of the at least two images acquired by the acquisition means;
The difference generation means includes
The image processing apparatus according to claim 3, wherein a difference in frequency component information of each corresponding pixel between the at least two images acquired by the information acquisition unit is generated.
前記差分生成手段により生成された前記各画素の周波数成分情報の差分に基づいて、当該差分が大きくなるほど遮断周波数がより小さくなるようにローパスフィルタを設定する設定手段を備え、
前記画像生成手段は、
前記設定手段により設定された前記ローパスフィルタを用いて、前記ぼかし処理を施すことを特徴とする請求項4に記載の画像処理装置。 The adjusting means includes
Based on the difference between the frequency component information of each pixel generated by the difference generation means, the setting means for setting the low-pass filter so that the cutoff frequency becomes smaller as the difference becomes larger,
The image generating means includes
The image processing apparatus according to claim 4, wherein the blurring process is performed using the low-pass filter set by the setting unit.
前記差分生成手段は、前記取得手段により取得された前記三つ以上の画像のうち、取得順が連続する画像どうしの間で対応する各画素の差分をそれぞれ生成し、
前記調整手段は、
前記取得手段により取得された前記三つ以上の画像における、前記差分生成手段により生成された前記各画素の差分の変化に基づいて、前記ぼかし処理のぼかし度合いを調整することを特徴とする請求項3に記載の画像処理装置。 The acquisition means acquires three or more images in which the depth of field changes in a predetermined direction,
The difference generation unit generates a difference between pixels corresponding to each other between images in which the acquisition order is continuous among the three or more images acquired by the acquisition unit,
The adjusting means includes
The blurring degree of the blurring process is adjusted based on a change in the difference between the pixels generated by the difference generating unit in the three or more images acquired by the acquiring unit. The image processing apparatus according to 3.
前記差分生成手段は、
前記位置合わせ手段により位置合わせされた少なくとも二つの画像の間で対応する各画素の差分を生成することを特徴とする請求項1〜7の何れか一項に記載の画像処理装置。 An alignment means for aligning the at least two images;
The difference generation means includes
The image processing apparatus according to claim 1, wherein a difference of each corresponding pixel is generated between at least two images aligned by the alignment unit.
略等しい画角で撮像された被写界深度の異なる少なくとも二つの画像を取得するステップと、
取得された前記少なくとも二つの画像の間で対応する各画素の差分を生成するステップと、
生成された前記各画素の差分に基づいて、前記少なくとも二つの画像のうち、何れか一の画像に対してぼかし処理を施してぼかし画像を生成するステップと、
を実行させることを特徴とする画像処理方法。 An image processing method using an image processing apparatus,
Obtaining at least two images with different depths of field captured at substantially equal angles of view;
Generating corresponding pixel differences between the acquired at least two images;
Generating a blurred image by performing a blurring process on any one of the at least two images based on the generated difference between the pixels;
An image processing method characterized in that
略等しい画角で撮像された被写界深度の異なる少なくとも二つの画像を取得する取得手段、
この取得手段により取得された前記少なくとも二つの画像の間で対応する各画素の差分を生成する差分生成手段、
この差分生成手段により生成された前記各画素の差分に基づいて、前記少なくとも二つの画像のうち、何れか一の画像に対してぼかし処理を施してぼかし画像を生成する画像生成手段、
として機能させることを特徴とするプログラム。 The computer of the image processing device
Acquisition means for acquiring at least two images with different depths of field, which are imaged at substantially the same angle of view;
Difference generation means for generating a difference between corresponding pixels between the at least two images acquired by the acquisition means;
Based on the difference between the pixels generated by the difference generation unit, an image generation unit that generates a blurred image by performing a blurring process on any one of the at least two images;
A program characterized by functioning as
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009217609A JP2011066827A (en) | 2009-09-18 | 2009-09-18 | Image processing apparatus, image processing method and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009217609A JP2011066827A (en) | 2009-09-18 | 2009-09-18 | Image processing apparatus, image processing method and program |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2011066827A true JP2011066827A (en) | 2011-03-31 |
Family
ID=43952550
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2009217609A Pending JP2011066827A (en) | 2009-09-18 | 2009-09-18 | Image processing apparatus, image processing method and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2011066827A (en) |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2013005084A (en) * | 2011-06-14 | 2013-01-07 | Pentax Ricoh Imaging Co Ltd | Image processing apparatus and image processing method |
| WO2013061810A1 (en) * | 2011-10-26 | 2013-05-02 | アイキューブド研究所株式会社 | Image processing device, image processing method, and recording medium |
| JP2014036362A (en) * | 2012-08-09 | 2014-02-24 | Canon Inc | Imaging device, control method therefor, and control program |
| WO2014196166A1 (en) * | 2013-06-05 | 2014-12-11 | 株式会社デンソー | Image pickup control apparatus |
| JP2018022938A (en) * | 2016-08-01 | 2018-02-08 | キヤノン株式会社 | Imaging device, image processing apparatus, image processing method and image processing program |
| CN113658128A (en) * | 2021-08-13 | 2021-11-16 | Oppo广东移动通信有限公司 | Image blurring degree determining method, data set constructing method and deblurring method |
| CN114298896A (en) * | 2021-12-28 | 2022-04-08 | 维沃移动通信有限公司 | Image processing circuit, image processing method, and electronic device |
| JP7583924B2 (en) | 2022-03-16 | 2024-11-14 | グーグル エルエルシー | Selective Image Blur Using Machine Learning |
-
2009
- 2009-09-18 JP JP2009217609A patent/JP2011066827A/en active Pending
Cited By (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2013005084A (en) * | 2011-06-14 | 2013-01-07 | Pentax Ricoh Imaging Co Ltd | Image processing apparatus and image processing method |
| JPWO2013061810A1 (en) * | 2011-10-26 | 2015-04-02 | アイキューブド研究所株式会社 | Image processing apparatus, image processing method, and recording medium |
| CN103858421A (en) * | 2011-10-26 | 2014-06-11 | I<sup>3</sup>研究所股份有限公司 | Image processing device, image processing method, and recording medium |
| WO2013061810A1 (en) * | 2011-10-26 | 2013-05-02 | アイキューブド研究所株式会社 | Image processing device, image processing method, and recording medium |
| US9836812B2 (en) | 2011-10-26 | 2017-12-05 | I-Cubed Research Center Inc. | Image processing apparatus, method, and medium to apply a restrictive condition |
| KR101838342B1 (en) * | 2011-10-26 | 2018-03-13 | 아이큐브드 연구소 주식회사 | Image processing device, image processing method, and recording medium |
| CN103858421B (en) * | 2011-10-26 | 2018-07-20 | I<sup>3</sup>研究所股份有限公司 | Image processor and image treatment method |
| JP2014036362A (en) * | 2012-08-09 | 2014-02-24 | Canon Inc | Imaging device, control method therefor, and control program |
| WO2014196166A1 (en) * | 2013-06-05 | 2014-12-11 | 株式会社デンソー | Image pickup control apparatus |
| JP2014235410A (en) * | 2013-06-05 | 2014-12-15 | 株式会社デンソー | Image capture controller |
| JP2018022938A (en) * | 2016-08-01 | 2018-02-08 | キヤノン株式会社 | Imaging device, image processing apparatus, image processing method and image processing program |
| CN113658128A (en) * | 2021-08-13 | 2021-11-16 | Oppo广东移动通信有限公司 | Image blurring degree determining method, data set constructing method and deblurring method |
| CN114298896A (en) * | 2021-12-28 | 2022-04-08 | 维沃移动通信有限公司 | Image processing circuit, image processing method, and electronic device |
| JP7583924B2 (en) | 2022-03-16 | 2024-11-14 | グーグル エルエルシー | Selective Image Blur Using Machine Learning |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN101931752B (en) | Imaging apparatus and focusing method | |
| JP5507014B2 (en) | Moving object detection apparatus and method | |
| JP6157242B2 (en) | Image processing apparatus and image processing method | |
| CN103139485B (en) | Image synthesizer and image combining method | |
| US8472747B2 (en) | Image composition device, image composition method, and storage medium storing program | |
| JP5453573B2 (en) | Imaging apparatus, imaging method, and program | |
| JP2011066827A (en) | Image processing apparatus, image processing method and program | |
| JP4868046B2 (en) | Image processing apparatus, image processing method, and program | |
| WO2010073619A1 (en) | Image capture device | |
| JP2010279054A (en) | Imaging apparatus, image processing apparatus, imaging method, and image processing method | |
| JP2017216592A (en) | Imaging apparatus, control method, and program | |
| JP5267279B2 (en) | Image composition apparatus and program | |
| JP5673454B2 (en) | Image processing apparatus, image processing method, and program | |
| JP6024135B2 (en) | Subject tracking display control device, subject tracking display control method and program | |
| JP5636660B2 (en) | Image processing apparatus, image processing method, and program | |
| JP5494537B2 (en) | Image processing apparatus and program | |
| JP5644180B2 (en) | Imaging apparatus, imaging method, and program | |
| JP2010278701A (en) | Image composition apparatus, image composition method, and program | |
| JP5565227B2 (en) | Image processing apparatus, image processing method, and program | |
| JP6003974B2 (en) | Image processing apparatus, image processing method, and program | |
| KR20180028962A (en) | Method and Device for detecting image wobbling | |
| JP2009194469A (en) | Imaging device | |
| JP2011077820A (en) | Image synthesis device and method, and program | |
| JP2018151415A (en) | IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM | |
| JP5101399B2 (en) | Image capturing apparatus, image capturing apparatus control method, and program |